Ling-mini-2.0 (16B MoE): TV-box GGUF (Q2_K experts, 60K head)

This is the exact file that runs Ling-mini-2.0 at 5.1 tok/s in real chat on a Xiaomi TV Box S (3rd Gen). That box has 4ร— Cortex-A55 and 1 GB of usable RAM. Ling-mini-2.0 has 16.3 B parameters (1.4 B active) and 256 experts of ~1 MB each. They are paged from flash on demand.

From the ๐Ÿค smolmaxxing project. The full write-up is in EXPERIMENT.md ยง20.

โš ๏ธ This file needs the patched llama.cpp from the smolmaxxing repo. It has a pruned output head (60,000 of 157,184 vocabulary rows plus an output_ids tensor). Stock llama.cpp, LM Studio and Ollama will not load it. See Run.

The file

File lm2-q2-h60.gguf, 5.49 GB
SHA-256 c089aeb0e5989bf8ecf38eb74bc6bb781f0acbe1ccf326bc8c5b7838d8c2e8d7
Source bartowski/inclusionAI_Ling-mini-2.0-GGUF, Q4_K_M plus its imatrix
Experts Requantized to Q2_K with bartowski's imatrix
Everything else Q4_K, copied from the source
Output head 60,000 rows (data/head-ids-ling-60k.txt), chosen by token frequency on an English + multilingual corpus. Prompts can still use every token; the model can only generate tokens in the head.
Context 32,768 tokens in the metadata; run at 1,024 on the TV

Measured on the TV box

Setting Quality (bits/byte, lower is better) Real chat
Default: top-8 experts, pool 43, bias 0.3, prefetch, repeat penalty 1.054 5.1 tok/s (5.0 on ~600-word answers, 0/6 looped)
Top-6 experts, bias 0.25 1.090 5.3 tok/s
  • Quality is English perplexity on a fixed 22 KB text, converted to bits per byte so models with different tokenizers compare fairly.
  • Compared with smaller models: this model is bigger but not better. Moon-Beam-8B-A1B scores 0.996 at 7.2 tok/s on the same box, and Bonsai-8B 0.974.
  • RAM: ~1.13 GB RSS in headless mode. On flash: the GGUF plus a 5.3 GB repack cache.
  • Where the time goes: of a ~190 ms token, ~85 ms is spent waiting for expert reads from flash.

Next to the other sizes

Best model per size class on the TV box, first run to now, and where one Moon-Beam token's 144 ms go

This model is the 16B MoE row. The best file of every size class is in hyperionaidev. The scoreboard has the full table and the kernels and memory tricks behind each step.

Run

Build the patched llama.cpp first. It's llama.cpp at 8642541 with patches/llama.cpp-v0.8.0-tvbox.patch applied; Quick start has the exact steps. Then run:

# Low-RAM setup (what the TV runs): expert pager, cache-aware routing, warm start, pre-gated prefetch.
# moe-warm-ling.txt is in this repo. The repack cache is written on the first run.
GGML_MOE_PAGER=1 GGML_MOE_POOL=43 GGML_MOE_BIAS=0.3 LLAMA_MOE_USED=8 \
GGML_MOE_PREFETCH_K=6 GGML_MOE_PREFETCH_AHEAD=2 \
GGML_MOE_WARM=moe-warm-ling.txt GGML_REPACK_CACHE=cache/lmq2 \
llama-server -m lm2-q2-h60.gguf -t 3 -c 1024 -ub 4 -b 64 -ctk q8_0 -ctv q8_0 -fa on -cram 0 \
  --repeat-penalty 1.15 --repeat-last-n 256

On a machine with RAM to spare, drop the environment variables: the patched llama-server -m lm2-q2-h60.gguf loads every expert normally. On the TV box, MODEL=lm2-q2-h60.gguf tv-llm-ui/start.sh in the repo does all of this, including a headless mode that frees Android's RAM.

License and credits

Downloads last month
648
GGUF
Model size
16B params
Architecture
bailingmoe2
Hardware compatibility
Log In to add your hardware

We're not able to determine the quantization variants.

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for hyperionaidev/Ling-mini-2.0-tvbox-GGUF

Quantized
(21)
this model