Mellum 2

JetBrains (with Constructor University, Bremen) · 2026-05-29 · analysed 2026-08-10 · skill v0.3.5

sparse-MoE hybrid text-only open-weights large domain-specific

Design overview

Mellum 2 is a 28-layer, 12B-parameter MoE (2.5B active per token) built as a scaled-down Qwen3-MoE: hidden 2,304, 32 query heads / 4 KV heads (GQA) at head dim 128 with QK-Norm (RMSNorm), pre-RMSNorm, SiLU-gated MLPs, RoPE base 500,000, and 64 experts per layer (expert intermediate 896) with top-8 routing, no shared expert, untied 98,304-token embeddings. Three deployment-oriented modifications distinguish it: a 3:1 sliding-window pattern (1,024-token window on three of every four layers, full attention on the fourth), a single MTP head (one extra transformer layer, loss weight 0.1) that doubles as a speculative-decoding draft, and a latency budget — matching Qwen2.5-7B on one H100 — against which every choice was ablated (dense variants, MLA, hybrids, shared experts, and auxiliary-loss-free balancing were all tried and rejected). Pre-training runs ~10.65T tokens in three phases (web 70→44→23%, code 23→42→59%) with a 50/10/50% FIM schedule, distributed Muon (Moonlight config) under BF16+FP8 hybrid precision, and a Warmup-Hold-Decay schedule with linear decay to zero. The 128K context comes from layer-selective YaRN — frequency re-mapping applied only to the global layers, per the Gemma-3/OLMo-3 recipe — over a ~117B-token extension run. Post-training splits into two variants from one long-context base: Instruct (direct answers, ~47B SFT tokens) and Thinking (explicit reasoning traces, ~167B SFT tokens, last-turn loss, turn unfolding), each refined by GRPO-style RLVR on verifiable math/code/tool tasks with IcePop truncation and a concision penalty. Released under Apache 2.0 with an unusually candid discussion of what was ablated and why.

What the report claims is novel

Atlas assessment: Architecturally derivative by design — the report openly frames Mellum 2 as the Qwen3-MoE recipe (64 experts/8 active, GQA, QK-Norm, RMSNorm, SiLU, RoPE) plus three known components: Mistral-style sliding-window attention (3:1, window 1,024), Gloeckle-style MTP, and Gemma-3/OLMo-3-style layer-selective context scaling (with YaRN instead of PI). No mechanism is new to the atlas. The genuine contributions are process-level: every choice is tied to an ablation against a fixed single-H100 latency budget (with rejected alternatives documented — MLA, dense sweeps, hybrid Gated DeltaNet backbones, shared experts, aux-loss-free balancing), the three-phase curriculum with an unusually transparent FIM schedule, and a very complete RL recipe (IcePop, clip-higher, concision penalty). vs atlas peers it sits between mistral-mixtral-8x7b (MoE, no SWA/GQA/MTP) and google-gemma-3 (SWA + layer-selective scaling but dense, 5:1 pattern); it is the first small-MoE coding-assistant record and the first Qwen3-MoE-style record (the existing qwen-qwen3-moe record predates the current schema).

Relation to the atlas

Lineage in

Influence out

No descendants recorded yet.

Notable omissions

Closest relatives in the atlas

Spec sheet

Identity

FamilyMellum 2[1]
OrganisationJetBrains (with Constructor University, Bremen)[2]
Release date2026-05-29[3]
Report URLhttps://arxiv.org/abs/2605.31268[4]
LicenseApache 2.0[5]
Open weightsyes[6]

Scale

Total parameters12B[7]
Active parameters / token2.5B[8]
Layers28[9]
Hidden dimension2304[10]
FFN inner dimension896[11]
FFN ratio0.39
Query heads32[12]
KV heads4[13]
Head dimension128[14]
Vocabulary size98304[15]
Embedding tyingno[16]

Core block

