Mellum2.1 Instruct with the MTP head
[!Note] This repository is Mellum2.1 Instruct with its multi-token prediction (MTP) head included. The model weights are byte-identical to that release; the head adds one shard and one config key. Use this repository for speculative decoding with vLLM 0.33 or newer and transformers 5.20 or newer. Earlier versions do not support the head; with them, use the Instruct repository.
[!Note] Mellum2.1 Instruct answers directly, without a chain of thought. Use it for fast agentic work, such as sub-agents, tool loops, small fixes, and questions about code. For long, difficult tasks that benefit from reasoning before acting, use Mellum2.1 Thinking.
Mellum2.1 Instruct Highlights
Mellum2.1 Instruct is the next version of Mellum2 Instruct and the direct-answer sibling of Mellum2.1 Thinking. The architecture is unchanged (a 12B mixture-of-experts model with 2.5B active parameters). What changed is post-training:
- Reinforcement learning in real environments: like Mellum2.1 Thinking, the model was trained with large-scale reinforcement learning, including agentic training inside real repositories with shell and file tools, where it is rewarded when the tests pass. Training was built on NVIDIA's open-source NeMo RL and NeMo Megatron-Bridge libraries.
- Direct, concise answers: the model answers without a chain of thought. On our repository-level validation tasks, it generates about half as many tokens as Mellum2.1 Thinking.
- Large gains over Mellum2 Instruct: the model resolves 40.4% of SWE-bench Verified tasks, up from 20.2%. It also improves on most coding, math, tool-use, and instruction-following benchmarks, for example from 32.3 to 61.1 on AIME and from 22.2 to 38.0 on WorkBench.
Model Overview
Mellum2.1 Instruct has the following features:
- Number of Parameters: 12B total, 2.5B active
- Number of Layers: 28
- Hidden Size: 2304
- Intermediate Size: 7168
- MoE Intermediate Size: 896
- Number of Experts: 64
- Number of Activated Experts: 8
- Number of Attention Heads (GQA): 32 for Q and 4 for KV
- Context Length: 131,072
- Sliding Window: 1,024 (3 of every 4 layers)
- Vocabulary Size: 98,304
- Precision: bfloat16
- Multi-token prediction head: 1 layer, used as a speculative decoding draft
- License: Apache 2.0
The mellum architecture is supported in transformers 5.11.0 and later, the MTP head in 5.20 and later.
Serving with vLLM
Requires vLLM 0.33 or newer with transformers 5.20 or newer. The --speculative-config flag turns on speculative decoding with the MTP head; without it the server runs the plain model and ignores the head.
# Without tool calling
vllm serve JetBrains/Mellum2.1-12B-A2.5B-Instruct-MTP \
--max-model-len 131072 \
--speculative-config '{"method": "mtp", "num_speculative_tokens": 1}'
# With tool calling
vllm serve JetBrains/Mellum2.1-12B-A2.5B-Instruct-MTP \
--max-model-len 131072 \
--enable-auto-tool-choice \
--tool-call-parser hermes \
--speculative-config '{"method": "mtp", "num_speculative_tokens": 1}'
GGUF builds for llama.cpp, Ollama, and LM Studio, including the MTP head as a draft file, are in JetBrains/Mellum2.1-12B-A2.5B-Instruct-GGUF.
Quickstart
from openai import OpenAI
# Configured by environment variables
client = OpenAI()
messages = [
{"role": "user", "content": "Write a Python function to reverse a string."},
]
chat_response = client.chat.completions.create(
model="JetBrains/Mellum2.1-12B-A2.5B-Instruct-MTP",
messages=messages,
max_tokens=81920,
temperature=0.6,
top_p=0.95,
extra_body={"top_k": 20},
)
print("Chat response:", chat_response)
Multi-token prediction head
The multi-token prediction (MTP) head is one extra transformer block, trained together with the model, that predicts the token after the one just sampled. Inference engines use it as a speculative draft: the model verifies every drafted token, so the output is unchanged while decoding runs 1.4–1.8x faster, with about 90% of the drafted tokens accepted. The head lives in model-mtp.safetensors under the mtp. prefix, announced by num_nextn_predict_layers: 1 in config.json; everything else is identical to Mellum2.1 Instruct.
- vLLM 0.33 or newer:
--speculative-config '{"method": "mtp", "num_speculative_tokens": 1}', as in the serving commands above. - transformers 5.20 or newer: pass
use_mtp=Truetogenerate. - llama.cpp: use the GGUF repository with
--spec-type draft-mtp --spec-draft-n-max 1.
Older versions cannot load the extra tensors: transformers before 5.20 skips them with a warning, vLLM releases up to 0.32 refuse the checkpoint. With those, serve Mellum2.1 Instruct instead.
Evaluation
The model weights are those of Mellum2.1 Instruct, so its results apply unchanged. All values are percentages; higher is better except HarmBench, where lower is better. All values are self-reported by JetBrains.
| Benchmark | Mellum2.1 (Instruct / Thinking) | Mellum2 (Instruct / Thinking) | Qwen3.5 9B (non-thinking / thinking) | Gemma 4 E4B (non-thinking / thinking) |
|---|---|---|---|---|
| Coding | ||||
| LiveCodeBench v6 | 53.7 / 82.0 | 40.4 / 70.5 | 65.2 / 74.8 | 64.8 / 69.7 |
| HumanEval+ | 89.1 / 91.5 | 84.8 / 89.1 | 84.8 / 89.0 | 85.4 / 89.6 |
| MBPP+ | 74.3 / 79.4 | 72.2 / 74.6 | 63.8 / 69.0 | 65.6 / 69.5 |
| MultiPL-E (7 languages, chat mode) | 73.7 / 81.5 | 68.7 / 75.1 | 66.4 / 75.9 | 67.7 / 79.6 |
| Math | ||||
| AIME 25/26 (avg@8) | 61.1 / 83.3 | 32.3 / 56.7 | 69.2 / 79.8 | 36.7 / 44.6 |
| GSM-Plus | 86.7 / 88.3 | 80.4 / 86.8 | 89.4 / 90.8 | 85.3 / 87.4 |
| Agentic | ||||
| SWE-bench Verified | 40.4 / 47.0 | 20.2 / 3.8 | 49.8 / 55.6 | 6.4 / 16.8 |
| Terminal-Bench 2.1 | 8.2 / 17.4 | 6.7 / 1.9 | 17.6 / 18.5 | 1.9 / 3.7 |
| SWE-bench Pro | 20.0 / 28.0 | 12.0 / 0.0 | 12.7 / 33.0 | 4.7 / 7.3 |
| Tool Use | ||||
| BFCL v4 | 46.5 / 62.3 | 46.2 / 50.5 | 61.2 / 60.0 | 42.7 / 52.5 |
| WorkBench | 38.0 / 44.6 | 22.2 / 45.7 | 41.3 / 41.3 | 32.2 / 45.5 |
| ToolHop | 51.4 / 49.1 | 47.2 / 46.4 | 51.6 / 52.2 | 39.0 / 39.3 |
| Conversational | ||||
| IFEval | 87.2 / 90.6 | 80.8 / 82.0 | 87.1 / 92.2 | 89.1 / 90.8 |
| Knowledge | ||||
| GPQA Diamond | 48.6 / 64.6 | 40.0 / 53.0 | 81.3 / 81.8 | 52.1 / 56.5 |
| MMLU-Redux | 82.8 / 87.8 | 77.6 / 86.0 | 90.7 / 89.9 | 84.0 / 85.7 |
| MixEval-Hard | 31.7 / 46.4 | 28.9 / 43.8 | 35.9 / 51.0 | 28.9 / 39.8 |
| Safety | ||||
| XSTest | 72.3 / 88.8 | 82.0 / 90.0 | 91.2 / 96.4 | 86.8 / 94.8 |
| HarmBench (↓) | 15.6 / 8.5 | 21.2 / 21.5 | 26.8 / 6.9 | 28.7 / 38.4 |
Notes:
- Non-agentic benchmarks use greedy decoding, except AIME.
- AIME is AIME 2025 plus AIME 2026 (30 questions each).
- Agentic benchmarks use the same open-source agent harness (Pi v0.73.1, shell and file tools) for every model, with each model's default sampling, a 114K-token context, and up to 16K tokens per turn.
- BFCL v4 is the benchmark's official overall score, a weighted mean of its category accuracies.
- Mellum2 Thinking and Mellum2 Instruct were re-evaluated with this pipeline, so their numbers differ slightly from their model cards and the Mellum2 Technical Report.
License
Released under the Apache 2.0 license.