Hy4-flash W4A16 AWQ (g32)

This checkpoint is a 4-bit quantization of Tencent Hy4-flash at base revision d88c9dfd96ba, targeting 4× Tesla V100 32GB GPUs (128 GB total VRAM).

What is quantized:

  • Routed experts (layers 1–41). Quantized to asymmetric uint4 (group size 32, AWQ GEMM layout) from Tencent's BF16 weights using sequential layer-by-layer GPTQ with diagonal-Hessian clipping search.
  • Engram tables (layers 1, 11, 21, 31). Encoded to E4M3 with BF16 per-row scales using Tencent's exact FP8 round trip.
  • Shared-expert int8 sidecar (hy4-v100-shared-w8.safetensors). Optional int8 g32 GPTQ packs of the unchanged BF16 shared expert for the V100 engine's fast profiles. The model index does not list it, so other loaders ignore it.
  • Attention, dense MLP, router, norms, embeddings, LM head, DFly2 drafter. Preserved at Tencent's source precision.

The file layout, tensor names, shapes, dtypes, and safetensors headers follow the AWQ-g32 layout established by leoncca/Hy4-flash-AWQ-g32, so any loader that supports that layout loads this checkpoint unchanged.

Download

hf download philbert440/Hy4-flash-W4A16-AWQ --local-dir Hy4-flash-W4A16-AWQ
(cd Hy4-flash-W4A16-AWQ && sha256sum -c SHA256SUMS)

The download is 168.5 GB: 167.3 GB of checkpoint files, the 0.62 GB shared-expert sidecar (hy4-v100-shared-w8.safetensors), and a 0.62 GB per-rank copy in shared-w8-cache/ for older engine releases.

Method

Part Format How it was made
Routed experts, layers 1–41 uint4 asymmetric, group size 32, integer zero points, FP16 scales, AWQ GEMM packing GPTQ in natural column order with a diag(H)-weighted clipping search and damping 1e-5. Layers are fitted in order, each calibrated on the outputs of the already-quantized layers below it.
Engram tables (layers 1, 11, 21, 31) E4M3 codes with BF16 per-row scales Re-encoded from the BF16 table with Tencent's FP8 round trip (s = amax/448 in FP32, E4M3 codes, BF16 scale), matching Tencent's runtime numerics within 6e-15 normed relative error.
Shared expert (sidecar) int8 symmetric, group size 32, FP16 scales GPTQ codes of the unchanged BF16 shared expert used by the V100 engine's fast profiles.
Attention, dense MLP, router, norms, embeddings, LM head, drafter unchanged Preserved at Tencent's source precision.

Calibration. 581,183 tokens in windows of up to 2,048 tokens:

Source Tokens Share
Agentic coding-assistant sessions (private, sanitized, not released) 360,270 62.0%
Magicoder-OSS-Instruct-75K (code) 72,024 12.4%
Aya dataset (multilingual) 60,514 10.4%
Glaive function calling v2 (tool use) 48,116 8.3%
GSM8K train (math) 30,069 5.2%
OASST2 train (chat) 10,190 1.8%
  • Sanitizing the private sessions. Secrets, names, hosts, addresses, and identifiers were replaced with placeholders prior to calibration.
  • Privacy checks. Membership and verbatim-continuation probes on calibration windows against session-disjoint held-out windows found no memorization gain (membership gap +0.0007 nats/token [−0.022, +0.024]; verbatim gain −0.11 tokens [−0.39, +0.14]).
  • File scan. A scan of every released file found no calibration text, paths, hostnames, or identifiers.

Quality vs tencent/Hy4-flash BF16

All quality numbers compare this checkpoint directly against the tencent/Hy4-flash BF16 base model on 40 held-out prompts × 64 teacher-forced decode positions (2,560 positions total).

Logit fidelity

