The Rabbit Hole / AI / Model architectures
Tencent · Architecture mapHunyuan-A13B
A compact fine-grained mixture of experts with GQA, QK-norm and tied embeddings, extended to long context with dynamic NTK scaling.
Hunyuan-A13B-Instruct, June 2025 · Hunyuan release timeline
Inside Hunyuan-A13B
Inside grouped-query attention · Transformer layers 1–32
Earlier context dimmed · current token bright · dashed regions contain cached entries.
Model-specific details
- Transformer layers 1–32 · 32 repetitions
- 64 routed experts (size 3072), 8 chosen per token, plus 1 shared expert. No dense layers.
- Attention and positions
- 32 query heads share 8 key/value heads of size 128, with per-head query/key normalisation applied after the rotary rotation.
- Memory
- Keys and values for 8 heads of size 128 per token per layer.
Experts in every layer
All 32 layers select eight of 64 routed experts plus one shared expert. Attention uses grouped queries, with QK-norm applied after RoPE; input and output embeddings are tied.
The model supports 262,144 tokens. Its shipped config defaults to 32,768 positions to reduce memory use; the model card documents raising that setting for the full context.
Explore the components
- Embeddings: giving every token a meaning
- Residual connections: when more layers made things worse
- A whole LLM, layer by layer
- RMSNorm: keeping a token's scale under control
- Grouped-query attention (GQA): sharing keys and values in groups
- QK normalisation (QK-Norm) and soft-capping
- Mixture of experts (MoE): a big model that uses only part of itself
- RoPE scaling: stretching context beyond the training length
- Attention, from scratch
- The KV cache: why LLMs remember every key and value
- RoPE: position as a rotation
- Routing: selecting experts and weighting their work