Skip to content

Tencent Hy4 and Hy4 flash: Sparse Indexing, LatentMoE and 63.5B Engram Tables

optionalcorefrontierblogrubric 10/122026 · ~45 min

Tencent Hunyuan Team

Read first: DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Model · DeepSeek-V4.1-Flash: Pushing the Limits of KV Cache Compression

Status

TL;DR. Tencent’s Hy4 (announced November 4, 2026; HF repo created October 29) and Hy4 flash (announced November 16; HF repos public November 17–18) are open-weight MoE siblings documented through detailed GitHub READMEs (no arXiv paper yet, licensed under the custom Tencent Hy License). Hy4 is a 770B-total / 49B-active flagship using gated DeepSeek Sparse Attention (DSA) with cross-layer IndexCache, iHC 4-stream residuals, and a 3.3B DFly2 shared-KV drafter. Hy4 flash shrinks this into a 220B-total / 12B-active throughput specialist (11.3B text) by pairing 1:3 sparse-to-sliding-window attention, LatentMoE (1,536-d latent expert space), and 63.5B Engram N-gram lookup tables — cutting KV cache to 1/6 of Hy4 (1/24 of Hy3) and pushing decode past 150 tokens/s (all numbers vendor-reported in the GitHub READMEs).

What to skip on a first read. Use the side-by-side architecture table to compare Hy4 against Hy4 flash quickly; skip the vendor benchmark rows if you only want the architectural blueprint (LatentMoE, Engram, iHC, and DFly2).

1 · Flagship vs throughput-optimized sibling. The pair illustrates a clean 2026 split: build a massive flagship teacher (Hy4) for maximum reasoning and knowledge quality, then distill and RL-compress it into a low-KV, low-active-FLOP production workhorse (Hy4 flash).

Specification (vendor READMEs)Hy4 (flagship)Hy4 flash (high-throughput)
Total / active parameters770B / 49B~220B (155.5B language backbone + 63.4B Engram + 0.43B ViT + 0.85B DFly2) / 12B (11.3B text)
Layers & hidden dim78 layers (1 dense, 77 MoE), d=6,144d = 6{,}14442 layers (1 dense, 41 MoE), d=3,072d = 3{,}072
MoE routing256 routed (top-8) + 1 sharedLatentMoE: 512 routed (top-16) + 1 shared, 1,536-d latent
AttentionGated DSA + IndexCache (2603.12201), MLA 64 heads; indexer 32×128, top-2,048Hybrid MLA: 12 sparse (IndexPool) + 30 SWA (w=512w = 512; vendor-described as 1:3 hybrid)
N-gram memory (Engram)Not listed63.4B bigram & trigram (2 orders × 8 heads/order = 16 heads/layer), layers 1, 11, 21, 31
Residual streamsiHC (identity Hyper-Connections), 4 streamsiHC, 4 streams
Speculative drafter (DFly2)5 layers, 3.3B (shared KV + sparse indices)0.85B (shared KV + sparse indices)
Context / vision / vocab1M contextVocab 120,832; SigLIP2-adapted vision encoder (0.43B)
Open weight variantsHy4, Hy4-FP8, Hy4-baseHy4-flash, Hy4-flash-base

2 · LatentMoE: routing experts in a compressed subspace. In a standard MoE, every token’s dd-dimensional hidden vector is dispatched to experts and multiplied by d×dffd \times d_{\text{ff}} matrices. LatentMoE in Hy4 flash first projects the d=3,072d = 3{,}072 hidden state into a 1,5361{,}536-d latent space (half width) before routing across 16 of 512 experts (plus 1 shared expert). That cuts both expert matrix dimensions and all-to-all communication volume per routed token while keeping fine-grained expert specialization.

3 · Engram N-gram lookup tables: cheap total capacity off the FLOP path. Hy4 flash inserts bigram and trigram hash-lookup tables (2 n-gram orders × 8 heads per order = 16 heads per layer, 64 heads total) at layers 1, 11, 21, and 31, totaling 63.4B embedding-table parameters — nearly 29% of the model’s ~220B total count (~15.85B per Engram layer, ~0.99B per hash head on average). Because each token only reads a handful of hashed rows rather than multiplying dense weight matrices, Engram adds massive static lookup capacity at almost zero matrix-multiply cost (the same family of ideas seen in DeepSeek-V4.1-Flash and Qwen3.8-Flash-Next).

