Instructions to use JetBrains/Mellum2-12B-A2.5B-Instruct-SFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JetBrains/Mellum2-12B-A2.5B-Instruct-SFT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JetBrains/Mellum2-12B-A2.5B-Instruct-SFT") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("JetBrains/Mellum2-12B-A2.5B-Instruct-SFT") model = AutoModelForCausalLM.from_pretrained("JetBrains/Mellum2-12B-A2.5B-Instruct-SFT") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use JetBrains/Mellum2-12B-A2.5B-Instruct-SFT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JetBrains/Mellum2-12B-A2.5B-Instruct-SFT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JetBrains/Mellum2-12B-A2.5B-Instruct-SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/JetBrains/Mellum2-12B-A2.5B-Instruct-SFT
- SGLang
How to use JetBrains/Mellum2-12B-A2.5B-Instruct-SFT with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "JetBrains/Mellum2-12B-A2.5B-Instruct-SFT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JetBrains/Mellum2-12B-A2.5B-Instruct-SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "JetBrains/Mellum2-12B-A2.5B-Instruct-SFT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JetBrains/Mellum2-12B-A2.5B-Instruct-SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use JetBrains/Mellum2-12B-A2.5B-Instruct-SFT with Docker Model Runner:
docker model run hf.co/JetBrains/Mellum2-12B-A2.5B-Instruct-SFT
Mellum2 Instruct (SFT)
Research artifact: the SFT-only intermediate checkpoint of the Instruct training pipeline. Use it to study or build on the SFT stage in isolation, run post-training experiments (preference tuning, RLVR, etc.), or compare against the final RL-tuned variant. For production-quality instruction following use Instruct instead.
Mellum2 Instruct (SFT) Highlights
Mellum2 Instruct (SFT) is the supervised-fine-tuning-only intermediate checkpoint of the Mellum2 Instruct training pipeline, released by JetBrains as a research artifact.
The model uses a Mixture-of-Experts architecture with 64 experts and activates 8 experts per token. It uses a combination of sliding-window and full attention layers, with a context length of 131,072 tokens.
This checkpoint was produced from Mellum2-12B-A2.5B-Base with three epochs of SFT on a mixed corpus of coding, agentic, tool use, instruction following, general chat, identity, and safety data. It is the starting point of the RLVR stage that produces the final Mellum2-12B-A2.5B-Instruct.
Mellum2 Model Family
This repository contains one checkpoint from the Mellum2 family.
| Checkpoint | Description |
|---|---|
| Base Pretrain | Base checkpoint before long-context extension |
| Base | Final base model |
| Instruct SFT | Supervised instruction-tuned checkpoint |
| Thinking SFT | Supervised thinking checkpoint |
| Instruct | RL-tuned instruction model |
| Thinking | RL-tuned thinking model |
Model Overview
Mellum2 Instruct (SFT) has the following features:
- 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
- Vocabulary Size: 98,304
- Precision: bfloat16
Serving with vLLM
# Without tool calling
vllm serve JetBrains/Mellum2-12B-A2.5B-Instruct-SFT --max-model-len 131072
# With tool calling
vllm serve JetBrains/Mellum2-12B-A2.5B-Instruct-SFT \
--max-model-len 131072 \
--enable-auto-tool-choice \
--tool-call-parser hermes
Quickstart
Text-Only Input
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-12B-A2.5B-Instruct-SFT",
messages=messages,
max_tokens=81920,
temperature=0.6,
top_p=0.95,
extra_body={
"top_k": 20,
},
)
print("Chat response:", chat_response)
Evaluation
Evaluation results are available in the model card. All values are self-reported by JetBrains.
For more details, see the Mellum2 Technical Report.
License
Released under the Apache 2.0 license.
- Downloads last month
- 57
Space using JetBrains/Mellum2-12B-A2.5B-Instruct-SFT 1
Collection including JetBrains/Mellum2-12B-A2.5B-Instruct-SFT
Paper for JetBrains/Mellum2-12B-A2.5B-Instruct-SFT
Article mentioning JetBrains/Mellum2-12B-A2.5B-Instruct-SFT
Evaluation results
- Diamond on Idavidrein/gpqa View evaluation results leaderboard 38.9 *
- Bfclv3 on gorilla-llm/Berkeley-Function-Calling-Leaderboard View evaluation results 43.1 *
- pass@1 on LiveCodeBench v6self-reported30.900
- pass@1 on EvalPlus (HumanEval+ / MBPP+ mean)self-reported76.200
- pass@1 on MultiPL-E (7 languages)self-reported64.600
- accuracy on BFCL v3self-reported43.100
- accuracy on BFCL v4 (macro-avg of 5 subtasks)self-reported31.800
- exact match on AIME 2025+2026 (mean, 30 questions each)self-reported29.900