model: add support for Mellum2 architecture#1919
Merged
Merged
Conversation
ikawrakow
approved these changes
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds JetBrains Mellum2 support, including:
mellumarchitecture registration and model type reportingJetBrains/Mellum2-12B-A2.5B-*weightsThis PR does not include MTP/speculative decoding, performance tuning, custom quantization work, or chat/server UX changes.
Validation
Official JetBrains Instruct source revision:
Public branch for reviewer inspection:
Reviewer/community convenience GGUFs generated from official JetBrains Instruct BF16 weights:
These GGUFs were converted with this PR's
ik_llama.cppconverter. They embed the stock JetBrainschat_template.jinjaand include the Mellum RoPE/YARN metadata emitted by this PR. They are expected to run on currentllama.cppbuilds with Mellum2 support as well as thisik_llama.cppbranch.Validation highlights:
origin/mainrejects Mellum2 GGUFs withunknown model architecture: 'mellum'rope.freq_base,rope.freq_base_swa, YaRN scaling metadata, sliding-window size, and sliding-window layer patternik_llama.cppCUDA server long-code smoke with--cpu-moellama.cppupstream CUDA server long-code smoke with--cpu-moellama.cppupstream CUDA server long-code smoke with--cpu-moepython3 -m py_compile, and pass a functional topological-sort test including cycle detectionllama-serverandllama-quantizeCUDA build targets are up to datepy_compilepassesgit diff --checkpassesNotes / caveats
The linked GGUFs are convenience artifacts for review and community testing; they are not performance or quality claims.
The model's normal logits path uses the standard output head. MTP/draft-head support is not required for normal Mellum2 generation and is intentionally out of scope here.
The uploaded BF16 is a reference conversion; Q8_0 is the practical reviewer/community download.
No custom chat template is used. The embedded template matches
JetBrains/Mellum2-12B-A2.5B-Instruct/chat_template.jinja.No performance claims are made.
I have read the contributing guidelines
Self-reported review complexity: