Hy4-preview
Tencent · reasoning checkpoint
No base checkpoint is public; facts describe the released post-trained checkpoint.
Open in the comparison table Hugging Face ↗ Blog ↗
KV calculations use one sequence at 131,072 tokens and 16-bit cache elements. They include bounded sliding-window caches. This is retained cache payload, not peak prefill memory. The comparison table also offers sourced mixed-precision layouts, including quantization scales.
Release
- Released
2026-08-28
Source: blog · tencent.com; article header
Tencent Releases and Open-Sources Tencent Hy4 preview August 28, 2026
Date the weights (or, if earlier, the technical report) were first made public, YYYY-MM-DD, as dated by the publisher. A Hugging Face repository creation date is used only when no dated publisher page exists, with a note.
- License
apache-2.0
Source: model-card · README.md; YAML front matter
license: apache-2.0
License of the released weights as declared by the publisher (model card metadata or license file), e.g. apache-2.0, mit, or the name of a custom license.
- Input modalities
text
Inferred from the source; see the explanation below.
Source: model-card · README front matter
pipeline_tag: text-generation
Card tags the checkpoint text-generation; config declares no vision or audio tower (HYV4ForCausalLM).
Input modalities of the released checkpoint as the publisher states them, from: text, image, video, audio, joined with ' + ' in that order ("text", "text + image + video").
Parameters
- Total params
770B parameters
Source: model-card · README.md; Model Introduction
The model comprises 770B total parameters, of which 49B are activated per token.
Total parameter count as reported by the publisher. See params.note for whether embeddings, MTP heads or vision towers are included.
- Active params
49B parameters
Source: model-card · README.md; Model Introduction
The model comprises 770B total parameters, of which 49B are activated per token.
Parameters used per token in the forward pass, as reported by the publisher.
- Active non-embedding (stated)
Not disclosed
Active parameters excluding the input embedding and the output head (unembedding). Stated by the publisher, or computed from params.active by subtracting vocab × d_model for each of the embedding and output head that params.active is stated to include (basis inferred, note with the arithmetic). Not disclosed when the scope of params.active is not stated.
- Counted total params
769.9B parameters
Calculated: embedding + output head + all experts + other weights, tencent/Hy4-preview@705d81e safetensors headers; reproduces stated total (backbone) and active (with embedding and output head)
Parameters of the text backbone counted from the released checkpoint's safetensors headers (embedding, output head, all experts and other weights; excluding MTP modules, vision/audio towers and n-gram lookup tables). Shown only when the counts reproduce the publisher's stated total and active parameters within 5% under some scope.
- Counted embedding + head
1.485B parameters
Calculated: input embedding + output head, tencent/Hy4-preview@705d81e safetensors headers
Input embedding plus output head (once if tied), counted from the checkpoint.
- Non-emb. params (counted)
768.4B parameters
Calculated: dense + routed backbone weights; excludes input embedding, output head, lookup tables, MTP and other modalities, tencent/Hy4-preview@705d81e safetensors headers; reproduces stated total (backbone) and active (with embedding and output head)
Language backbone weights excluding input embeddings, output head, lookup/Engram tables, MTP modules and vision/audio towers. Equals params.counted_total minus params.counted_embedding. Same validation as params.counted_total.
- Largest layer (counted)
9.978B parameters
Calculated: max(sum of dense and routed weights sharing a full layers.<index> tensor path), all experts included, tencent/Hy4-preview@705d81e safetensors headers
Largest group of language-backbone weights sharing a full layers.<index> tensor path, including every routed expert. Excludes lookup/Engram tables, embeddings, output head, MTP and other modalities. Hybrid checkpoints may store mixers and FFNs as separate layers. All-gather volume also depends on wrapping, sharding and dtype.
- Active non-emb. (counted)
47.57B parameters
Calculated: non-expert weights + routed experts × 8/256, excluding embedding and output head, tencent/Hy4-preview@705d81e safetensors headers; reproduces stated total (backbone) and active (with embedding and output head)
Active parameters per token excluding the input embedding and output head, counted from the checkpoint as all non-expert weights plus routed-expert weights × top_k / experts. Same validation as params.counted_total.
- Counting scope
Backbone only, excluding the MTP layer (10B total, 0.7B active).
Source: model-card · README.md; Model Specifications
The table below lists backbone parameters only, excluding the MTP layer.
What the publisher's counts include or exclude (MTP modules, embeddings, vision encoder, n-gram tables).
Shape
- Layers
78
Source: config · /num_hidden_layers
Number of transformer blocks in the main backbone (attention or token mixer plus FFN), excluding MTP modules.
- d_model
6,144
Source: config · /hidden_size
Residual stream width.
- Vocab
120,832
Source: config · /vocab_size
Embedding table rows (vocab_size in config, may include padding).
- Tied embeddings
No
Source: config · /tie_word_embeddings
Input embedding and output head share weights.
- d_model / layers
78.7692
Calculated: d_model / layers
Width-to-depth ratio, d_model divided by the number of blocks.
Attention
- Token mixers
MLA, DSA
Source: config · config.json; use_dsa, use_mla
"use_dsa": true, "use_mla": true
Token-mixing layer types in the backbone, e.g. GQA, MLA, SWA, Gated DeltaNet, Mamba-2, DSA (DeepSeek sparse attention).
- Layer layout
78 DSA
Inferred from the source; see the explanation below.
Source: config · config.json; layer_types
"layer_types": [ "deepseek_sparse_attention", "deepseek_sparse_attention",
Uniform: /layer_types | count deepseek_sparse_attention = 78 = /num_hidden_layers.
Token-mixer order, summarized as a pattern or layer positions. The fact's optional sequence lists each mixer in order; a ratio alone does not establish the order. Auxiliary prediction modules and standalone FFNs are excluded.
- Global-attention layers
78
Source: config · /layer_types | count deepseek_sparse_attention
Layers whose KV cache grows with full context (dense or sparse global attention, MLA). Excludes sliding-window and linear/recurrent layers.
- Query heads
64
Source: config · /num_attention_heads
Query heads in the global-attention layers.
- Heads × head dim
16,384
Calculated: heads × head_dim
attn.heads × attn.head_dim, the query projection width of global layers.
- QK head dim
256
Source: config · /qk_head_dim
qk_nope_head_dim 192 + qk_rope_head_dim 64. /head_dim=64 only sizes the rotary embedding.
Query/key dimension per head in global-attention layers (for MLA, nope + rope dims).
- V head dim
256
Source: config · /v_head_dim
Value dimension per head in global layers (MLA v_head_dim; stated for MLA even when equal to the QK head dim).
- MLA KV latent
512
Source: config · /kv_lora_rank
Width of the compressed KV latent that MLA caches per token per layer.
- MLA Q latent
2,048
Source: config · /q_lora_rank
Width of the low-rank query projection in MLA; 0 when queries use a full-rank projection.
- Decoupled RoPE dim
64
Source: config · /qk_rope_head_dim
Width of the shared positional key that MLA caches next to the latent.
- Positional encoding
partial RoPE (MLA decoupled, 64 of 256 QK dims)
Source: code · modeling_hy_v4.py; HYV4Attention.forward
q_pass, q_rot = torch.split(q_states, [self.qk_nope_head_dim, self.qk_rope_head_dim], dim=-1)
Positional scheme in global layers: RoPE, partial RoPE, NoPE, or mixed per layer type.
- RoPE base
10,000,000
Source: config · /rope_parameters/rope_theta
RoPE base frequency of the global layers at release.
- QK norm
No
Source: code · modeling_hy_v4.py; HYV4Attention.forward
k_pass = self.kv_a_layernorm(kv_pass).view(batch_size, 1, seq_length, self.kv_lora_rank)
RMSNorm only on the Q and KV latents; no per-head Q/K norm. The DSA indexer LayerNorms its key.
Queries and keys are normalized per head before the dot product.
- Output gate
elementwise sigmoid gate computed from the block input, before o_proj
Source: code · modeling_hy_v4.py; HYV4Attention.forward
attn_output = attn_output * torch.sigmoid(gate_states)
Config /gated_mla true, /gating_type elementwise.
Gate applied to the attention output before the output projection, with its placement.
- Sparse attention
DSA indexer (32 heads × 128, top-2048); IndexCache: 21 layers run the indexer, 57 reuse the previous indexer layer's top-k
Source: model-card · README.md; Model Introduction
(Gated DSA) with [IndexCache](https://arxiv.org/abs/2603.12201) for cross-layer sparse index reuse
Indexer dims from the card table (config /index_n_heads, /index_head_dim, /index_topk); layer split from config /indexer_types (21 full, 57 shared).
Token-selection mechanism inside global layers, e.g. DSA lightning indexer with top-k.
- Attention sinks
learned per-head sink logit, all 78 layers
Source: config · config.json; learnable_sink
"learnable_sink": true, "learnable_sink_init": 0.0
modeling_hy_v4.py HYV4Attention holds one sink per head and concatenates it to the attention logits before softmax.
Learned sink logits or sink bias in the softmax, with the layer types that use them.
- QKV bias
No
Source: config · /attention_bias
Query/key/value projections have bias terms.
- Indexer key dim
128
Source: config · /index_head_dim
One indexer key head (HYV4Indexer.wk outputs index_head_dim); only the 21 'full' indexer layers cache it (see attn.kv_groups).
Width of the sparse-attention indexer key cached per token in each global layer (DSA lightning indexer), counted in the KV cache.
- KV cache groups
MLA latent + RoPE key
- Layers
- 78
- Elements
- 576
- Tokens per entry
- 1
Source: code · modeling_hy_v4.py; HYV4Attention.__init__, HYV4Attention.forward
k_pass, k_rot = past_key_values.update(k_pass, k_rot, self.layer_idx)
kv_lora_rank 512 + qk_rope_head_dim 64.
DSA indexer key
- Layers
- 21
- Elements
- 128
- Tokens per entry
- 1
Source: code · modeling_hy_v4.py; HYV4Attention.__init__, HYV4Attention.forward
self.indexer = None if self.skip_topk else HYV4Indexer(config, layer_idx)
Only layers with indexer_types 'full' own an indexer; 'shared' layers reuse the previous top-k.
Source: code · modeling_hy_v4.py; HYV4Attention.__init__, HYV4Attention.forward
Cache owners and entry shapes for compressed or shared attention. Each item specifies layers owning the cache, scalar elements per entry (K and V together), tokens_per_entry (compression ratio, default 1), and optionally window (maximum entries retained). Completed compressed entries are floor(context / tokens_per_entry); incomplete compressor state is excluded. KV sizes use these groups when present.
Feed-forward
- Activation
SwiGLU
Source: code · modeling_hy_v4.py; HYV4MLP.forward
down_proj = self.down_proj(self.act_fn(self.gate_proj(x)) * self.up_proj(x))
act_fn is config /hidden_act silu; routed experts compute F.silu(gate) * up.
FFN activation (SwiGLU, GeGLU, ...).
- Dense FFN dim
18,432
Source: config · /intermediate_size
Intermediate width of the dense FFN layers that are actually executed.
- Activation clamp
SwiGLU limit 10 (gate ≤ 10, up in [-10, 10]), routed experts only
Source: config · config.json; swiglu_limit
"swiglu_limit": 10.0
Clamp applied in modeling_hy_v4.py HYV4Experts._apply_gate; HYV4MLP has none.
Clamping of GLU gate / up activations (e.g. SwiGLU limit 7), with the layers it applies to.
- FFN bias
No
Source: code · modeling_hy_v4.py; HYV4MLP.__init__
self.gate_proj = nn.Linear(self.hidden_size, self.intermediate_size, bias=False)
Routed experts (HYV4Experts) hold only gate_up_proj and down_proj weights.
FFN projections have bias terms.
- Dense FFN / d_model
3
Calculated: ffn.dim / d_model
ffn.dim divided by shape.d_model.
Mixture of experts
- Routed experts
256
Source: config · /n_routed_experts
Routed experts per MoE layer.
- Experts per token
8
Source: config · /num_experts_per_tok
Routed experts selected per token.
- Expert dim
2,048
Source: config · /moe_intermediate_size
Intermediate width of one routed expert.
- Leading dense layers
1
Source: config · /mlp_layer_types | count dense
Number of initial blocks that use a dense FFN instead of MoE.
- Router score
sigmoid
Source: code · modeling_hy_v4.py; HYV4TopkRouter.forward
scores = router_logits.sigmoid()
Gating function over expert logits (softmax, sigmoid).
- Load balancing
expert bias added to selection scores (e_score_correction_bias); update rule and any aux loss not disclosed
Source: code · modeling_hy_v4.py; HYV4TopkRouter.forward
scores_for_choice = scores + self.e_score_correction_bias
Load-balancing method, with coefficients where disclosed.
- Routed scaling factor
2.827
Source: config · /routed_scaling_factor
Multiplier applied to the combined routed-expert output (routed_scaling_factor).
- Renormalize top-k
Yes
Source: config · /norm_topk_prob
Selected expert weights are renormalized to sum to 1.
- Expert dim / d_model
0.333333
Calculated: moe.expert_dim / d_model
moe.expert_dim divided by shape.d_model.
- Sparsity (experts / top-k)
32
Calculated: experts / top_k
Routed experts divided by experts selected per token.
- Active / total
0.0636364
Calculated: params.active / params.total
params.active divided by params.total.
Multi-token prediction
- MTP depth
Not disclosed
Additional future tokens predicted during pretraining (0 when the model was trained without MTP).
- MTP weights released
Yes
Source: model-card · README.md; Model Introduction
1 native MTP layer (10B total parameters, 0.7B activated) is built in for speculative decoding.
Config /num_nextn_predict_layers 1; config mtp_loss_factor 0.1 is not read by modeling_hy_v4.py, and the training stage of the MTP layer is not stated.
The released checkpoint contains the MTP module weights.
Normalization and stability
- Norm
RMSNorm
Source: code · modeling_hy_v4.py; HYV4DecoderLayer.__init__
self.input_layernorm = HYV4RMSNorm(config.hidden_size, eps=config.rms_norm_eps)
Normalization layer type in the blocks.
- Norm placement
pre
Source: code · modeling_hy_v4.py; HYV4DecoderLayer.forward
hidden_states = self.input_layernorm(hidden_states)
Pre-norm on the hyper-connection-mixed input (see norm.residual).
Pre-norm, post-norm, or sandwich (pre and post).
- Norm epsilon
1e-05
Source: config · /rms_norm_eps
Epsilon of the block normalization layers.
- Residual stream
iHC (identity Hyper-Connections), 4 streams: per sublayer, input-dependent sigmoid read weights and 2·sigmoid write weights, identity stream mixing (no Sinkhorn); streams merged by a sigmoid-weighted sum before the final norm
Source: model-card · README.md; Model Specifications
Residual Streams | 4
Card: 'The residual pathway uses iHC (identity Hyper-Connections)'. Details from modeling_hy_v4.py HYV4HyperConnection / HYV4HyperHead and config /enable_ihc, /hc_mult 4, /hc_magnitude 2.0, /hc_eps 1e-6 (added to the sigmoid weights).
Residual design when it is not a plain sum, e.g. hyper-connections with n streams, gated residuals, depth-scaled residuals, FP32 residual accumulation.
Context length
- Pretraining context
Not disclosed
Sequence length of the main pretraining stage.
- Trained context
Not disclosed
Longest sequence length trained on after context extension.
- Advertised context
1.049M tokens
Source: config · /max_position_embeddings
Card table: Context Length 1M.
Longest context the publisher says the model supports, possibly beyond trained length via RoPE scaling.
Pretraining recipe
- Pretraining tokens
Not disclosed
Tokens seen in pretraining including annealing and context extension, as reported.
- Optimizer
Not disclosed
Optimizer used for the bulk of parameters.
- Peak LR
Not disclosed
Peak learning rate of the main pretraining stage.
- Final LR
Not disclosed
Learning rate at the end of the decay.
- LR schedule
Not disclosed
Learning-rate schedule shape with phase boundaries.
- Warmup
Not disclosed
Warmup length in steps or tokens.
- Batch size
Not disclosed
Global batch size, including any batch-size ramp: sequences × sequence length (token total), or the token total alone when only that is stated.
- Weight decay
Not disclosed
Decoupled weight decay coefficient.
- Adam betas
Not disclosed
(beta1, beta2) of the Adam-family optimizer or its AdamW fallback.
- Grad clip
Not disclosed
Global gradient-norm clipping threshold.
- Training precision
Not disclosed
Matmul precision of pretraining (BF16, FP8 recipe, NVFP4 recipe) with the scaling granularity where disclosed. Never inferred from the released checkpoint dtype.
KV cache
- KV bytes / token
95,232 bytes
Calculated: kv.bytes_at_context / 131072 tokens; uniform BF16, payload only; quantization overhead excluded. MLA latent + RoPE key: 78 × (576 × 16/8) B/entry; DSA indexer key: 21 × (128 × 16/8) B/entry
Retained KV cache divided by context length, including bounded SWA caches and indexer keys. Exports use uniform BF16 at 131,072 tokens. The website can select uniform payload precision (no quantization overhead) or sourced component formats (including scales and documented padding). This is cache payload, not peak prefill memory or persistent prefix storage.
- Global KV bytes / token
95,232 bytes
Calculated: 89856 B / 1 tokens (MLA latent + RoPE key) + 5376 B / 1 tokens (DSA indexer key); uniform BF16, payload only; quantization overhead excluded. MLA latent + RoPE key: 78 × (576 × 16/8) B/entry; DSA indexer key: 21 × (128 × 16/8) B/entry
Long-context global KV bytes per token, including indexer keys; excludes bounded SWA caches. Compression rates and cross-layer cache reuse are included. Exports use uniform BF16; the website's storage selector also applies here. This is the field to compare with global-KV figures in reports, using the matching storage recipe.
- KV bytes / token / B active
1,944 bytes
Calculated: kv.bytes_per_token (131072 tokens) / (params.active / 1e9); uniform BF16, payload only; quantization overhead excluded. MLA latent + RoPE key: 78 × (576 × 16/8) B/entry; DSA indexer key: 21 × (128 × 16/8) B/entry
kv.bytes_per_token divided by active parameters in billions (131,072 tokens in exports).
- KV at context / B active
254,739,769 bytes
Calculated: kv.bytes_at_context (131072 tokens) / (params.active / 1e9); uniform BF16, payload only; quantization overhead excluded. MLA latent + RoPE key: 78 × (576 × 16/8) B/entry; DSA indexer key: 21 × (128 × 16/8) B/entry
kv.bytes_at_context divided by active parameters in billions (131,072 tokens in exports).
- KV at context
12,482,248,704 bytes
Calculated: 89856 B × 131072 (MLA latent + RoPE key) + 5376 B × 131072 (DSA indexer key); uniform BF16, payload only; quantization overhead excluded. MLA latent + RoPE key: 78 × (576 × 16/8) B/entry; DSA indexer key: 21 × (128 × 16/8) B/entry
Retained KV cache for one sequence at the selected context, including SWA windows and indexer keys. Exports use uniform BF16 at 131,072 tokens. Excludes recurrent state, compressor tail state, draft/MTP caches, temporary prefill tensors, allocator metadata and persistent prefix snapshots. Does not estimate peak prefill or total serving memory.