(Attached screenshot: live run of `inkling2_mini_p2_looptop8.safetensors` loading in 7.45s*, generating* 1,031 tokens @ 52.09 tok/s*, and live `rocm-smi` mid-decode showing* 100% GPU busy***,*** 11.28 / 15.92 GiB VRAM (70.9%), 0% CPU offload*, and a unit-test-verified thread-safe O(1) TTL LRU cache.)*
Thinking Machines' new Inkling-2-Mini (26.4B total / 3.4Bβ5.4B active, 3-pass looped MoE) ships at 20.16 GB (NVFP4+MXFP8, 52.8 GB BF16) and recommends 32 GB+ VRAM β locking out 12 GB and 16 GB consumer GPUs.
I quantized 99.85% of the model (`26.35B / 26.39B` params) down to 10.87 GB (hybrid 2-bit/4-bit) and 8.83 GB (all-2-bit MoE) using my proprietary PRIME-Quant method, wrote fused pure-Triton decode kernels + a single HIP/CUDA-graph runner, and got it running 100% resident on a single 16 GB AMD RX 9060 XT at 52β57 tok/s ***(*47β49 tok/s at 16K context, zero offload).
Both checkpoints, the standalone read-only Triton inference runner, and every raw benchmark JSON/test file are live on Hugging Face so you can verify everything yourself:
Hugging Face: https://huggingface.co/batteryphil/Inkling-2-Mini-PRIME-Quant
---
| Checkpoint | Size / Resident VRAM | Compression vs BF16 | Mean KLD (`1,849` toks) | PPL (`BF16 = 2.1416`) | Top-1 Agree (All / Python / C++) | Decode (`4K` / `16K` ctx) | Fits 100% On |
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| Official Unquantized BF16 (24-core Xeon + GPU) | 52.8 GB (12.1G GPU + 40.7G RAM) | 1.00Γ | 0.0000 | 2.1416 | 100% | 2.62 tok/s (offload) | 64 GB+ |
| Official NVFP4 + MXFP8 | 20.16 GB | 2.62Γ | β | β | β | OOM on 16 GB | 24β32 GB+ |
| `loop_top8` (16 MoE 2-bit + top-8 looped MoE 4-bit) β | 10.87 GB | 4.86Γ | 0.0542 | 2.1542 (+0.0059 loss) | 93.35% / 97.50% / 97.61% | 52β54 / 48.6 tok/s | 16 GB GPUs (up to 16K ctx) |
| `maxcomp` (all 24 MoE banks 2-bit) | 8.83 GB | 5.98Γ | 0.1138 | 2.2143 (+0.0334 loss) | 91.35% / 95.39% / 96.90% | 56.2β57.8 tok/s | 12 GB & 16 GB GPUs |
Exact parameter breakdown: `99.85%` quantized (2-bit/4-bit); only `0.15%` (`124.6 MB`: rank-64 looped `message_gate`, MoE routers, short-conv/sink/norms) stays BF16/FP32.
---
Raw JSONs are in `benchmarks/kld_looptop8.json` and `benchmarks/kld_p2_maxcomp.json` in the HF repo.
| Domain (`n_tokens`) | BF16 Ref PPL | `maxcomp` (`8.83 GB`) PPL / KLD / Top-1 | `loop_top8` (`10.87 GB`) PPL / KLD / Top-1 |
| :--- | :---: | :---: | :---: |
| `python_code` (521) | 1.3042 | 1.3034 / 0.0409 / 95.39% | 1.3190 / 0.0217 / 97.50% |
| `systems_cpp` (419) | 1.2216 | 1.2724 / 0.0337 / 96.90% | 1.2525 / 0.0181 / 97.61% |
| `math_reasoning` (390) | 1.7601 | 1.9600 / 0.1382 / 91.03% | 1.8209 / 0.0437 / 93.59% |
| `technical_prose` (216) | 6.9495 | 8.3906 / 0.2283 / 77.31% | 7.6525 / 0.1021 / 83.33% |
| `inkling_chat_tool` (303) | 6.0739 | 5.3638 / 0.2372 / 87.13% | 5.3300 / 0.1395 / 87.13% |
| Overall (1,849) | 2.1416 | 2.2143 / 0.1138 / 91.35% | 2.1542 / 0.0542 / 93.35% |
Because Inkling-2-Mini loops layers `6..17` 3 times per token (48 logical passes), quantization error in the hottest looped layers compounds 3Γ. Promoting just those top-8 sensitive looped/boundary MoE layers (`L5, 8, 9, 11, 12, 14, 15, 16`) to 4-bit while keeping the other 16 MoE banks at 2-bit cuts KL divergence in half (`0.1138 β 0.0542`) for only `+2.04 GB` VRAM and `-3.6%` speed.
---
Perplexity alone doesn't prove a 2-bit quant holds up on hard multi-step code. I ran a strict head-to-head test (identical prompts, official `temp=1.0, top_p=1.0`, identical RNG seeds `701β703`) building a 2-module reactive spreadsheet formula compiler + incremental DAG engine (`benchmarks/test_spreadsheet_engine.py`):
- Stage A (`formula_parser.py`, 6 tests): No `eval`/`exec`, reversed multi-letter 2D ranges (`AB2:Z1`), right-assoc power & unary binding (`2^3^2 == 512`, `-2^2 == -4`, `2^-3 == 0.125`, `--5 + +-3 == 2`), non-chaining comparisons, strict short-circuit `IF()`, and empty-vs-explicit-zero aggregates.
- Stage B (`spreadsheet_engine.py`, 15 tests): Iterative 3-color DFS cycle detection + transactional rollback (including cycles hidden inside 2D ranges), atomic `batch_update` dependency swap (`A1 β B1`), error propagation & self-healing, and incremental Kahn topological recalc over a 40-layer diamond DAG (`2^40` paths) next to 1,000 unrelated cells in `< 0.2s`*.*
| Metric (same `4,500`-tok budget, same seeds) | `PRIME-Quant loop_top8` (`10.87 GB`) | Official Unquantized BF16 (`52.8 GB`) |
| :--- | :---: | :---: |
| Load time | 7.6 s | 75.8 s |
| Decode speed | 46.9 β 49.3 tok/s | 2.57 β 2.62 tok/s (18.6Γ slower) |
| Stage A (`formula_parser.py`) | 6/6 PASS (Iter 3, 5.3 min) | 4/6 FAIL (3 iters truncated @ 4,500, 92.5 min) |
| Stage B (Full 15-test DAG suite) | 14/15 PASS (93.3%) (8.4 min) | Stopped after Stage A |
Honest caveat: BF16's parser logic wasn't broken β Inkling-2's tokenizer averages only `~2.64β2.87 chars/tok` on Python (`11.5β14.7 tok/line`), so a 340-line class AST + 900 thinking tokens needs `~5,000` tokens. Both models truncated at `4,500` tokens on early turns; `loop_top8` converged to a leaner 230-line dict AST that fit cleanly, then cleared `14/15` on Stage B (missing only `test_08` due to an eager upstream-error check before short-circuit `IF`).
After updating the runner to `16K` context + `8,192` token budget + fixing a subtle post-answer `<|content_thinking|>` rewrite edge case:
- Truncation rate dropped to 0/6 turns (`100%` clean `finish=stop`).
- Stage A solved 6/6 on Iteration 2 (335-line class AST, `4,381` tokens).
- Peak VRAM at `ctx=16384`***:*** `12.08β15.67 GB` (100% on the 16 GB RX 9060 XT) at `46.8β49.2 tok/s`*.*
All generated code + the 15-test pytest suite are in the HF `benchmarks/` folder so you can run `pytest` on them in 0.2s.
---
Zero custom HIP/CUDA C++ extensions to compile β everything runs in pure Triton (AMD ROCm & NVIDIA CUDA):
- L0-cached 4-float LUT 2-bit MoE GEMV: `300.7 GB/s` achieved out of `320 GB/s` theoretical peak on RDNA4.
- Parallel-K FP32 MoE `down_proj` + fused SoftcappedSwiGLU (`1.54Γ` faster than 2-pass).
- Fused Triton Inkling-2 decode ops across all 48 looped passes: 4-tap static/dynamic short convs (`192` calls/tok), rank-64 `message_gate` (`96` calls/tok), single-pass `AttnRes` (`120` calls/tok), single-CTA `router_topk` (`4.25Γ` faster), `unweighted_rmsnorm` (`8.06Γ` faster), and ring-buffer GQA + RelPosBias + per-head sink decode attention (`48` calls/tok).
- Chunked prefill attention (`Q_CHUNK=128`) & `AttnRes` (`T=512`): cuts 16K prefill activation VRAM by ~80Γ (`2+ GB β ~25 MB`).
- Single HIP/CUDA Graph replay: verified `24/24` exact greedy token parity vs eager `model.generate()`.
---
```bash
huggingface-cli download batteryphil/Inkling-2-Mini-PRIME-Quant --local-dir ./Inkling-2-Mini-PRIME-Quant
cd ./Inkling-2-Mini-PRIME-Quant
pip install -r requirements.txt # requires transformers >= 5.24.0
TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 python run_inkling2_prime.py \
--checkpoint ./inkling2_mini_p2_looptop8.safetensors \
--max-cache-len 16384 --max-new-tokens 8192 --max-thinking-tokens 900 \
--interactive
python run_inkling2_prime.py \
--checkpoint ./inkling2_mini_p2_maxcomp.safetensors \
--max-cache-len 4096 --max-new-tokens 2048 --max-thinking-tokens 600 \
--interactive