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 23-27
Browse files
model-00023-of-00038.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b0abb51ae0aff394c07e4c50c3ca16a9cef3c424b6edf6ff2550cb3191e5f9dd
|
| 3 |
+
size 3995216952
|
model-00024-of-00038.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:281eb1094c52973c4062be3cde74c742b32731ad703389661969535b1a35aa58
|
| 3 |
+
size 3995235608
|
model-00025-of-00038.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cb5f0ed0d93d7927c1879cd234bbd0665f543c799d360f0143052bce8ade0718
|
| 3 |
+
size 3812816720
|
model-00026-of-00038.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eb058c9bcd0891d84181b4d5435e9768a7ba1b7c94f8b2234c754e4176e16889
|
| 3 |
+
size 3812802400
|
model-00027-of-00038.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:23c14166e0595c1585e0bf4de06ff1646df6250b07d1db3b1e188cc41c3dcebb
|
| 3 |
+
size 3693189296
|