Tencent (Hunyuan) · usage rank #3 · released 2026-08-28
Hy4-preview
What Hy4-preview’s own documents say it is built from — every method with the sentence that describes it.
Curator’s note770B total / 49B active MoE: 78 layers (layer 1 dense FFN, the other 77 MoE with 256 routed + 1 shared expert, top-8 per token) plus a native 10B/0.7B MTP layer for speculative decoding. Attention is Gated DeepSeek Sparse Attention with IndexCache cross-layer index reuse; the residual pathway uses identity Hyper-Connections (4 residual streams). 1M context, Apache 2.0. No Tencent system report for Hy4: the model card is the architecture document, and the two arXiv ids it cites (2512.02556 DSA, 2603.12201 IndexCache) are the cited methods' own papers, not Hy4's — they are deliberately not listed as Hy4 sources.
Rank by open-weight tokens on OpenRouter, week of 2026-09-21.
Against the consensus recipe
Its documents state 4 of the 15 methods the field agrees on.
The recipe from the overview: the methods the most labs adopt, per stage. A missing one is something the documents do not say, not something the model lacks.
Data curation
- Agentic data synthesis pipelinenot in its documents
Training objective
- Multi-Token Predictionnot in its documents
- KL alignment lossnot in its documents
Model architecture
- Mixture of Expertscore
- Hybrid Attentionnot in its documents
- Multi-Token Predictioncore
Optimization
- Muonnot in its documents
- Expert Parallelismnot in its documents
- Cosine decaynot in its documents
Post-training
- Group Relative Policy Optimizationnot in its documents
- Supervised fine-tuningnot in its documents
- Multi-Teacher On-Policy Distillationnot in its documents
Inference & serving
- Configurable reasoning effortused
- Speculative decodingused
- FP8 KV-cache quantizationnot in its documents
Checked in its code
Its code shows 9 of the 19 architecture features checked — 7 of them are not stated in its documents.
Documents say what a lab chose to describe; the modeling code says what the checkpoint runs. Each feature below was put to a code verifier, and only the config values and source lines it cited that were found in the files are shown, linked to the line.
Read from Hugging Face Transformers (modeling_hy_v4.py, configuration_hy_v4.py) and config.json at revision 705d81ee51, by anthropic/claude-sonnet-5 on 2026-09-25.
| Feature | Code | Its documents | Evidence |
|---|---|---|---|
| Grouped-query attention | not in its code | not stated | The config sets num_key_value_heads equal to num_attention_heads (MLA overrides it in __post_init__), so there is no head grouping; attention uses MLA instead of GQA. num_attention_heads = 64num_key_value_heads = 8 |
| Multi-head latent attention code only | in its code | not stated | Attention down-projects hidden states into a shared kv_lora_rank latent (kv_a_proj_with_mqa/kv_a_layernorm) and up-projects per head via kv_b_proj, DeepSeek-V2/V3 style MLA with a decoupled RoPE key. kv_lora_rank = 512q_lora_rank = 2048qk_rope_head_dim = 64 |
| Sliding-window attention | not in its code | not stated | No sliding_window config key or windowed masking code is present; all layers use the DeepSeek sparse (indexer-selected) attention over the full causal context. |
| Interleaved sliding-window and global attention | not in its code | not stated | layer_types lists only "deepseek_sparse_attention" for every layer, with no sliding-window layer type interleaved. layer_types = ["deepseek_sparse_attention", "deepseek_sparse_attention", "deepseek_sparse_a… |
| Indexer-selected sparse attention (DeepSeek Sparse Attention) code only | in its code | not stated | HYV4Indexer scores past tokens with a lightweight head and each query attends only to the index_topk selected tokens via a scattered sparse mask. index_topk = 2048index_n_heads = 32index_head_dim = 128 |
| Linear-attention or state-space layers alongside full attention | not in its code | not stated | All layers use the same DeepSeek sparse attention mechanism; there is no linear-attention or SSM layer type in layer_types. layer_types = ["deepseek_sparse_attention", "deepseek_sparse_attention", "deepseek_sparse_a… |
| Gated DeltaNet layers | not in its code | not stated | No gated delta-rule recurrent mixer code or config keys (linear_num_key_heads, linear_conv_kernel_dim) exist in this model. |
| Mamba-2 layers | not in its code | not stated | No Mamba-2/SSD state-space code or config keys (mamba_num_heads, ssm_state_size) are present. |
| Learnable attention sink code only | in its code | not stated | Each attention head has a learned sink logit parameter concatenated to the attention logits before the softmax denominator. learnable_sink = truelearnable_sink_init = 0.0 |
| Gated attention output code only | in its code | not stated | The attention output is multiplied elementwise by a sigmoid gate computed from a separate gate_proj before the output projection. gated_mla = truegating_type = "elementwise" |
| QK normalization | not in its code | not stated | There is no RMSNorm/LayerNorm applied to the main query/key projections of HYV4Attention (only the DSA indexer's separate k_norm is normalized), so QK-norm on the main attention path is absent. |
| Partial RoPE code only | in its code | not stated | RoPE is applied only to the qk_rope_head_dim slice (64 of 256) of each query/key head, with the remaining qk_nope_head_dim portion carrying no position signal, MLA decoupled-RoPE style. qk_rope_head_dim = 64qk_nope_head_dim = 192 |
| YaRN RoPE scaling | not in its code | not stated | rope_parameters.rope_type is "default" rather than "yarn", so the YaRN scaling code path (yarn_apply_mscale checking rope_type != default) is not triggered. rope_parameters = {"rope_theta": 10000000, "rope_type": "default"} |
| Layers without positional encoding (NoPE) | not in its code | not stated | layer_types shows every layer is the same deepseek_sparse_attention type and all apply RoPE to their rope slice; there is no subset of full-attention layers that skip positional encoding entirely. layer_types = ["deepseek_sparse_attention", "deepseek_sparse_attention", "deepseek_sparse_a… |
| Mixture of experts | in its code | core | HYV4TopkRouter routes each token to num_experts_per_tok of n_routed_experts expert MLPs via sigmoid-scored top-k selection, used in every layer where mlp_layer_types is "sparse". n_routed_experts = 256num_experts_per_tok = 8 |
| Shared expert | in its code | core | HYV4MoE adds a shared_experts HYV4MLP with intermediate size scaled by n_shared_experts=1, applied to every token in addition to the routed experts. n_shared_experts = 1 |
| Auxiliary-loss-free load balancing (selection bias) code only | in its code | not stated | The router adds an e_score_correction_bias buffer to the sigmoid scores solely for top-k expert selection, while the actual output weighting uses the unbiased scores gathered afterward, DeepSeek-V3 style. |
| Multi-token prediction layers | code unclear | core | The config declares num_nextn_predict_layers=1 and mtp_loss_factor, and the modeling file references model.mtp_layers.* weights to ignore on load, but the MTP module itself is not defined/built in the given files. num_nextn_predict_layers = 1mtp_loss_factor = 0.1 |
| SwiGLU feed-forward code only | in its code | not stated | Both the dense HYV4MLP and the MoE HYV4Experts compute silu(gate(x)) * up(x), a SwiGLU feed-forward, with hidden_act set to silu. hidden_act = "silu" |
model architecture 9
token mixer 2
channel mixer 5
mixture of experts 5
expert routing 1
normalization & residual 1
prediction head 1
data curation 3
filed at the root 1
data sourcing 1
synthetic data 1
inference & serving 12
filed at the root 1
decoding strategy 3
reasoning control 2
inference quantization 2
serving parallelism 1
inference kernel 1
agentic scaffolding 2
software implementation 3
inference engine 1
kernel & quantization library 2
evaluation 1
human & real-world evaluation 1
other 1
filed at the root 1
unfiled 8
Further reading
Picked by hand, not extracted: where to read more, not evidence for anything on this page.
- Hy4-preview architecture card — LLM Architecture Gallery explainer sebastianraschka.com
Sources
The curated document list for this model. "not fetched" means the URL is recorded but its text was not read in the current run.
| Document | Kind | Publisher | Status |
|---|---|---|---|
| tencent.com/tencent-releases-and-open-sources-tencent-hy4-preview | official blog | Tencent | read |
| hy.tencent.com/research/hy4-preview | official blog | Tencent Hy | not fetched |
| huggingface.co/tencent/Hy4-preview | model card | Tencent Hunyuan | read |
| github.com/Tencent-Hunyuan/Hy4-preview | code repo | Tencent Hunyuan | read |
| recipes.vllm.ai/tencent/Hy4-preview | vendor docs | vLLM | read |
| openrouter.ai/tencent/hy4-preview | vendor docs | OpenRouter | read |
| technode.com/2026/08/28/tencent-open-sources-hy4-preview-with-770b-para… | news | TechNode | read |
| simonwillison.net/2026/Aug/29/hy4 | third party analysis | Simon Willison | read |