Instructions to use ahtx/AH-Inkling-2-Mini 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 ahtx/AH-Inkling-2-Mini 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 ahtx/AH-Inkling-2-Mini:IQ2_M # Run inference directly in the terminal: llama cli -hf ahtx/AH-Inkling-2-Mini:IQ2_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf ahtx/AH-Inkling-2-Mini:IQ2_M # Run inference directly in the terminal: llama cli -hf ahtx/AH-Inkling-2-Mini:IQ2_M
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 ahtx/AH-Inkling-2-Mini:IQ2_M # Run inference directly in the terminal: ./build/bin/llama cli -hf ahtx/AH-Inkling-2-Mini:IQ2_M
Use Docker
docker model run hf.co/ahtx/AH-Inkling-2-Mini:IQ2_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use ahtx/AH-Inkling-2-Mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ahtx/AH-Inkling-2-Mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ahtx/AH-Inkling-2-Mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ahtx/AH-Inkling-2-Mini:IQ2_M
- Ollama
How to use ahtx/AH-Inkling-2-Mini with Ollama:
ollama run hf.co/ahtx/AH-Inkling-2-Mini:IQ2_M
- Unsloth Desktop
- Pi
How to use ahtx/AH-Inkling-2-Mini with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ahtx/AH-Inkling-2-Mini:IQ2_M
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": "ahtx/AH-Inkling-2-Mini:IQ2_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use ahtx/AH-Inkling-2-Mini with Docker Model Runner:
docker model run hf.co/ahtx/AH-Inkling-2-Mini:IQ2_M
- Lemonade
How to use ahtx/AH-Inkling-2-Mini with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ahtx/AH-Inkling-2-Mini:IQ2_M
Run and chat with the model
lemonade run user.AH-Inkling-2-Mini-IQ2_M
List all available models
lemonade list
- Hermes Agent
How to use ahtx/AH-Inkling-2-Mini with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ahtx/AH-Inkling-2-Mini:IQ2_M
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 ahtx/AH-Inkling-2-Mini:IQ2_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use ahtx/AH-Inkling-2-Mini with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ahtx/AH-Inkling-2-Mini:IQ2_M
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 "ahtx/AH-Inkling-2-Mini:IQ2_M" \ --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"
AH-Inkling-2-Mini
AH-Inkling-2-Mini is a modified (re-quantized) version of Inkling 2 Mini by Thinking Machines Lab. We changed only the number format of the weights. We did not train the model and we did not change its behaviour on purpose.
The file is 7.4 GiB (7,947,408,096 bytes). All 3,072 experts fit in the memory of one 8 GB GPU, so the full model runs on cards such as the GTX 1080 and the RTX 3080 without memory offload.
This file runs only in Kindi 0.7.1 or later. It uses two Kindi-specific GGUF tensor types (116 and 117). llama.cpp, Ollama, LM Studio and other GGUF runtimes cannot load it. For those runtimes, use the Unsloth GGUF files.
Demo videos and the full write-up: amirhusain.com/inkling
The model
Inkling 2 Mini is a mixture-of-experts model from Thinking Machines Lab. It has 24 layers. The middle 12 layers run three times with shared weights, so each token goes through 48 layer applications. Each layer routes every token to 8 of 128 experts. The model has 26.4B parameters in total, and Thinking Machines Lab gives 5.4B effective active parameters per token. The original model also accepts images. Kindi runs the text part only.
For the model's design, its intended uses, its limitations and the benchmarks of the full-precision model, read the original model card. Those benchmark numbers are for the original weights, not for this file.
What we changed
- The expert weights are stored in 2-bit formats (Kindi IQ2_XS_128 for the gate and up projections of the 12 looped layers, and Kindi IQ2_XXS_128 for all other experts).
- The attention projections and the output layer are stored in Q4_0. The loop-control weights are stored in Q8_0.
- The chat template, the tokenizer and the sampling values from the original model are kept in the file.
- The source of the conversion was Unsloth's UD-Q4_K_M file from unsloth/Inkling-2-Mini-GGUF. Kindi re-quantized it with an importance matrix that Kindi collected from the model on about 1,500 tokens of mixed text.
Quality
A 2-bit file loses some quality. We measured how much against Unsloth's UD-Q4_K_M file (16.6 GB), with the same engine (Kindi), on a CPU.
| File | Size | Math (12) | Code (12) | Instructions (8) | Total (32) |
|---|---|---|---|---|---|
| UD-Q4_K_M | 16.6 GB | 12 | 11 | 8 | 31 |
| AH-Inkling-2-Mini (IQ2_M) | 7.9 GB | 12 | 11 | 7 | 30 |
The task set has 32 short tasks: arithmetic and word problems (numeric answer), Python functions checked by hidden tests, and instructions with checkable rules. We used greedy decoding, one turn, the model's chat template with reasoning effort 0, and a limit of 800 new tokens. The IQ2_M file missed one extra task: it wrote "Rayleigh" with a capital letter in an answer that had to be all lowercase.
On 1,999 positions of plain text, compared with the Q4 file:
- the most likely next token is the same at 86.8% of positions;
- the mean KL divergence is 0.105 (median 0.037);
- the perplexity is 4.19 (Q4: 3.91), which is 7.2% higher.
This set is small. It shows that the 2-bit file does not collapse. It cannot show a difference of a few points. Use this file when the model must fit on an 8 GB card. Do not expect the same quality as a 4-bit or 8-bit file.
Speed
All numbers are from Kindi with this file, with all experts in GPU memory, and greedy decoding.
Benchmark: 512-token prompt, 128 generated tokens, context 2,048 (mean of 3 runs).
| GPU | Prompt (tokens/s) | Generation (tokens/s) |
|---|---|---|
| GTX 1080 8 GB | 121.3 | 21.5 |
| RTX 3080 10 GB | 523.2 | 29.4 |
Coding-agent sessions: opencode 1.19.5 with Kindi's OpenAI-compatible server, context 32,768, 8K to 30K tokens in use (four sessions).
| GPU | Prompt reading (tokens/s) | Generation (tokens/s) |
|---|---|---|
| RTX 3080 10 GB | 428 to 453 | 20.3 to 21.2 |
Largest context with all experts in GPU memory: 14,336 tokens on the GTX 1080 (8 GB) and 32,768 tokens on the RTX 3080 (10 GB). The opencode system prompt is about 8,000 tokens.
Agent demos
We gave opencode one prompt per session and did not help the model. On the RTX 3080, these four prompts passed on the first attempt. The table shows the recorded runs; for Plant Therapy, that is a second run of the same prompt (the first run also passed, but the photos that it linked from the web do not load offline).
| Task | Result | Time |
|---|---|---|
| A car in one HTML file with Three.js | A stylised red coupe with wheels, glass and lights, and orbit controls | 10 min 19 s |
| A floating island in snowy weather | Island with snow-capped trees, a meadow, falling snow and a slowly orbiting camera | 9 min 55 s |
| A space shooter in one HTML file | The game starts, the ship moves and shoots, the score, three lives and the game-over screen work | 6 min 29 s |
| A landing page for a SaaS called Plant Therapy | A complete single-file landing page with no external images and no JavaScript errors | 6 min 3 s |
We also asked for "an entire web based operating system with all the apps". The first result did not start. After two short follow-up messages in the same session ("It's stuck on the BOOTING screen and I can't click anything...", "Still can't click any icons or anything inside the windows."), 11 of its 12 apps worked with the mouse. The paint app cleared its canvas every second.
Run it
Install Kindi 0.7.1 or later:
curl -fsSL https://amirhusain.com/kindi/install.sh | bash
Download the file, build the Kindi pack and start the server:
hf download ahtx/AH-Inkling-2-Mini AH-Inkling-2-Mini-IQ2_M.gguf --local-dir ~/.kindi
kindi convert ~/.kindi/AH-Inkling-2-Mini-IQ2_M.gguf
kindi --ctx 14336 serve # 8 GB card; use --ctx 32768 on a 10 GB card
The server speaks the OpenAI chat API on http://127.0.0.1:8093/v1, with streaming, tool calls and a separate
reasoning field. For opencode, add a provider like this to opencode.json:
{
"provider": {
"kindi": {
"npm": "@ai-sdk/openai-compatible",
"options": { "baseURL": "http://127.0.0.1:8093/v1", "apiKey": "none" },
"models": {
"inkling-2-mini": { "tool_call": true, "reasoning": true, "limit": { "context": 14336, "output": 4096 },
"options": { "reasoningEffort": "low" } }
}
}
}
}
Sampling: the file carries the values that Thinking Machines Lab recommends (temperature 1.0, top-p 1.0, top-k off, min-p 0). A request can set other values.
Limitations
- This is a 2-bit quantization. It makes more mistakes than the original weights (see Quality).
- Kindi runs the text part only. Image input is not supported.
- Thinking Machines Lab lists these limitations for the model: reasoning can repeat itself in loops (set an output token limit), agentic tool use is less reliable than in larger models, quality is lower outside English, and the model can state wrong facts with confidence.
- The model writes a short thinking block before most answers, also at low reasoning effort. This uses time on long tasks.
Licence and use policy
Inkling 2 Mini is released by Thinking Machines Lab under the Apache License 2.0. This repository is a modified version of that model and is released under the same licence. A copy of the licence is in LICENSE, and the changes are listed in NOTICE.
The Thinking Machines Lab Model Acceptable Use Policy applies to the model weights and to any modified version, which includes this file. If you download or use this file, you must obey that policy. If you deploy the model in a product, the policy tells you to tell your users that they are talking to an AI.
Credits
- Thinking Machines Lab made and released Inkling 2 Mini.
- Unsloth made the GGUF conversion that we re-quantized.
- Kindi by Amir Husain runs the file.
- Downloads last month
- 993
2-bit
Model tree for ahtx/AH-Inkling-2-Mini
Base model
thinkingmachines/Inkling-2-Mini