Text Generation
Transformers
Safetensors
English
Chinese
llama
chat
conversational
text-generation-inference
Instructions to use leafspark/magnum-72b-v1-llamaify with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use leafspark/magnum-72b-v1-llamaify with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="leafspark/magnum-72b-v1-llamaify") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("leafspark/magnum-72b-v1-llamaify") model = AutoModelForCausalLM.from_pretrained("leafspark/magnum-72b-v1-llamaify", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use leafspark/magnum-72b-v1-llamaify with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "leafspark/magnum-72b-v1-llamaify" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "leafspark/magnum-72b-v1-llamaify", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/leafspark/magnum-72b-v1-llamaify
- SGLang
How to use leafspark/magnum-72b-v1-llamaify with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "leafspark/magnum-72b-v1-llamaify" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "leafspark/magnum-72b-v1-llamaify", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "leafspark/magnum-72b-v1-llamaify" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "leafspark/magnum-72b-v1-llamaify", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use leafspark/magnum-72b-v1-llamaify with Docker Model Runner:
docker model run hf.co/leafspark/magnum-72b-v1-llamaify
model: add chunks 33-37
Browse files
model-00033-of-00038.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:77ccde7d3261bf0faad274c56ff872371e0c15de6949c8c566be41d1f34ed30f
|
| 3 |
+
size 3995216952
|
model-00034-of-00038.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:34729bb99f05afa1fdca1dc0865ea27740c7fb3f3d959c7683fe1e98636c9135
|
| 3 |
+
size 3995235608
|
model-00035-of-00038.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7688739785288dcd41887bdc330a5b26a97937b367055f59a55ad1f929a1f95a
|
| 3 |
+
size 3812816720
|
model-00036-of-00038.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3edb364c06b99bbbfb6e0744979ebce12517ccac70e43dd2e9fc4a1f0d3b3da7
|
| 3 |
+
size 3812802400
|
model-00037-of-00038.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:018c570cb9dbec2c43e96258b6064f3b51eec4e207b29581c42ac93a96b01046
|
| 3 |
+
size 3208747040
|