Skip to content

About

SSD-based expert streaming inference engine built on llama.cpp. Supports accelerated token generation, MoE models, an OpenAI-compatible API, and a built-in web chat interface for running AI models locally.

Topics

Resources

Contributing

Security policy

Stars

721 stars

Watchers

10 watching

Forks

 
 

Latest commit

 

History

12,634 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Atomic Engine

Developer Preview

Local AI should leave room for the rest of your work. Atomic Engine builds on llama.cpp to run a model within a memory budget you set. Model weights, session state, and compute buffers share that budget. The engine streams expert weights from the original GGUF as needed. On supported configurations, lowering the budget frees cached weights while keeping the session alive. On Apple Silicon, Inkling 2 Mini runs through the same core layers several times, so Atomic Engine prioritizes keeping their expert weights in memory.

Run Inkling 2 Mini on Apple Silicon

The memory-budgeted Metal example below uses the IQ2_M model and a small DSpark draft model. DSpark proposes tokens and Inkling checks them. With a 14 GiB budget plus 100 MiB for the attention cache, this pair generated 105.71 tokens/s on a 48 GB M4 Max in the archive benchmark below. For a fully resident model, see Run Inkling with DFlash2.

1. Build Atomic Engine

You need the Xcode command line tools, CMake and the Hugging Face CLI (hf). From a fresh checkout (use branch codex/inkling-rtx-spark for the PR #105 preview):

git clone --branch engine-development https://github.com/AtomicBot-ai/atomic-engine.git
cd atomic-engine
cmake -S . -B build-metal \
  -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF \
  -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_TOOLS=ON \
  -DLLAMA_BUILD_EXAMPLES=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_BUILD_APP=OFF \
  -DLLAMA_BUILD_UI=OFF -DLLAMA_OPENSSL=OFF \
  -DGGML_METAL=ON -DGGML_METAL_EMBED_LIBRARY=ON -DGGML_BLAS=OFF -DGGML_CCACHE=OFF
cmake --build build-metal --target llama-server -j 6

2. Download the Inkling weights

Run both commands from the repository root. The IQ2_M model is 8.67 GB and the Q8_0 draft is 504 MB. Both files come from the same AtomicChat model revision.

hf download AtomicChat/Inkling-2-Mini-GGUF Inkling-2-Mini-AD-IQ2_M.gguf \
  --revision 309509848b3151419aa26d069eb03db57fd29a00 --local-dir .work/models
hf download AtomicChat/Inkling-2-Mini-GGUF dspark-Inkling-2-Mini-Q8_0.gguf \
  --revision 309509848b3151419aa26d069eb03db57fd29a00 --local-dir .work/models/atomicchat-dspark-3095098

3. Start the server

./build-metal/bin/llama-server \
  -m .work/models/Inkling-2-Mini-AD-IQ2_M.gguf \
  -md .work/models/atomicchat-dspark-3095098/dspark-Inkling-2-Mini-Q8_0.gguf \
  --spec-type draft-dspark --engine-budget-mib 14436 \
  -fit off -c 4096 -b 1024 -ub 1024 -np 1 \
  -fa on -ctk q4_0 -ctv q4_0 -ctkd q4_0 -ctvd q4_0 -ngl all -ngld 99 -t 8 -tb 8 \
  --temp 0 --cache-ram 0 --ctx-checkpoints 0 --no-warmup --metrics \
  --alias inkling-2-mini --host 127.0.0.1 --port 8080

4. Send a message

In a second terminal:

curl -sS http://127.0.0.1:8080/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"inkling-2-mini","messages":[{"role":"user","content":"Why does ice float?"}]}'
Run Inkling with a 4 GiB engine budget

Download just the IQ2_M file in step 2 and use this command in step 3. The engine reads expert weights from SSD as the model selects them. On an M4 Max, a 912-token prompt took 3.60 s to first token and the reply streamed at 18.26 tokens/s. Allow additional memory for macOS and the host process.

./build-metal/bin/llama-server \
  -m .work/models/Inkling-2-Mini-AD-IQ2_M.gguf \
  --engine-budget-mib 4096 -fit off -c 1024 -b 1024 -ub 256 -np 1 \
  -fa on -ctk q4_0 -ctv q4_0 -ngl all -t 8 -tb 8 \
  --cache-ram 0 --ctx-checkpoints 0 --no-warmup --metrics \
  --alias inkling-2-mini --host 127.0.0.1 --port 8080

Run Inkling with DFlash2

On Apple Silicon, pass the Inkling target and DFlash2 draft GGUFs to the Metal server. The example uses the fully resident AD-Q4_K target and a BF16 draft. To prepare those files from the repository root, install the converter's Python dependencies in your virtual environment:

python -m pip install -r requirements/requirements-convert_hf_to_gguf.txt
hf download AtomicChat/Inkling-2-Mini-GGUF Inkling-2-Mini-AD-Q4_K.gguf --local-dir .work/models
hf download incoai/Inkling-2-Mini-DFlash2 config.json model.safetensors \
  --revision 4f9088ea --local-dir .work/dflash2-source
hf download thinkingmachines/Inkling-2-Mini config.json tokenizer.json tokenizer_config.json \
  --local-dir .work/inkling-tokenizer
python convert_hf_to_gguf.py .work/dflash2-source --target-model-dir .work/inkling-tokenizer \
  --outtype bf16 --outfile .work/models/inkling-dflash2-bf16.gguf
./build-metal/bin/llama-server -c 4096 \
  -m .work/models/Inkling-2-Mini-AD-Q4_K.gguf \
  -md .work/models/inkling-dflash2-bf16.gguf

The server detects the DFlash2 selector from its GGUF. With automatic parallelism it selects one slot for this pair. At positive temperature the draft samples from its full eight-position block and the target verifies up to four proposals by rejection sampling. Look for Metal DFlash2 uses eight draft positions for four proposals in the startup log.

An explicit proposal count, greedy draft sampling or a multi-slot configuration takes precedence. For the previous Metal defaults, set LLAMA_EXPERIMENTAL_METAL_DFLASH2_NATIVE_BLOCK=0. The budgeted DSpark example above uses its own draft and settings.

On a 48 GB M4 Max, the automatic profile generated 50.82 tokens/s on Lunch and 59.09 on Sky, or 54.94 tokens/s pooled. The previous explicit fast profile measured 54.41 tokens/s pooled in the same run. Both produced identical chat responses and proposal counts for each prompt at seeds 42 and 43. These 4K-context figures use a 192-token output limit and exclude the warm-up.

CUDA profiles

The qualified Windows ARM64 RTX Spark profile uses the same four-proposal DFlash2 policy under its shared memory budget. The Linux Ada profile supports single-slot Inkling DFlash2 with --spec-type draft-dflash2 -np 1. On a GeForce RTX 4070 Laptop with 8 GiB, the measured setup kept MoE experts on the CPU with --cpu-moe --no-op-offload and offloaded the draft to CUDA. Across Lunch and Sky the change from seven proposals to the combined defaults raised Spark decode throughput from 55.07 to 58.40 tokens/s and the laptop from 13.00 to 15.54. Upstream target-only decoding on that laptop reached 19.34 tokens/s with the same CPU expert placement. Measurements and hardware configurations

Inkling 2 Mini benchmarks

Apple M4 Max, 48 GB unified memory. Each run used the same 4,000-token archive excerpt and generated 64 tokens with the model already loaded. The figure shows time to first token and generation speed at each memory budget. Strata used its own SQ-10 weights and FP16 attention cache.

Inkling IQ2_M, IQ3_S and Q4_K with the Q8_0 DSpark draft, compared with stock inference and Strata

IQ2_M with fused attention on and off

Inkling 2 Mini on Apple M4 Max, TTFT and decode at 8 to 20 GiB plus KV

Timings and output token IDs · Benchmark script

Credits

Atomic Engine builds on llama.cpp and ggml. Thank you to their maintainers and contributors for the GGUF tooling, inference runtime and hardware backends this project uses. llama.cpp · ggml

Thank you to Tom (@TheTom) for the TurboQuant implementation, reference kernels and backend ports that Atomic Engine’s KV cache and weight compression build on. Tom’s TurboQuant project

About

SSD-based expert streaming inference engine built on llama.cpp. Supports accelerated token generation, MoE models, an OpenAI-compatible API, and a built-in web chat interface for running AI models locally.

Topics

Resources

Contributing

Security policy

Stars

721 stars

Watchers

10 watching

Forks

Releases

Packages

Contributors

Languages