Sushi Brings 1M-Token Qwen3.8 Inference to Apple Silicon Offline
A new Zig-based serving engine for Apple Silicon ships sub-4-bit quant packs that fit frontier models into 64GB and 96GB Macs.
Takeaways
- Sushi is a new Zig-based inference engine for Apple Silicon, forked from mlx-serve
- Ships 3bpw and 4bpw Qwen3.8-Flash-Next packs for 64GB and 96GB Macs
- Mixes EXL3 and affine quant formats, tuned for M5 Max-class chips
- MTP draft head and 8-bit KV cache are on by default for speculative decoding
- Supports up to 1M token context on 128GB Macs with disk prefix caching
- MIT licensed binary, serves OpenAI-style API on 127.0.0.1:12345 locally
Sushi is a local inference engine that packages two heavily quantized Qwen3.8-Flash-Next models for high-memory Apple Silicon Macs. Its custom weight formats reduce model memory enough to support long context windows without sending prompts or generated tokens to a cloud service.
Sushi began as a detached fork of ddalcu’s mlx-serve and now focuses on a small set of custom Sushi model packs. The engine is written in Zig and distributed under the MIT License. Its model packs use the Qwen Community License, whose terms apply separately from the engine license.
Quantization built around unified memory
Sushi combines EXL3 variable-bit quantization with affine quantization, which represents weights using low-bit integers plus scaling metadata. The project reports pack sizes in average bits per weight, or bpw. Lower bpw reduces memory use, usually with greater divergence from the original bf16 model.
Apple Silicon uses unified memory shared by the CPU and GPU. Model weights, attention caches, applications, and macOS all draw from that pool, so weight compression directly affects the context length a machine can serve. Sushi is tuned for M5 Max-class memory bandwidth, while other supported Apple Silicon chips should expect lower prefill and decoding throughput.
Two packs and an SSD fallback
The initial release provides two quantized packs on Hugging Face and an SSD-backed path for the original bf16 checkpoint:
| Execution path | Memory guidance | Tradeoff |
|---|---|---|
Qwen3.8-Flash-Next-Sushi-3bpw |
64 GB or more | Smallest weight footprint and greater quantization error |
Qwen3.8-Flash-Next-Sushi-4bpw |
96 GB or more | Larger weights and closer bf16 fidelity |
| bf16 expert streaming | Depends on context and available memory | Streams mixture-of-experts weights from SSD, reducing resident memory at the cost of disk I/O |
The memory recommendations cover the model packs, not every context configuration. Long contexts add a large KV cache, and macOS still needs operating headroom. The bf16 streaming mode serves the original Qwen3.8-Flash-Next checkpoint and targets machines that cannot keep all experts resident in unified memory.
A deliberately small serving surface
The project publishes a prebuilt macOS arm64 release tarball, avoiding a local compilation step. The server binds to 127.0.0.1:12345 by default and does not require an API key. That loopback address limits access to the local machine; deployments exposed through another interface need an authenticated proxy or another access-control layer.
- Platform: Apple Silicon Macs running the macOS arm64 build
- Model loading: the two Sushi packs or the supported bf16 streaming checkpoint
- Default address:
127.0.0.1:12345 - Authentication: none in the local server
- Integration: designed to operate as a guest engine within mlx-serve
The context window sets the memory bill
The recommended configuration enables multi-token prediction, or MTP, for speculative decoding. An MTP draft head proposes several tokens, which the main model verifies together. Sushi also supports an 8-bit KV cache, which stores the attention keys and values generated for earlier tokens and grows roughly linearly with context length.
With MTP enabled and --mtp-head-kv-quant applied, the documented KV cache footprint is 16,640 bytes per token. That flag keeps the draft head’s cache at 8 bits alongside the main cache.
| Loaded state or context | Sushi-3bpw | Sushi-4bpw |
|---|---|---|
| Weights loaded | 49.33 GiB | 63.68 GiB |
| 256,000 tokens | 53.4 GiB | 67.7 GiB |
| 512,000 tokens | 57.5 GiB | 71.8 GiB |
| 1 million tokens | 65.6 GiB | 79.9 GiB |
A 64 GB Mac cannot accommodate the reported 1-million-token configuration, and practical limits will be lower after reserving memory for macOS and other processes. Developers should select a context size from the complete machine budget rather than the weight size alone.
macOS also limits how much unified memory the GPU can wire. Sushi’s README provides iogpu.wired_limit_mb settings for 64, 96, and 128 GB machines. Raising that limit is required for the larger configurations and reduces the memory available to the rest of the system.
Flags that move speed and memory
The project’s recommended command enables MTP, an 8-bit KV cache, a 500,000-token context window, and memory-backed plus SSD-backed prefix caches:
./sushi-macos-arm64/sushi serve \
--model ~/.sushi/models/Qwen3.8-Flash-Next-Sushi-4bpw \
--mtp \
--kv-quant 8 \
--mtp-head-kv-quant \
--ctx-size 500000 \
--prefill-chunk 2048 \
--max-tokens 64000 \
--prefix-cache-disk 20GB \
--prefix-cache-entries 1 \
--prefix-cache-mem 2GB \
--temp 1
| Option | Effect | Operational tradeoff |
|---|---|---|
--ctx-size 500000 |
Allows up to 500,000 context tokens | Larger values increase KV cache memory |
--prefill-chunk 2048 |
Processes at most 2,048 prompt tokens per prefill step | A value of 4,096 can prefill faster but needs more peak memory |
--prefix-cache-mem 2GB |
Keeps reusable prompt prefixes in RAM | Consumes unified memory but avoids SSD reads |
--prefix-cache-disk 20GB |
Stores reusable prefixes on SSD | Saves prefill work for repeated prompts but adds disk use |
--prefix-cache-entries 1 |
Retains one conversation prefix | Shared agent servers may need four to eight entries |
--mtp-typical 0.2 |
Changes MTP acceptance during sampled decoding | The project reports a 15% to 20% speed increase for Sushi-4bpw at temperature 1.0, with a small quality cost |
--max-tokens 64000 |
Caps generated output | Higher limits permit longer runs and larger worst-case cache growth |
KLD puts bounds on the quality claim
The repository evaluates each quantized pack against the bf16 reference using Kullback-Leibler divergence, or KLD. Its test covers 16 prompts with up to 512 scored tokens per prompt, stopping at the first end-of-sequence token. Every pack uses the same Sushi build and an 8-bit KV cache.
KLD measures how far the quantized model’s next-token probability distribution drifts from the bf16 distribution. Lower values indicate closer reproduction of the reference model. Task accuracy still requires downstream benchmarks, and a 16-prompt sample provides limited evidence about behavior across domains.
The comparison also includes a variant with a 4-bit n-gram table, which ships with the 3bpw pack. Sushi keeps that table on SSD, preserving a reported loaded-weight footprint of 49.33 GiB.
Sushi’s niche in the Mac stack
Local Apple Silicon inference commonly runs through llama.cpp’s Metal backend or Apple’s MLX framework, while EXL3 has primarily targeted CUDA systems. Sushi brings EXL3-style variable-bit quantization into an MLX-adjacent server tuned for Apple’s unified-memory hardware.
Sushi currently serves a narrow workload: two custom Qwen packs and one bf16 expert-streaming path. Its guest-engine design lets mlx-serve continue handling routing while Sushi serves those supported models. The release is best suited to developers who already own a high-memory Mac, need long-context Qwen inference offline, and can tune context, cache, and wired-memory limits for a single machine.