JetBrains Mellum2: a 12B coding MoE that runs like 2.5B

Mellum2 is JetBrains' open 12B MoE with 2.5B active parameters per token, 131K context, and Apache 2.0 weights. Here is when it beats bigger dense models for routing, RAG, and agent sub-calls.

SaifullahSaifullah
4 min read
JetBrains Mellum2: a 12B coding MoE that runs like 2.5B

JetBrains did not ship Mellum2 to win a single leaderboard screenshot. They shipped it because modern AI products fire many small model calls per user action: route this ticket, summarize that diff, validate a tool argument, plan the next sub-agent step.

Each call cares about latency and throughput, not whether you activated 70B parameters for a yes/no gate.

Mellum2 is the open-weight answer: 12B total, 2.5B active per token, Apache 2.0, built for text-and-code stacks that JetBrains already runs inside IDEs.

Alpha Signal flagged it the same week as Life-Harness. Same pattern: fix the infrastructure layer, not just the brain.

From autocomplete to full coding assistant

The original Mellum was a 4B dense code-completion model inside JetBrains editors. Mellum2 is a broader successor:

  • Multi-step agentic workflows
  • Tool calling (BFCL-style benchmarks in the release card)
  • Long conversations about code
  • Optional Thinking variant with explicit reasoning traces

Architecture follows the Qwen3-MoE recipe: 64 experts, 8 active, with deployment-oriented tweaks:

Design choiceWhy it matters
Grouped-Query Attention (4 KV heads)Smaller KV cache, better batching
Sliding Window Attention on 3 of 4 layersLong context without full attention everywhere
Multi-Token Prediction headAuxiliary training + speculative decoding draft
131,072 token context (YaRN extension)Repo-scale context for routing and RAG
Mellum2 MoE architecture: 64 experts with 8 active per token, 2.5B active of 12B total, long context window

Pre-training ran roughly 10.6 trillion tokens with a curriculum that shifted from diverse web data toward code and math (code ratio rising from 23% to 59% in later phases). Post-training is two-stage: supervised fine-tuning then RL with verifiable rewards on math, executable code, tools, and knowledge tasks.

Three checkpoints on Hugging Face

JetBrains released a full tree, not a single marketing checkpoint:

Instruct is the default for chat, code assistance, and tool use when you want low latency. Thinking is for hard debugging, planning, and multi-step flows where you pay for tokens in explicit reasoning blocks before the answer.

vLLM serve example from the Thinking card:

vllm serve JetBrains/Mellum2-12B-A2.5B-Thinking \ --max-model-len 131072 \ --reasoning-parser qwen3

Benchmarks: competitive, not crown-seeking

JetBrains publishes side-by-side tables against Qwen3.5 (4B/9B), OLMo-3 7B, Ministral 3 14B, and Seed-Coder 8B in their technical report.

Honest read:

  • LiveCodeBench v6: larger Qwen3.5 variants still lead on raw scores
  • Tool use (BFCL): Mellum2 Instruct reaches competitive mid-tier numbers after RLVR
  • Thinking variant: strong on math reasoning (AIME) and JetBrains' internal pairwise eval

The product claim is more than 2x faster inference than similar-sized dense baselines while staying in the competitive band. That is the Mellum2 wedge.

Benchmark comparison chart for Mellum2 Instruct and Thinking variants on coding and tool-use tasks

Where I would actually deploy Mellum2

Not as the single model for every agent turn. As the efficiency tier in a routed stack:

WorkloadMellum2 fit
Intent routing / triageHigh
RAG summarization before main agentHigh
Sub-agent for grep or file searchHigh
Final patch on critical prod serviceLow unless eval proves parity
Overnight batch refactorsMedium (Thinking variant)

This mirrors how I advise clients on specialized model economics: frontier models for the hard gate, small open models for the firehose of cheap calls.

Mellum2's Apache 2.0 license also matters for private VPC deploys where JetBrains-style IDE integration is not the goal but you want a maintained coding MoE with documented training.

Mellum2 vs Mellum vs buying another API tier

OptionTradeoff
API frontier model everywhereSimple, expensive at high QPS
Mellum2 on your GPUOps overhead, predictable unit economics
Original Mellum 4B denseCheaper, narrower (completion-only heritage)
Qwen3.5 9B denseHigher per-token cost, simpler mental model

If your agent already runs Cursor or Claude Code with a frontier default, Mellum2 is a candidate for the inner loops you control: routers, evaluators, retrieval compressors.

What to test before you standardize on it

  1. Your repo languages and frameworks (MultiPL-E style coverage is not your private monorepo)
  2. Tool schemas you actually emit (BFCL is a proxy, not your MCP surface)
  3. Latency at your batch size on the hardware you own
  4. Thinking vs Instruct cost on your median task length

Run the same harness on Mellum2 and your current small model. Harness effects still dominate, as always.

Bottom line

Mellum2 is JetBrains betting that agent products are multi-call systems. The winning open model is not always the biggest score on LiveCodeBench. It is the one that keeps p95 latency stable when you spawn five sub-agents per user click.

That is a deployability story, not a hype slide. Worth a slot in your model router eval.

Routing models for agent sub-calls? Book a free discovery call and we can benchmark Mellum2 against your real tool schemas, not public leaderboards.

Share this post

Related posts