Hy4-flash - IQR-V4 - for radiance
IQR-V4 quants of tencent/Hy4-flash for the radiance inference engine on AMD RDNA 4.
For newer EXL3-V3 (
mad) mixed-precision quants with 28.1% lower mean KL at equal size (0.01278 vs 0.01777 at ~129 GiB withRADIANCE_HY4_ENGRAM_EPS=f32), see keptn/hy4-flash-exl3.
| File | Size | Expert gate_up |
Expert down |
Shared trunk |
|---|---|---|---|---|
hy4-flash-iqr-v4-u3.rad |
128.61 GiB | u3 trellis (mad, GPTQ) |
w4nl group-64 (GPTQ) |
u5 trellis / i8 (GPTQ) |
hy4-flash-iqr-v4-np.rad |
140.11 GiB | u4 trellis (mad, GPTQ) |
w4nl group-64 (GPTQ) |
u5 trellis / i8 (GPTQ) |
Every .rad file includes:
- 41 routed MoE layers (512 experts per layer): IQR-V4 GPTQ (
u3oru4trellis forgate_up,w4nlgroup-64 fordown, calibrated with per-tensor Grams). - Engram tables: native
E4M3rows (fp8_e4m3, per-row BF16 scale). - DFly2 drafter:
IQ8Rblock drafter (i8, group-256,fwht128) for speculative decoding. - Vision and video tower: kept in full BF16.
- TP2 expert placement:
expert-profile.json(432 KB) is included for hot-expert VRAM pinning on 2x 32 GB GPUs.
The .recipe file next to each model lists every quantization rule.
Which file
hy4-flash-iqr-v4-u3.rad(128.61 GiB,u3, 3.39 bpw experts): smaller and faster on 2x 32 GB cards (pins ~66% of experts in VRAM withexpert-profile.json).hy4-flash-iqr-v4-np.rad(140.11 GiB,u4, 4.10 bpw experts): lower KL; recommended for 4x 32 GB cards (all_vram).
Quality
Distance to the BF16 reference (tencent/Hy4-flash in HF transformers, FP32 on CPU) measured with radiance --kld-ref on Radeon AI PRO R9700 (BF16 KV cache, no prefix cache), 160 documents / 40,443 scored positions, full vocabulary (reference PPL 1.9761).
With RADIANCE_HY4_ENGRAM_EPS=f32 (matches HF FP32 Engram RMSNorm eps)
Measured at TP2 on 2x Radeon AI PRO R9700:
| File | Expert bpw | Size | Mean KL | Median | p99 | p99.9 | Max | Top-1 | PPL ratio |
|---|---|---|---|---|---|---|---|---|---|
hy4-flash-iqr-v4-u3.rad |
3.39 | 128.61 GiB | 0.01777 | 0.000491 | 0.2608 | 0.7967 | 5.14 | 96.37% | 1.0049 |
hy4-flash-exl3-v3-m350.rad (keptn/hy4-flash-exl3) |
3.50 | 129.54 GiB | 0.01278 | 0.000390 | 0.1783 | 0.5327 | 2.70 | 96.67% | 1.0050 |
With default BF16 Engram RMSNorm eps
Measured at TP4 on 4x Radeon AI PRO R9700 (max-num-batched-tokens: 4096):
| File | Expert bpw | Size | Mean KL | Median | p99 | p99.9 | Max | Top-1 | PPL ratio |
|---|---|---|---|---|---|---|---|---|---|
hy4-flash-iqr-v4-np.rad (u4) |
4.10 | 140.11 GiB | 0.03096 | 0.001183 | 0.4160 | 1.3022 | 5.91 | 95.09% | 1.0090 |
hy4-flash-iqr-v4-u3.rad (u3) |
3.39 | 128.61 GiB | 0.03838 | 0.001413 | 0.5187 | 1.5589 | 7.04 | 94.53% | 1.0133 |
Note: Default BF16 Engram RMSNorm epsilon adds a ~0.0226 KL floor relative to the HF FP32 reference. Set RADIANCE_HY4_ENGRAM_EPS=f32 when running on builds that support it.
Speed
TP2 on 2x Radeon AI PRO R9700 (32 GB each), 262,144 context, BF16 KV cache, hot experts pinned in VRAM (expert-profile.json), Engram tables in host RAM, DFly2 off. Decode: 512 tokens per stream. Prefill: 13k to 16k token prompts.
| File | Decode (1 stream) | Decode (4 streams total) | Prefill | Experts in VRAM |
|---|---|---|---|---|
hy4-flash-iqr-v4-u3.rad |
62.2 tok/s | 155.9 tok/s | 2,280 tok/s | 66% |
hy4-flash-iqr-v4-np.rad |
53.4 tok/s | 106.8 tok/s | 1,573 tok/s | 55% |
With DFly2 speculative decoding on hy4-flash-iqr-v4-u3.rad (coupled drafts, 1 stream, same TP2 setup; greedy output matches DFly2 off):
| DFly2 depth | Code | Prose | Accepted drafts (code / prose) |
|---|---|---|---|
| off | 61.9 tok/s | 62.7 tok/s | - |
| 2 | 115.6 tok/s | 75.9 tok/s | 87% / 33% |
| 3 | 143.3 tok/s | 69.9 tok/s | 92% / 22% |
| 5 | 151.0 tok/s | 67.2 tok/s | 77% / 17% |
Requirements and Quick Start
- Engine: radiance
2.4.1with radiance-exl3-oot (exl3-2.4.1-r3or newer), or Code000-211/RadianceHy4Flash (commitaaf09ff7or newer forDFly2speculation). - Hardware: 2 or 4 AMD RDNA 4 GPUs with 32 GB VRAM (tested on 2x and 4x Radeon AI PRO R9700).
Download a model file and expert-profile.json (example for u3 on 2 cards; replace with hy4-flash-iqr-v4-np.rad for u4):
hf download keptn/hy4-flash-iqr hy4-flash-iqr-v4-u3.rad expert-profile.json config.json --local-dir /models/hy4-flash-iqr
Always pass expert-profile.json on 2 cards so expert-pin-top pins hot experts in VRAM. Set RADIANCE_HY4_ENGRAM_EPS=f32 to match the HF FP32 reference.
Credits
- Base model: tencent/Hy4-flash
- Inference engine: Deadcode and the radiance contributors
- Hy4-flash plugin and IQR-GPTQ foundation: Code000 (RadianceHy4Flash)
- Quantization and packaging: keptn42 (Hugging Face)
License
Tencent Hy License 1.0, see LICENSE. The model files in this repository are a quantized form of tencent/Hy4-flash.
- Downloads last month
- 96
Model tree for keptn/hy4-flash-iqr
Base model
tencent/Hy4-flash