JetBrains Mellum2.1: small 12B MoE coding-agent model, Apache 2.0
JetBrains has released Mellum2.1 Thinking, a reasoning model with 12 billion parameters, of which only 2.5 billion are active per token. The focus is reinforcement learning in real code environments: on SWE-bench Verified, JetBrains says it jumps from 2.0 to 47.0 percent.

What it's about
JetBrains, known for IntelliJ IDEA and PyCharm, has released the model Mellum2.1 Thinking (JetBrains/Mellum2.1-12B-A2.5B-Thinking) on Hugging Face. It is a Mixture-of-Experts (MoE: many sub-networks, of which only a few compute per token) model with 12 billion parameters in total and 2.5 billion active. The license is Apache 2.0, so commercial use is allowed. According to the Model Card, it is designed for complex agentic tasks, such as working in a repository, running commands and calling tools, as well as for hard problems in programming, math and logical reasoning.
A note on dates: the Reddit post is dated November 2, 2026, while tech-insider.org gives October 8, 2026 as the release date. The two don't clearly line up. The version with the MTP head is probably the newer one.
What's new: reinforcement learning in real environments
Mellum2.1 is the successor to Mellum2 Thinking. The architecture stayed the same, and nearly all the work went into post-training, mainly reinforcement learning (RL: the model is rewarded for good results). According to JetBrains, RL went from a short final phase to the main part of training:
- More and more strictly filtered data: new RL tasks in math, competitive programming, science, tool use and software engineering, partly from open datasets and partly built in-house. Every source was filtered before training.
- Real environments: For software engineering, the model trains in real repositories with a shell and file editor, and is rewarded when tests pass.
After millions of sandbox runs, the model should be able to explore a codebase, edit files and check its own changes. Tech-insider.org speaks of thousands of environments.
Specs
| Property | Value |
|---|---|
| Parameters | 12B total, 2.5B active |
| Layers | 28 |
| Experts | 64, 8 of them active |
| Attention | 32 query heads, 4 KV heads (GQA) |
| Context | 131,072 tokens |
| Sliding window | 1,024 in 3 of 4 layers |
| Vocabulary | 98,304 |
| Precision | bfloat16 |
Before answering, the model outputs visible reasoning in <think> blocks. According to the Hugging Face documentation, the architecture is based on Qwen3-MoE with layer-specific rotary embeddings and alternating sliding-window attention.
Benchmarks
JetBrains ran all figures itself with the same pipeline in thinking mode. They are not independent results. The comparison is against the predecessor, Gemma 4 (E4B) and Qwen3.5 (9B).
| Benchmark | Mellum2.1 | Mellum2 | Gemma 4 E4B | Qwen3.5 9B |
|---|---|---|---|---|
| LiveCodeBench v6 | 82.0 | 69.4 | 69.4 | 75.4 |
| HumanEval+ | 91.5 | 90.9 | 89.1 | 89.6 |
| MBPP+ | 79.4 | 75.4 | 70.9 | 69.8 |
| AIME 25/26 | 83.3 | 60.1 | 45.0 | 86.7 |
| SWE-bench Verified | 47.0 | 2.0 | 23.0 | 50.0 |
| Terminal-Bench 2.1 | 17.4 | 0.6 | 3.4 | 21.7 |
| SWE-bench Pro | 28.0 | 0.0 | 4.0 | 38.0 |
| BFCL v4 | 62.3 | 49.6 | 52.5 | 58.5 |
| IFEval | 90.6 | 79.5 | 90.8 | 92.4 |
| GPQA Diamond | 64.6 | 51.0 | 53.1 | 77.8 |
| MMLU-Redux | 87.8 | 86.0 | 84.9 | 89.5 |
| HarmBench (lower is better) | 8.5 | 21.5 | 38.1 | 6.6 |
The jumps over Mellum2 are huge, especially on the agent benchmarks. The predecessor scored close to zero there, possibly because it wasn't trained for this kind of agentic work. Against Qwen3.5 (9B), Mellum2.1 leads in coding (LiveCodeBench, HumanEval+, MBPP+) and tool use (BFCL), but trails on agent benchmarks, knowledge (GPQA Diamond: 64.6 vs. 77.8) and safety. The agent tests used the open-source harness Pi v0.73.1 with shell and file tools, 114K context and up to 16K tokens per turn.
Deployment and speed
For serving, the card recommends vLLM with --max-model-len 131072 --reasoning-parser qwen3, plus --enable-auto-tool-choice --tool-call-parser hermes for tool calling. SGLang and Docker Model Runner are also listed. For sampling, the card specifies temperature 0.6, top_p 0.95 and top_k 20, with up to 81,920 output tokens.
According to the Model Card, GGUF builds for llama.cpp, Ollama and LM Studio are still "coming soon." Tech-insider.org, however, already mentions GGUF quantizations such as Q4_K_M, which the Model Card doesn't yet confirm.
New is an MTP head (Multi-Token Prediction): an extra transformer block, trained alongside the model, that predicts the token after the one just chosen. The main model checks every suggestion, so the output stays unchanged. According to JetBrains, decoding runs 1.4–1.8x faster with about 90% of drafts accepted. Requirements: vLLM 0.33 or later (--speculative-config '{"method": "mtp", "num_speculative_tokens": 1}'), transformers 5.20 or later (use_mtp=True), or llama.cpp with the GGUF variant (--spec-type draft-mtp --spec-draft-n-max 1). According to tech-insider.org (a vendor claim), under heavy load the model serves almost twice as many tokens as Qwen3.5-9B, and for single requests MTP makes it about 1.6x faster.
What you need to try it
- Graphics card: In bfloat16, 12B parameters take up about 24 GB. Once GGUFs are available, 4-bit quantizations should need roughly 8–10 GB of VRAM (estimate). Since only 2.5B parameters are active, generation is relatively fast.
- RAM: With MoE models, some of the experts can sit in RAM. The source gives no figures.
- Storage: about 24 GB for the bf16 weights, much less for quantized versions.
- Mac/CPU/Colab: The Model Card links Google Colab and Kaggle notebooks. For CPU and Mac, you'll probably need the GGUF builds with llama.cpp or LM Studio.
Our take
Mellum2.1 is a sensible step toward small, fast, openly licensed coding agents that run locally or on-premises. According to tech-insider.org, JetBrains positions the model less as a rival to the largest proprietary models and more as a building block for routing, Q&A and sub-agents.
The caveats: all benchmarks are self-reported. JetBrains compares only against Gemma 4 (E4B) and Qwen3.5 (9B), not Codestral, Qwen Coder or DeepSeek Coder. Tech-insider.org points out that claims of beating specific rivals deserve skepticism without independent testing. The card itself also shows Qwen3.5 (9B) ahead on SWE-bench Verified, Terminal-Bench, GPQA and AIME. Safety scores (XSTest 88.8, HarmBench 8.5) are better than the predecessor's but worse than Qwen3.5's. For local users, the model becomes truly practical once the GGUF builds arrive.
Sources
- Reddit: lokale Modelle & Bild-KI huggingface.co
- tech-insider.org tech-insider.org
Try it yourself: Mellum2.1-12B-A2.5B-Thinking
Explained step by step, no prior knowledge needed – on your own computer or free in your browser.
What can I do with it?
Mellum2.1 Thinking is a compact reasoning model for programming tasks. It thinks visibly in <think> blocks and can work in a repository: read code, change files, run commands and call tools. According to JetBrains, it solves 47% on SWE-bench Verified and scores 82% on LiveCodeBench v6 (self-reported figures). Since only 2.5B parameters are active per token, it is fast and practical even on smaller GPUs. On general knowledge (GPQA Diamond 64.6) it trails Qwen3.5 (9B), while on pure coding it is partly ahead. It is no replacement for the largest proprietary models, but it works well as a fast local helper.
Who is it worth it for?
Interesting for developers who want to build a local, freely licensed coding assistant or agent, and for teams with data-protection requirements. If you just want a chat app with no setup, you're better off waiting for the GGUF builds for Ollama or LM Studio.
Ideas: What you can do with it
Give the model a diff or a file and have it flag bugs, risks and missing tests. Your code never leaves your machine, which can matter for internal company source code.
Connect the model through an agent framework with shell and file tools and let it analyze and fix failing tests. The model was trained for exactly this kind of loop.
Use it for routine steps like file search, small edits or routing, while a larger model handles only the hardest decisions. That cuts cost and latency.
With its visible reasoning process, it suits competition problems and puzzle-style math. The AIME 25/26 score of 83.3 is self-reported.
Have it explain error messages and show step-by-step solutions. The reasoning in the think block makes it clear how the model reaches its answer.
What your computer needs
Which variant is right for me?
Many models come in several sizes or "quantizations." These are compressed versions: smaller and faster, but slightly less accurate. Rule of thumb: pick the largest variant whose memory requirement fits in your VRAM (video memory). The scripts below choose this for you automatically.
| Variant | Download | Needs approx. | Compatible graphics cards |
|---|---|---|---|
Q4_K_M Default |
16 GB | 20 GB | e.g. RTX 3090, RTX 4090, Tesla P40 |
Q6_K |
22 GB | 26 GB | e.g. RTX 5090 |
Q8_0 |
26 GB | 30 GB | e.g. RTX 5090 |
BF16 |
51 GB | 58 GB | e.g. multiple professional GPUs (2× A6000, H100) or DGX Spark |
According to the Model Card, what's currently available are the bf16 weights (about 24 GB), which need a large card or vLLM. Quantized GGUF versions for llama.cpp, Ollama and LM Studio are to follow soon, and a 4-bit build would need roughly 8–10 GB of VRAM. The variant with the MTP head is worth it if you run vLLM 0.33+ or transformers 5.20+.
- The bf16 weights need about 24 GB of VRAM for 12B parameters. 4-bit quantizations should manage with about 8–10 GB (estimate).
- The 131,072-token context costs extra memory. Sliding window in 3 of 4 layers reduces KV-cache demand.
- MTP requires vLLM 0.33 or later, or transformers 5.20 or later.
- Google Colab and Kaggle are linked on the Model Card as notebook options.
- GGUF builds for llama.cpp, Ollama and LM Studio have been announced but aren't out yet.
How do I find out what my computer has?
- Windows: Press Ctrl + Shift + Esc → Task Manager → Performance tab → click GPU on the left. At the bottom you'll see Dedicated GPU memory (that's your VRAM). You'll find system memory under Memory.
- Mac: Apple menu at the top left → About This Mac. You'll see your chip (e.g. M2) and memory (e.g. 16 GB). On Apple chips, graphics and processor share this memory.
- Linux: Type
nvidia-smiin the terminal (shows your graphics card and its memory) andfree -hfor system memory.
Guide
Google Colab (in your browser, no installation)
Google Colab is a free service from Google. It gives you a computer with a graphics card in your browser for a few hours. All you need is a Google account. For this model: Colab Pro only – needs the L4 GPU (22.5 GB); the free T4 is too small.
- Download the notebook. Click the button and save the file.
- Open Colab. Go to colab.research.google.com and sign in with your Google account.
- Upload the notebook. In the window that appears, click Upload on the left (or choose File → Upload notebook at the top) and select the file
colab.ipynb. - Turn on the GPU. In the top menu, go to Runtime → Change runtime type → under Hardware accelerator, select T4 GPU (with Colab Pro: L4 or A100) → Save.
- Start everything. Runtime → Run all (keyboard shortcut Ctrl + F9). If you see the warning “This notebook was not authored by Google,” click Run anyway.
- Wait. The cells run one after another. A green checkmark appears to the left of each cell when it's done. Installation and download take about 9 minutes here.
- Try it out. The result appears below the last cell. To test something else, change the text in the cell and run it again with Shift + Enter. The last cell starts a proper chat with an input field.
- Clean up. When you're done: Runtime → Disconnect and delete runtime. This saves your free quota.
Good to know: The free GPU is limited (usually a few hours per day). After about 90 minutes of inactivity, Colab disconnects, and you'll have to start everything over.
Windows 10 / 11
The easiest way is Ollama, a free program that launches AI models with a single command.
- Update your graphics driver (NVIDIA cards only): Install the NVIDIA app or the latest driver. For AMD cards, use the latest Adrenalin driver.
- Install Ollama. Download the file OllamaSetup.exe from ollama.com/download/windows, double-click it, and choose Install. Afterward, a small llama icon appears in the taskbar at the bottom right.
- Open a terminal window. Press the Windows key, type PowerShell and press Enter. A blue or black window opens.
- Start the model. Copy this command ("Copy" button), paste it into the window with a right-click, and press Enter:
The first time, Ollama downloads the model (16 GB (about 22 min at 100 Mbit/s)). After that, it's instant.ollama run hf.co/JetBrains/Mellum2.1-12B-A2.5B-Thinking-GGUF:Q4_K_M - Start typing. Once
>>> Send a messageappears, type your question and press Enter. Type/byeto end the chat.
Not enough memory? Pick a smaller variant from the table above, e.g. ollama run hf.co/JetBrains/Mellum2.1-12B-A2.5B-Thinking-GGUF:Q4_K_M.
Prefer automatic? A script that picks the right variant for you
- Download both files into the same folder: try_windows.ps1 demo.py
- Open the folder in File Explorer, right-click an empty spot and choose Open in Terminal.
- Paste this command and press Enter:
powershell -ExecutionPolicy Bypass -File try_windows.ps1
If needed, the script installs Ollama via winget, measures your VRAM (video memory) and downloads the matching variant.
macOS
Macs with an Apple chip (M1 to M5) are ideal. Older Intel Macs are very slow.
- Install Ollama. Download it from ollama.com/download/mac, open the file, and drag Ollama into your Applications folder. Launch Ollama once – a llama appears in the menu bar at the top.
- Open Terminal. Press Cmd + Space, type Terminal, and press Enter.
- Start the model. Paste the command (Cmd + V) and press Enter:
The first time, the model is downloaded (16 GB (about 22 min at 100 Mbit/s)).ollama run hf.co/JetBrains/Mellum2.1-12B-A2.5B-Thinking-GGUF:Q4_K_M - Start typing. Type your question and press Enter. Quit with
/bye.
Linux
- Check your GPU.
nvidia-smishould show your card. If it doesn't, install the driver on Ubuntu and restart:sudo ubuntu-drivers install - Install Ollama:
curl -fsSL https://ollama.com/install.sh | sh - Start the model:
Exit withollama run hf.co/JetBrains/Mellum2.1-12B-A2.5B-Thinking-GGUF:Q4_K_M/bye. Useollama psto check whether the model is running on the GPU. - Or let it pick the right variant automatically:
bash try_linux.sh # mit Python/transformers statt Ollama: MODE=hf bash try_linux.sh
Try it
Find the bug in this function and explain the fix: def mean(xs): return sum(xs) / len(xs) - 1Write a Python function that merges two sorted lists in linear time, and add unit tests with pytest.Explain step by step why this SQL query is slow, and suggest a suitable index: SELECT * FROM orders WHERE LOWER(email) = 'a@b.com';Refactor this class with three nested if blocks into clean, testable code and justify your changes.You have access to shell tools: investigate the repository, find out why the test test_parse is failing, and fix it.
Tips for better results
- Use the recommended sampling values: temperature 0.6, top_p 0.95, top_k 20.
- Allow generous output (max_tokens up to 81,920) so the reasoning doesn't get cut off.
- Describe tasks with a concrete symptom, file paths and the desired result, especially in agent mode.
- Enable the MTP head in vLLM for 1.4–1.8x speed with unchanged output, according to JetBrains.
If something goes wrong
GGUF files aren't available on the Model Card yet, so for Ollama and LM Studio you'll need to wait for now.
For tool calling, vLLM must be started with --enable-auto-tool-choice and --tool-call-parser hermes, otherwise tool calls won't be recognized.
Without --reasoning-parser qwen3, the thinking blocks end up in the normal response text.
The MTP head requires vLLM 0.33 or newer, or transformers 5.20 or newer. Older versions can't use it.
Reasoning generates a lot of tokens (recommended: max_tokens up to 81,920), so responses take longer than with non-reasoning models.
“out of memory,” a crash, or your computer freezes
The model is too big for your VRAM (video memory). Pick a smaller variant from the table above and close other programs, especially games and browsers with lots of tabs.
It runs, but extremely slowly
Your CPU is probably doing the work instead of your graphics card. In Ollama, the PROCESSOR column of ollama ps shows how much runs on the GPU. If it says "100% CPU", update your graphics driver or pick a smaller variant that fits entirely into VRAM (video memory).
“ollama” or “python” is not found
Close the terminal window and open it again so it recognizes the newly installed program. For Python on Windows: reinstall it and check Add python.exe to PATH.
Windows: "Running scripts is disabled on this system"
Run the script with exactly the command above: powershell -ExecutionPolicy Bypass -File try_windows.ps1. This allows execution for this one time only.
Error message when loading the model (version, "trust_remote_code", unknown architecture)
Brand-new models often need the latest software version. With Ollama: update Ollama. With Python: pip install -U transformers in the activated environment. The Model Card usually lists the exact version.
Tokenstrom generates the scripts and notebook automatically. Please take a quick look before running them – they're plain, readable text. Mind the model's license: apache-2.0.
Ask the AI assistant
Questions about this article, installation or background? Our assistant knows this page and runs on our own machine, not in someone else's cloud.
The Assistant is an AI (Gemma 4) and can make mistakes – please check important details against the source. Questions are used only to generate an answer and are deleted after one hour. Please don't enter any personal data.
Comments
What do you think? Already tried it? Write it here, no sign-up needed.
Comments are public. Links aren't allowed, and we delete abusive posts. You can delete your own comment at any time in this browser. Learn more in the Privacy Policy.