Block typesparse-MoE
Attention varianthybrid[17]
Attention layer pattern3:1 SWA: 3 out of every 4 layers use a sliding window of 1,024 tokens and the remaining 1 in 4 uses full attention[18]
Depth mixingsequential-residual
ActivationSiLU-gated MLP (SwiGLU)[19]
Expert count64[20]
Experts per token8[21]
Shared experts0[22]
Routingtop-8 expert selection; router operates in FP32; dropless routing (no expert capacity factor, no token dropping)[23]
Load balancingglobal-batch auxiliary load-balancing loss (coefficient 1e-3) plus router z-loss (coefficient 1e-3); global-batch balancing chosen over per-sequence balancing for flexibility (per-sequence gave marginally better loss on short runs); aux-loss coefficient reduced to 1e-4 during SFT; auxiliary-loss-free bias balancing (DeepSeek-V3 style) considered but rejected for ecosystem fit[24]
Expert granularityfine-grained: 64 experts per layer with 8 active (12.5% activation ratio), expert intermediate size 896; scaled down proportionally from the Qwen3-30B-A3B architecture
MethodRoPE[27]
RoPE base frequency500000[28]
Partial RoPEnot disclosed
TypeRMSNorm[29]
Placementpre[30]
QK-normyes[31]
Attention sinksno
Softcappingno

Context

Trained context length131,072[32]
Deployed context length131,072[33]
Extension methodlayer-selective YaRN: frequency re-mapping applied only to global (full-attention) layers, sliding-window layers keep original RoPE (Gemma 3 / OLMo 3 recipe); ~117B tokens of long-context training (3,500 iterations, WHD schedule, peak LR 3e-5, 500 decay iterations); RULER @64K 0.64 vs 0.52 uniform θ-bump vs 0.33 unchanged-θ[34]

Tokenizer

Algorithmnot disclosed
NotesCustom tokenizer with a 98,304-token vocabulary, identical to the tokenizer used in Mellum-4B; designed to provide strong coverage of programming-language tokens and technical terminology[35]

Training

Training tokens10.65T[36]
Data compositionThree categories: (1) web and general knowledge — large-scale synthetic web corpora from Common Crawl, educational web content and PDFs, multilingual reasoning/QA datasets, curated knowledge (SFT data, STEM instruction data, Wikipedia rewrites, synthetic encyclopedic articles); (2) source code — raw permissively licensed code deduplicated at file level, code extracted from Common Crawl, and synthetic/derived datasets (summarization, functionality extensions, translations, test generation, commit messages, task descriptions, QA, rewriting, review, transpilation, educational explanations); (3) mathematical data — math SFT data, quality-tiered math web content, permissively licensed textbooks, math instruction data; raw code corpus seen for 3 epochs (~958B tokens), no dataset repeated more than 4×[37]
Curriculum / stagingThree-phase curriculum aligned with the WHD schedule: Phase 1 Foundation (~6.18T tokens, 58%; web 70% / code 23% / math 6%; warmup→hold), Phase 2 Quality Uplift (~2.79T, 26.2%; web 44% / code 42% / math 14%; hold), Phase 3 Capability Sharpening (~1.69T, 15.9%; web 23% / code 59% / math 18%; decay); FIM rate schedule 50% (all data) → 10% → 50% (code files only); global batch size ramps 2,048 → 4,096 sequences[38]
OptimizerDistributed Muon (Moonlight configuration: spectral scale mode, extra scale factor 0.2, Newton-Schulz iterations 5, momentum 0.95, Nesterov momentum, blockwise TP mode) with Adam (beta1=0.9, beta2=0.95, epsilon=1e-8) for embedding and output layers; weight decay 0.1; gradient clipping 1.0[39]
LR scheduleWarmup-Hold-Decay (WHD): linear warmup over 2,000 steps to peak 3e-4, held through Phases 1-2, linear decay to zero over 49,306 steps (~15% of training, Phase 3); linear decay-to-zero chosen over cosine-to-nonzero minimum[40]
Batch scheduleGlobal batch size ramps linearly from 2,048 to 4,096 sequences during the initial phase; at full batch each step processes ~33.6M tokens (4,096 × 8,192); micro-batch size 2; sequence length 8,192[41]
PrecisionBF16 base precision with FP8 hybrid mixed precision (tensorwise FP8 recipe, most-recent amax algorithm); gradient reduction in FP32[42]
ParallelismExpert parallelism 8 (each GPU hosts 8 of 64 experts), tensor parallelism 1, pipeline parallelism 1, gradient reduction and parameter gather overlapped with computation; SFT adds context parallelism 8[43]
Hardware32 nodes × 8 H200 GPUs (migrated to a 16-node cluster mid-training with effective batch size fixed); RL on a Kubernetes cluster of H200 nodes (small training group + larger generation group); Megatron-LM / Megatron-Bridge, NeMo-RL, vLLM, Ray[44]
Disclosed computenot disclosed

