Instructions to use GEHIRNS/magi-1.0-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use GEHIRNS/magi-1.0-2B with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf GEHIRNS/magi-1.0-2B # Run inference directly in the terminal: llama cli -hf GEHIRNS/magi-1.0-2B
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf GEHIRNS/magi-1.0-2B # Run inference directly in the terminal: llama cli -hf GEHIRNS/magi-1.0-2B
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf GEHIRNS/magi-1.0-2B # Run inference directly in the terminal: ./build/bin/llama cli -hf GEHIRNS/magi-1.0-2B
Use Docker
docker model run hf.co/GEHIRNS/magi-1.0-2B
- Llama new
- LM Studio
- Jan
- vLLM
How to use GEHIRNS/magi-1.0-2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GEHIRNS/magi-1.0-2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GEHIRNS/magi-1.0-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GEHIRNS/magi-1.0-2B
- Ollama
How to use GEHIRNS/magi-1.0-2B with Ollama:
ollama run hf.co/GEHIRNS/magi-1.0-2B
- Unsloth Desktop
- Pi
How to use GEHIRNS/magi-1.0-2B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf GEHIRNS/magi-1.0-2B
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "GEHIRNS/magi-1.0-2B" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use GEHIRNS/magi-1.0-2B with Docker Model Runner:
docker model run hf.co/GEHIRNS/magi-1.0-2B
- Lemonade
How to use GEHIRNS/magi-1.0-2B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull GEHIRNS/magi-1.0-2B
Run and chat with the model
lemonade run user.magi-1.0-2B-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use GEHIRNS/magi-1.0-2B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf GEHIRNS/magi-1.0-2B
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 GEHIRNS/magi-1.0-2B
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use GEHIRNS/magi-1.0-2B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf GEHIRNS/magi-1.0-2B
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 "GEHIRNS/magi-1.0-2B" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Introduction
magi-1.0-2B is the magi-1.0 mixed-precision recipe applied to Qwen3.5-2B, with no training: 1.36 GiB at a 32K context, capability density ฯ = 1.071 against 0.903 for magi-1.0 (4B), measured under the same settings.
It is Qwen/Qwen3.5-2B quantized with magi-1.0's 13 tensor-class rules and the same quantizer, with an importance matrix computed on the 2B. Nothing else changes: the weights are the base model's, only stored at different precisions.
It scores 63.5%, 17.0 points below magi-1.0. Its main weakness is looping: under greedy decoding, 82% of its benchmark traces end in a repetition loop and run out the thinking budget (many still answer correctly after the cutoff). magi-1.1-2B is the same recipe plus a LoRA fine-tune aimed at these loops: it scores 66.1% (ฯ = 1.149) at the same file size and loops on 77% of traces. Use magi-1.1-2B unless you want the training-free model.
Capability density
Capability density is ฯ = โlogโ(1 โ score) / GiB: how many times the benchmark error rate is halved per gibibyte of memory. All three models here were measured the same way (llama.cpp, q4_0 KV cache, memory at a 32K context from llama-fit-params). The magi-1.0 card's chart used Ollama's memory figures, so its numbers are not comparable with these.
Benchmarks
Every column was run on one RTX 5070 (12 GB) with llama.cpp b11800 (llama-server) under one protocol:
- Tasks: 2,313, run with thinking on and a 4,096-token thinking budget (budget forcing), greedy decoding.
- Server: q4_0 KV cache with flash attention and micro-batch 128. Exception: magi-1.0's benchmark run used micro-batch 512. Its memory is shown at micro-batch 128, which passed a non-inferiority check on a 250-task sample.
- Code grading: by executing tests (EvalPlus for HumanEval+ and MBPP+). LiveCodeBench uses 150 problems from contests between 2025-01-18 and 2025-04-06.
Memory and ฯ. Memory is the resident size llama-fit-params projects for a 32K context with one sequence: weights, KV cache, recurrent state and compute buffers, GPU plus host, without the CUDA context. These sizes are measured differently from the Ollama figures on the magi-1.0 card, so compare ฯ only within this table.
| Benchmark | magi-1.0 (4B) 2.61 GiB | magi-1.0-2B 1.36 GiB | magi-1.1-2B 1.36 GiB |
|---|---|---|---|
| Efficiency | |||
| Memory at 32K (GiB) | 2.61 | 1.36 | 1.36 |
| Benchmark score | 80.49% | 63.48% | 66.06% |
| Capability density ฯ | 0.903 | 1.071 | 1.149 |
| Decode speed (tok/s) | 186 | 332 | 338 |
| Traces ending in a loop | 15.0% | 82.4% | 77.4% |
| Coding | |||
| HumanEval+ | 86.59 | 38.41 | 46.95 |
| MBPP+ | 70.43 | 41.35 | 44.61 |
| LiveCodeBench | 24.00 | 0.67 | 1.33 |
| Math | |||
| GSM8K | 86.00 | 70.00 | 78.00 |
| Science and Knowledge | |||
| ARC-Challenge | 97.33 | 89.33 | 93.33 |
| MMLU | 79.00 | 61.00 | 64.00 |
| OpenBookQA | 93.50 | 74.00 | 77.00 |
| SciQ | 97.00 | 92.00 | 94.00 |
| TruthfulQA | 75.50 | 74.50 | 77.50 |
| Commonsense | |||
| HellaSwag | 73.50 | 54.50 | 50.50 |
| WinoGrande | 83.00 | 66.00 | 65.50 |
| Tool Use | |||
| Function calling | 100.00 | 100.00 | 100.00 |
Largest gaps to magi-1.0: competitive programming and code (LiveCodeBench, HumanEval+, MBPP+). magi-1.0-2B hits the thinking budget on 85% of tasks, mostly because it loops.
Decode speed: single-stream generation speed (llama-bench, 128 tokens, q4_0 KV), on the same GPU.
Recipe
The same rules as magi-1.0, applied to Qwen3.5-2B's 24 layers (18 Gated DeltaNet, 6 full attention):
| Tensor group | Type | Share of parameters | bits/weight |
|---|---|---|---|
| FFN gate, up, down (all 24 layers) | IQ3_XXS | 48.1% | 3.06 |
| Token embedding = tied output head | Q4_K | 27.0% | 4.50 |
DeltaNet input projection attn_qkv (18) |
Q4_K | 12.0% | 4.50 |
| Full-attention q, k, v, output (6 layers) | Q4_K | 4.7% | 4.50 |
| Gated-attention output gate (18 DeltaNet layers) | IQ3_XXS | 4.0% | 3.06 |
DeltaNet output projection ssm_out (18) |
Q4_K | 4.0% | 4.50 |
DeltaNet gates ssm_alpha, ssm_beta |
Q8_0 | <0.1% | 8.50 |
| Norms, convolution, A, ฮt bias | F32 | <0.1% | 32.00 |
The quantizer is llama-quantize --pure from the PrismML-Eng/llama.cpp fork with magi-1.0's override file and base type IQ2_XXS. The importance matrix was computed on Qwen3.5-2B (BF16) from the same calibration text as magi-1.0: 32 reasoning traces for LiveCodeBench problems dated before the benchmark's contest window. File SHA-256: 94f4998fce4ecad4e7408d33dfe7a63814348feca1124be0aa21b7a15e439e9f.
How to run
llama.cpp (the evaluated configuration; uses the Qwen3.5 chat template embedded in the file):
llama-server -m magi-1.0-2B.gguf -c 32768 --jinja --flash-attn on --cache-type-k q4_0 --cache-type-v q4_0 -ub 128
Ollama:
ollama create magi-1.0-2B -f Modelfile
ollama run magi-1.0-2B
The benchmark used greedy decoding. For interactive use with thinking enabled, Qwen recommends temperature 0.6, top_p 0.95 and top_k 20, which also makes repetition loops much rarer.
Limitations
- Much weaker than magi-1.0 in absolute terms, most of all on code: LiveCodeBench 0.7%, against 24.0% for magi-1.0.
- Loops under greedy decoding: 82% of benchmark traces end in a repetition loop. Use sampling for interactive work, or magi-1.1-2B.
- Narrow evaluation: one runtime (llama.cpp b11800), one benchmark, one GPU, each configuration run once.
- The name is ours. "2B" follows Qwen's naming; the file holds 1,881,825,088 parameters. Text only: the base model's vision encoder is not included.
Related
- GEHIRNS/magi-1.0: the 4B model and the recipe this release reuses.
- GEHIRNS/magi-1.1-2B: this model plus a fine-tune that teaches it to finish its thinking.
- Paper on the recipe: Eason Sun, Where the Bits Go, Zenodo, 2026. DOI: 10.5281/zenodo.23630199.
License
The weights are Apache 2.0, inherited from Qwen/Qwen3.5-2B; the license text is included in this repository.
- Downloads last month
- -
We're not able to determine the quantization variants.