4 · IndexCache / IndexPool and DFly2 shared-KV drafting. Long-context sparse attention still pays two bills: running the top-kk token indexer at every layer, and feeding long contexts to a speculative drafter.

  • Cross-layer index reuse: Hy4 uses IndexCache (arXiv:2603.12201) with a 32-head × 128-dim indexer selecting top-2,048 tokens; Hy4 flash combines IndexPool sparse layers with 30 layers of 512-token sliding-window attention (1:3 ratio), shrinking its KV cache to 1/6 of Hy4 and 1/24 of Hy3.
  • DFly2 drafter: both models attach a lightweight drafter (3.3B / 5 layers for Hy4; 0.85B for Hy4 flash) that reuses the target model’s KV cache and sparse indices. Each drafted token therefore attends to roughly 2K keys at constant cost instead of building a separate KV cache or scanning the full 1M context.

Every figure below is vendor-reported from the official GitHub READMEs (Tencent-Hunyuan/Hy4 and Tencent-Hunyuan/Hy4-flash), with no accompanying arXiv paper:

Benchmark / metricHy4 (770B-A49B)Hy4 flash (220B-A12B)Vendor comparison baseline
Base MMLU (5-shot)91.688.7 (mid-train caveat)DeepSeek-V4-Pro-Base: 91.1
Base SimpleQA (5-shot)57.237.5 (mid-train caveat)DeepSeek-V4-Pro-Base: 52.1
Base SuperGPQA (5-shot)62.7—DeepSeek-V4-Pro-Base: 54.8
579 financial tasks (out of 4)3.04 / 4—DeepSeek-V4.1-Flash-1017: 2.97; Kimi K3.1 Pro & GLM-5.3: 2.68
WorkIndex—42.1Hy4 preview: 39.7
Cost per task1× (reference)1/20 of Hy41/13 of Hy4 preview; 1/8 of DeepSeek-V4.1-Flash-1017
Reliability (internal, Hy4)Hallucination 5.45%; spec errors 5.6%—Down from 15.76% and 23.1% on Hy4 preview

Notice one instructive contrast inside Tencent’s own numbers: Hy4 Base reaches 57.2 on SimpleQA versus 37.5 for Hy4 flash Base, even though Hy4 flash carries 63.5B Engram parameters — a reminder that N-gram hash tables do not automatically substitute for 770B of backbone knowledge capacity.

  • GitHub README only, no technical report. Pretraining token count, optimizer recipe, data curation, and ablations for LatentMoE, iHC, and Engram are not published yet. Treat efficiency ratios and internal scores (WorkIndex, 579 financial tasks, hallucination rates) as vendor claims until independently replicated.
  • Mid-training instruction distortion. Tencent explicitly flags that Hy4 flash Base saw substantial synthetic instruction data during mid-training, so its 5-shot base scores (MMLU 88.7, SimpleQA 37.5) are not apples-to-apples with pure pretraining checkpoints.
  • Stated capability gaps. The Hy4 README openly notes a remaining gap to top proprietary models on research-level math, long-horizon coding, and self-improvement.
  • License and release timeline. Weights are under the custom Tencent Hy License (not Apache-2.0/MIT), and HF repository timestamps (Oct 29 for Hy4; Nov 17–18 for Hy4 flash and bases) slightly differ from BenchLM’s Nov 4 / Nov 16 launch dates.
  • Closest architectural cousins: DeepSeek-V4.1-Flash (CSA2 cross-layer KV/index reuse, 196B Engram tables, mHC, DSpark drafter) and Qwen3.8-Flash-Next (3:1 hybrid attention, 51B N-gram table, 4-branch gated residual).
  • LatentMoE sibling: ERNIE-5.5-Flash-Base also adopts a Multi-Router Latent MoE (2,048-d latent space, 512 experts) alongside 4-stream mHC.
  • Hybrid SWA + MoE context: MiMo-V2-Flash is another production SWA-heavy sparse MoE designed for fast decoding.
  • Core building blocks: MLA for compressed KV attention, Speculative Decoding for how DFly2 accelerates decode, and SimpleQA for the factual-recall gap between Hy4 and Hy4 flash.

Questions to think through

