← Latest papers
💬 NLP

Mellum2 Technical Report

Mellum 2 is an open-weight, 12B-parameter Mixture-of-Experts language model with 2.5B active parameters per token, specialized in software engineering and agentic tasks, which achieves competitive performance with larger models through architectural innovations like Multi-Token Prediction and a three-phase training curriculum spanning 10.6 trillion tokens.

Original authors: Marko Kojic, Ivan Bondyrev, Aral de Moor, Joseph Shtok, Petr Borovlev, Kseniia Lysaniuk, Madeeswaran Kannan, Ivan Dolgov, Nikita Pavlichenko

Published 2026-06-01
📖 4 min read☕ Coffee break read

Original authors: Marko Kojic, Ivan Bondyrev, Aral de Moor, Joseph Shtok, Petr Borovlev, Kseniia Lysaniuk, Madeeswaran Kannan, Ivan Dolgov, Nikita Pavlichenko

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you're trying to build a super-smart coding assistant that lives inside your computer. The challenge is that you want it to be incredibly smart (like a senior engineer) but also incredibly fast and cheap to run (like a standard office laptop). Usually, you have to pick one: either the "smart" version is huge and slow, or the "fast" version is too simple to handle hard problems.

The team at JetBrains built Mellum 2 to solve this exact problem. Here is how they did it, explained simply:

1. The "Swiss Army Knife" Brain (The Architecture)

Most AI models are like a single, giant brain cell that does everything. Mellum 2 is different. It's built like a Mixture-of-Experts (MoE).

  • The Analogy: Imagine a massive library with 64 different specialized librarians (experts). When you ask a question, the model doesn't wake up all 64 librarians. Instead, it has a smart manager who picks only the 8 most relevant librarians for your specific question.
  • The Result: The model has the total knowledge of a 12-billion-parameter "giant" brain, but for every single word it writes, it only "thinks" with the power of a 2.5-billion-parameter brain. This makes it fast enough to run on standard hardware while still being very smart.

2. The "Sliding Window" and "Drafting" Tricks

To make it even faster, they added two clever shortcuts:

  • Sliding Window: Instead of trying to remember every single word you've ever typed in a conversation (which gets slow), the model focuses on the last 1,024 words like a sliding window on a train. It keeps the most recent context sharp while letting older details fade, which saves a ton of energy.
  • The "Draft" Assistant: The model has a tiny, built-in "drafting" assistant. Before it commits to writing a final answer, this little assistant guesses the next few words. If the guess is right, the main model skips the work and just accepts it. It's like a writer having a friend whisper the next sentence so they can type faster.

3. The "Three-Phase" School Curriculum

They didn't just feed the model random data. They taught it in three specific stages, like a school curriculum:

  • Phase 1 (The Generalist): They started with a huge mix of general internet data (70%) and some code (23%). This gave the model a broad understanding of how humans talk and write.
  • Phase 2 (The Specialist): They shifted the mix to include more high-quality code (42%) and math. This is where the model started learning the specific rules of programming.
  • Phase 3 (The Master): In the final stage, the mix was almost entirely code and math (59% code). This is the "boot camp" where the model sharpened its skills to become an expert coder.

4. Two Personalities: "Instruct" and "Thinking"

From the same trained brain, they released two versions of the model:

  • The "Instruct" Model: This is the direct worker. You ask a question, and it gives you the answer immediately. It's great for quick tasks.
  • The "Thinking" Model: This is the deep thinker. Before it gives you an answer, it writes out a "reasoning trace"—a step-by-step explanation of how it solved the problem. This is like a student showing their work on a math test. The paper found that this "thinking" mode makes the model much better at solving hard logic puzzles and complex coding challenges.

5. The "Proof" (Testing)

They tested Mellum 2 against other popular models.

  • Speed: It runs as fast as a 7-billion-parameter model (which is much smaller than its 12-billion total size) but is smarter than many models its size.
  • Coding: It excels at writing code, debugging, and using tools (like searching the web or running commands).
  • The Trade-off: Because they focused so heavily on making it a coding expert, it is slightly less knowledgeable about general world facts (like history or biology) compared to models trained to be general chatbots. However, for its intended job—helping developers—it is a top performer.

Summary

Mellum 2 is a specialized coding assistant that uses a "team of experts" architecture to be both smart and fast. It was trained through a carefully designed curriculum to master code and math, and it comes in two flavors: one for quick answers and one for deep, step-by-step reasoning. The team released it for free so anyone can use it to build better software.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →