· 6 min read
JetBrains Mellum2.1: a fast open model for coding agents
JetBrains Mellum2.1 is a 12B open MoE model with 2.5B active parameters for coding agents. How it works, what changed, and how to run it.

Mellum2.1 is an open-weight coding model from JetBrains, released in October 2026 under the Apache 2.0 license, built to act as the worker inside coding agents. It is a 12B-parameter mixture-of-experts model that uses only 2.5B parameters per token, so it runs fast on a single GPU or, quantized, in about 8 GB on a local machine. You can serve it with vLLM or SGLang, or run a GGUF build in llama.cpp, Ollama or LM Studio.
The interesting part is not the size. Mellum2.1 keeps exactly the same architecture as Mellum2, released in June, and yet its agentic scores moved from near zero to something usable. All of the change came from post-training. Here is what the model is, how it works, and how to run it.
What is Mellum2.1?
Mellum2.1 is a text-only "thinking" model, meaning it writes out its reasoning before giving a final answer. JetBrains positions it for three jobs: a worker or sub-agent inside a larger coding agent, a general reasoning assistant, and a model you can host privately when code cannot leave your network.
The weights live on Hugging Face as JetBrains/Mellum2.1-12B-A2.5B-Thinking, with GGUF builds in a separate repository. The name encodes the shape: 12B total parameters, 2.5B active.
That small active footprint is the point. A coding agent makes many calls per task: read a file, decide on an edit, run a test, read the failure, try again. Each of those steps pays the model's latency. A model that answers quickly and cheaply is more useful for that loop than a bigger one that answers slightly better but slowly.
How does the Mellum2.1 architecture work?
A mixture-of-experts (MoE) model splits its feed-forward layers into many smaller sub-networks called experts, and a small router picks a few of them for each token. You store all the weights, but you only compute with a fraction of them.
Mellum2.1's published configuration:
| Property | Value |
|---|---|
| Total parameters | 12B |
| Active parameters per token | 2.5B |
| Experts | 64, with 8 active per token |
| Layers | 28 |
| Attention | 32 query heads, 4 key-value heads |
| Context length | 131,072 tokens |
| Weights | bfloat16, Apache 2.0 |
Two attention details help with long contexts. Grouped-query attention (GQA) lets several query heads share one set of key and value heads, which shrinks the KV cache, the memory the model keeps for every token it has already seen. Here, 32 query heads share 4 KV heads. And three out of every four layers use sliding-window attention, where a layer only looks at the most recent 1,024 tokens instead of the whole context. The remaining full-attention layers still connect distant parts of the input, but most layers stay cheap no matter how long the conversation gets. For an agent that keeps piling tool output into its context, that matters.
What changed from Mellum2?
Nothing in the network itself. JetBrains says the gains come entirely from post-training, with reinforcement learning (RL) turned from a short final step into the main phase of training.
Reinforcement learning here means the model attempts tasks, an automatic check scores the result, and the weights are nudged toward attempts that scored well. The RL tasks covered math, competitive programming, science, tool use and software engineering. For the software engineering part, the model worked in real repositories with a shell and file-editing tools, and was rewarded when the tests passed. JetBrains also filtered the open RL datasets it used, removing tasks with broken tests, answers that could not be checked, and problems that were either trivial or impossible.
The effect shows most on agentic benchmarks. These are JetBrains' own numbers, with Mellum2 re-evaluated through the same pipeline:
| Benchmark | Mellum2 | Mellum2.1 |
|---|---|---|
| SWE-bench Verified | 2.0 | 47.0 |
| SWE-bench Pro | 0.0 | 28.0 |
| Terminal-Bench 2.1 | 0.6 | 17.4 |
| BFCL v4 (tool calling) | 49.6 | 62.3 |
| LiveCodeBench v6 | 69.4 | 82.0 |
SWE-bench asks a model to fix real GitHub issues in real repositories, so going from 2% to 47% is the difference between a model that cannot drive an agent and one that can. Treat all of these as self-reported. JetBrains also publishes comparisons with other small open models, and on some agentic and knowledge benchmarks those models still score higher, so test against your own tasks before choosing.
How do you run Mellum2.1 locally?
For a server with a recent GPU, vLLM is the documented path. The model card gives this command, including tool calling:
vllm serve JetBrains/Mellum2.1-12B-A2.5B-Thinking \
--max-model-len 131072 \
--reasoning-parser qwen3 \
--enable-auto-tool-choice \
--tool-call-parser hermes
The reasoning parser separates the model's thinking text from its final answer, so your client gets them in different fields. The tool-call parser turns the model's tool-call output into the standard tool_calls structure that OpenAI-compatible clients expect. Once it is running, any OpenAI-compatible SDK can talk to it:
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="unused")
resp = client.chat.completions.create(
model="JetBrains/Mellum2.1-12B-A2.5B-Thinking",
messages=[{"role": "user", "content": "Write a Python function that checks if a number is a power of two."}],
temperature=0.6,
top_p=0.95,
extra_body={"top_k": 20},
)
print(resp.choices[0].message.content)
For a laptop, use the GGUF build. GGUF is the file format used by llama.cpp and the tools built on it, and quantization stores weights at lower precision to cut memory, at some cost in accuracy:
ollama run hf.co/JetBrains/Mellum2.1-12B-A2.5B-Thinking-GGUF:Q4_K_M
The recommended Q4_K_M file is 8.1 GB, against 24.3 GB for full BF16. Q8_0 (12.9 GB) and Q6_K (10.9 GB) keep closer to the original if you have the memory. Because only 2.5B parameters are active per token, generation stays quick even on modest hardware; the bigger constraint is fitting the whole file in memory.
JetBrains also says a multi-token prediction (MTP) head for speculative decoding in vLLM is coming. Speculative decoding guesses several tokens ahead and verifies them in one pass, which speeds up single requests without changing the output.
When should you use Mellum2.1?
It fits best where you need many fast, cheap model calls and can keep the work narrow:
- Sub-agents. A larger model plans, and Mellum2.1 handles the repetitive steps: reading files, making focused edits, running and re-running tests. It is the same split-by-cost idea behind putting a small decision model in front of an LLM for routing.
- Private deployments. Apache 2.0 weights mean you can run it inside your own network, which matters when source code cannot be sent to a hosted API.
- Local tooling. An 8 GB quantized file is small enough for a developer machine, much like running EmbeddingGemma 2 on-device for search.
It is less suited to work that needs broad world knowledge, images, or the strongest possible reasoning on a hard problem. It is text-only, and a 12B model will not match frontier hosted models on difficult tasks. Thinking mode also means longer outputs, so budget your max_tokens generously; the model card's example allows up to 81,920.
Key takeaways
- Mellum2.1 is a 12B MoE coding model from JetBrains with 2.5B active parameters and a 131K context, released under Apache 2.0.
- The architecture is unchanged from Mellum2; heavy reinforcement learning on real repositories drove the gains.
- Self-reported SWE-bench Verified rose from 2.0 to 47.0, making it viable as an agent worker.
- Serve it with vLLM using the
qwen3reasoning parser andhermestool-call parser, or run the 8.1 GB Q4_K_M GGUF in Ollama or llama.cpp. - Use it for fast sub-agent steps and private deployments, and keep larger models for planning and hard reasoning.
FAQ
Is Mellum2.1 free for commercial use?
Yes. The weights are released under the Apache 2.0 license, which allows commercial use, modification and self-hosting.
How much memory does Mellum2.1 need?
The full bfloat16 weights take about 24.3 GB. The recommended Q4_K_M GGUF build is 8.1 GB, and the smallest published build, MXFP4_MOE, is 7.0 GB, plus extra memory for the context you use.
Does Mellum2.1 support tool calling?
Yes. In vLLM, enable it with --enable-auto-tool-choice --tool-call-parser hermes, and the server returns standard OpenAI-style tool calls.