Hy4-flash-NVFP4
Calibrated ModelOpt MIXED_PRECISION (NVFP4 + selective MXFP8 + BF16) quantization of tencent/Hy4-flash (weights from revision b2498eba6a1a3f9bbcab4190bc1313a3c7010c2f, unchanged in 1e3e4005da28b6ef7f53c1298b09c8e00bfc659e), including 4-bit NVFP4_E4M3_GLOBAL host-resident Engram n-gram tables, prepared for a single 96 GiB NVIDIA Blackwell (SM120) GPU with 64 GiB+ host RAM under Flare.
A ready-to-run signed Flare runtime package exported from this checkpoint (--online-mxfp8 + --image-concurrency 2, 1,166,848 (1.17M) KV token capacity + SigLIP2 multimodal vision on a single 96 GiB GPU) is published at:
Quantization Summary
Total checkpoint size on disk is 122.71 GiB (89.64 GiB uncompressed GPU weights / ~85.4 GiB with CSF scales + 33.19 GiB 4-bit Engram host tables):
| Component | Precision | Method |
|---|---|---|
| 41 LatentMoE routed expert layers | NVFP4 (group_size=16, stacked 3D tensors with 1D [512] scales) |
Batched block-16 Cholesky GPTQ with Four-Over-Six (1.5× headroom) |
Selective large dense projections (q_b_proj, linear_gate, o_proj) |
MXFP8 (group_size=32) |
Optimal block-scale quantization |
Sensitive dense projections (q_a_proj, kv_a_proj_with_mqa, kv_b_proj, layer-0 MLP, DFly2, SigLIP2 vision encoder, Engram dense layers, embeddings, lm_head, norms, routers) |
BF16 / FP32 | Preserved verbatim from upstream BF16 |
| 4 Engram n-gram embedding tables (host RAM) | 4-bit NVFP4_E4M3_GLOBAL |
Reduces host footprint from 60.84 GiB (FP8) to 33.19 GiB (-45.4%), fitting 100% resident in 64 GiB host RAM without disk stalls |
Quality Verification (vs. Upstream BF16 tencent/Hy4-flash)
Verified in exact streaming lockstep across all 42 decoder layers (including 4-bit NVFP4_E4M3_GLOBAL vs. BF16 Engram table lookups, MXFP8 selective dense projections, and NVFP4 LatentMoE experts) against upstream BF16 tencent/Hy4-flash (revision 1e3e4005da28b6ef7f53c1298b09c8e00bfc659e, W4A16 dequantized weight reference).
Standard Public Corpora (WikiText-2 & C4)
| Corpus | Split & Window | Scored Positions | KL (BF16 || NVFP4) |
Top-1 Agreement | Top-5 Agreement | BF16 Ref PPL | NVFP4 PPL | PPL Ratio |
|---|---|---|---|---|---|---|---|---|
Salesforce/wikitext (wikitext-2-raw-v1) |
test, exact raw lines, 578 × 512 (full split) |
295,358 |
0.25405 |
82.62% |
97.72% |
30.374 |
32.181 |
1.0595× |
Salesforce/wikitext (wikitext-2-raw-v1) |
test, exact raw lines, 144 × 2,048 (full split) |
294,768 |
0.33321 |
82.33% |
97.13% |
34.532 |
35.523 |
1.0287× |
allenai/c4 (en) |
validation, first 121 docs, 64 × 512 |
32,704 |
0.23726 |
81.29% |
97.65% |
53.894 |
56.388 |
1.0463× |
Note: tencent/Hy4-flash is a post-trained instruct model (temperature=0.9 default) rather than a base pretraining checkpoint, so even exact upstream BF16 produces high-confidence logits and elevated raw-continuation perplexity on un-templated text (30.37–34.53 on WikiText-2 raw with Penn Treebank punctuation spacing such as " , " and " @-@ ", and 53.89 on raw C4 web documents). Across all three public splits, the perplexity ratio stays within 1.029×–1.059× of BF16 with 97.1%–97.7% Top-5 agreement.
Multi-Domain & Long-Context Probes
Additional lockstep probes against exact BF16 tencent/Hy4-flash on held-out multi-domain text (code, math, reasoning, and prose from eval_hy4.jsonl, seed 999) and long-context documents:
| Comparison | Scope | KL (BF16 || NVFP4) |
Top-1 Agreement | Perplexity (Quant vs. Ref) |
|---|---|---|---|---|
Full 42-layer checkpoint (W4A16, remaining dense BF16) |
4 × 256 (1,024 tok) |
0.09434 |
91.02% |
10.789 vs. 10.909 (0.9890×) |
Full 42-layer checkpoint (W4A16, remaining dense BF16) |
24 × 256 (6,144 tok) |
0.0441 |
93.29% |
— |
Full 42-layer checkpoint (W4A16, remaining dense BF16) |
2 × 4,096 (8,192 tok) |
0.1749 |
86.15% |
— |
Engram tables FP8 → 4-bit NVFP4_E4M3_GLOBAL |
4 × 256 (1,024 tok) |
0.0560 |
93.46% |
10.82 vs. 11.14 (0.971×) |
Measured Serving Performance (flare run, SM120 96 GiB)
Serving throughput is measured using the signed Flare runtime core exported from this checkpoint (timbuksu/Hy4-flash-NVFP4-FLARE@gb202, commit 5366c19a, W4A16 routed experts + --online-mxfp8 export quantization on additional dense projections and target lm_head + --embedding-table-storage ram, adaptive DFly2 speculation, official sampling defaults temperature=0.9, top_p=1.0, top_k=-1) on a single NVIDIA RTX PRO 6000 Blackwell Server Edition (97,887 MiB VRAM, 600 W, driver 580.82.07, CUDA 13.0, 176 GiB host RAM, 48 vCPUs) with local-inference-lab/llm-inference-bench (v0.9.1, commit 52216d7). Note that the WikiText-2 and C4 metrics above evaluate the un-exported checkpoint weights directly (W4A16 experts, selective MXFP8, remaining dense layers and lm_head in BF16); the Flare package README reports the incremental KL impact of --online-mxfp8.
Prefill Throughput (8k–128k Cold Scout Prompts)
Client prefill throughput equals prompt_tokens / TTFT (N=1 per context length):
| Context | Prompt Tokens | TTFT | Prefill Throughput |
|---|---|---|---|
8k |
8,196 |
0.96 s |
8,532 tok/s |
16k |
16,206 |
1.80 s |
9,011 tok/s |
32k |
32,257 |
3.59 s |
8,977 tok/s |
64k |
64,358 |
7.15 s |
8,995 tok/s |
128k |
128,555 |
14.29 s |
8,999 tok/s |
Sustained Decode Throughput (0k–128k, C=1..8)
Measured over 30.0 s per cell (max_tokens=8192, exact-loop guard enabled; 20 / 20 cells completed with 0 errors and 0 detected loops). Cells report aggregate tok/s (per-request tok/s, mean ITL):
| Context | C=1 |
C=2 |
C=4 |
C=8 |
|---|---|---|---|---|
0 |
108.8 (108.8, 9 ms) |
176.6 (88.3, 11 ms) |
298.5 (74.6, 13 ms) |
452.9 (56.6, 17 ms) |
16k |
110.6 (110.6, 9 ms) |
170.4 (85.2, 12 ms) |
293.7 (73.4, 13 ms) |
436.7 (54.6, 18 ms) |
32k |
108.5 (108.5, 9 ms) |
181.7 (90.9, 11 ms) |
293.0 (73.3, 13 ms) |
445.6 (55.7, 18 ms) |
64k |
108.1 (108.1, 9 ms) |
174.8 (87.4, 11 ms) |
293.1 (73.3, 13 ms) |
444.8 (55.6, 18 ms) |
128k |
112.2 (112.2, 9 ms) |
175.1 (87.5, 11 ms) |
282.6 (70.7, 14 ms) |
437.9 (54.7, 18 ms) |
Single-request coding, reasoning, prose, and vision workloads on the same package measure 92.8–176.6 tok/s (C=1), and the 134,929-token estonia v2 multi-hop benchmark scores 30 / 30 (100.0%); see timbuksu/Hy4-flash-NVFP4-FLARE for the full workload breakdown, memory footprint (85.18 GiB VRAM, 1.17M KV tokens), and Docker quick start.
Running with Flare (Recommended)
Use the pre-exported signed core directly on any 96 GiB SM120 GPU with ≥64 GiB host RAM:
flare run timbuksu/Hy4-flash-NVFP4-FLARE --gpus 0 --embedding-table-storage ram
Or export your own core from this checkpoint:
ignition export /path/to/Hy4-flash-NVFP4 \
--gpus 0 \
--max-concurrency 8 \
--image-concurrency 2 \
--prefill-chunk-size 4096 \
--mtp-draft-tokens 5 \
--mtp-only \
--speculative-token-capacity 48 \
--expert-scale-compression csf \
--draft-head-quantization nvfp4 \
--online-mxfp8 \
--online-mxfp8-scope all \
--lock-gpu-clocks
flare run /path/to/exported/core --gpus 0 --embedding-table-storage ram
Pass "chat_template_kwargs": {"reasoning_effort": "no_think"} in /v1/chat/completions to disable <think:opensource>...</think:opensource> blocks, or "reasoning_effort": "high" (default) to enable reasoning.
vLLM & SGLang Compatibility
Direct loading of timbuksu/Hy4-flash-NVFP4 is not supported by vLLM or SGLang. Tested on 1× NVIDIA RTX PRO 6000 Blackwell Server Edition (SM120, 96 GiB VRAM, driver 580.82.07, CUDA 13.0), every tested release, nightly, vendor branch, and open SM120 PR fails during model initialization or weight loading due to three incompatibilities:
- 4-bit
NVFP4_E4M3_GLOBALEngram tables: This checkpoint packs the four Engram n-gram tables intomulti_head_embedding.{weight,scale,weight_scale_2}(U8E2M1 nibbles +F8_E4M3block-16 scales + FP32 global scale,33.19 GiBtotal). Both vLLM (FlashEmbedding.load_weights) and SGLang (hunyuan_v4_flash.py:_load_engram) only support BF16 or FP8 tables (multi_head_embedding.embedding.{weight,weight_scale_inv}). - Stacked 3D NVFP4 LatentMoE experts with 1D
[512]scales: Routed experts are stored as stacked 3D tensors (experts.{gate,up,down}_proj.{weight,weight_scale}) with 1D[512]per-expertweight_scale_2andinput_scaletensors. vLLM'sHYV4FlashModelMixin.load_weightseither rejects.input_scale/.weight_scale_2as unknown weights or requiresvalue.ndim == 3on stacked expert tensors. - SM120 sparse MLA backend gating (upstream vLLM): Upstream
vllm/models/hy_v4_flash/nvidia/attention.pyrestrictsHYV4FlashAttentionto Hopper (SM90) and data-center Blackwell (SM100).
| Runtime & Version / Branch Tested | Observed Result on timbuksu/Hy4-flash-NVFP4 (SM120) |
|---|---|
vllm==0.34.0 (CUDA 13.0 release) |
Fails at config load: model type 'hy_v4_flash' not recognized |
vllm==0.34.1rc1.dev288+g0f15cf011 (nightly, matching vllm/vllm-openai:hy4-flash hy_v4_flash implementation) |
Fails in vllm/models/hy_v4_flash/nvidia/attention.py: NotImplementedError: Flash MLA requires Hopper or Blackwell data-center GPUs |
vLLM PR #68387 (hy4-flash-capability12-nvfp4, overlaid with matching hy_v4_flash/nvidia/model.py) |
Passes SM120 check; fails during weight loading: ValueError: Invalid packed expert shape for layers.1.mlp.experts.down_proj.input_scale: torch.Size([512]) (also lacks NVFP4_E4M3_GLOBAL Engram support) |
vLLM PR #70147 (hy4_flash_sm120, overlaid on nightly) |
Passes SM120 check; fails during weight loading: ValueError: Unknown Flash checkpoint weight: layers.1.mlp.experts.down_proj.input_scale (also lacks NVFP4_E4M3_GLOBAL Engram support) |
SGLang PR #51159 (hy4_flash_squash, backing lmsysorg/sglang:hy4-flash, on sglang==0.5.23 + sglang-kernel==0.4.11) |
Fails during weight loading in hunyuan_v4_flash.py (_load_engram): KeyError: 'multi_head_embedding.scale' |
To serve Hy4-flash with vLLM or SGLang on multi-GPU Hopper/Blackwell (TP=8) hosts, use upstream tencent/Hy4-flash-FP8 or tencent/Hy4-flash following the vLLM Hy4-flash recipe or SGLang Hy4-flash cookbook. To serve this NVFP4 checkpoint on a single 96 GiB SM120 GPU, use Flare (timbuksu/Hy4-flash-NVFP4-FLARE).
License
Governed by the Tencent Hy License, Version 1.0 (LICENSE), matching tencent/Hy4-flash.
- Downloads last month
- 69