• 6 min read

JetBrains Mellum 2.1 vs Codex: Can 12B Open Replace Agents?

tl;dr

Mellum2.1 Instruct is the better self-hosted worker for routine coding tasks, while OpenAI Codex remains the stronger cloud agent for end-to-end work. Mellum's open weights are free to run on your own GPU, whereas Codex Plus costs $20 per user per month.

Featured image for "JetBrains Mellum 2.1 vs Codex: Can 12B Open Replace Agents?"

JetBrains just dropped a 12-billion-parameter mixture-of-experts model that scores 40.4% on SWE-bench Verified while using 45% fewer tokens than its reasoning sibling — and you can run it on your own GPU for free. That changes the math for teams weighing self-hosted workers against cloud agents like OpenAI Codex.

What is Mellum2.1 Instruct and how does it differ from Thinking?

Mellum2.1 Instruct is an open 12-billion-parameter mixture-of-experts coding model with 2.5 billion active parameters per token (64 experts, 8 active per token) and a 131,072-token context window, released under Apache 2.0 on Hugging Face. It shares the exact same architecture and reinforcement-learning training as Mellum2.1 Thinking, which launched in October — the only difference is that Instruct skips the chain-of-thought output entirely. JetBrains built both variants through large-scale RL on repository-level tasks in real environments using NVIDIA NeMo libraries, rewarding the model only when hidden tests pass. The post-training recipe is what moved the needle: Mellum2 scored 2.0% on SWE-bench Verified, while Mellum2.1 Thinking reaches 47.0% with the same weights.

The Instruct variant exists because the local-inference community asked for it. After the Thinking release, developers running models on their own hardware pointed out that step-by-step reasoning adds latency without improving quality on routine agent tasks — small fixes, tool calls, questions about code. JetBrains responded by retraining the same weights with a length penalty that keeps answers concise. On agentic coding tasks, Instruct generates about half as many tokens as Thinking: roughly 5,600 versus 10,100 tokens per task overall (45% fewer), and 2,400 versus 8,800 excluding tool calls (73% fewer). It also includes a multi-token prediction head that JetBrains reports makes generation up to 1.8x faster — about 1.4x faster than Qwen3.5 9B for a single request and 1.8x faster under load.

How does Mellum2.1 Instruct perform on real coding benchmarks?

The headline number is 40.4% on SWE-bench Verified, roughly doubling the predecessor Mellum 2 Instruct’s 20.2%. That puts Instruct within striking distance of Thinking’s 47.0% while burning far fewer tokens. But the benchmark picture gets nuanced when you look across task types. On LiveCodeBench v6 (competitive programming), Thinking scores 82.0 versus Instruct’s 53.7. On AIME 25/26 (math), it’s 83.3 versus 61.1. On BFCL v4 (tool calling), 62.3 versus 46.5. JetBrains is explicit about this: Thinking remains the better choice for hard algorithmic and math problems where step-by-step reasoning changes the answer.

Against peers in the same weight class, the results are mixed. Qwen3.5 9B leads on SWE-bench Verified at roughly 49.8–50.0%, ahead of both Mellum variants. But Mellum2.1 Instruct leads the compared open group on code generation and matches Qwen3.5 9B on multi-step tool use. The speed advantage is real: because Mellum activates only 2.5B parameters per token, it serves nearly twice as many tokens as Qwen3.5-9B under heavy load. In a hands-on tutorial, the 8.1 GB Q4_K_M GGUF build ran at about 216.8 tokens/sec on an RTX 3090 after a roughly 48-second first-call load time. That’s a workstation GPU, not a data center card.

What does it cost to run Mellum2.1 Instruct vs OpenAI Codex?

Here’s where the comparison gets practical. OpenAI Codex is an autonomous software engineering agent for end-to-end tasks such as pull requests and refactors in cloud sandboxes, with CLI, desktop, and web presence — while JetBrains AI Assistant is an IDE-native copilot according to AI Central Resources. Codex pricing includes a free/Go tier and a Plus plan at $20 per month as of November 23, 2026. A 50-developer team using OpenAI Codex Plus pays $12,000 per year in subscriptions (50 developers × $20 per user per month × 12 months). Mellum2.1 Instruct’s weights are free to self-host under Apache 2.0 (GGUF/Ollama); JetBrains charges no per-token fee for the open weights, and no hosted Mellum API price was disclosed. Operating cost is the user’s GPU, electricity, and inference-server ops — but the research provides no per-seat or per-token Mellum price and no quantified GPU/ops cost, so a comparable Mellum2.1 Instruct year-one total cannot be derived from the available inputs.