These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.

  1. Derive / compute

    Hy4 flash has 42 layers (12 MLA sparse-attention layers with IndexPool and 30 sliding-window layers of window w = 512) and ~220B total parameters: 155.5B language backbone, 63.4B Engram N-gram tables across 4 layers (layers 1, 11, 21, 31; 2 n-gram orders—bigrams and trigrams—with 8 hash heads per order = 16 heads per layer), 0.43B ViT, and 0.85B DFly2 drafter, with 12B total active (11.3B text). Compute (a) the fraction of layers storing long-range KV cache compared with an all-global 42-layer model, (b) the fraction of total parameters sitting in Engram vs. the 155.5B language backbone (noting why non-Engram total ≠ language backbone), and (c) the average Engram parameter count per Engram layer and per individual hash head.

    What a strong answer covers
    • (a) Only 12 of 42 layers (28.6%) store long-range sparse KV entries; the other 30 layers (71.4%) keep a bounded 512-token sliding window, which combines with MLA and reduced hidden dimension (3,072 vs Hy4's 6,144) to cut KV cache to 1/6 of Hy4 and 1/24 of Hy3.
    • (b) Engram holds 63.4B / 220B ≈ 28.8% of total parameters, while the language backbone excluding Engram, ViT (0.43B), and DFly2 (0.85B) is 155.5B (≈ 70.7% of total; all non-Engram parameters including ViT + DFly2 sum to ~156.8B). Avoid dividing the rounded whole-model 12B active count by 155.5B as if it were purely backbone active.
    • (c) Spreading 63.4B Engram parameters across 4 layers gives ~15.85B parameters per Engram layer; because each layer has 2 n-gram orders × 8 heads per order = 16 heads (64 heads total), the average is 63.4B / 64 ≈ 0.99B parameters per hash head.
    • Notice that Engram lookup touches only a tiny row slice per token, adding virtually zero matrix-multiply FLOPs while dramatically increasing total parameter count.
  2. Mechanism

    Explain how Hy4 flash's LatentMoE (16 of 512 routed experts in a 1,536-d latent space vs hidden size 3,072) and DFly2 shared-KV/shared-index drafter (0.85B for Hy4 flash, 3.3B for Hy4) cut serving cost simultaneously on compute, communication and attention work.

    What a strong answer covers
    • LatentMoE projects the 3,072-d hidden state down to a 1,536-d latent space (2× narrower) before routing across 16 of 512 experts, halving per-token expert projection dimensions and all-to-all token-payload bandwidth across expert-parallel GPUs.
    • Fine-grained routing (16 of 512 + 1 shared) preserves combinatorial specialization inside that narrower latent space.
    • DFly2 shares both the KV cache and the sparse-attention top-k indices with the target model: each draft token attends to ~2K selected keys at constant attention cost rather than maintaining its own KV cache or re-running a full-context indexer.
    • Together with 4-bit quantization and megakernels, these cut Hy4 flash's decoding latency past 150 tokens/s and reduce reported cost per task to 1/20 of Hy4.
  3. What if…

    The Hy4 flash README warns that its base checkpoint saw substantial synthetic instruction data during mid-training, which distorts few-shot base scores (MMLU 88.7, SimpleQA 37.5). Explain why synthetic instruction contamination in mid-training inflates or distorts few-shot base evaluations, and compare the SimpleQA gap between Hy4 Base (57.2) and Hy4 flash Base (37.5) in light of Hy4 flash's 63.5B Engram tables.

    What a strong answer covers
    • Few-shot base evaluations assume the base model models raw text completions; mid-training on synthetic instruction data shifts formatting and answer priors, making few-shot scores non-comparable to pure pretraining checkpoints.
    • Hy4 Base (770B / 49B active) scores 57.2 on SimpleQA versus 37.5 for Hy4 flash Base (220B total including 63.5B Engram / 12B active) — a 19.7-point gap despite Hy4 flash's huge 63.5B N-gram embedding tables.
    • That gap illustrates that raw N-gram hash-table parameter count does not equate one-for-one with dense/MoE parametric knowledge capacity at 770B scale, echoing Qwen3.8-Flash-Next's caution about N-gram table scaling.
    • A clean ablation would evaluate Hy4 flash with and without the 63.5B Engram tables on SimpleQA and MMLU under an identical pretraining-only mix (no mid-training instruction data).
  4. Critique

    Neither Hy4 nor Hy4 flash has an arXiv technical report yet — all architecture specifications, reliability improvements (hallucination 15.76% → 5.45%, speculative errors 23.1% → 5.6%), and benchmark wins (WorkIndex 42.1, financial tasks 3.04/4) come solely from vendor GitHub READMEs under a custom "Tencent Hy License". What key technical and evaluation gaps prevent a researcher from treating these claims on par with a peer-reviewed or full technical report?

    What a strong answer covers
    • No pretraining token count, data mixture, optimizer details, or scaling ablations are published, making it impossible to separate LatentMoE, iHC, and Engram contributions from data scale or distillation from Hy4.
    • Internal metrics (hallucination 15.76% → 5.45%, speculative errors 23.1% → 5.6%, 579 financial tasks 3.04/4, WorkIndex 42.1) lack public task definitions, judge prompts, or error bars.
    • Cost-per-task claims (1/20 of Hy4, 1/8 of DeepSeek-V4.1-Flash-1017) depend heavily on output-token length (RL cut Hy4 flash output tokens by 50%), serving hardware, and pricing assumptions that are not independently audited.
    • The custom Tencent Hy License ("other" on Hugging Face) is more restrictive than Apache-2.0/MIT, and the mixed release dates (HF Oct 29 / Nov 17–18 vs Nov 4 / Nov 16 announcements) leave checkpoint provenance lightly documented.
  5. Design

    You are building a high-volume financial-analysis assistant (long filings up to 256K–1M tokens, strict latency SLO, tight cost budget) and must choose between hosting Hy4 (770B-A49B), Hy4 flash (220B-A12B with 63.5B Engram), or a tiered router using both. Design the serving topology and routing policy, accounting for KV-cache memory, off-GPU Engram placement, and hallucination risk.

    What a strong answer covers
    • Use Hy4 flash as the default tier for triage, extraction, and routine filings: 1/6 the KV cache of Hy4, >150 tokens/s decode with megakernels + 4-bit + 0.85B DFly2, and ~1/20 the reported cost per task.
    • Because 63.5B of Hy4 flash's 220B parameters sit in Engram hash tables across 4 layers, evaluate offloading or prefetching Engram tables from host DRAM (like DeepSeek-V4.1-Flash / Qwen3.8) so GPU HBM serves the 156.5B MoE + KV cache cleanly.
    • Escalate complex synthesis, multi-document quantitative reasoning, or low-confidence cases to Hy4 (770B-A49B), which scores higher on factual recall (SimpleQA 57.2 vs 37.5) and 3.04/4 on Tencent's financial suite.
    • Add retrieval grounding and verification checks on both tiers, since Tencent itself notes a remaining gap on long-horizon coding and research-level math, and internal hallucination rates must be re-measured on your filings.
  6. Connect

    Hy4 flash, DeepSeek-V4.1-Flash and Qwen3.8-Flash-Next all combine three ideas in late 2026: sparse/hybrid attention, multi-stream residual connections (iHC/mHC/gated residual), and large N-gram lookup tables (Engram). Compare their concrete design choices across all three axes.

    What a strong answer covers
    • Attention: Hy4 flash interleaves MLA IndexPool sparse attention and 512-token SWA 1:3 (12 sparse, 30 SWA); DeepSeek-V4.1-Flash uses CED + CSA2 cross-layer KV/index sharing + FP4 KV; Qwen3.8-Flash-Next uses 3 Gated DeltaNet layers per 1 QSA sparse-attention layer.
    • N-gram tables: Hy4 flash places 63.5B bigram/trigram Engram tables (8 heads) at layers 1, 11, 21, 31; DeepSeek-V4.1-Flash places 196B orders 2–4 FP8 Engram tables at layers 1 and 14; Qwen3.8-Flash-Next places a 51B table at layer 2 (and warns that loss gains did not cleanly lift benchmarks).
    • Residuals: Hy4 / Hy4 flash use iHC (identity Hyper-Connections) with 4 residual streams; DeepSeek-V4.1-Flash uses mHC with 4 streams (Sinkhorn-balanced); Qwen3.8-Flash-Next uses a 4-branch gated residual.
    • Shared theme: frontier open models now scale capacity off the dense matmul critical path (N-gram memory) while shrinking KV caches via cross-layer index sharing and local/linear hybrids.

Done with this page?

Status