Hy4-flash, streaming EXL3 packs of turboderp's quants, for mlx-serve
This is the repo's main card, dated 2026-12-03. "We" are OpensourceWTF, who made the repacks. Every measurement on it is ours, unless it names turboderp. We ran mlx-serve on Apple M5 Max Macs with 128 GB, and exllamav3 on an NVIDIA GPU.
This repo holds three of turboderp's EXL3 quantizations of Tencent's Hy4-flash, one in each branch, repacked for mlx-serve on Apple silicon. The packs run only on Macs with an M5-class GPU. The repack moved tensors into new files and decoded three tensor groups to fp16. It kept every weight value that exllamav3 uses. Two mlx-serve plugins run the packs, with two profiles: the default, and fast prefill (lossy, opt-in), which is faster and changes the output.
No branch holds the Engram table file ngram_embedding.safetensors (64.7 GB). You download it from turboderp's repo.
It is the same file for all three branches. The Engram file gives the command.
The video shows Hy4-flash sc_2.00bpw on mlx-serve writing three voxel scenes from fixed prompts, with thinking on
and one attempt each, after the speed cards.
What each part is, and who made it
- Hy4-flash is Tencent's mixture-of-experts language model: 220B parameters in total, of which 64B are in its Engram lookup tables, and about 12B active per token. It has a context of 1M tokens. It includes DFly2, a 0.85B-parameter draft model for speculative decoding, and a vision encoder for images. The Tencent Hy Team made it: tencent/Hy4-flash.
- The quantizations are turboderp's. He made them with exllamav3, his inference library for NVIDIA GPUs, in its EXL3 format. He publishes them in turboderp/Hy4-flash-exl3. Please credit turboderp when you use them.
- The repacks are ours. We did not quantize again.
- mlx-serve is an open-source server that runs language models on Apple silicon through an OpenAI-compatible HTTP API. ddalcu maintains it.
- Two plugins add this model to mlx-serve. A plugin is a library that you build and install apart from the server.
The model plugin
hy4fruns the model. The quant pluginturboexl3_hy4fruns the EXL3 weights on the Metal kernels of turboexl3. Both are in review for CommunityServe/plugins (CommunityServe/plugins#58 forturboexl3_hy4fand CommunityServe/plugins#59 forhy4f).
Status. The plugins are in review in CommunityServe/plugins. They need three mlx-serve changes, which are in two
open pull requests: ddalcu/mlx-serve#1332, and
ddalcu/mlx-serve#1344, which is stacked on #1332 and holds the
memory admission change that the plugins' memory bill uses. Until they merge, build mlx-serve from the commit that we
measured, as How to download and run shows. sc_2.00bpw has the full results on this
card. sc_2.50bpw and sc_3.00bpw have the repack proofs, the distance from exllamav3 and the load memory. Speed and
evals for sc_2.50bpw and sc_3.00bpw: in progress on the same stack.
Branches
Each pack is a branch. main holds only this card and the license.
| Branch | Source | Routed experts | Attention | bits |
Branch size | With the Engram file | Results |
|---|---|---|---|---|---|---|---|
sc_2.00bpw |
turboderp's sc_2.00bpw, commit dc1f8bf9 |
K2 | K6 | 2.14 | 46.32 GB | 111.0 GB | Speed, memory, code evals and quality, on this card |
sc_2.50bpw |
turboderp's sc_2.50bpw, commit 68885ada |
K2.5 | K6 | 2.62 | 55.60 GB | 120.3 GB | Quality and load memory, on the branch card. Speed and evals: in progress |
sc_3.00bpw |
turboderp's sc_3.00bpw, commit 62e2c722 |
K3 | K7 | 3.14 | 65.63 GB | 130.3 GB | Quality and load memory, on the branch card. Speed and evals: in progress |
We checked every branch file by file (name, size and sha256) against the pack folder that we uploaded.
- The branch names are turboderp's. "2.00 bpw" (bits per weight) is his name for the size. Each pack's
config.jsongives the average asbits. - "SC" is turboderp's self-calibrated series. Its bits per weight differ by layer and tensor type. "Routed experts" gives the rate K (bits per weight) of the routed experts in every layer. "Attention" gives the rate of the attention, latent, shared-expert and indexer weights.
- All three packs use the MUL1 codebook. A codebook turns the stored EXL3 codes into weight values.
- "Branch size" is the size of the pack files in the branch, without the card and the video. "With the Engram file" adds the 64.7 GB Engram table file, which you download from turboderp. 1 GB is 10^9 bytes, and 1 GiB is 2^30 bytes.
- turboderp also publishes
sc_3.50bpwandsc_4.00bpw. We did not repack them.
The Engram file
Hy4-flash has Engram lookup tables: 4 layers read rows from a large table by n-gram hash. turboderp stores them in
ngram_embedding.safetensors (64,680,645,120 bytes), at 8 bits (EXL3 trellis form, K 8). His sc_2.00bpw,
sc_2.50bpw and sc_3.00bpw branches hold the same file, byte for byte (Git LFS sha256
879a78da57fffaf3b2f87aba44eb69859d84adfea1d4f75ae51b97fc8a8e0f10). The repack does not change it. Our branches do
not hold it, so download it from his repo into the pack folder:
hf download turboderp/Hy4-flash-exl3 --revision sc_2.00bpw --include ngram_embedding.safetensors --local-dir <the pack folder>
The command is the same for every branch here: any of his three branches gives the same file. If you keep two packs on
one volume, one copy can serve both, for example as a hard link (ln). Each branch's REPACK-SHA256SUMS lists the
file, so the check in Download and check a branch covers it. The server keeps the
table on the SSD and reads its rows as it needs them.
Related repositories
| Repo | What it holds |
|---|---|
| turboderp/Hy4-flash-exl3 | turboderp's EXL3 quantizations, one branch per size, made with exllamav3. It is the source of every branch here and of the Engram file. |
| tencent/Hy4-flash | Tencent's original model and its license. |
| ddalcu/mlx-serve | The server. The packs need #1332 and #1344; we measured davidtai/mlx-serve 3ad7a395d. |
| CommunityServe/plugins#58, #59 | The turboexl3_hy4f and hy4f plugins, in review. The install steps build them from davidtai/plugins c83bc47d (branch hy4f-release). |
| davidtai/turboexl3 | The Metal kernels for EXL3 weights. The plugins pin commit d5920c6. |
| OpensourceWTF/Hy4-flash-exl3 | Our own EXL3 quantizations of Hy4-flash, for exllamav3, with another codebook (MCG). They are not branches here, and this card gives no results for them. |
Why a repack, and what it changed
hy4f reads the draft model and the vision tower from their own files. It also reads three tensor groups as plain
tensors (ordinary fp16 numbers) and not in EXL3 form: the token embedding, the indexer's query projection and the
draft model's linears. turboderp's branches store these parts differently, so we rearranged his files once for each
branch, with one tool and the same steps. Every other tensor keeps turboderp's stored bytes. These files are byte for
byte his: config.json, quantization_config.json, generation_config.json, processor_config.json, the tokenizer
files, the chat template and LICENSE. The Engram file is also his, unchanged, and you download it from his repo.
exllamav3 also loads each repacked folder. On a 3,348-token prompt, its forward pass gives byte-identical logits from our pack and from turboderp's branch, at every position. This holds for all three branches.
The changes and checks in detail
| Change | What the repack did |
|---|---|
| File layout | It moved the draft model tensors (model.dfly_layers.*) to dfly.safetensors and the vision tower tensors (vit.*) to vision.safetensors, as stored. It wrote the text tensors into new model shard files, as many as turboderp's branch has: 6 for sc_2.00bpw, 7 for sc_2.50bpw and 9 for sc_3.00bpw. |
| Engram tensors split | exllamav3 stacks some Engram tensors into one tensor at load, and turboderp stores them stacked. The repack splits each one back into its parts, in exllamav3's stacking order. The rows do not change. |
| Three groups decoded to fp16 | It decoded the token embedding, the compressed indexer's query projection (12 layers) and the draft model's 44 EXL3 linears. Each decoded weight is the fp16 weight that exllamav3's own forward pass multiplies by. For the draft model's kv_a_proj_with_mqa, the repack keeps the first 576 of the 640 stored outputs, the ones exllamav3 uses. |
| dtype | It stores small plain tensors as BF16 where BF16 holds exactly the same value as turboderp's F16 or F32. |
The checks:
- In each branch, the repack tool wrote a proof line for every output tensor, and none failed. A copied tensor has the sha256 of its source. A split tensor, stacked again, has the sha256 of its source. A BF16 tensor, widened back to its source dtype, has the sha256 of its source.
- Each decoded tensor is bit for bit the weight that exllamav3's forward pass uses. We checked this on an NVIDIA GPU
with exllamav3
devat2d79ab55. quantization_config.jsonis turboderp's file, unchanged. mlx-serve and exllamav3 both load each pack with it.
Each branch card lists each file and its status.
How to download and run
Requirements
- A Mac with an M5-class chip. We tested only the M5 Max. Its GPU has Apple's Neural Accelerators, which MLX calls NAX.
On any other GPU,
turboexl3_hy4frefuses the pack withturboexl3_hy4f: an M5-class GPU (NAX) is needed (turboexl3's prompt kernels run on its matrix units). - Memory: on our 128 GB Mac, the server used up to 63.7 GB with
sc_2.00bpwat a 16K-token prompt and 81.0 GB at a 256K-token prompt (see Memory per prompt size). The larger branches need more: each branch card gives its load memory. On a Mac with 96 GiB of RAM or more,hy4fkeeps some decoded weights in memory to process prompts faster (see The default profile). That adds 7.25 GB. Below 96 GiB it is off. The Engram table stays on the SSD, and the server reads its rows as it needs them. We tested only 128 GB, and we do not know the smallest Mac that works. - macOS 26.2 or later, Xcode 26.2 or later with its Metal Toolchain component, and Homebrew, to build mlx-serve. These
come from mlx-serve's
docs/building.md. Ifxcrun -sdk macosx metal --versionfails, runxcodebuild -downloadComponent MetalToolchainfirst. - Free disk on the internal SSD for the pack: 111.0 GB for
sc_2.00bpw, 120.3 GB forsc_2.50bpwor 130.3 GB forsc_3.00bpw, each with the Engram file. Add space for the mlx-serve build. The server reads Engram rows from the SSD while it runs, so the SSD's speed affects token speed. We did not test external drives. - The Hugging Face CLI
hf(pip install -U huggingface_hub).
The packs serve text only. hy4f does not run the vision tower. For exllamav3, use turboderp's own branches.
Download and check a branch
The steps from here on use sc_2.00bpw, the branch that we measured in full. For another branch, change B.
B=sc_2.00bpw
hf download OpensourceWTF/Hy4-Flash-streaming-repack-exl3 --revision $B --local-dir ~/models/Hy4-flash-$B
hf download turboderp/Hy4-flash-exl3 --revision $B --include ngram_embedding.safetensors --local-dir ~/models/Hy4-flash-$B
cd ~/models/Hy4-flash-$B
shasum -a 256 -c REPACK-SHA256SUMS
The second hf download gets the Engram file from turboderp (see The Engram file). Each line of
the check must end with OK. REPACK-SHA256SUMS lists every pack file, the Engram file too: 18 files for
sc_2.00bpw, 19 for sc_2.50bpw and 21 for sc_3.00bpw. It does not list README.md or the files in assets/.
To check only the Engram file, run grep ngram_embedding REPACK-SHA256SUMS | shasum -a 256 -c -.
Build mlx-serve and its plugin kit
Run every block from here on in one terminal session, in order. The later blocks use MLXS and PATH from this one.
These are the server-only steps of mlx-serve's docs/building.md, plus the plugin kit. The commit is the one that we
measured: pull request #1344 with the memory admission change merged in.
git clone https://github.com/davidtai/mlx-serve && cd mlx-serve
git checkout 3ad7a395d
git submodule update --init --recursive
brew bundle install --file=Brewfile
./scripts/fetch-zig.sh && export PATH="$PWD/.zig-toolchain:$PATH"
./scripts/fetch-llama.sh && ./scripts/build-mlx.sh
zig build -Doptimize=ReleaseFast
zig build kit -Dversion=26.11.3
export PATH="$PWD/zig-out/bin:$PATH"
MLXS="$PWD"
cd ..
Build and install the two plugins
Build both plugins against the kit of the same mlx-serve checkout. The server refuses a plugin that was built against another MLX.
git clone https://github.com/davidtai/plugins && cd plugins
git checkout c83bc47d00401634fc2158ccff658a0af6254135
MLX_SERVE_KIT="$MLXS/zig-out/kit/mlx-serve-plugin-kit-26.11.3" scripts/install.sh turboexl3_hy4f
MLX_SERVE_KIT="$MLXS/zig-out/kit/mlx-serve-plugin-kit-26.11.3" scripts/install.sh hy4f
printf '{"disabled": [], "enabled": true}\n' > ~/.mlx-serve/plugins.json
The printf line turns plugins on. mlx-serve loads no plugin unless ~/.mlx-serve/plugins.json holds
"enabled": true. The line replaces any file that is there.
Start the server
We used these settings on a 128 GB Mac:
MLX_SERVE_GPU_CEILING_MB=112640 MLX_SERVE_CACHE_LIMIT=2147483648 \
mlx-serve --model ~/models/Hy4-flash-sc_2.00bpw --serve --host 127.0.0.1 --port 8080 --ctx-size 32768 --wired-margin-gib 2
For another branch, change the folder in --model.
| Setting | What it does |
|---|---|
MLX_SERVE_GPU_CEILING_MB=112640 |
Sets the server's memory ceiling to 110 GiB, the limit it plans against. Set it only on a 128 GB Mac. On other Macs, leave it unset, and the server uses its default ceiling. |
MLX_SERVE_CACHE_LIMIT=2147483648 |
Caps MLX's buffer cache at 2 GiB. |
--ctx-size 32768 |
The longest context that the server plans for, prompt and output together. The default is the model's 1,048,576 tokens. We used 32,768 for the code evals, and the prompt size plus 16,387 for each sweep run. |
--wired-margin-gib 2 |
How far under the GPU's wired memory limit (iogpu.wired_limit_mb) the server may plan. The default is 8 GiB. It has an effect only if you raised that limit. |
When the pack loads, the log shows [plugin] hy4f serves hy_v4_flash, and /v1/models shows "plugin": "hy4f".
On a Mac with 96 GiB or more, the log also shows a line that starts with hy4f: resident W_hat engaged.
The server uses the pack's DFly2 draft model for speculative decoding, for greedy and for sampled requests. In each round, the draft model proposes 5 tokens, and the main model checks them in one pass. It is on by default.
Send a request
curl -s 127.0.0.1:8080/v1/chat/completions -H 'Content-Type: application/json' -d '{
"messages": [{"role": "user", "content": "Write a Python function that reverses a string."}],
"temperature": 0.9, "top_p": 1.0, "max_tokens": 16384,
"reasoning_effort": "high"
}'
"reasoning_effort": "high" turns thinking on. This is how we ran the published code evals and the thinking-on sweep.
A request without a thinking field runs with thinking off: our earlier runs sent none, and the server logged
thinking=false for each. Tencent recommends temperature 0.9 and top_p 1.0. A thinking answer can be long (up to
7,461 tokens in our sweep runs), so give it a large max_tokens.
Two profiles: default and fast prefill
Both profiles serve the same pack and the same plugin build. Neither one is equal to the original model: the quantization itself changes the model. Neither one is equal to exllamav3 on these weights either. Quality gives the measured distance from exllamav3 for each profile.
| Profile | How to get it | What changes |
|---|---|---|
| Default | No settings. | mlx-serve follows exllamav3's math on these weights, with rounding differences: hy4f rounds each EXL3 linear's input to bf16 (exllamav3 uses fp16), some fp32 products use TF32, and some sums run in another order. |
| Fast prefill (lossy, opt-in) | The three settings in the next table, in the server's environment. | Prompt processing uses lower-precision products. At decode, greedy requests also accept some draft tokens that are not the main model's top token. The generated text differs from the default. |
The default profile
The default has one setting that depends on the Mac. On a Mac with 96 GiB of RAM or more, hy4f decodes the EXL3
weights of every layer's linear_gate and o_proj once at load and keeps them (7.25 GB). The prompt pass then reads
the kept weights and does not decode them again for each prompt chunk. The output is the same, bit for bit. Below
96 GiB it is off.
| Setting | Plugin | What it does |
|---|---|---|
HY4F_PF_RESIDENT_WHAT |
hy4f |
Unset: the rule above. 1: kept on any Mac. 0: off. Any other value refuses the load. |
On our 16K test of sc_2.00bpw, the kept weights raised prefill from 1,490.2 to 1,501.7 tok/s and raised peak memory from 52.39 to
58.87 GiB, with the same text on every prompt.
The fast prefill profile
Set all three settings.
| Setting | Plugin | What it does |
|---|---|---|
TURBOEXL3_HY4F_PF_INT8=1 |
turboexl3_hy4f |
When it processes the prompt, the plugin runs the routed experts' gate, up and down products in int8, with one scale for each 128-wide block of inputs. |
HY4F_PF_KVB_HALF=1 |
hy4f |
When it processes the prompt, the plugin runs the attention's kv_b products with fp16 inputs in place of TF32-rounded fp32 inputs, with fp32 sums. |
HY4F_LOSSY_TYPICAL=0.2 |
hy4f |
At decode, the plugin also keeps a draft token that is not the main model's top token, when that token's probability is above min(1, 0.2 ร exp(โH)). H is the entropy of the main model's next-token distribution. The extra token after the drafts stays the top token. This applies to greedy requests. Sampled requests keep the exact acceptance rule. |
The server refuses to load with a value that the plugin's README does not list, and the error names the setting. The
hy4f README lists every option.
The default stays closest to exllamav3's math. Pick fast prefill if you want faster prompts and faster greedy decode,
and accept that its text differs. On our 16K test of sc_2.00bpw with greedy decoding, fast prefill processed prompts 5.4 % faster
(1,500.8 to 1,582.5 tok/s) and decoded 11.1 % faster (86.32 to 95.91 tok/s). With Tencent sampling, it processed
prompts 6.2 % faster (1,501.1 to 1,593.8 tok/s) and decoded 2.1 % faster (82.33 to 84.09 tok/s).
Quality
The measures below answer different questions, and their numbers do not compare. turboderp's chart shows how far each quantization is from the original BF16 model. Our table shows how far mlx-serve is from exllamav3 on the same quantized weights. Neither compares mlx-serve with the original model directly.
The quantization against the original model
turboderp measured the mean KL divergence of his quantizations against the original model. The chart below is his, linked from his card. His card does not say which engine made the measurement.
Each pack holds his values, so his numbers describe its weights. They do not include mlx-serve's kernels.
mlx-serve against exllamav3
We compared mlx-serve's next-token distributions with exllamav3's on the same weights. For each pack, the reference
is exllamav3 dev 2d79ab55 on turboderp's original branch of that size, on an NVIDIA GPU with TF32 off. TF32 is a
GPU mode that rounds fp32 inputs to fewer bits in matrix products. The test is one 3,348-token prompt, scored at every
position of the prompt pass. It does not cover decode or longer prompts.
Lower KL divergence and higher top-1 agreement mean closer to the reference. Each cell gives the median KL divergence and the top-1 agreement.
| Run | sc_2.00bpw |
sc_2.50bpw |
sc_3.00bpw |
|---|---|---|---|
| exllamav3 again, with TF32 on (the reference's own noise) | 0.00515, 91.31 % | 0.00561, 90.80 % | 0.00712, 90.74 % |
| mlx-serve, default profile | 0.00767, 89.12 % | 0.00887, 89.06 % | 0.01064, 88.50 % |
| mlx-serve, fast prefill profile | 0.00769, 89.45 % | 0.01083, 87.84 % | 0.01080, 89.27 % |
All rows ran on the release server (mlx-serve 3ad7a395d, MLX 0.33.0). The plugin builds differ by pack.
sc_3.00bpw ran on the measured release builds (2dab6193 default, 8615ddd1 fast prefill). sc_2.50bpw ran on
builds that add the fractional-rate admission (commit 4be24e75, in the history of the install commit); the earlier
builds refuse this pack. Every fast prefill row ran with the profile's two prompt settings (see the next paragraph).
We measured both sc_2.00bpw mlx-serve rows (mlx-serve 3ad7a395d, MLX 0.33.0), on the plugin build before
two exact changes: speculative decoding for sampled requests, and the kept weights. The default row is word for word
the same as on two earlier builds. The fast prefill row ran with its two prompt settings, TURBOEXL3_HY4F_PF_INT8=1
and HY4F_PF_KVB_HALF=1. The third setting, HY4F_LOSSY_TYPICAL, changes no next-token distribution, so this test
does not see it. It changes which tokens the model writes: on the 16K test of an earlier build, 142 of 3,072 written
tokens (4.6 %) were not the main model's top token.
The first row shows how much exllamav3 differs from itself when only the GPU's rounding changes. Even that run picks a different top token at 8.7 % of positions. The default profile is further from the reference than the reference's own TF32 run, because of the rounding differences in the profile table. The two mlx-serve profiles are about equally far from the reference. They are not equal to each other: measured against the default, fast prefill has median KL 0.00821 and picks a different top token at 350 of 3,347 positions (10.5 %).
Code evals
We scored EvalPlus pass@1 (the share of problems solved on the first try) on sc_2.00bpw, with greedy decoding, on
the default profile. The model ran as shipped, with speculative decoding on and a limit of 16,384 output tokens, on a second Apple
M5 Max with 128 GB. The published scores have thinking on ("reasoning_effort": "high").
| Thinking | HumanEval | HumanEval+ | MBPP | MBPP+ |
|---|---|---|---|---|
| On (published) | 0.939 (154 of 164) | 0.921 (151 of 164) | 0.947 (358 of 378) | 0.780 (295 of 378) |
| Off (no thinking field) | 0.957 (157 of 164) | 0.915 (150 of 164) | 0.929 (351 of 378) | 0.794 (300 of 378) |
The thinking-on run used the shipped plugin build. The thinking-off run used the build before two exact changes
(speculative decoding for sampled requests, and the kept weights); their tests gave the same greedy output bits as
the build before them. With thinking on, 4 of the 164 HumanEval replies and 6 of the 378 MBPP replies reached the
16,384-token limit (finish reason length); they were scored as they stood. With thinking off, all 542 requests
stopped on their own, and none reached the output limit. We did not run the code evals on the fast prefill profile.
Speed and memory
The results in this section are for sc_2.00bpw. We measured speed and memory on one Apple M5 Max with 128 GB. The stack: mlx-serve 26.11.3 at commit 3ad7a395d
(ddalcu/mlx-serve#1344 with the memory admission change merged in, MLX 0.33.0); hy4f and turboexl3_hy4f from
our fork davidtai/plugins, commits 2dab6193 (default) and 8615ddd1 (fast prefill); turboexl3 50720bf (default)
and 6e7a9ef (fast prefill). Speculative decoding was on in every run, as served.
The install steps check out a later plugin commit, c83bc47d, that serves both profiles from one build, and also
admits the fractional routed rate of turboderp's sc_2.50bpw. On the sc_2.00bpw parity test (the 3,348-token prompt of
Quality, all 3,347 compared positions, then the first 64 greedy tokens), its output equals the measured builds' bit for bit: for the default with no
option set, and for fast prefill with its three settings. Its GPU tests also give the same 46 output digests.
The 16K test
We ran three coding prompts of about 17K tokens each (17,492, 17,006 and 17,155 tokens), with 1,024 output tokens each. Thinking was off: these requests sent no thinking field. The table shows the average of the three prompts. "Greedy" always picks the most likely token. "Tencent sampling" is the sampling that Tencent's model card recommends: temperature 0.9 and top_p 1.0, with no top_k.
| Profile | Sampling | Prefill tok/s | Decode tok/s | TTFT s | Wall time s | Draft hit rate % | Tokens per round | Peak GiB |
|---|---|---|---|---|---|---|---|---|
| Default | greedy | 1,500.8 | 86.32 | 11.49 | 23.36 | 69.2 | 4.451 | 59.02 |
| Default | Tencent | 1,501.1 | 82.33 | 11.48 | 23.93 | 65.0 | 4.243 | 58.97 |
| Fast prefill | greedy | 1,582.5 | 95.91 | 10.90 | 21.56 | 79.1 | 4.947 | 58.89 |
| Fast prefill | Tencent | 1,593.8 | 84.09 | 10.82 | 22.99 | 66.9 | 4.329 | 58.89 |
Peak is the server process's peak memory, not the whole Mac's. This table gives it in GiB (2^30 bytes); the sweep tables below give it in GB (10^9 bytes). For example, 59.02 GiB is 63.37 GB.
These requests had thinking off. With thinking on, as in the request example above, decode is about half as fast: the default profile decoded 49.2 tok/s at 16K with Tencent sampling (see Context sweep).
Each run of the 16K test
The runs alternate the two profiles in the order A B B A A B, each on a new server, with a cool-down to 40 ยฐC before each run. A is the default and B is fast prefill. Seed 1234.
| Sampling | Run | Profile | Prompt | Prefill tok/s | Decode tok/s | TTFT s | Wall s | Draft hit % | Tokens per round | Peak GiB |
|---|---|---|---|---|---|---|---|---|---|---|
| greedy | 1 | Default | p01 | 1,501.1 | 81.96 | 11.67 | 24.15 | 65.1 | 4.249 | 58.97 |
| greedy | 2 | Fast prefill | p01 | 1,591.4 | 96.45 | 11.01 | 21.61 | 79.8 | 4.971 | 58.90 |
| greedy | 3 | Fast prefill | p14 | 1,593.1 | 94.37 | 10.69 | 21.53 | 77.6 | 4.876 | 58.86 |
| greedy | 4 | Default | p14 | 1,498.4 | 89.84 | 11.36 | 22.75 | 72.7 | 4.613 | 58.94 |
| greedy | 5 | Default | p21 | 1,502.9 | 87.16 | 11.43 | 23.17 | 69.8 | 4.491 | 59.15 |
| greedy | 6 | Fast prefill | p21 | 1,563.1 | 96.90 | 10.99 | 21.55 | 79.9 | 4.995 | 58.91 |
| Tencent | 1 | Default | p01 | 1,499.2 | 83.40 | 11.68 | 23.95 | 66.2 | 4.303 | 58.98 |
| Tencent | 2 | Fast prefill | p01 | 1,597.0 | 83.01 | 10.97 | 23.29 | 65.9 | 4.285 | 58.89 |
| Tencent | 3 | Fast prefill | p14 | 1,596.6 | 86.85 | 10.67 | 22.45 | 69.8 | 4.472 | 58.87 |
| Tencent | 4 | Default | p14 | 1,500.0 | 78.27 | 11.35 | 24.42 | 60.8 | 4.031 | 58.94 |
| Tencent | 5 | Default | p21 | 1,504.0 | 85.33 | 11.42 | 23.41 | 68.1 | 4.395 | 58.98 |
| Tencent | 6 | Fast prefill | p21 | 1,587.8 | 82.41 | 10.82 | 23.23 | 64.9 | 4.231 | 58.91 |
Context sweep
We built one coding task to each prompt size from 1K to 256K tokens, doubling. Each run could write up to 16,384 output tokens. We ran each size with greedy decoding and with Tencent sampling, at seeds 1234 and 4321, each run on a new server. The greedy runs had thinking off. The published Tencent-sampling runs had thinking on; the same runs with thinking off are in the tables below.
Thinking slows decode by about half. With thinking on, the draft model's tokens are accepted less often: about 2.6 tokens a round against about 4.7 with thinking off. At 16K with Tencent sampling, the default profile decoded 49.2 tok/s with thinking on and 91.3 tok/s with thinking off. Prefill stays within 4 % of the thinking-off runs at every size.
Prefill tok/s (mean of seeds 1234 and 4321)
| Profile | Requests | 1K | 2K | 4K | 8K | 16K | 32K | 64K | 128K | 256K |
|---|---|---|---|---|---|---|---|---|---|---|
| Default | greedy, thinking off | 1,184 | 1,423 | 1,528 | 1,522 | 1,507 | 1,440 | 1,322 | 1,197 | 1,024 |
| Default | Tencent sampling, thinking on | 1,205 | 1,392 | 1,506 | 1,517 | 1,502 | 1,398 | 1,323 | 1,186 | 999 |
| Fast prefill | greedy, thinking off | 1,134 | 1,440 | 1,576 | 1,578 | 1,590 | 1,538 | 1,410 | 1,259 | 1,024 |
| Fast prefill | Tencent sampling, thinking on | 1,151 | 1,411 | 1,572 | 1,573 | 1,589 | 1,530 | 1,409 | 1,257 | 1,045 |
Decode tok/s (mean of seeds 1234 and 4321)
| Profile | Requests | 1K | 2K | 4K | 8K | 16K | 32K | 64K | 128K | 256K |
|---|---|---|---|---|---|---|---|---|---|---|
| Default | greedy, thinking off | 94.4 | 92.1 | 92.3 | 91.4 | 94.6 | 92.0 | 92.5 | 86.1 | 79.4 |
| Default | Tencent sampling, thinking on | 48.8 | 51.7 | 50.7 | 48.7 | 49.2 | 48.5 | 48.3 | 42.1 | 40.0 |
| Fast prefill | greedy, thinking off | 100.6 | 101.1 | 98.7 | 94.3 | 97.7 | 96.9 | 94.0 | 88.1 | 73.7 |
| Fast prefill | Tencent sampling, thinking on | 50.6 | 49.4 | 48.2 | 48.2 | 50.9 | 52.1 | 49.5 | 44.5 | 37.7 |
Thinking on against thinking off, default profile, Tencent sampling
| Size | Thinking off: decode tok/s | Thinking off: tokens/round | Thinking on: decode tok/s | Thinking on: tokens/round | Thinking on: draft hit % |
|---|---|---|---|---|---|
| 1K | 95.9 | 4.67 | 48.8 | 2.57 | 31.4 |
| 2K | 90.6 | 4.68 | 51.7 | 2.74 | 34.7 |
| 4K | 91.3 | 4.67 | 50.7 | 2.71 | 34.1 |
| 8K | 92.2 | 4.71 | 48.7 | 2.64 | 32.8 |
| 16K | 91.3 | 4.67 | 49.2 | 2.64 | 32.7 |
| 32K | 89.9 | 4.75 | 48.5 | 2.68 | 33.7 |
| 64K | 90.6 | 4.79 | 48.3 | 2.74 | 34.8 |
| 128K | 86.6 | 4.74 | 42.1 | 2.61 | 32.3 |
| 256K | 76.9 | 4.75 | 40.0 | 2.58 | 31.7 |
Every sweep run
"Not recorded" marks a column that the thinking-off sweep harness did not record. Peak is the server's peak footprint in GB (10^9 bytes).
Default, greedy, thinking off
| Size | Seed | Prefill tok/s | Decode tok/s | TTFT s | Wall s | Draft hit % | Tokens/round | Peak GB |
|---|---|---|---|---|---|---|---|---|
| 1K | 1234 | 1,183.1 | 94.50 | 0.88 | Not recorded | Not recorded | 4.605 | 57.9 |
| 1K | 4321 | 1,184.6 | 94.37 | 0.87 | Not recorded | Not recorded | 4.605 | 57.9 |
| 2K | 1234 | 1,426.4 | 92.07 | 1.42 | Not recorded | Not recorded | 4.709 | 59.0 |
| 2K | 4321 | 1,420.2 | 92.04 | 1.42 | Not recorded | Not recorded | 4.709 | 59.0 |
| 4K | 1234 | 1,527.4 | 92.20 | 2.60 | Not recorded | Not recorded | 4.721 | 62.8 |
| 4K | 4321 | 1,529.4 | 92.39 | 2.59 | Not recorded | Not recorded | 4.721 | 62.8 |
| 8K | 1234 | 1,522.0 | 91.40 | 5.20 | Not recorded | Not recorded | 4.662 | 62.9 |
| 8K | 4321 | 1,521.6 | 91.44 | 5.20 | Not recorded | Not recorded | 4.662 | 62.9 |
| 16K | 1234 | 1,513.4 | 94.45 | 10.60 | Not recorded | Not recorded | 4.833 | 63.5 |
| 16K | 4321 | 1,501.3 | 94.66 | 10.69 | Not recorded | Not recorded | 4.833 | 63.5 |
| 32K | 1234 | 1,431.3 | 91.69 | 22.45 | Not recorded | Not recorded | 4.855 | 65.0 |
| 32K | 4321 | 1,448.3 | 92.30 | 22.19 | Not recorded | Not recorded | 4.855 | 64.8 |
| 64K | 1234 | 1,320.5 | 92.48 | 48.86 | Not recorded | Not recorded | 4.878 | 67.8 |
| 64K | 4321 | 1,324.1 | 92.49 | 48.73 | Not recorded | Not recorded | 4.878 | 67.8 |
| 128K | 1234 | 1,197.3 | 83.21 | 107.76 | Not recorded | Not recorded | 4.797 | 72.4 |
| 128K | 4321 | 1,197.4 | 88.99 | 107.74 | Not recorded | Not recorded | 4.797 | 72.4 |
| 256K | 1234 | 1,029.2 | 80.10 | 250.62 | Not recorded | Not recorded | 4.893 | 81.0 |
| 256K | 4321 | 1,019.7 | 78.72 | 252.94 | Not recorded | Not recorded | 4.893 | 80.9 |
Default, Tencent sampling, thinking on (published)
| Size | Seed | Prefill tok/s | Decode tok/s | TTFT s | Wall s | Draft hit % | Tokens/round | Peak GB | Output tokens | Reasoning tokens |
|---|---|---|---|---|---|---|---|---|---|---|
| 1K | 1234 | 1,204.7 | 48.62 | 0.85 | 98.5 | 30.8 | 2.541 | 57.9 | 4,749 | 4,001 |
| 1K | 4321 | 1,204.7 | 49.02 | 0.85 | 126.0 | 31.9 | 2.592 | 57.9 | 6,136 | 5,518 |
| 2K | 1234 | 1,391.7 | 53.09 | 1.44 | 92.1 | 35.7 | 2.786 | 59.1 | 4,812 | 3,946 |
| 2K | 4321 | 1,391.7 | 50.38 | 1.44 | 129.1 | 33.7 | 2.686 | 59.0 | 6,431 | 5,567 |
| 4K | 1234 | 1,506.5 | 48.49 | 2.62 | 120.0 | 31.6 | 2.581 | 62.8 | 5,694 | 4,819 |
| 4K | 4321 | 1,506.5 | 52.84 | 2.62 | 128.3 | 36.6 | 2.830 | 62.8 | 6,644 | 5,911 |
| 8K | 1234 | 1,518.8 | 47.13 | 5.20 | 163.5 | 32.6 | 2.630 | 62.9 | 7,461 | 6,570 |
| 8K | 4321 | 1,515.9 | 50.18 | 5.21 | 99.9 | 33.1 | 2.654 | 62.9 | 4,751 | 3,966 |
| 16K | 1234 | 1,501.2 | 46.57 | 10.67 | 144.4 | 30.8 | 2.540 | 63.5 | 6,230 | 5,511 |
| 16K | 4321 | 1,502.6 | 51.86 | 10.66 | 73.2 | 34.7 | 2.734 | 63.5 | 3,245 | 2,652 |
| 32K | 1234 | 1,346.6 | 46.93 | 23.84 | 167.8 | 33.0 | 2.651 | 64.8 | 6,760 | 5,918 |
| 32K | 4321 | 1,448.7 | 50.09 | 22.16 | 123.8 | 34.4 | 2.718 | 65.0 | 5,089 | 4,413 |
| 64K | 1234 | 1,322.9 | 51.26 | 48.74 | 165.2 | 38.0 | 2.900 | 67.8 | 5,968 | 5,043 |
| 64K | 4321 | 1,322.9 | 45.37 | 48.74 | 175.3 | 31.5 | 2.577 | 67.8 | 5,742 | 4,978 |
| 128K | 1234 | 1,183.5 | 42.22 | 108.95 | 212.6 | 32.8 | 2.637 | 72.4 | 4,375 | 3,630 |
| 128K | 4321 | 1,188.1 | 42.06 | 108.53 | 255.0 | 31.8 | 2.591 | 72.4 | 6,162 | 5,379 |
| 256K | 1234 | 998.7 | 39.96 | 258.16 | 416.3 | 31.3 | 2.565 | 81.0 | 6,319 | 5,420 |
| 256K | 4321 | 999.5 | 40.12 | 257.93 | 394.9 | 32.0 | 2.600 | 81.0 | 5,496 | 4,628 |
Default, Tencent sampling, thinking off
| Size | Seed | Prefill tok/s | Decode tok/s | TTFT s | Wall s | Draft hit % | Tokens/round | Peak GB |
|---|---|---|---|---|---|---|---|---|
| 1K | 1234 | 1,182.8 | 94.41 | 0.88 | Not recorded | Not recorded | 4.604 | 57.9 |
| 1K | 4321 | 1,184.4 | 97.30 | 0.87 | Not recorded | Not recorded | 4.736 | 57.9 |
| 2K | 1234 | 1,424.7 | 92.30 | 1.42 | Not recorded | Not recorded | 4.817 | 59.0 |
| 2K | 4321 | 1,421.1 | 88.87 | 1.42 | Not recorded | Not recorded | 4.537 | 59.0 |
| 4K | 1234 | 1,527.3 | 93.95 | 2.60 | Not recorded | Not recorded | 4.805 | 62.8 |
| 4K | 4321 | 1,527.9 | 88.59 | 2.59 | Not recorded | Not recorded | 4.536 | 62.8 |
| 8K | 1234 | 1,521.0 | 94.35 | 5.21 | Not recorded | Not recorded | 4.813 | 63.0 |
| 8K | 4321 | 1,521.2 | 90.10 | 5.20 | Not recorded | Not recorded | 4.610 | 63.0 |
| 16K | 1234 | 1,505.1 | 94.67 | 10.66 | Not recorded | Not recorded | 4.846 | 63.7 |
| 16K | 4321 | 1,507.1 | 87.96 | 10.64 | Not recorded | Not recorded | 4.500 | 63.5 |
| 32K | 1234 | 1,452.6 | 90.49 | 22.12 | Not recorded | Not recorded | 4.772 | 65.0 |
| 32K | 4321 | 1,450.2 | 89.25 | 22.16 | Not recorded | Not recorded | 4.735 | 64.8 |
| 64K | 1234 | 1,326.3 | 88.56 | 48.65 | Not recorded | Not recorded | 4.678 | 67.8 |
| 64K | 4321 | 1,327.8 | 92.73 | 48.60 | Not recorded | Not recorded | 4.893 | 67.8 |
| 128K | 1234 | 1,194.7 | 91.54 | 107.98 | Not recorded | Not recorded | 4.793 | 72.4 |
| 128K | 4321 | 1,195.8 | 81.58 | 107.89 | Not recorded | Not recorded | 4.690 | 72.4 |
| 256K | 1234 | 1,031.8 | 79.11 | 249.97 | Not recorded | Not recorded | 4.858 | 80.9 |
| 256K | 4321 | 1,021.8 | 74.67 | 252.43 | Not recorded | Not recorded | 4.641 | 80.9 |
Fast prefill, greedy, thinking off
| Size | Seed | Prefill tok/s | Decode tok/s | TTFT s | Wall s | Draft hit % | Tokens/round | Peak GB |
|---|---|---|---|---|---|---|---|---|
| 1K | 1234 | 1,135.7 | 100.60 | 0.91 | Not recorded | Not recorded | 4.903 | 57.9 |
| 1K | 4321 | 1,131.6 | 100.56 | 0.92 | Not recorded | Not recorded | 4.903 | 57.9 |
| 2K | 1234 | 1,438.9 | 101.10 | 1.40 | Not recorded | Not recorded | 5.184 | 58.9 |
| 2K | 4321 | 1,441.3 | 101.11 | 1.40 | Not recorded | Not recorded | 5.184 | 59.0 |
| 4K | 1234 | 1,575.3 | 98.67 | 2.52 | Not recorded | Not recorded | 5.059 | 62.7 |
| 4K | 4321 | 1,576.0 | 98.74 | 2.52 | Not recorded | Not recorded | 5.059 | 62.7 |
| 8K | 1234 | 1,577.5 | 94.22 | 5.02 | Not recorded | Not recorded | 4.825 | 62.8 |
| 8K | 4321 | 1,578.4 | 94.38 | 5.02 | Not recorded | Not recorded | 4.825 | 62.8 |
| 16K | 1234 | 1,591.1 | 97.76 | 10.09 | Not recorded | Not recorded | 4.992 | 63.4 |
| 16K | 4321 | 1,589.1 | 97.70 | 10.10 | Not recorded | Not recorded | 4.992 | 63.5 |
| 32K | 1234 | 1,537.1 | 96.95 | 20.91 | Not recorded | Not recorded | 5.138 | 64.7 |
| 32K | 4321 | 1,539.5 | 96.90 | 20.88 | Not recorded | Not recorded | 5.138 | 64.8 |
| 64K | 1234 | 1,409.1 | 93.92 | 45.80 | Not recorded | Not recorded | 5.008 | 67.5 |
| 64K | 4321 | 1,410.3 | 94.12 | 45.76 | Not recorded | Not recorded | 5.008 | 67.5 |
| 128K | 1234 | 1,257.4 | 87.65 | 102.60 | Not recorded | Not recorded | 5.216 | 72.4 |
| 128K | 4321 | 1,259.7 | 88.46 | 102.42 | Not recorded | Not recorded | 5.216 | 72.4 |
| 256K | 1234 | 1,048.6 | 77.95 | 245.97 | Not recorded | Not recorded | 5.076 | 80.9 |
| 256K | 4321 | 998.7 | 69.40 | 258.25 | Not recorded | Not recorded | 5.076 | 80.9 |
Fast prefill, Tencent sampling, thinking on (published)
| Size | Seed | Prefill tok/s | Decode tok/s | TTFT s | Wall s | Draft hit % | Tokens/round | Peak GB | Output tokens | Reasoning tokens |
|---|---|---|---|---|---|---|---|---|---|---|
| 1K | 1234 | 1,150.6 | 52.43 | 0.89 | 127.6 | 35.4 | 2.770 | 57.9 | 6,645 | 5,701 |
| 1K | 4321 | 1,150.6 | 48.84 | 0.89 | 110.7 | 31.1 | 2.553 | 57.9 | 5,363 | 4,688 |
| 2K | 1234 | 1,411.3 | 48.31 | 1.42 | 105.0 | 30.7 | 2.536 | 58.9 | 5,007 | 4,400 |
| 2K | 4321 | 1,411.3 | 50.53 | 1.42 | 117.9 | 33.5 | 2.678 | 58.9 | 5,888 | 5,059 |
| 4K | 1234 | 1,572.5 | 49.46 | 2.51 | 139.6 | 33.0 | 2.649 | 62.7 | 6,780 | 5,845 |
| 4K | 4321 | 1,572.5 | 46.94 | 2.51 | 137.3 | 30.0 | 2.502 | 62.7 | 6,327 | 5,706 |
| 8K | 1234 | 1,573.3 | 49.39 | 5.02 | 101.2 | 32.2 | 2.608 | 62.8 | 4,751 | 3,965 |
| 8K | 4321 | 1,573.3 | 47.11 | 5.02 | 153.8 | 30.9 | 2.542 | 62.9 | 7,009 | 6,091 |
| 16K | 1234 | 1,585.9 | 52.82 | 10.10 | 96.9 | 35.7 | 2.786 | 63.5 | 4,585 | 3,722 |
| 16K | 4321 | 1,592.2 | 48.89 | 10.06 | 130.6 | 32.4 | 2.621 | 63.5 | 5,894 | 5,030 |
| 32K | 1234 | 1,522.2 | 50.56 | 21.09 | 109.3 | 34.3 | 2.714 | 64.7 | 4,461 | 3,627 |
| 32K | 4321 | 1,537.5 | 53.57 | 20.88 | 101.2 | 37.0 | 2.852 | 64.8 | 4,303 | 3,518 |
| 64K | 1234 | 1,410.6 | 49.72 | 45.71 | 127.5 | 33.8 | 2.688 | 67.5 | 4,067 | 3,232 |
| 64K | 4321 | 1,407.2 | 49.31 | 45.82 | 164.2 | 35.0 | 2.749 | 67.5 | 5,839 | 4,857 |
| 128K | 1234 | 1,258.3 | 44.78 | 102.47 | 214.6 | 35.0 | 2.748 | 72.4 | 5,024 | 4,143 |
| 128K | 4321 | 1,254.9 | 44.25 | 102.75 | 221.3 | 35.0 | 2.751 | 72.4 | 5,248 | 4,496 |
| 256K | 1234 | 1,044.2 | 37.43 | 246.89 | 355.6 | 28.4 | 2.419 | 80.9 | 4,072 | 3,333 |
| 256K | 4321 | 1,045.8 | 38.02 | 246.53 | 414.0 | 29.9 | 2.494 | 80.9 | 6,369 | 5,579 |
Fast prefill, Tencent sampling, thinking off
| Size | Seed | Prefill tok/s | Decode tok/s | TTFT s | Wall s | Draft hit % | Tokens/round | Peak GB |
|---|---|---|---|---|---|---|---|---|
| 1K | 1234 | 1,137.9 | 94.84 | 0.91 | Not recorded | Not recorded | 4.625 | 57.9 |
| 1K | 4321 | 1,136.0 | 96.75 | 0.91 | Not recorded | Not recorded | 4.717 | 57.9 |
| 2K | 1234 | 1,433.3 | 96.55 | 1.41 | Not recorded | Not recorded | 4.937 | 58.9 |
| 2K | 4321 | 1,436.9 | 91.98 | 1.41 | Not recorded | Not recorded | 4.694 | 58.9 |
| 4K | 1234 | 1,574.4 | 94.39 | 2.52 | Not recorded | Not recorded | 4.828 | 62.7 |
| 4K | 4321 | 1,575.2 | 87.72 | 2.52 | Not recorded | Not recorded | 4.488 | 62.7 |
| 8K | 1234 | 1,578.0 | 95.60 | 5.02 | Not recorded | Not recorded | 4.873 | 62.9 |
| 8K | 4321 | 1,576.5 | 88.01 | 5.02 | Not recorded | Not recorded | 4.496 | 62.9 |
| 16K | 1234 | 1,593.0 | 92.06 | 10.07 | Not recorded | Not recorded | 4.701 | 63.5 |
| 16K | 4321 | 1,590.1 | 91.29 | 10.09 | Not recorded | Not recorded | 4.669 | 63.5 |
| 32K | 1234 | 1,527.2 | 89.74 | 21.04 | Not recorded | Not recorded | 4.736 | 64.8 |
| 32K | 4321 | 1,539.3 | 87.74 | 20.88 | Not recorded | Not recorded | 4.655 | 64.7 |
| 64K | 1234 | 1,413.2 | 89.56 | 45.67 | Not recorded | Not recorded | 4.760 | 67.6 |
| 64K | 4321 | 1,409.0 | 87.55 | 45.80 | Not recorded | Not recorded | 4.667 | 67.5 |
| 128K | 1234 | 1,261.6 | 82.89 | 102.27 | Not recorded | Not recorded | 4.865 | 72.4 |
| 128K | 4321 | 1,259.1 | 82.49 | 102.47 | Not recorded | Not recorded | 4.822 | 72.4 |
| 256K | 1234 | 1,043.6 | 69.53 | 247.16 | Not recorded | Not recorded | 4.740 | 80.9 |
| 256K | 4321 | 1,048.9 | 71.28 | 245.90 | Not recorded | Not recorded | 4.607 | 80.9 |
Memory per prompt size
The server's bill (its planned upper bound for the loaded model and one request) and its measured peak, in GB. Each peak is the higher of the two seeds. The bill columns come from the thinking-on runs, the only runs that recorded them; each of those runs peaked at or under its bill.
| Size | Prompt tokens | Bill: weights GB | Bill: request GB | Bill: total GB | Peak GB, default, greedy | Peak GB, default, Tencent + thinking | Peak GB, fast prefill, greedy | Peak GB, fast prefill, Tencent + thinking |
|---|---|---|---|---|---|---|---|---|
| 1K | 1,024 | 50.73 | 7.26 | 57.99 | 57.9 | 57.9 | 57.9 | 57.9 |
| 2K | 2,004 | 50.73 | 12.73 | 63.46 | 59.0 | 59.1 | 59.0 | 58.9 |
| 4K | 3,947 | 50.73 | 34.97 | 85.70 | 62.8 | 62.8 | 62.7 | 62.7 |
| 8K | 7,898 | 50.73 | 32.42 | 83.15 | 62.9 | 62.9 | 62.8 | 62.9 |
| 16K | 16,018 | 50.73 | 32.75 | 83.48 | 63.5 | 63.5 | 63.5 | 63.5 |
| 32K | 32,103 | 50.73 | 33.38 | 84.11 | 65.0 | 65.0 | 64.8 | 64.8 |
| 64K | 64,480 | 50.73 | 34.79 | 85.52 | 67.8 | 67.8 | 67.5 | 67.5 |
| 128K | 128,940 | 50.73 | 38.27 | 89.00 | 72.4 | 72.4 | 72.4 | 72.4 |
| 256K | 257,813 | 50.73 | 47.34 | 98.07 | 81.0 | 81.0 | 80.9 | 80.9 |
Limits
- Speed and evals for
sc_2.50bpwandsc_3.00bpw: in progress on the same stack. - We measured speed and memory on one Apple M5 Max with 128 GB, and the code evals on a second one.
- The
sc_2.00bpwsweep stops at 256K tokens. We did not run 512K or 1M. - The packs serve text only.
- The draft model always proposes 5 tokens a round. exllamav3 can propose fewer, by the draft model's confidence score. This changes speed only, not the main model's output.
- We did not run the code evals on the fast prefill profile.
- The packs need the Engram file from turboderp's repo, downloaded apart from the branch.
- We did not test a Mac with less than 96 GiB of RAM, where the kept weights are off.
Credits
- The Tencent Hy Team made Hy4-flash: tencent/Hy4-flash.
- turboderp made exllamav3, the EXL3 format and the quantizations in these packs: turboderp/Hy4-flash-exl3.
- ddalcu maintains mlx-serve.
- OpensourceWTF made the repacks. davidtai maintains the
hy4fandturboexl3_hy4fplugins and the turboexl3 kernels.
License
The model is under the Tencent Hy License, Version 1.0, the license of
tencent/Hy4-flash. The LICENSE file in this repo and in
every branch is that file, unchanged. turboderp's branches carry the same file. Read the file for the terms. In short:
- If you share the model or a changed copy, include
LICENSEand say what you changed (Section 4). - Section 10 applies if you run a MaaS (Model as a Service) business: you give third parties general remote access to the model, for example through an API. You then need a separate written license from Tencent first if your worldwide revenue is above US$50 million in any 12 months, or if your product has more than 100 million monthly users. Internal use with no outside access is exempt.
The repack changed some files of the model. "Why a repack, and what it changed" and each branch card's file table list each change. The code (mlx-serve, the plugins, turboexl3 and exllamav3) has its own licenses.
Terms
| Term | Meaning |
|---|---|
| EXL3 | exllamav3's quantization format. |
| bpw | Bits per weight. |
| Codebook | The table that turns stored EXL3 codes into weight values. These packs use MUL1. |
| MoE | Mixture of experts: each layer has many small networks (experts), and a router picks a few for each token. |
| Engram | Hy4-flash's lookup memory: 4 layers read rows from a large table by n-gram hash. |
| Plain tensor | A tensor stored as ordinary numbers (here fp16 or bf16), not in EXL3 form. |
| W_hat | The plain weight that an EXL3 linear decodes from its stored codes before a product. |
| fp16, bf16, fp32 | Floating-point formats of 16, 16 and 32 bits. bf16 keeps a wider range than fp16, with less precision. Tensor dtype names in files are written F16, BF16 and F32. |
| int8 | 8-bit integers. Products in int8 are faster and less precise. |
| Forward pass | One run of the model over its input, which gives the next-token scores. |
| DFly2 | Hy4-flash's draft model for speculative decoding, stored in dfly.safetensors. |
| Speculative decoding | A small draft model proposes tokens, and the main model checks them in one pass. |
| Draft hit rate | The share of draft tokens that the main model accepts. |
| Tokens per round | The tokens that one check of the main model writes: the accepted drafts plus one. |
| Thinking | The model writes its reasoning before the answer. "reasoning_effort": "high" turns it on. |
| Entropy | A measure of how spread out a next-token distribution is. A low value means one token is much more likely than the rest. |
| Prefill | Processing the prompt, before the first output token. |
| Decode | Writing the answer. |
| TTFT | Time to first token, from the request to the first output token, on a loaded model. |
| Wall time | The time from the request to the last output token. |
| KL divergence | A measure of how far one next-token distribution is from another. 0 means equal. |
| Top-1 agreement | The share of positions where both runs pick the same most likely token. |
| TF32 | A GPU mode that rounds fp32 inputs to fewer bits in matrix products. |
| NAX | MLX's name for the Neural Accelerators in M5-class Apple GPUs. |
| Bill | mlx-serve's upper bound on the memory that the loaded model and a request use. |
| EvalPlus | A code benchmark that runs HumanEval and MBPP with extra tests (the "+" sets). |
| pass@1 | The share of problems that the first answer solves. |
| MaaS | Model as a Service: giving others remote access to the model, for example through an API. |
| GB, GiB | 10^9 bytes and 2^30 bytes. |
