Text Generation
Transformers
Safetensors
MLX
English
mistral
chat
mlx-my-repo
conversational
Eval Results (legacy)
text-generation-inference
6-bit
Instructions to use isv2lf/magnum-v4-12b-Q6-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use isv2lf/magnum-v4-12b-Q6-mlx with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="isv2lf/magnum-v4-12b-Q6-mlx") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("isv2lf/magnum-v4-12b-Q6-mlx") model = AutoModelForCausalLM.from_pretrained("isv2lf/magnum-v4-12b-Q6-mlx", 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]:])) - MLX
How to use isv2lf/magnum-v4-12b-Q6-mlx with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("isv2lf/magnum-v4-12b-Q6-mlx") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- vLLM
How to use isv2lf/magnum-v4-12b-Q6-mlx with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "isv2lf/magnum-v4-12b-Q6-mlx" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "isv2lf/magnum-v4-12b-Q6-mlx", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/isv2lf/magnum-v4-12b-Q6-mlx
- SGLang
How to use isv2lf/magnum-v4-12b-Q6-mlx 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 "isv2lf/magnum-v4-12b-Q6-mlx" \ --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": "isv2lf/magnum-v4-12b-Q6-mlx", "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 "isv2lf/magnum-v4-12b-Q6-mlx" \ --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": "isv2lf/magnum-v4-12b-Q6-mlx", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Pi
How to use isv2lf/magnum-v4-12b-Q6-mlx with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "isv2lf/magnum-v4-12b-Q6-mlx"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "isv2lf/magnum-v4-12b-Q6-mlx" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use isv2lf/magnum-v4-12b-Q6-mlx with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "isv2lf/magnum-v4-12b-Q6-mlx"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "isv2lf/magnum-v4-12b-Q6-mlx" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "isv2lf/magnum-v4-12b-Q6-mlx", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use isv2lf/magnum-v4-12b-Q6-mlx with Docker Model Runner:
docker model run hf.co/isv2lf/magnum-v4-12b-Q6-mlx
- Hermes Agent
How to use isv2lf/magnum-v4-12b-Q6-mlx with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "isv2lf/magnum-v4-12b-Q6-mlx"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default isv2lf/magnum-v4-12b-Q6-mlx
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use isv2lf/magnum-v4-12b-Q6-mlx with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "isv2lf/magnum-v4-12b-Q6-mlx"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "isv2lf/magnum-v4-12b-Q6-mlx" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
library_name: transformers
|
| 6 |
+
tags:
|
| 7 |
+
- chat
|
| 8 |
+
- mlx
|
| 9 |
+
- mlx-my-repo
|
| 10 |
+
pipeline_tag: text-generation
|
| 11 |
+
datasets:
|
| 12 |
+
- anthracite-org/c2_logs_32k_llama3_qwen2_v1.2_no_system
|
| 13 |
+
- anthracite-org/kalo-opus-instruct-22k-no-refusal-no-system
|
| 14 |
+
- anthracite-org/kalo-opus-instruct-3k-filtered-no-system
|
| 15 |
+
- anthracite-org/nopm_claude_writing_fixed
|
| 16 |
+
- anthracite-org/kalo_opus_misc_240827_no_system
|
| 17 |
+
- anthracite-org/kalo_misc_part2_no_system
|
| 18 |
+
base_model: anthracite-org/magnum-v4-12b
|
| 19 |
+
model-index:
|
| 20 |
+
- name: magnum-v4-12b
|
| 21 |
+
results:
|
| 22 |
+
- task:
|
| 23 |
+
type: text-generation
|
| 24 |
+
name: Text Generation
|
| 25 |
+
dataset:
|
| 26 |
+
name: IFEval (0-Shot)
|
| 27 |
+
type: HuggingFaceH4/ifeval
|
| 28 |
+
args:
|
| 29 |
+
num_few_shot: 0
|
| 30 |
+
metrics:
|
| 31 |
+
- type: inst_level_strict_acc and prompt_level_strict_acc
|
| 32 |
+
value: 33.93
|
| 33 |
+
name: strict accuracy
|
| 34 |
+
source:
|
| 35 |
+
url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=anthracite-org/magnum-v4-12b
|
| 36 |
+
name: Open LLM Leaderboard
|
| 37 |
+
- task:
|
| 38 |
+
type: text-generation
|
| 39 |
+
name: Text Generation
|
| 40 |
+
dataset:
|
| 41 |
+
name: BBH (3-Shot)
|
| 42 |
+
type: BBH
|
| 43 |
+
args:
|
| 44 |
+
num_few_shot: 3
|
| 45 |
+
metrics:
|
| 46 |
+
- type: acc_norm
|
| 47 |
+
value: 30.5
|
| 48 |
+
name: normalized accuracy
|
| 49 |
+
source:
|
| 50 |
+
url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=anthracite-org/magnum-v4-12b
|
| 51 |
+
name: Open LLM Leaderboard
|
| 52 |
+
- task:
|
| 53 |
+
type: text-generation
|
| 54 |
+
name: Text Generation
|
| 55 |
+
dataset:
|
| 56 |
+
name: MATH Lvl 5 (4-Shot)
|
| 57 |
+
type: hendrycks/competition_math
|
| 58 |
+
args:
|
| 59 |
+
num_few_shot: 4
|
| 60 |
+
metrics:
|
| 61 |
+
- type: exact_match
|
| 62 |
+
value: 9.82
|
| 63 |
+
name: exact match
|
| 64 |
+
source:
|
| 65 |
+
url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=anthracite-org/magnum-v4-12b
|
| 66 |
+
name: Open LLM Leaderboard
|
| 67 |
+
- task:
|
| 68 |
+
type: text-generation
|
| 69 |
+
name: Text Generation
|
| 70 |
+
dataset:
|
| 71 |
+
name: GPQA (0-shot)
|
| 72 |
+
type: Idavidrein/gpqa
|
| 73 |
+
args:
|
| 74 |
+
num_few_shot: 0
|
| 75 |
+
metrics:
|
| 76 |
+
- type: acc_norm
|
| 77 |
+
value: 6.15
|
| 78 |
+
name: acc_norm
|
| 79 |
+
source:
|
| 80 |
+
url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=anthracite-org/magnum-v4-12b
|
| 81 |
+
name: Open LLM Leaderboard
|
| 82 |
+
- task:
|
| 83 |
+
type: text-generation
|
| 84 |
+
name: Text Generation
|
| 85 |
+
dataset:
|
| 86 |
+
name: MuSR (0-shot)
|
| 87 |
+
type: TAUR-Lab/MuSR
|
| 88 |
+
args:
|
| 89 |
+
num_few_shot: 0
|
| 90 |
+
metrics:
|
| 91 |
+
- type: acc_norm
|
| 92 |
+
value: 10.36
|
| 93 |
+
name: acc_norm
|
| 94 |
+
source:
|
| 95 |
+
url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=anthracite-org/magnum-v4-12b
|
| 96 |
+
name: Open LLM Leaderboard
|
| 97 |
+
- task:
|
| 98 |
+
type: text-generation
|
| 99 |
+
name: Text Generation
|
| 100 |
+
dataset:
|
| 101 |
+
name: MMLU-PRO (5-shot)
|
| 102 |
+
type: TIGER-Lab/MMLU-Pro
|
| 103 |
+
config: main
|
| 104 |
+
split: test
|
| 105 |
+
args:
|
| 106 |
+
num_few_shot: 5
|
| 107 |
+
metrics:
|
| 108 |
+
- type: acc
|
| 109 |
+
value: 28.93
|
| 110 |
+
name: accuracy
|
| 111 |
+
source:
|
| 112 |
+
url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=anthracite-org/magnum-v4-12b
|
| 113 |
+
name: Open LLM Leaderboard
|
| 114 |
+
---
|
| 115 |
+
|
| 116 |
+
# isv2lf/magnum-v4-12b-Q6-mlx
|
| 117 |
+
|
| 118 |
+
The Model [isv2lf/magnum-v4-12b-Q6-mlx](https://huggingface.co/isv2lf/magnum-v4-12b-Q6-mlx) was converted to MLX format from [anthracite-org/magnum-v4-12b](https://huggingface.co/anthracite-org/magnum-v4-12b) using mlx-lm version **0.20.5**.
|
| 119 |
+
|
| 120 |
+
## Use with mlx
|
| 121 |
+
|
| 122 |
+
```bash
|
| 123 |
+
pip install mlx-lm
|
| 124 |
+
```
|
| 125 |
+
|
| 126 |
+
```python
|
| 127 |
+
from mlx_lm import load, generate
|
| 128 |
+
|
| 129 |
+
model, tokenizer = load("isv2lf/magnum-v4-12b-Q6-mlx")
|
| 130 |
+
|
| 131 |
+
prompt="hello"
|
| 132 |
+
|
| 133 |
+
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
|
| 134 |
+
messages = [{"role": "user", "content": prompt}]
|
| 135 |
+
prompt = tokenizer.apply_chat_template(
|
| 136 |
+
messages, tokenize=False, add_generation_prompt=True
|
| 137 |
+
)
|
| 138 |
+
|
| 139 |
+
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
| 140 |
+
```
|