hello folks! i'm danny, cofounder of atomic chat
inkling 2 mini dropped last week, so we made our own quants for it (AtomicChat/Inkling-2-Mini-GGUF) and tried running them on the macs we had: an m3 pro 18gb, an m4 max 48gb and an m5 max 64gb
on llama.cpp it didn't go great. on the m3 pro our 16.5gb AD-Q4_K just didn't load with default flags (metal oom) and the only thing that worked was --fit pushing most experts to cpu at ~4 tok/s. on the two max machines it ran, but at ~33-38 tok/s, which felt slow for a moe with ~3b active
we also run these models on the same laptops we work on and it's really annoying when one eats all the ram and everything else starts freezing. so the first thing we wanted was a flag that caps the model at ~8gb (feels like a sane amount to give it) and we started from there
the model itself looks really strong on benchmarks for its size, so we wanted it faster too. that's how we ended up building our own inference engine on top of llama.cpp (atomic engine). you give it a budget with --engine-budget-mib. the core layers stay in ram and the moe expert stream from ssd when a token needs them, so memory stays under that cap. we also added dspark drafting, where a small draft model guesses a few tokens ahead and inkling checks them in one pass
once atomic engine was working we started running benchmarks on our macs. on the m3 pro the 8gb cap let our 16.5gb AD-Q4_K load and it runs at ~10 tok/s. not fast, but it runs
on the m5 max memory isn't the problem, so there we looked at speed with our smaller AD-IQ2_M (8.7gb) next to llama.cpp on the same gguf
setup:
m5 max 64gb, one engine running at a time
atomic engine e110381 vs llama.cpp b12600 (official macos build, whole model on gpu, no drafter)
AD-IQ2_M with an 18gb budget, AD-Q4_K with an 8gb budget
dspark draft from AtomicChat, q8_0, 0.5gb
-c 4096, flash attention on, q4_0 kv cache, --no-warmup
prompts of 2k and 3.6k tokens, 512 tokens out, temp 0
fresh server per test, numbers are from the first cold request. two warm repeats after it landed within 0.5%
tok/s from llama-server's own timings, memory is peak rss
| quant | prompt | atomic | llama.cpp |
|---|
| AD-IQ2_M | summarize llama.cpp docs | 84 tok/s | 40 tok/s |
| AD-IQ2_M | continue a doc already in the prompt | 122 tok/s | 40 tok/s |
| AD-IQ2_M | repeated log (copy test) | 143 tok/s | 40 tok/s |
| AD-Q4_K | summarize llama.cpp docs | 43 tok/s | 38 tok/s |
122 and 143 are copy-heavy prompts where any drafter looks great, so expect around 84 on normal prompts. on those two the output was byte-identical to llama.cpp
on the m5 max, AD-Q4_K with the 8gb cap peaks at 6.3gib of ram while llama.cpp sits at 15.8gib
prefill on AD-Q4_K at 8gb is still slower (556 vs 812 tok/s) and with long prompts at 8gb decode drops below stock too. llama.cpp ran without a drafter because b12600 wouldn't load the unsloth dspark draft for inkling. we've only tested on metal so far
engine: https://github.com/AtomicBot-ai/atomic-engine/tree/codex/expert-weight-source#run-inkling-2-mini-on-apple-silicon
gguf: https://huggingface.co/AtomicChat/Inkling-2-Mini-GGUF