Evaluation path Mean KL(W4A16 ‖ BF16) p95 KL Top-1 agreement with BF16
Offline FP32 forward (weights only) 0.0409 nats 0.201 nats 95.16%
V100 engine (fast15, chunk 4096, 1 stream) 0.0407 nats — 95.04%

DFly2 speculative acceptance vs BF16 base

Paired evaluation of Tencent's built-in DFly2 drafter (k=5 drafts) on 40 held-out prompts (2,360 verify positions) comparing this W4A16-AWQ checkpoint directly against tencent/Hy4-flash BF16 in FP32 reference forward. Brackets are paired case-bootstrap 95% intervals.

DFly2 regime tencent/Hy4-flash BF16 This checkpoint (W4A16-AWQ) Delta [95% CI] Retention vs BF16
Raw k=5 accepted tokens / verify 1.7975 1.7564 −0.0411 [−0.0754, −0.0089] 97.71%
fast15 variable verify (var@0.45) 1.7186 (width 3.619) 1.6852 (width 3.636) −0.0335 [−0.0661, −0.0025] 98.05%
Slot-1 acceptance rate 70.97% 71.06% +0.09 pp 100.1%
Per-slot acceptance (slots 1–5) 71.0 / 46.1 / 29.7 / 19.7 / 13.3% 71.1 / 45.0 / 28.5 / 18.7 / 12.4% — —
Decode top-1 agreement (W4A16 vs BF16) — 93.09% (2,383 / 2,560) — —

Speed and long-context verification (4× V100-SXM2-32GB)

Measured from the prebuilt hy4-fast15-20261129.7 SM70 wheel in a clean Python 3.12 venv on 4× Tesla V100-SXM2-32GB (NVLink, 300 W), TP4, FP8 (fp8_ds_mla) KV cache, HY4_W8_SHARED_SIDECAR=1.

Measure fast14 (chunk 2048) fast15 (20261128) fast15 (20261129.7)
Plain decode, short context (C1 / C4 / C8 / C16) ~107 / 307.5 / — / — tok/s 106.8 / — / — / — tok/s 112.6 / 315.0 / 472.0 / 589.8 tok/s (113.2 / 323.8 at max-seqs=4)
DFly2 speculative decode, 96 real prompts (C1) 138.1 tok/s 149.2 tok/s 168.4–171.3 tok/s (.6/.3 96-prompt panel)
DFly2 concurrency, random (C1 / C4 / C8 aggregate) — — 289.5 / 561.7 / 418.2 tok/s (max-seqs=8; 303.8 / 607.8 at max-seqs=4)
8,192-token prompt TTFT (random) 3.05 s 1.93 s (4,240 tok/s) 1.66 s (4,931 tok/s; 1.63–1.64 s at max-seqs=4)
32,768-token prompt TTFT (random) 12.69 s 8.07 s (4,060 tok/s) 7.57 s (4,327 tok/s; 7.54 s at max-seqs=4)
Full 1M-token context (DCP=2 plain) prefill / decode — 392.33 s (2,672 tok/s) / 55.7 tok/s 309.23 s (3,391 tok/s) / 76.3–90.4 tok/s (1M–128K)
Full 1M-token context (DCP=2 + DFly2) 128K–512K decode — — 146.4 / 144.4 / 260.2 tok/s (fits full 1M: 1,113,862 KV)
KV cache tokens (DCP=2 plain / DCP=2 + DFly2, chunk 4096) — 1,190,611 / — 1,223,988 / 1,113,862
Engram Triton cold JIT kernels (fresh cache) 5 kernels 5 kernels 0 (100% native SM70 CUDA, STACK:0)
tool_choice (required & named function) not enforced not enforced enforced (13/13 live)

Full 1M-token context verification (DCP=2, clean wheel .7)

