Standalone Rust and Metal inference engine for Inkling-2-Mini (inkling2_loop) on Apple Silicon.
It maps the GGUF file directly into unified GPU memory with no copy, compiles its Metal shaders at startup, and has no external ML runtime dependencies.
Download the prebuilt Apple Silicon binary (no Rust required):
curl -L https://github.com/MrPrinceRawat/inkling-rs/releases/latest/download/inkling-rs-macos-arm64.tar.gz | tar -xz Or install from source with Cargo:
cargo install --git https://github.com/MrPrinceRawat/inkling-rs Download the model (Inkling-2-Mini-AD-Q4_K.gguf, 16.5 GB):
curl -L -o Inkling-2-Mini-AD-Q4_K.gguf \ https://huggingface.co/AtomicChat/Inkling-2-Mini-GGUF/resolve/main/Inkling-2-Mini-AD-Q4_K.gguf Start chatting:
./inkling-rs -m Inkling-2-Mini-AD-Q4_K.gguf --chat Requirements
macOS on Apple Silicon (Metal GPU with at least 1,024 threads per threadgroup and 16 KB pages)
Inkling-2-Mini-AD-Q4_K.gguf (16.5 GB)
Rust toolchain (cargo, edition 2021) only if building from source
Optional: dspark-Inkling-2-Mini-Q8_0.gguf (504 MB) for experimental speculative decoding
Single-turn generation:
./inkling-rs -m Inkling-2-Mini-AD-Q4_K.gguf -p "Write a short poem about the sea." -n 128 OpenAI-compatible HTTP server:
./inkling-rs -m Inkling-2-Mini-AD-Q4_K.gguf --serve 8080 Sampling and raw completion:
./inkling-rs -m Inkling-2-Mini-AD-Q4_K.gguf --exact -p "Hello" -n 128 CLI Flags
Set PROF=
PROF=gu ./target/release/inkling-rs -m /path/to/model.gguf -p "Hello" -n 64 Classes: gemv, head, single, post, attn, route, gu, dn, fout.
Reference fixtures in tests/ were captured from llama-server (llama.cpp b12608):
./target/release/inkling-rs -m /path/to/model.gguf --exact --toktest tests/tokenizer.json ./target/release/inkling-rs -m /path/to/model.gguf --exact --oracle tests/oracle_short.json ./target/release/inkling-rs -m /path/to/model.gguf --exact --oracle tests/oracle_long.json Fixture Coverage tests/tokenizer.json 8 strings (accents, Japanese, emoji, code, URLs) tests/oracle_short.json 21-token chat and 12-token raw (48 steps each) tests/oracle_long.json 1,718-token prompt (tests sliding-window wrap past 1,024) Architecture
Inkling-2-Mini is a 26.4 B-parameter looped Mixture-of-Experts model: 24 physical layers evaluated as 48 logical layers per token (layers 6 to 17 run 3 passes), 128 experts with top-8 routing, 24 query heads and 8 KV heads, depth-mixing attention residuals, static and dynamic causal convolutions, relative position bias, and attention sinks.
Fixed model geometry and quantization mix: Dimensions and tensor types (Q4_K expert gate/up, Q5_0 expert down, Q8_0 embeddings and dense layers, F32 routers, norms, and convolutions) are hardcoded for Inkling-2-Mini-AD-Q4_K.gguf.
Text only: Vision projectors (mmproj) are not implemented.
Experimental speculative decoding: --draft produces exact greedy tokens, but batched verification kernels do not yet use simdgroup_matrix, so single-token greedy decode is faster.











