Mirai Labs' Qwen3.8-27B Squeezes 128K Context Into 12 GB of VRAM
A community port brings Mirai Labs' 2.4-bit trellis-compressed Qwen3.8-27B to llama.cpp, fitting 128K context on a 12 GB RTX 3090.
- Community port of Mirai's 2.4-bit Qwen3.8-27B runs on llama.cpp fork with no requantization
- Fits 128K context on 12 GB VRAM with q4 KV cache, 40 tok/s decode
- 16 GB cards get 128K with q8 KV plus MTP speculative decoding at 85 tok/s on code
- On AppWorld, 2.4-bit scores 57.9% vs 55.8% for bf16 teacher, beating other 2-bit quants decisively
- GGUF on Hugging Face; needs the custom fork, CUDA only (Ampere tested)
- Vision works via base Qwen mmproj running on CPU at zero VRAM cost
A community port now runs Mirai Labs’ 2.4-bit Qwen3.8-27B build in llama.cpp. Its 12 GB configuration uses 7.8 GB of VRAM for the model and a 128K-token context window, while keeping the 2.5 GB token embedding in system memory. The Hugging Face checkpoint copies Mirai’s compressed codes unchanged into GGUF, avoiding another lossy quantization pass.
How 27 billion parameters fit
The port starts with Mirai Labs’ source checkpoint, which uses the Mirai S codec to store weights at 2.4 bits each. The compressed weights occupy 8.45 GB, compared with roughly 56 GB for BF16 weights and about 17 GB for a conventional 4-bit GGUF before allocating the key-value cache used to retain context.
The release contains two files. An 11.2 GB GGUF holds the language model and its multi-token prediction block, which can accelerate generation through speculative decoding. At runtime, 7.8 GB of that file goes to the GPU and the 2.5 GB F16 token embedding remains in system RAM. An optional 0.93 GB vision encoder comes from the base Qwen3.8-27B model because Mirai’s checkpoint includes only the language model.
RTX 3090 results, with caveats
The port’s published benchmarks used one RTX 3090 capped at 300 W, with available VRAM restricted in software to emulate smaller cards. The measurements therefore show memory feasibility on the tested GPU, while actual 12 GB and 16 GB cards may differ in memory bandwidth, compute throughput, and power limits.
| Profile | Context | KV cache | VRAM | Measured performance |
|---|---|---|---|---|
| 12 GB | 128K | q4_0 |
11.3 GB | 39.7 tok/s at shallow context, 34.6 tok/s at 62K, 30.4 tok/s at 117K, and 1,008 tok/s prefill |
| 12 GB | 74K | q8_0 |
11.1 GB | 40.0 tok/s decode |
| 16 GB with MTP |
This story is for Pro members
You've reached the end of the free preview. Upgrade to AlphaSignal Pro to read the full article - and everything else behind the paywall.