Self-hosting

Hy4 Flash: 220B, and a third of it is lookup

·

Short answer

  • Tencent open-sourced Hy4 flash on 18 November: three repositories — the instruct model, an FP8 build, and the pre-trained base — on Hugging Face, ModelScope and GitCode.
  • Of the 220B total parameters, 63.5B are an n-gram hash table (Engram) and only 155.5B are the actual language backbone. That is why 220B can serve at 11.7B active per token without being slow.
  • Self-hosters get a 1M-token model with a KV cache one sixth of Hy4's, an FP8 checkpoint and an official 8-way tensor-parallel recipe — but under the Tencent Hy License, not MIT.

Two days after launching Hy4 flash as an API at ¥0.50 per million input tokens, Tencent published the weights. The interesting part is what the parameter budget buys, because a 220B model that serves like a 12B one is an architecture choice, not a marketing line.

What was released

Three repositories, which matters more than the headline: Hy4 flash (instruct), Hy4 flash-FP8 (quantised for serving) and Hy4 flash-base (pre-trained only). Mirrored on Hugging Face, ModelScope and GitCode; Tencent says it is accelerating the release of full Hy4 too.

The licence is the Tencent Hy License, not MIT or Apache — a real difference from this month's other open releases, such as Meituan's MIT-licensed LongCat-2.5. Read it before any commercial deployment, especially one that redistributes a fine-tune.

Where the 220B actually goes

The card breaks the parameter count down in a way most model cards do not:

ComponentParametersWhat it is
Language backbone (excl. Engram, ViT, drafter)155.5B42 layers, 1 dense FFN + 41 MoE
Engram n-gram embedding63.5Bbigram and trigram hash tables, no matrix multiply
Vision encoder0.43BSigLIP2-So400m-Patch16-Res512, adapted
DFly2 drafter0.85B5-layer speculative decoder
Total220.3B11.3B text + 0.43B vision active per token

The Engram block is the unusual piece: 63.4B parameters of learned bigram and trigram embeddings, read through 8 hash heads per order over a 10.3M-entry vocabulary, injected at backbone layers 1, 11, 21 and 31. A lookup table costs storage and memory bandwidth, not floating-point work — it inflates the checkpoint by roughly 29% and adds nothing to the per-token compute bill.

Attention is hybrid at an explicit ratio: sparse attention (IndexPool) and sliding-window attention interleave at 1:3, giving 12 sparse and 30 SWA layers. Sparse layers select at most 2,048 tokens by group; SWA layers see a 512-token causal window. Both use MLA with a 512-dimension KV latent.

Why the long context got cheap

Tencent states the KV cache is 1/6 of Hy4's and 1/24 of Hy3's. Three mechanisms stack to get there: the hybrid attention layout, the 512-token sliding windows, and the sparse selection cap — a token attends to at most ~2K keys rather than to the whole 1M context.

The speculative decoder inherits that structure instead of duplicating it. DFly2 (0.85B, 5 layers) reuses the target model's KV cache and the indexer's selected positions through KV Share and Index Share, so draft tokens also attend to at most ~2K keys regardless of context length, keep zero extra KV memory and stay out of prefill. That is the difference between speculative decoding that pays off at 4K and one that still pays off at 1M.

Self-distillation, and the 50% output cut

Hy4 flash was not trained from scratch as a small model: the post-training recipe is self-distillation from the flagship Hy4, plus reinforcement learning that Tencent says cuts average end-to-end output tokens by 50%. That second factor is the commercial one — at a fixed price per token, halving output length halves both the bill and the latency.

ModelWorkIndex scoreCost per task (relative)
Hy451.41× (baseline)
Hy4 flash42.11/20
Hy4 preview39.71/13

The card's blind evaluation adds a human number: satisfaction 2.79 out of 4 against Claude Haiku 5.5 at 2.81, median completion 6.7 minutes, ¥0.26 per task. WorkIndex is Tencent's own benchmark over eight workplace task families, so treat the ranking as a vendor measurement — but 42.1 versus 39.7 at one-thirteenth the cost is a claim a buyer can test.

What it takes to run it yourself

Checkpoint arithmetic is less intimidating than "220B" sounds, because the FP8 build exists:

PrecisionCheckpoint sizeWeight traffic per token
BF16, full 220.3B~440 GB~23 GB (11.7B active)
FP8, as released~220 GB~12 GB
Engram tables alone (BF16)~127 GBread on hash lookup, not per matmul

Tencent ships serving recipes rather than leaving you to guess: an official vLLM image running the FP8 checkpoint with --tensor-parallel-size 8 and DFly speculation, plus an SGLang image for x86 and Arm. Eight GPUs for a flash-tier model is a real bill — which is why ¥0.50 per million input tokens stays the sane default for almost everyone.

Three numbers to quote carefully

  • 224B versus 220B. The Chinese announcement says 2,240亿; the card says 220B and its table sums to 220.3B. Use 220B.
  • 12B versus 11.7B. "12B activated" rounds up 11.3B text plus 0.43B vision. Both defensible, not the same number.
  • "1/8 of DeepSeek" is a task-cost ratio. It is WorkIndex against DeepSeek-V4.1-Flash-1017 at max tier on peak-hour pricing, not the per-token table. On unit prices the gap is narrower, as this site measured at launch.

What the release establishes is a shape worth watching: a flagship distilled into a cheap tier, a third of its parameters parked in lookup tables, a KV cache cut to a sixth, weights out two days after launch. It is a cheaper way to ship a capable small model than training one from scratch — and now checkable by anyone with eight GPUs.

Sources: Hugging Face model card for tencent/Hy4-flash — 220B total with 64B Engram, 11.3B text plus 0.43B vision active per token, 1M context, 42-layer backbone (1 dense, 41 MoE), LatentMoE 512 routed / 16 plus 1 shared, hybrid attention 12 sparse and 30 SWA at 1:3, sparse selection up to 2,048 tokens, 512-token SWA window, Engram at layers 1/11/21/31 (8 hash heads, 10.3M vocabulary, 63.4B table), KV cache 1/6 of Hy4 and 1/24 of Hy3, DFly2 with KV Share and Index Share, self-distillation plus RL cutting output tokens 50%, WorkIndex 42.1 / 39.7 / 51.4 at 1/20 and 1/13 cost, blind evaluation 2.79 vs Claude Haiku 5.5 at 2.81 with ¥0.26 per task, 220B BF16/F32 model size, Tencent Hy License (checked 2026-11-19); Tencent Hunyuan announcement and IT之家 coverage, 18 November 2026, for the three repositories, mirrors, 2,240亿 and 12B active figures and the Hy4 open-source intent (checked 2026-11-19). Checkpoint sizes are arithmetic at 2 bytes (BF16) and 1 byte (FP8) per parameter, not measured downloads.