Verified up to the full native 1,048,576-token window (--tensor-parallel-size 4 --decode-context-parallel-size 2 --max-model-len 1048576, 1,223,988 KV cache tokens plain / 1,113,862 KV tokens with DFly2, 88–93 s boot) with direct 2-GPU NVLink P2P IPC active across target and all 12 DFly2 draft layers. Five needles placed at [8%, 30%, 50%, 70%, 92%] depth plus streaming decode:

Context length Needles found Prefill TTFT (20261129 → .7) Plain decode (20261129 → .6 → .7) DCP=2 + DFly2 (.7)
131,072 (128K) 5/5 37.08 s → 31.46 s (4,162 tok/s) 70.2 → 82.0 → 90.42 tok/s (+28.8%) 146.4 tok/s (2.76 tok/step, 5/5)
262,144 (256K) 4/5* 78.07 s → 65.05 s (4,028 tok/s) 68.3 → 81.2 → 89.21 tok/s (+30.6%) 144.4 tok/s (2.45 tok/step, 4/5*)
524,288 (512K) 5/5 170.41 s → 138.57 s (3,783 tok/s) 62.8 → 79.6 → 85.38 tok/s (+36.0%) 260.2 tok/s (3.83 tok/step, 5/5)
1,048,576 (1M) 5/5 392.33 s → 309.23 s (3,391 tok/s, −83.1 s) 55.7 → 73.2 → 76.33 tok/s (+37.0%) fits 1M (315.4 s prefill, 4.88 tok/step)

*At 256K, the 30% depth needle landed adjacent to a prompt-injection security log in the synthetic filler text; all other depths (including 5/5 at 128K, 512K, and 1M) passed cleanly.

Serving with the V100 engine

The engine is github.com/philbert440/hy4-flash-v100. Install the SM70 wheel from release hy4-fast15-20261129.7 and follow its HY4-V100.md guide for hardware, install, and the full vllm serve command:

export VLLM_HY4_PROFILE=fast15
export HY4_W8_SHARED_SIDECAR=1
export VLLM_HY4_DFLY_GRAPHS=both
unset HY4_W8_SHARED_GPTQ_CACHE
vllm serve Hy4-flash-W4A16-AWQ --served-model-name hy4-flash --tensor-parallel-size 4 ...   # full flags in HY4-V100.md

The engine reads the shared expert's int8 packs from hy4-v100-shared-w8.safetensors and verifies they match this checkpoint's files. No separate cache directory or rebind step is needed. Other engines that load AWQ G32 Hy4-flash checkpoints load this one unchanged and ignore the sidecar and shared-w8-cache/.

Known limits

  • Calibration domain. Calibration is weighted towards agentic coding sessions (62%) alongside public code, multilingual, tool-use, math, and chat datasets (38%).
  • Engine-side dense int8 conversion. Dense projections and the small-batch LM head are converted to int8 at load time by the V100 engine (VLLM_HY4_PROFILE=fast15); that is an engine runtime choice, not baked into the checkpoint's BF16/FP16 tensors.
  • Measurement scope. Logit KL was measured on contexts up to ~2,000 tokens, long-context needle retrieval up to 1,048,576 tokens (with the 256K 30%-depth filler-collision caveat noted above), and serving throughput on 4× V100-SXM2-32GB.
  • DFly2 speculative retention. Relative to tencent/Hy4-flash BF16, this 4-bit checkpoint retains 98.05% of DFly2 var@0.45 acceptance (−0.0335 accepted tokens/verify, 97.71% raw k=5).

License and attribution

The original model is by the Tencent Hy Team. The AWQ-g32 file layout, packing format, configuration, and unchanged non-expert files follow the format established by leoncca/Hy4-flash-AWQ-g32. This derivative is distributed under the Tencent Hy License, Version 1.0. See NOTICE for every changed or added file, and SHA256SUMS to verify file integrity.

Downloads last month
59
Safetensors
Model size
220B params
Tensor type
BF16
·
I32
·
F32
·
F8_E4M3
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for philbert440/Hy4-flash-W4A16-AWQ

Quantized
(78)
this model