Instructions to use GEHIRNS/magi-1.0 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 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 # Run inference directly in the terminal: llama cli -hf GEHIRNS/magi-1.0
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 # Run inference directly in the terminal: llama cli -hf GEHIRNS/magi-1.0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf GEHIRNS/magi-1.0 # Run inference directly in the terminal: ./llama-cli -hf GEHIRNS/magi-1.0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf GEHIRNS/magi-1.0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf GEHIRNS/magi-1.0
Use Docker
docker model run hf.co/GEHIRNS/magi-1.0
- LM Studio
- Jan
- vLLM
How to use GEHIRNS/magi-1.0 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" # 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", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GEHIRNS/magi-1.0
- Ollama
How to use GEHIRNS/magi-1.0 with Ollama:
ollama run hf.co/GEHIRNS/magi-1.0
- Unsloth Desktop
- Pi
How to use GEHIRNS/magi-1.0 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
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" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use GEHIRNS/magi-1.0 with Docker Model Runner:
docker model run hf.co/GEHIRNS/magi-1.0
- Lemonade
How to use GEHIRNS/magi-1.0 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull GEHIRNS/magi-1.0
Run and chat with the model
lemonade run user.magi-1.0-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use GEHIRNS/magi-1.0 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
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
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use GEHIRNS/magi-1.0 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
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" \ --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"
Paper: Where the Bits Go (GEHIRNS, 2026), in preparation
Introduction
magi-1.0 is Qwen3.5-4B in 1.80 GiB. It keeps 96% of the full model's benchmark score in 30% of the GPU memory and decodes 2.7× faster, with no training: the bits are simply placed where the model needs them.
magi-1.0 stores Qwen/Qwen3.5-4B in a mixture of standard GGUF quantization types. Each tensor class gets the precision that its measured sensitivity calls for: more bits for the small attention and DeltaNet projections that break easily, fewer for the large FFN matrices that tolerate them. The weights are Qwen's own. The file averages 3.65 bits per weight and runs unmodified in llama.cpp and Ollama.
Capability density
Capability density is ID = −log₂(1 − score) / GiB: how many times the benchmark error rate is halved per gibibyte of GPU memory. Memory is the resident size that Ollama's /api/ps reports with a 32K context loaded (weights, KV cache, recurrent state and compute buffers, without the CUDA context, which is about 1.05 GiB for every model). magi-1.0 + q8 KV is magi-1.0 served with an 8-bit KV cache. The 95% intervals, from a suite-stratified bootstrap over tasks, are 0.856–0.934 for magi-1.0 + q8 KV, 0.768–0.835 for magi-1.0, 0.673–0.734 for Q4_K_M and 0.646–0.703 for Q2_K.
Unsloth's Q4_K_M matches BF16's accuracy (84.14%) and is 2.85 points more accurate than magi-1.0. It needs 0.76 GiB more memory, or 1.13 GiB more than magi-1.0 + q8 KV. If accuracy matters most, use Q4_K_M. If memory is the constraint, magi-1.0 gives you 14–27% more capability per GiB. Against the published Q2_K file, magi-1.0 is smaller and 4.2 points more accurate (paired 95% interval 2.8–5.6).
Benchmarks
All models were run on one RTX 5070 (12 GB) under the same protocol: thinking on with a 4,096-token budget (budget forcing), greedy decoding, 32K context, 2,313 tasks. Code is graded by executing tests (EvalPlus for HumanEval+ and MBPP+); LiveCodeBench uses 150 problems from contests between 2025-01-18 and 2025-04-06. Small numbers in the Ours columns are relative to BF16.
| Baselines | Ours | ||||
|---|---|---|---|---|---|
| Benchmark | BF16 8.98 GiB | Q4_K_M 3.78 GiB | Q2_K 3.15 GiB | magi-1.0 3.02 GiB | magi-1.0 + q8 KV 2.65 GiB |
| Efficiency | |||||
| GPU memory at 32K (GiB) | 8.98 | 3.78 | 3.15 | 3.023.0× less | 2.653.4× less |
| Benchmark score | 83.96% | 84.14% | 77.06% | 81.30%97% | 80.64%96% |
| Capability density | 0.294 | 0.703 | 0.675 | 0.8002.7× | 0.8933.0× |
| Decode speed (tok/s) | 66.3 | 146.6 | 165.5 | 180.02.7× | 181.42.7× |
| Traces ending in a loop | 3.4% | 3.3% | 33.3% | 9.4% | 9.1% |
| Coding | |||||
| HumanEval+ | 91.46 | 92.68 | 75.00 | 87.80 | 88.41 |
| MBPP+ | 72.18 | 73.68 | 58.90 | 68.42 | 67.92 |
| LiveCodeBench | 35.33 | 35.33 | 15.33 | 24.67 | 24.00 |
| Math | |||||
| GSM8K | 87.33 | 93.33 | 90.67 | 89.33 | 87.33 |
| Science and Knowledge | |||||
| ARC-Challenge | 98.67 | 98.67 | 97.33 | 97.33 | 98.00 |
| MMLU | 84.50 | 82.50 | 74.00 | 82.00 | 81.00 |
| OpenBookQA | 95.00 | 96.50 | 93.00 | 96.00 | 95.00 |
| SciQ | 98.00 | 98.50 | 96.00 | 96.00 | 97.00 |
| TruthfulQA | 82.50 | 82.00 | 73.00 | 79.50 | 76.00 |
| Commonsense | |||||
| HellaSwag | 75.50 | 72.00 | 71.50 | 72.00 | 69.00 |
| WinoGrande | 87.00 | 84.50 | 80.00 | 82.50 | 84.00 |
| Tool Use | |||||
| Function calling | 100.00 | 100.00 | 100.00 | 100.00 | 100.00 |
The largest gap to BF16 is competitive programming (LiveCodeBench). Most of magi-1.0's advantage over Q2_K comes from looping less: 337 of Q2_K's 575 failed tasks end with the reasoning stuck in a repetition loop, against 99 of magi-1.0's 463. Over the whole benchmark, a task takes magi-1.0 13.8 seconds on average, against 16.5 for Q4_K_M and 36.1 for BF16.
Recipe
| Tensor group | Type | Share of parameters | bits/weight |
|---|---|---|---|
| FFN gate, up, down (all 32 layers) | IQ3_XXS | 53.9% | 3.06 |
| Gated-attention output gate (24 DeltaNet layers) | IQ3_XXS | 6.0% | 3.06 |
DeltaNet input projection attn_qkv (24) | Q4_K | 12.0% | 4.50 |
DeltaNet output projection ssm_out (24) | Q4_K | 6.0% | 4.50 |
| Full-attention q, k, v, output (8 layers) | Q4_K | 7.0% | 4.50 |
| Token embedding = tied output head | Q4_K | 15.1% | 4.50 |
DeltaNet gates ssm_alpha, ssm_beta | Q8_0 | 0.1% | 8.50 |
| Norms, convolution, A, Δt bias | F32 | <0.1% | 32 |
Types were allocated greedily under a 1.80 GiB budget by the measured increase in greedy next-token disagreement with BF16 per gibibyte, scored on the model's own long reasoning traces and chat answers. The importance matrix comes from 32 of the model's own reasoning traces. At the same file size, this allocation disagrees with BF16 on 10.0% of tokens, against 14.3–17.5% for three random allocations of the same bytes.
How to run
llama.cpp (uses the Qwen3.5 chat template embedded in the file):
llama-server -m magi-1.0.gguf -c 32768 --jinja
# 8-bit KV cache (magi-1.0 + q8 KV, 2.65 GiB):
llama-server -m magi-1.0.gguf -c 32768 --jinja --flash-attn on --cache-type-k q8_0 --cache-type-v q8_0
Ollama (verified with Ollama 0.40.3, which picks up the embedded template):
ollama create magi-1.0 -f Modelfile
ollama run magi-1.0
For the 8-bit KV cache, start the server with OLLAMA_FLASH_ATTENTION=1 and OLLAMA_KV_CACHE_TYPE=q8_0. The benchmark used greedy decoding. For interactive use with thinking enabled, Qwen recommends temperature 0.6, top_p 0.95 and top_k 20.
Limitations
- Evaluated on one model family, one runtime (Ollama), one benchmark and one GPU; each configuration was run once.
- Below BF16 in accuracy, most clearly on LiveCodeBench (24.7% vs 35.3%). 9.4% of thinking traces end in a repetition loop, against BF16's 3.4%.
- Text only: the vision encoder of the base model is not included.
- The name is ours. magi-1.0 is not a fine-tune and contains no new training.
Related
- GEHIRNS/magi-beta-1: an alternative allocation with the full-attention k, v and output projections at Q6_K (80.65%, capability density 0.771), published for comparison.
- Paper: Where the Bits Go: Sensitivity-Allocated Mixed Precision Triples the Capability per Gigabyte of a 4B Hybrid Reasoning Model on a 12 GB Consumer GPU (GEHIRNS, 2026, in preparation).
License
Apache 2.0, inherited from Qwen/Qwen3.5-4B. The license text is included in this repository.
- Downloads last month
- -
We're not able to determine the quantization variants.

