Instructions to use JetBrains/Mellum2-12B-A2.5B-Instruct 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 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") 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") model = AutoModelForCausalLM.from_pretrained("JetBrains/Mellum2-12B-A2.5B-Instruct") 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 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" # 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", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/JetBrains/Mellum2-12B-A2.5B-Instruct
- SGLang
How to use JetBrains/Mellum2-12B-A2.5B-Instruct 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" \ --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", "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" \ --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", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use JetBrains/Mellum2-12B-A2.5B-Instruct with Docker Model Runner:
docker model run hf.co/JetBrains/Mellum2-12B-A2.5B-Instruct
Question: are Mellum2 native MTP / dual-decoder weights available in the public checkpoints?
Hi JetBrains team!
The Mellum2 technical report describes an integrated Multi-Token Prediction (MTP) / dual-decoder head intended to support efficient speculative decoding. This is one of the most interesting parts of the architecture for local agentic coding workflows.
However, from inspecting the currently published Base, Instruct, and Thinking checkpoints, the public safetensors indexes appear to expose only the core autoregressive model weights. In particular, I do not see MTP/draft/NextN-style auxiliary tensors or metadata in the released checkpoints, and converted GGUFs likewise appear to contain only the normal output head and transformer block weights.
Because native MTP requires trained auxiliary weights, local runtimes such as llama.cpp / ik_llama.cpp cannot reconstruct the dual-decoder behavior from the released tensors alone. Parser or converter support can map existing weights into GGUF, but it cannot recover learned draft-side projections or auxiliary heads if those parameters are not present.
Would JetBrains be open to publishing any of the following?
- The missing MTP / dual-decoder weights, either merged into the existing safetensors checkpoints or released as an auxiliary checkpoint artifact.
- A deterministic conversion or derivation recipe, if the MTP parameters are tied to or recoverable from the published model weights in a non-obvious way.
- Documentation clarifying whether the public Mellum2 checkpoints are intended to support native MTP speculative decoding.
This would make it possible for local inference engines to support Mellum2’s native speculative decoding path directly, likely improving generation latency for local coding agents and IDE-integrated workflows.
Thanks for releasing Mellum2. The model is already very interesting locally, and exposing the MTP path would make it even more compelling for high-throughput agent use.
Does MTP even provide much performance benefit for MoE models? In all reports iv seen it mainly is usefull for large dense models. But regardless, I would also be interested if these will be released or not and gratefull for JetBrains work!
Hi folks!
Yes, MTP is indeed missing. We're planning to add its support and upload the weights. Our main goal for MTP was to increase pre-training quality. Though, MTP should indeed speed up inference further. We'll need to merge support for it on HF/inference frameworks side and on the model side, probably need to do MTP healing for RL checkpoints. A little complicated, so don't want to promise a timeline, but won't expect it to take too long. May come with the next minor model release.
Thank you, @pavlichenko , and thanks to JetBrains for releasing Mellum2 to open-source!
Even if the performance gain were nil (and I suspect it's not), I'm very interested in seeing how the dual-decode head works in practice.