Post-training

SFTyes[45]
Preference optimisationGRPO[46]
Reasoning trainingThinking variant: emits an explicit reasoning trace before the final answer; SFT loss on the last assistant turn + reasoning field only (multi-turn conversations unfolded into up to 5 samples); RLVR with a harder thinking mix (difficulty-filtered long-form math subset); max total sequence length 40,960 tokens for thinking RL rollouts[47]
Distillationnot disclosed

Modality

Typetext-only
Attachmentn/a[48]

Inference efficiency

KV-cache designGQA: KV cache proportional to 4 KV heads; the 3:1 SWA pattern bounds per-token KV reads on window layers to the 1,024-token window; KV-cache size under high concurrency was the dominant design driver for choosing 4 KV heads
Quantisation shippeddynamic FP8 model quantization for serving (vLLM FP8 serving on a single H100 80GB)[49]
Speculative decodingsingle Multi-Token Prediction (MTP) head: one additional transformer layer predicting one future token, trained with scaled loss α=0.1, removed at evaluation/inference, and used as a built-in draft model for speculative decoding[50]
Serving optimisationsvLLM serving on a single H100 (80GB); matches Qwen2.5-7B sync-mode latency (192 vs 193 tokens/s) and exceeds it by 21% in throughput mode (5,179 tokens/s; 20.2 req/s sustained vs 16.7 for Qwen2.5-7B and 11.3 for Qwen3-8B); workload shape ISL/OSL = 2,304/256 tokens[51]

Evaluation

