The Rabbit Hole / AI / Model architectures
Meituan · Architecture mapLongCat-Flash
A mixture of experts where some experts do nothing: easy tokens can pick an identity expert and spend less compute.
LongCat-Flash-Chat, 2025 · LongCat release timeline
Inside LongCat-Flash
Inside latent attention · Layers 1–28 (two attentions per layer)
Earlier context dimmed · current token bright · dashed regions contain cached entries.
Model-specific details
- Layers 1–28 (two attentions per layer) · 28 repetitions
- Each layer holds two latent attentions, two dense feed-forward networks (size 12288) and one expert block. The expert block reads the normalised state after the first attention, runs beside the first dense feed-forward, and its output is added at the end of the layer.
- Attention and positions
- 64 heads; compressed KV latent of 512 with a 64-value rotary key; query rank 1536. Per-head content key 128, value 128.
- Memory
- A 512-value KV latent plus a 64-value rotary key per token per layer.
A shortcut around the second half
Each of the 28 layers contains two latent-attention blocks and two dense networks. A routed expert branch bypasses the second attention/feed-forward pair.
The router makes twelve choices from 512 real experts and 256 identity experts, so active computation varies between 18.6B and 31.3B parameters, averaging about 27B. Selecting an identity expert avoids its expert computation.
Attention uses 64 heads, a 512-wide latent and 64 position coordinates. Training context reaches 131,072 tokens.
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
- Multi-head latent attention (MLA): caching a compressed latent
- Mixture of experts (MoE): a big model that uses only part of itself
- Zero-computation experts: letting easy tokens spend lesscoming soonExperts that do nothing, so easy tokens can use less compute.
- Shortcut-connected MoE: overlapping the experts with other workcoming soonWires the expert layer on a shortcut so its communication overlaps other computation.
- Routing: selecting experts and weighting their work
- Attention, from scratch
- The KV cache: why LLMs remember every key and value
- RoPE: position as a rotation