ToolDeploymentModel AccessPricing (Nov 2026)Best For
OpenAI CodexCloud sandboxProprietary (GPT-6.1 Sol)Free/Go tier; Plus $20/user/moEnd-to-end PRs, refactors, cloud workflows
Mellum2.1 InstructSelf-hosted (GPU)Open weights (Apache 2.0)$0 weights; GPU/ops cost variesSub-agents, tool loops, test triage, air-gapped
Qwen3.5 9BSelf-hosted (GPU)Open weights (license unspecified)$0 weights; GPU/ops cost variesHigher SWE-bench scores, general agent work

The cost gap widens when you look at per-task economics. On Artificial Analysis’s Coding Agent Index, Codex running GPT-6.1 Sol and Claude Code running Sonnet 5.5 earn the same score, while one costs three times as much per task; pushing Claude Code to maximum effort costs about fourteen times Codex’s price. That harness-choice multiplier matters more than the model sticker price — a pattern I’ve covered in AI coding benchmarks that actually matter per Graham Miranda’s harness comparison. For teams already paying for ChatGPT, Codex Plus is a line item. For teams willing to run their own inference, Mellum2.1 Instruct removes the per-token meter entirely.

When should you use an open model versus a cloud agent?

The decision framework isn’t “which model is better” — it’s “which workload are you optimizing.” Mellum2.1 Instruct is positioned as the fast worker for small fixes, tool loops, and test triage, not as the planning brain. That maps cleanly to a hybrid architecture: a frontier cloud model (GPT-6.1 Sol, Claude Sonnet 5.5) handles planning and complex reasoning, while self-hosted Mellum2.1 Instruct executes the high-volume, low-latency sub-tasks — summarize this diff, classify this stack trace, pick which file to open, rewrite this import block. I’ve seen this pattern work in building a hybrid agentic coding stack: the harness decides undo behavior, context cost, and parallel-agent limits, factors that outweigh any difference between underlying models.

Three constraints drive the choice. First, data gravity: if your code cannot leave your VPC, a cloud agent is a non-starter. Mellum2.1 Instruct runs entirely on your hardware. Second, volume: if you’re running dozens of parallel sub-agents on routine tasks, the per-token savings of a local 2.5B-active model compound fast. Third, ops capacity: self-hosting means you own GPU capacity, autoscaling, observability, and prompt caching. “Free weights” is not free infrastructure. Teams without platform engineering bandwidth will find the cloud agent’s operational simplicity worth the subscription.

What’s the practical trade-off for engineering teams?

The contrarian take here is that for most coding-agent tasks, emitting chain-of-thought is not a reasoning feature but a cost. Instruct reaches 40.4% on SWE-bench Verified versus Thinking’s 47.0% while using roughly half the tokens, because the reinforcement learning already internalized repository navigation and test-driven fixing into the weights. Thinking’s step-by-step output is mostly waiting time for the local-inference community that requested it. JetBrains should stop positioning Thinking and Instruct as equal siblings for different tasks; the data shows Instruct is the default worker for repository agents and Thinking is only a specialist override for the small subset of algorithmic deadlocks.

But don’t overstate the replacement story. It beats Qwen3.5-9B on LiveCodeBench v6 (82.0 vs 75.4) and BFCL v4 (62.3 vs 58.5). The honest scope is narrow: sub-agents, quick fixes, first looks at a failing test, and work where code must not leave the building. That’s the same conclusion I reached in open-source vs closed AI coding — open-source agents win on flexibility but carry sustainability risks.

If you’re evaluating this for a team, run the same eval harness on your own repositories with both Mellum2.1 Instruct and your current cloud agent. Measure tokens per task, tickets actually solved, and total wall-clock time. The benchmark leaderboard is a proxy; your codebase is the ground truth.