Benchmarks (report's own numbers only)

BenchmarkValueRef
MMLU (base)70.9Table 5
MMLU-Pro (base)59.3Table 5
BBH (base)74.9Table 5
GSM8K (base)81.7Table 5
HumanEval (base)41.5Table 5
MBPP (base)62.4Table 5
LiveCodeBench v6 (Instruct-RL)37.2Table 9
EvalPlus (Instruct-RL)78.4Table 9
BFCL v3 (Instruct-RL)66.3Table 9
BFCL v4 (Instruct-RL)44.2Table 9
AIME (Instruct-RL)41.7Table 9
GSM-Plus (Instruct-RL)80.5Table 9
MMLU-Redux (Instruct-RL)78.1Table 9
GPQA Diamond (Instruct-RL)40.9Table 9
IFEval (Instruct-RL)75.8Table 9
LiveCodeBench v6 (Thinking-SFT)75.1Table 10
AIME (Thinking-RL)58.4Table 10
GSM-Plus (Thinking-RL)87.0Table 10
RULER @64K (layer-selective YaRN, long-context stage)0.64§4.1

Provenance references

  1. stated · Title ('Mellum 2 Technical Report'), Abstract
  2. stated · Title page byline
  3. stated · arXiv header line 16 ('arXiv:2605.31268v1 [cs.CL] 29 May 2026'); title page stamps 'v1.0 · May 2026'
  4. stated · pipeline
  5. stated · Abstract ('released… under the Apache 2.0 license'); §1
  6. stated · Abstract ('We release the base, instruct, and thinking checkpoints'); §1 ('We release base, instruct, and thinking checkpoints under the Apache 2.0 license, together with this report'; 'we release a base model before the long context extension and SFT checkpoints')
  7. stated · Abstract, §2.2, Table 2 ('≈12B total parameters' / '≈12B')
  8. stated · Abstract, §2.2, Table 2 ('≈2.5B active parameters per token')
  9. stated · §2.2 ('Backbone: 28 transformer layers'), Table 2
  10. stated · §2.2 ('hidden dimension 2,304'), Table 2
  11. stated · §2.2 ('expert intermediate size 896'), Table 2 ('Expert MLP size 896') — per-expert inner dim (MoE)
  12. stated · §2.2 ('32 query heads'), Table 2
  13. stated · §2.2 ('4 KV heads (GQA)'), Table 2
  14. stated · §2.2 ('head dimension 128'), Table 2
  15. stated · §2.2 ('a 98,304-token vocabulary'), Table 2, §3.1.4
  16. stated · §2.2 ('untied input/output embeddings'), Table 2 ('Tied embeddings: No')
  17. stated · §2.1.4, §2.2 (GQA with a 3:1 Sliding Window Attention pattern: 3 of every 4 layers use a 1,024-token sliding window, the remaining layer uses full attention; 32 query heads / 4 KV heads, QK-Norm, RoPE)
  18. stated · §2.1.4, §2.2, Table 2
  19. stated · §2.2 ('SiLU-gated MLPs'), Table 2 ('Activation: SiLU (gated)')
  20. stated · §2.2 ('64 routed experts per layer'), Table 2
  21. stated · §2.2 ('8 active per token (top-8 routing)'), Table 2
  22. stated · §2.2 ('no shared expert'), Table 2 ('Shared expert: None'); Appendix A.2 (a shared expert was ablated and dropped: 'no measurable quality gain… consistently hurt inference performance')
  23. stated · §2.2, §3.4.5, Table 11
  24. stated · §3.4.5, Appendix A.2, §5.1.2, Table 11
  25. stated · §4.1 (layer-selective YaRN: frequency re-mapping applied only to the global (full-attention) layers; sliding-window layers keep their original RoPE parameters — recipe first reported in Gemma 3 and adopted by OLMo 3)
  26. stated · §4 ('extend the effective context length of Mellum 2 from the 8,192-token training context to 131,072 tokens (128K)'), Table 2
  27. stated · §2.2 ('Rotary Position Embeddings (RoPE) with base θ=500,000'), Table 2
  28. stated · §2.2 ('RoPE with base θ=500,000'), Table 2
  29. stated · §2.2 ('pre-RMSNorm (ε=10^-6)'), Table 2; QK-Norm is also RMSNorm (Table 2: 'QK-Norm: Yes (RMSNorm)')
  30. stated · §2.2 ('pre-RMSNorm')
  31. stated · §2.2 ('QK-Norm applied to the query and key projections'), Table 2 ('QK-Norm: Yes (RMSNorm)')
  32. stated · §4 (native 8,192-token pre-training context extended to 131,072 in the long-context stage; SFT and RL train on packed 131,072-token sequences — §5.1.2, Table 6)
  33. stated · §4 ('to 131,072 tokens (128K)'); Abstract ('extended to a 128K context window'); Table 2 ('8,192 / 131,072⋆ after the long-context extension stage')
  34. stated · §4.1, §4.3
  35. stated · §3.1.4
  36. stated · §3 ('approximately 10.6 trillion tokens'); Table 3 (phase totals 6.18 + 2.79 + 1.69 = 10.65T)
  37. stated · §3.1, §3.2.1
  38. stated · §3.2, Table 3
  39. stated · §3.4.1, Table 4, Table 11
  40. stated · §3.4.2, Table 4
  41. stated · §3.4.3, Table 4
  42. stated · §3.4.4, Table 11
  43. stated · §3.4.7, Table 11, §5.1.2
  44. stated · §3.4.7, §3.6, §5.2.1
  45. stated · §5.1 (two SFT variants — Instruct and Thinking — from the same long-context YaRN checkpoint and data mix, differing in chat template, reasoning-trace handling, and loss masking; packed 131,072-token sequences, 3 epochs, peak LR 3e-5 cosine-decaying to 3e-6, Muon optimizer, MoE aux-loss coefficient reduced to 1e-4, EP=8 + CP=8 on 16×8 H200; Instruct run ≈47B tokens, Thinking run ≈167B tokens; MTP head retained with α=0.1)
  46. stated · §5.2.3 (GRPO variant: token-level loss, leave-one-out advantage baseline without std normalization, asymmetric clip-higher [1-0.2, 1+0.28], IcePop band [0.5, 5.0], KL coefficient 0, DAPO-style soft overlong penalty, ARLCP-style concision penalty for Instruct; RLVR rather than RLHF — every prompt has a programmatic verifier; Instruct 500 steps at max seq 16,384, Thinking 100 steps at max seq 40,960; AdamW peak 1e-6 → 1e-7)
  47. stated · §5.1, §5.2, Table 6, Table 8
  48. n/a · modality.type = text-only
  49. stated · §6
  50. stated · §2.1.5, §2.2
  51. stated · §6, Figure 13