Instructions to use RTorney/Inkling-2-Mini-Pi-GGUF 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 RTorney/Inkling-2-Mini-Pi-GGUF 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 RTorney/Inkling-2-Mini-Pi-GGUF # Run inference directly in the terminal: llama cli -hf RTorney/Inkling-2-Mini-Pi-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf RTorney/Inkling-2-Mini-Pi-GGUF # Run inference directly in the terminal: llama cli -hf RTorney/Inkling-2-Mini-Pi-GGUF
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 RTorney/Inkling-2-Mini-Pi-GGUF # Run inference directly in the terminal: ./build/bin/llama cli -hf RTorney/Inkling-2-Mini-Pi-GGUF
Use Docker
docker model run hf.co/RTorney/Inkling-2-Mini-Pi-GGUF
- Llama new
- LM Studio
- Jan
- Ollama
How to use RTorney/Inkling-2-Mini-Pi-GGUF with Ollama:
ollama run hf.co/RTorney/Inkling-2-Mini-Pi-GGUF
- Unsloth Desktop
- Pi
How to use RTorney/Inkling-2-Mini-Pi-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf RTorney/Inkling-2-Mini-Pi-GGUF
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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "RTorney/Inkling-2-Mini-Pi-GGUF" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use RTorney/Inkling-2-Mini-Pi-GGUF with Docker Model Runner:
docker model run hf.co/RTorney/Inkling-2-Mini-Pi-GGUF
- Lemonade
How to use RTorney/Inkling-2-Mini-Pi-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull RTorney/Inkling-2-Mini-Pi-GGUF
Run and chat with the model
lemonade run user.Inkling-2-Mini-Pi-GGUF-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use RTorney/Inkling-2-Mini-Pi-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf RTorney/Inkling-2-Mini-Pi-GGUF
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:9931/v1 hermes config set model.default RTorney/Inkling-2-Mini-Pi-GGUF
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use RTorney/Inkling-2-Mini-Pi-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf RTorney/Inkling-2-Mini-Pi-GGUF
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:9931/v1 \ --custom-model-id "RTorney/Inkling-2-Mini-Pi-GGUF" \ --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"
Inkling-2-Mini Pi GGUF
Quantized by Ruben Torney (RTorney).
A GGUF quant of Inkling-2-Mini built to run on a Raspberry Pi 5 (16 GB) with llama.cpp on the CPU. It is tuned for fewer bytes read per token rather than the smallest file, because on the Pi decode speed is set by memory bandwidth (~11 GB/s) and the whole model fits in RAM anyway.
| File | Size | Use |
|---|---|---|
Inkling-2-Mini-pi-speed-B.gguf |
11.55 GB | recommended: better quality than UD-Q2_K_XL, fewer bytes per token |
Inkling-2-Mini-pi-speed-Blite.gguf |
11.32 GB | speed variant: ~14 % fewer bytes per token than B, but lower quality than UD-Q2_K_XL |
Inkling-2-Mini-phone-P2.gguf |
8.93 GB | 1-bit experts, for phones (Termux) and RAM-tight devices; clearly lower quality |
Text only: the vision encoder (mmproj) is not included.
Quality (measured)
KL divergence against Unsloth's UD-Q8_K_XL, measured on a PC (RTX 3090) with llama-perplexity --kl-divergence: context 1024, 100 chunks, 51,200 scored tokens of code and technical notes, disjoint from the imatrix corpus.
| Quant | Size | Mean KLD | Median KLD | KLD p99 | Same top-1 | PPL |
|---|---|---|---|---|---|---|
| Unsloth UD-Q2_K_XL | 9.14 GB | 0.0439 | 0.0049 | 0.425 | 93.0 % | 3.100 |
| Pi speed B (this repo) | 11.55 GB | 0.0387 | 0.0039 | 0.387 | 93.3 % | 3.087 |
| Pi speed B-lite (this repo) | 11.32 GB | 0.0573 | 0.0064 | 0.549 | 91.9 % | 3.142 |
Phone P2 (1-bit experts), screening run on the first 25 of the same chunks (12,800 tokens):
| Quant | Size | Mean KLD | Median KLD | KLD p99 | Same top-1 | PPL |
|---|---|---|---|---|---|---|
| Phone P2 (this repo) | 8.93 GB | 0.0902 | 0.0114 | 0.850 | 90.0 % | 3.226 |
| Quant B, same 25 chunks | 11.55 GB | 0.0359 | 0.0051 | 0.324 | 93.5 % | 3.145 |
The reference PPL is 3.014. B-lite was measured with the experts of blocks 0โ9 on the CPU (VRAM budget), B fully on the GPU. Our evaluation text is easier than the one Unsloth publishes numbers on, so compare the two rows with each other, not with other model cards.
Bytes read per token (estimated)
The estimate is computed from the actual tensor composition, without the KV cache. It counts 8 of 128 experts, 48 layer applications (the 6โ17 core runs 3 times), the full head and one embedding row.
| Quant | Total | Experts | Attention | Head | Loop controllers | Ceiling at 11 GB/s |
|---|---|---|---|---|---|---|
| Unsloth UD-Q2_K_XL | 2.93 GB | 1.02 | 1.25 | 0.26 | 0.34 | ~3.8 tok/s |
| Pi speed B | 2.61 GB | 1.26 | 0.74 | 0.38 | 0.17 | ~4.2 tok/s |
| Pi speed B-lite | 2.24 GB | 1.26 | 0.57 | 0.26 | 0.09 | ~4.9 tok/s |
Not yet measured on a Raspberry Pi. Run scripts/pi-bench.sh to get real numbers.
Recipe
The quant was made with llama-quantize --pure --allow-requantize --imatrix from UD-Q8_K_XL, using the tensor types in recipe.txt:
| Tensors | Type |
|---|---|
| Expert gate_up, blocks 0โ19 | Q2_K |
| Expert gate_up, blocks 20โ23 | Q3_K |
| Expert down, blocks 0โ19 | NVFP4, as in the source, copied losslessly |
| Expert down, blocks 20โ23 | IQ4_NL |
| Attention (q/k/v/gate/output/rel) | Q4_K |
| Embedding | Q8_0 (one row read per token, so it costs RAM, not bandwidth) |
| Output head | Q6_K |
| Loop controllers, sink/conv projections | BF16, as in the source |
| Router, norms, conv | F32, as in the source |
Two choices drive the result:
- Down projections stay 4-bit. A 2-bit down (Q2_0) collapsed quality: mean KLD 0.156, 86.9 % top-1.
- Attention is Q4_K instead of Q8_0. Attention is read at each of the 48 applications per token, so this is where most of the bytes are saved.
Phone P2 is B's layout with all expert gate_up in 1-bit: IQ1_M in the looped core (blocks 6โ17, run 3 times per token), IQ1_S elsewhere; attention Q4_K, loop controllers Q8_0 (recipe-phone.txt). IQ1_M in the core beat every all-IQ1_S variant tried (KLD 0.090 vs 0.096โ0.105).
B-lite is B with attention in Q3_K, the output head in Q4_K and the loop controllers (blk.N.loop_*) in Q8_0; everything else is identical (recipe-Blite.txt for the per-tensor overrides; the head is converted to Q4_K at quantize time). Attention in Q3_K is what costs most of the quality.
Importance matrix:
- Corpus: 245,760 tokens of mixed code, chat-template text, English and French.
- Coverage: all 128 experts in all 24 blocks (6,144 / 6,144), at least 119 tokens per expert.
Run on a Raspberry Pi 5
Inkling-2-Mini needs Unsloth's llama.cpp fork. The scripts rebuild the exact source tree used here: upstream b12572 plus the 30 pinned commits in scripts/pins-b12572.txt, checked against scripts/mix-tree.txt.
./scripts/pi-setup.sh # clone + native build (NEON + dotprod, OpenMP)
./scripts/pi-run.sh ~/models/Inkling-2-Mini-pi-speed-B.gguf server # OpenAI-compatible server on :8080
./scripts/pi-bench.sh # llama-bench, prefill and decode
The scripts now use a q8_0 KV cache with flash attention by default (KV=f16 restores f16). On quant B this cost nothing measurable (KLD 0.0360 vs 0.0359 on 25 chunks) and halves the KV bytes read per token at long context. Prefill with a quantized KV is not yet measured on the Pi.
Recommended settings:
- 4 threads and
-lm mmap+mlock; raise the memlock limit first. - 8k context.
- Active cooling and the 27 W PSU, so the Pi does not throttle under 4-core load.
- No swap and no zram.
- On a GPU machine with experts kept on the CPU (
-ot), add--no-op-offload: without it this fork gives NaN perplexity and KLD. CPU-only runs, as on the Pi, should not be affected; this was not checked.
pi-run.sh listens on all interfaces without an API key. Keep it on a trusted network, or add --api-key.
Run on Android (Termux)
See termux/README-termux.md (in French): termux/setup.sh builds the same llama.cpp tree on the phone, termux/run.sh checks free RAM, pins the big cores and serves the chat UI on http://127.0.0.1:8080, termux/bench.sh runs llama-bench. Tested target: Galaxy S24 Ultra. Not yet measured on a phone.
Credits and license
- Base model: Inkling-2-Mini by Thinking Machines, Apache 2.0.
- Source GGUF: Unsloth's UD-Q8_K_XL; the llama.cpp support comes from Unsloth's fork.
- This quant: recipe, importance matrix, evaluation and Pi scripts by Ruben Torney. Apache 2.0, same as the base model.
- Downloads last month
- -
We're not able to determine the quantization variants.
Model tree for RTorney/Inkling-2-Mini-Pi-GGUF
Base model
thinkingmachines/Inkling-2-Mini