JetBrains Mellum is a small, open-source language model built by JetBrains specifically for code completion. It is the model that powers the inline code suggestions you see while typing in JetBrains IDEs, and it is also released as free, downloadable weights under the Apache 2.0 license so anyone can run or fine-tune it. There are two generations: Mellum 1, a 4-billion-parameter model focused purely on code, and Mellum 2 (open-sourced June 2026), a 12-billion-parameter Mixture-of-Experts model that handles both code and natural language.
JetBrains calls Mellum a “focal” model - one built to do a narrow job exceptionally well rather than to be a general-purpose chatbot. That single design choice explains almost everything about how it behaves, what it costs, and who it’s for.
This page covers Mellum as a model. For subscription tiers and credits, see our JetBrains AI pricing guide; for the IDE feature set that uses it, see the JetBrains AI Assistant review. Mellum sits inside the wider JetBrains AI tools family.
What is JetBrains Mellum?
Mellum is JetBrains’ own large language model, trained from scratch for software development. Three facts define it:
It is made by JetBrains - not a fine-tune of someone else’s model. JetBrains trained it from the ground up on publicly available, permissively licensed code, on its own GPU clusters, and the people behind it (researchers including Nikita Pavlichenko and Anton Semenkin) have published the full training recipe in a peer-style technical report.
It is code-specialized. Where models like GPT or Claude aim for broad general ability, Mellum was deliberately kept small and narrow. JetBrains describes this with a “focal model” idea: skip the broad knowledge a generalist needs and keep only deep expertise in one area - code. The payoff is speed and cost. A focused 4B - 12B model can answer in milliseconds and run cheaply, which is exactly what code completion demands.
It is open source, released on Hugging Face under the Apache 2.0 license. That makes Mellum unusual among IDE completion engines, most of which are closed services. You can inspect it, run it on your own hardware, and even fine-tune it for your own languages or codebase.
What does Mellum do?
Mellum’s core job is code completion - and it helps to understand that this is different from chatting with an AI.
A chatbot assistant waits for you to describe a problem, then returns a whole block of code. Mellum works the opposite way: it predicts what comes next as you type, completing the current line or filling in the next few lines based on the surrounding code. The technical name for this is fill-in-the-middle (FIM) - the model sees the code before and after your cursor and generates what belongs in the gap.
Because it runs as you type, it has to be fast - suggestions need to appear in well under 100 milliseconds, or they break your flow. This latency constraint is the whole reason Mellum is small. In JetBrains’ own production data, Mellum cut completion latency to a third of the previous system and reaches an acceptance rate of about 40% for its suggestions, which is a strong figure for in-editor completion.
Mellum 2 extends the family beyond completion into natural-language tasks (more on that below), but completion remains what Mellum is for.
Is JetBrains Mellum free?
Yes - and it’s worth being precise, because “free” means two different things here.
Inside JetBrains IDEs, Mellum-powered code completion is unlimited and free on every tier - including AI Free. Crucially, it does not consume AI credits. The credit system that JetBrains uses for chat and agent features (like Junie) doesn’t touch completion. So the everyday “AI typing ahead of you” experience costs nothing beyond an active IDE license. (Note: the AI Free tier isn’t available in some Community editions or Android Studio.)
As open-source weights, Mellum is also free under Apache 2.0. You can download it from Hugging Face and use it commercially, self-host it, and fine-tune it with no licensing fee. Here you only pay for your own compute - the model itself is free.
For the full breakdown of paid tiers, credits, and what they unlock, see our JetBrains AI pricing guide.
Mellum 1 vs Mellum 2: what changed
Mellum 2 is not a small update - it’s a different class of model.
Version comparison
Mellum 1 vs Mellum 2
| Attribute | Mellum 1 | Mellum 2 |
|---|---|---|
| Released | Late 2024 (open source Apr 2025) | June 2026 |
| Parameters | 4B (dense) | 12B MoE, 2.5B active |
| Context window | 8,192 tokens | 181,072 tokens |
| Scope | Code completion only | Code + natural language |
| Training tokens | ~4 trillion | ~10.6 trillion |
| License | Apache 2.0 | Apache 2.0 |
| Best for | In-IDE autocomplete | Routing, RAG, sub-agents |
The headline change is scope. Mellum 1 did one thing: complete code. Mellum 2 still refuses to be a do-everything multimodal model (no images - it’s text and code only by design), but it now handles natural-language tasks too. That lets it act as a lightweight router (deciding which bigger model should handle a request), a summarizer in retrieval pipelines, or a fast sub-agent for planning and validation steps. The 128K context window - a 16× jump over Mellum 1’s 8K - is what makes those longer-context jobs practical.
A common error worth correcting: some write-ups claim Mellum 1 was a “3-billion-parameter” model that “runs on a laptop CPU.” The open-sourced Mellum 1 is 4B, and Mellum 2 is a 12B MoE model - not a casual laptop-CPU model. The confusion usually comes from mixing Mellum up with JetBrains’ separate on-device mini-model, which we untangle below.
How Mellum 2 works: Mixture-of-Experts, plainly
The biggest technical change in Mellum 2 is its Mixture-of-Experts (MoE) design. It’s simpler than it sounds.
A standard (“dense”) model runs all of its parameters for every token - powerful but slow and expensive. An MoE model instead holds many small specialist sub-networks called experts, and a small router picks only a few of them per token.
Mellum 2 has 64 experts but activates only 8 per token. So although the model holds 12 billion total parameters, only about 2.5 billion are active at any moment. The result: roughly 12B-class quality at the compute cost - and speed - of a 2.5B model. JetBrains reports this makes Mellum 2 more than twice as fast as comparably-sized dense models while halving inference cost. For a model that gets called constantly, that efficiency is the entire point.
How to use Mellum
There are two realistic paths depending on whether you want it in your editor or on your own machine.
In a JetBrains IDE (zero setup). If you use a JetBrains IDE (v2025.1+) with AI features enabled, Mellum already powers your cloud code completion by default - there’s nothing to do. To run it locally instead for privacy or offline work, open Settings → Tools → AI Assistant → Models and select a local Mellum option; JetBrains also ships a one-click “Mellum-all” local mode and a standalone VS Code extension that runs Mellum through Ollama.
As open weights on your own hardware. Pull a checkpoint from the Mellum collection on Hugging Face; Mellum 2 weights are published in base, instruct and thinking versions. For quick local experimentation, Mellum runs through Ollama in two commands (pull the model, then run it); for production serving, JetBrains documents vLLM, and llama.cpp works for CPU/edge setups. This path is aimed at people building tooling, not everyday IDE users.
Mellum vs other open code models
Mellum isn’t the only open model built for code. Here’s how it sits among the main alternatives developers actually compare it to.
How it compares
Mellum vs other open code models
| Model | Maker | Size | Context | License |
|---|---|---|---|---|
| Mellum 2 | JetBrains | 12B MoE | 128K | Apache 2.0 |
| Qwen2.5-Coder | Alibaba | 0.5 - 32B | 128K | Apache 2.0 |
| Code Llama | Meta | 7 - 70B | 16K | Llama license |
| DeepSeek-Coder | DeepSeek | 1.3 - 33B | 16K | Custom / MIT |
| StarCoder2 | BigCode | 3 - 15B | 16K | BigCode OpenRAIL |
Mellum’s edge isn’t raw size: it is a fully permissive license, long context and native JetBrains-IDE integration. Sizes and context are model-family ranges; check current specs.
Mellum’s distinguishing strengths aren’t raw parameter count - bigger models exist. They are: a fully permissive Apache 2.0 license (more commercially flexible than Code Llama’s or StarCoder’s restricted licenses), a long 128K context matched only by Qwen2.5-Coder here, an MoE efficiency profile tuned specifically for low-latency completion, and native integration with JetBrains IDEs that no third-party model can match. If you live in IntelliJ, PyCharm, or WebStorm, Mellum is the only one of these wired directly into the IDE’s own type-inference and project analysis.
“Mellum” vs the local mini-model: clearing up the confusion
This is the single most misreported thing about Mellum, so it’s worth stating clearly: JetBrains runs two different completion models, and only one of them is Mellum.
JetBrains has long shipped a tiny (~100-million-parameter) full-line completion model that runs entirely on your device, offline, by default, in its IDEs. It’s roughly 40 times smaller than Mellum, handles fast single-line suggestions, and needs no account or connection. That on-device mini-model is not Mellum.
Mellum (4B in v1, 12B MoE in v2) is the larger, smarter model that powers JetBrains’ cloud completion and is published as open weights you can self-host. When people say “JetBrains Mellum,” this is what they mean. The two systems complement each other - the tiny local model for instant offline suggestions, Mellum for richer, project-aware completion - but they are genuinely separate, and most articles blur them together. For what a free PyCharm install gets from the local model, see free AI in PyCharm.
Privacy and your code
JetBrains’ position is straightforward: your code is not used to train Mellum. The model was trained from scratch only on publicly available, permissively licensed code, and JetBrains states it does not train its models on your private code unless you explicitly opt in to data sharing. For teams with strict requirements, the open weights enable a stronger guarantee still - run Mellum entirely on your own infrastructure (or use the local mode and offline completion), and your keystrokes never leave your network. An .aiignore file lets you exclude sensitive files from AI processing entirely.
How good is Mellum 2? (Benchmarks)
JetBrains published self-reported results comparing Mellum 2 against open models in the 4B - 14B range. The pattern is exactly what a focal model should show - strong where it specializes, deliberately not frontier-level everywhere. The Instruct variant scores 78.4 on EvalPlus (a coding average) and 66.3 on BFCL v3 (tool/function-calling) - competitive numbers for a model running at 2.5B-active compute. But on the harder LiveCodeBench v6 it scores 37.2, below some dense 9B - 14B models. That’s the trade-off working as designed: Mellum 2 swaps some raw capability for speed and cost.
Two honesty notes: these figures are self-reported by JetBrains, and independent third-party benchmarks are still thin this early. Verify current numbers on the Hugging Face model cards before quoting them.
Should you use Mellum? (Quick take)
If you already use a JetBrains IDE, you’re using Mellum whether you realize it or not, and there’s no reason to turn it off - it’s free, fast, and private. The interesting decision is for builders: if you want a fast, cheap, fully-open code model to self-host - for a privacy-sensitive completion feature, a routing layer, or sub-agents in a pipeline - Mellum 2 is one of the few models that combines a permissive license, long context, and genuine production pedigree. If you need maximum raw coding capability, you’ll still reach for a frontier model. Mellum’s pitch is efficiency and openness, not topping every leaderboard.
For the products built on top of Mellum, compare the JetBrains AI Assistant and the rest of the JetBrains AI tools lineup.
Frequently asked questions
What is JetBrains Mellum?
Mellum is JetBrains’ open-source, code-focused language model. It powers inline code completion inside JetBrains IDEs and is also released as free weights on Hugging Face under the Apache 2.0 license for self-hosting and fine-tuning.
Is Mellum free?
Yes. Mellum-powered code completion is unlimited and free inside JetBrains IDEs on every tier (including AI Free) and consumes no AI credits. The open-source model weights are also free to use, including commercially, under Apache 2.0.
Does Mellum cost AI credits?
No. Code completion powered by Mellum does not consume credits. JetBrains’ AI credits are spent only on cloud chat and agent features like Junie, not on completion.
What’s the difference between Mellum 1 and Mellum 2?
Mellum 1 is a 4B dense model for code completion with an 8K context. Mellum 2 (June 2026) is a 12B Mixture-of-Experts model with a 128K context that also handles natural-language tasks like routing and summarization.
What does “focal model” mean?
It’s JetBrains’ term for a model built with deep skill in one narrow area instead of broad general ability - making it small, fast, and cheap to run for high-frequency tasks like code completion.
Is Mellum open source?
Yes. Both Mellum 1 and Mellum 2 are released on Hugging Face under the Apache 2.0 license, which permits commercial use, self-hosting, and fine-tuning.
Can I run Mellum locally?
Yes. You can run it via Ollama, vLLM, or llama.cpp on your own hardware, or use JetBrains’ built-in local “Mellum-all” mode and the standalone VS Code extension that runs Mellum through Ollama.
Does Mellum train on my code?
No. JetBrains trained Mellum from scratch on publicly available, permissively licensed code only, and does not use your private code to train its models unless you explicitly opt in.
What programming languages does Mellum support?
Mellum supports completion for languages including Java, Kotlin, Python, Go, PHP, C, C++, C#, JavaScript, TypeScript, CSS, HTML, Rust, and Ruby. The “Mellum-all” release adds broad multi-language support from a single model.
How is Mellum different from the local model already in my IDE?
JetBrains also ships a separate ~100M-parameter on-device model for instant offline single-line completion. That mini-model is not Mellum. Mellum (4B/12B) is the larger model behind cloud completion and the open weights.
Is Mellum better than GitHub Copilot?
They serve different goals. Mellum is a fast, specialized completion model with deep JetBrains-IDE integration and free unlimited completion; Copilot is a broader assistant. For JetBrains users specifically, Mellum’s native integration and free completion are major advantages. See our JetBrains AI vs Copilot comparison.
Is Mellum a frontier model like GPT or Claude?
No, and it isn’t trying to be. Mellum is a focal/component model optimized for speed and cost. For the hardest tasks you’d still route to a frontier model.
Where can I verify the latest Mellum details?
Specs and benchmarks change fast. Check jetbrains.com/mellum, the JetBrains AI blog, and the Hugging Face model cards for current figures.
