Every other "deploy this coding model" guide on this blog ends with an H100 or H200 in the cart. JetBrains' Mellum2 is the exception. It has 12B total parameters but only 2.5B active per token, and most of its layers use sliding-window attention that caps KV cache growth instead of letting it scale with context. The VRAM math for self-hosting this coding LLM in 2026 points to an L40S 48GB, or even an RTX 4090 24GB, not a flagship data-center card. This guide covers what the architecture actually is, the VRAM arithmetic behind that claim, a working vLLM deploy command, which GPU to rent, and the cost case for running Mellum2 instead of routing every orchestration call through something bigger.
TL;DR: Can You Self-Host a Coding LLM in 2026 Without an H100?
Yes, for Mellum2: JetBrains built it to fit a single H100 as a ceiling, not a floor, so the real footprint fits far cheaper cards.
- Model: a 12B total / 2.5B active MoE, 64 routed experts (top-8), 4 KV heads under GQA, Apache 2.0, in Base, Instruct, and Thinking variants.
- VRAM: about 13.8GB at FP8 or 27.6GB at BF16, plus roughly 1.8GB of KV cache at 131,072 tokens, versus roughly 7GB with full attention everywhere.
- Fit: clears a single RTX 4090 at FP8 or an L40S at BF16; Spheron prices both on-demand, as of 26 Nov 2026.
- Quality: Mellum2 scores 78.4 on EvalPlus (RL-instruct) against 71.8 for Qwen3.5-9B.
- Spheron: aggregates on-demand and spot rates with per-minute billing.
What Mellum2 Actually Is: 12B Total, 2.5B Active, Qwen3-MoE Recipe
That's the Qwen3-MoE recipe, scaled down: lots of small experts, a handful active per token, no dedicated always-on expert soaking up extra compute.
The backbone stacks 28 transformer layers at a hidden dimension of 2,304. The part that matters most for deployment is attention pattern, not parameter count: three of every four layers use sliding-window attention with a 1,024-token window, and the remaining one in four layers use full attention. Of the 28 layers, that's 21 sliding-window layers and 7 full-attention layers. Native context is 8,192 tokens, extended to 131,072 tokens, so the context extension doesn't touch the windowed layers at all.
There's also a multi-token prediction (MTP) head baked into training: a single extra transformer layer trained as an auxiliary objective with a 0.1 loss weight, which JetBrains frames as a built-in draft model for speculative decoding, but the paper reports no speedup figure for that use, and the head is removed at evaluation and inference. That last detail matters once you get to serving: the published checkpoint doesn't ship with it, so it costs you nothing in VRAM at inference time.
None of this is accidental. JetBrains constrained the architecture to fit a single H100 GPU, capping total parameters under 18B as a design limit, and ran its benchmarks on one H100 80GB with vLLM's dynamic FP8 quantization. A single H100 was the ceiling JetBrains designed against, which is a very different claim from "this model needs an H100." Mellum2 ships under Apache 2.0 in Base, Instruct, and Thinking variants, and it is the general-purpose successor to the 4B dense Mellum completion model. JetBrains describes it as "intentionally focused on text and code rather than multimodal tasks," and positions it for routing and prompt classification, RAG context compression and summarization, and sub-agent tasks like planning and validation, alongside private self-hosted deployment of proprietary code. If you want the same "small specialist model instead of a general API" framing applied to a different model family, the Qwen3.7 Max self-hosting guide covers the same tradeoff from the Qwen side.
VRAM Math: Why Sliding-Window Attention and the MTP Head Change Your Deployment
Total parameter count sets your weight memory, no matter how many experts are active per token. Mellum2's router sends every token through 8 of 64 experts, which cuts compute, not memory: all 64 experts' weights have to stay resident in VRAM because the router picks a different combination per token, per layer. So weight sizing uses the full 12B, not the 2.5B active figure.
At FP8 (1 byte/parameter), that's 12GB of raw weights; at BF16 (2 bytes/parameter), 24GB. Add a runtime overhead allowance of roughly 15% for the serving framework, CUDA graphs, and activation memory, the same convention this blog uses for other MoE deploy guides:
| Precision | Raw weights | With ~15% overhead |
|---|---|---|
| FP8 | 12GB | ~13.8GB |
| BF16 | 24GB | ~27.6GB |
KV cache is where the sliding-window design actually pays off. Per token, per layer, the KV cache cost is 2 (K and V) × 4 KV heads × 128 head dimension × 2 bytes (BF16) = 2KB. With 28 layers, if every layer used full attention, that's 28 × 2KB = 56KB per token, growing without bound as context grows. But 21 of those 28 layers are sliding-window layers capped at 1,024 tokens: past that window, their KV cache stops growing entirely. Only the 7 full-attention layers keep accumulating, at 7 × 2KB = 14KB per additional token beyond the window. That's a 4x lower marginal growth rate than an all-full-attention design of the same size. Worked out from those architecture numbers, that comes to roughly 1.8GB of KV cache for a full 131,072-token sequence, versus roughly 7GB if all 28 layers used full attention at that length, a 4x reduction from the sliding-window design.
Put the two together. At FP8, weights plus a full 128K-context KV cache come to roughly 13.8GB + 1.8GB ≈ 15.6GB, which clears a single RTX 4090's 24GB with room left over, before you've even reserved a flagship card. At BF16, it's roughly 27.6GB + 1.8GB ≈ 29.4GB, past the RTX 4090 but comfortably inside an L40S 48GB. None of that counts concurrent requests: each simultaneous session needs its own KV cache allocation, which is where the sliding-window cap does its real work. The 21 windowed layers' contribution per session is fixed at roughly 42MB once a session passes 1,024 tokens, so adding concurrent users mostly costs you the 14KB/token full-attention portion, not the full 56KB/token you'd pay with an all-full-attention model of the same size. On an L40S with roughly 34GB free after FP8 weights, that headroom covers dozens of concurrent shorter-context coding-agent sessions, or a handful of users each pushing the full 131,072-token window, depending on how you split it.
vLLM Deployment Command and Config
The Instruct model card ships ready-made vLLM serve commands, including --enable-auto-tool-choice --tool-call-parser hermes for tool calling, and a 131,072 --max-model-len example for the full extended context. A straightforward FP8 deployment on an RTX 4090 or L40S looks like this:
pip install -U vllm
export HF_TOKEN=your_token
huggingface-cli download JetBrains/Mellum2-12B-A2.5B-Instruct
vllm serve JetBrains/Mellum2-12B-A2.5B-Instruct \
--quantization fp8 \
--max-model-len 131072 \
--enable-auto-tool-choice \
--tool-call-parser hermes \
--port 8000Drop --quantization fp8 for a BF16 deployment on an L40S or A100. If your workload doesn't need the YaRN-extended 128K window (most IDE routing and RAG-compression use cases don't), set --max-model-len 8192 to stay inside the model's native context and shrink your KV cache budget further, which buys you more concurrent sessions on the same card.
For speculative decoding, Mellum2's own MTP head isn't usable at inference since it's dropped from the released checkpoint. RedHat AI published a speculator checkpoint for the Thinking variant, served through vLLM's --speculative-config with the dflash method and a num_speculative_tokens setting, validated on H100. The catch: it requires a vLLM nightly build rather than a stable release, so treat it as an experimental add-on for the Thinking variant, not something to put in a production Instruct deployment yet. For a general introduction to renting and deploying a GPU instance on Spheron, Spheron's docs walk through the basics.
Which GPU to Rent: How to Self-Host This Coding LLM in 2026 Without an H100
Every deploy guide on this blog so far has recommended at least an H100 or H200. Mellum2 is small enough, and its KV cache growth capped enough, that the honest recommendation is a GPU most of those guides treat as a fallback option:
| GPU | VRAM | Mellum2 fit | Spheron on-demand | Spheron spot |
|---|---|---|---|---|
| RTX 4090 | 24GB | FP8 weights + full 128K KV cache (~15.6GB total) | $1.23/hr | not listed |
| L40S | 48GB | BF16 weights + full 128K KV cache (~29.4GB total), more concurrency | $1.06/hr | $1.24/hr |
| A100 (40/80GB) | 40/80GB | Either precision, most concurrency headroom of the three | $1.43/hr | $1.19/hr |
The RTX 4090 is the one card here with no spot tier on Spheron; L40S and A100 both have a spot rate alongside on-demand as of 26 Nov 2026. Which tier runs cheaper varies with partner supply rather than following a fixed rule, so check both before committing to one. Spheron aggregates live rates across 5+ providers, no reserved contract required for any of the three tiers above.
Pricing fluctuates based on GPU availability. Spheron rates above are live as of 26 Nov 2026; other providers reflect their most recent published rates and may have changed. Check current GPU pricing → for live rates.
The published throughput numbers are H100-specific, worth being upfront about. On a single H100, Mellum2 runs about 21% faster under concurrent load (20.2 vs 16.7 req/s), and roughly 79% faster under load than Qwen3-8B at 11.3 req/s. JetBrains hasn't published equivalent L40S or RTX 4090 throughput figures, so treat those cards as capacity-qualified by the VRAM math above rather than speed-verified against the H100 numbers, until you've run your own load test on the card you rent. For a close comparison point on the same question, Cohere's North Mini Code is a 30B total / 3B-active MoE architecture specialized for agentic coding workflows. Devstral is the closer precedent for the L40S recommendation itself.
On model quality, Mellum2 doesn't come free of tradeoffs. Its RL-instruct variant scores 78.4 on EvalPlus against 71.8 for Qwen3.5-9B. On LiveCodeBench v6, its SFT-thinking checkpoint reaches 75.1, the top score in JetBrains' own panel and 6.8 points ahead of Qwen3.5-9B-Thinking. On BFCL v4 tool-use, the RL-thinking checkpoint scores 45.6 against 42.9 and 42.7 for the Qwen3.5 family. But its base model trails on general benchmarks: HumanEval sits at 41.5 against 55.5 and 57.3, and the RL-thinking variant's AIME score of 58.4 trails Qwen3.5-9B-Thinking's 73.4, which JetBrains attributes to a training mix weighted toward code over general knowledge. If your workload is closer to general reasoning than coding and routing, that's a real reason to keep a larger model in the loop rather than replacing it outright with Mellum2.
Self-Hosting Mellum2 vs Routing Through a Bigger Model: The Cost Math for 2026
The use cases JetBrains actually points Mellum2 at, routing, prompt classification, RAG compression, sub-agent planning and validation, are high-frequency, low-complexity calls inside a larger agent pipeline. That's a different cost profile from "serve one chat model to end users," and it's where self-hosting a small specialist model instead of calling a frontier API for every decision starts to matter.
Here's the arithmetic that frames it. Mellum2 ran at 20.2 concurrent requests/sec against Qwen2.5-7B's 16.7 and Qwen3-8B's 11.3 on identical single-H100 FP8 hardware, meaning more throughput per GPU-hour on the same card before you even account for Mellum2 fitting a cheaper card in the first place. Stack that against the rate card: Spheron lists RTX 4090 at $1.23/hr, L40S at $1.06/hr, and A100 at $1.43/hr on-demand, with A100 spot at $1.19/hr, as of 26 Nov 2026. Those figures move with partner supply, so treat them as a snapshot taken at render time, not a fixed number to budget against months out.
The comparison that counts isn't Mellum2 against a bigger open model on raw quality. It's Mellum2 against paying frontier-API rates for a task that doesn't need frontier reasoning. A tool-selection or context-compression call inside an agent loop doesn't benefit from a 70B+ general model's extra knowledge; it benefits from being fast and cheap to run at the call volume agent pipelines actually generate, which is routing and sub-agent steps on every turn, not one call per user message. Running that layer on a 12B/2.5B-active model that fits an L40S or RTX 4090 keeps the per-call cost tied to a fraction of a GPU-hour instead of a per-token API bill that scales with every orchestration decision your agents make. The honest caveat is that this is a capacity and architecture argument, not a benchmarked one: nobody has published Mellum2's L40S or RTX 4090 throughput yet, so run your own load test against your actual call pattern before committing a production pipeline to the smaller card.
If you're deciding between self-hosting a narrow model like Mellum2 for these specific pipeline steps versus keeping everything behind one bigger model's API, the Ministral 3 deployment guide covers the same small-model, cheap-GPU tradeoff for a dense rather than MoE architecture, which is a useful second data point if dense-vs-MoE serving characteristics matter for your stack.
Mellum2's 12B/2.5B-active footprint is one of the few coding models on this blog that genuinely doesn't need an H100 to self-host. Rent an L40S or an RTX 4090 and test your own throughput before committing a production pipeline to it.
Quick Setup Guide
At FP8, Mellum2's 12B total parameters need roughly 13.8GB including overhead. At BF16, that's roughly 27.6GB. Add KV cache on top: a full 131,072-token sequence needs about 1.8GB thanks to the sliding-window design, versus roughly 7GB if every layer used full attention. This is what tells you whether an RTX 4090, L40S, or A100 is the right fit.
Go to app.spheron.ai, open GPU Cloud, and pick RTX 4090 for an FP8 short-context deployment, L40S for BF16 with full 128K context headroom, or A100 for the most concurrency. Choose on-demand for guaranteed availability or spot where it's listed for a lower rate with reclaim risk; the RTX 4090 has never been sold as spot on Spheron. Attach at least 40GB of persistent storage for the weights.
Run pip install -U vllm, export your HuggingFace token, and pull the weights with huggingface-cli download JetBrains/Mellum2-12B-A2.5B-Instruct. Use the Thinking variant's repo instead if you want chain-of-thought reasoning traces.
Run vllm serve JetBrains/Mellum2-12B-A2.5B-Instruct --quantization fp8 --max-model-len 131072 --enable-auto-tool-choice --tool-call-parser hermes --port 8000. Drop --quantization fp8 for a BF16 deployment, and lower --max-model-len to 8192 if you don't need the YaRN-extended context and want to shrink the KV cache budget further.
Send a request to /v1/chat/completions with a tools array to confirm the Hermes tool-call parser returns a well-formed tool_calls block. Watch nvidia-smi dmon during load, and tune --max-num-seqs against your remaining VRAM headroom rather than assuming the published H100 throughput numbers transfer directly to a smaller card.
Frequently Asked Questions
At FP8, Mellum2's 12B total parameters need about 12GB for weights, roughly 13.8GB with runtime overhead, leaving plenty of room for KV cache on a single RTX 4090 24GB. At BF16, weights run about 24GB (around 27.6GB with overhead), which fits an L40S 48GB with headroom for a full 131,072-token context. An A100 40/80GB handles either precision with the most concurrency headroom of the three.
No. JetBrains designed Mellum2 to fit on a single H100 as an upper bound (its benchmarks ran there), not as a floor. With 12B total parameters, 2.5B active per token, and sliding-window attention that caps most of its KV cache growth, the VRAM math points to an L40S 48GB or RTX 4090 24GB for most deployments, reserving the A100 or H100 for higher-concurrency serving rather than because the model needs the extra memory.
On EvalPlus, Mellum2's RL-instruct variant scores 78.4 against 71.8 for Qwen3.5-9B. On LiveCodeBench v6, its SFT-thinking checkpoint scores 75.1, about 6.8 points above Qwen3.5-9B-Thinking (RL training actually brings that specific score down to 69.9). On BFCL v4 tool-use, its RL-thinking checkpoint scores 45.6 against 42.9 and 42.7 for the Qwen3.5 4B and 9B thinking models. Its base model trails on general knowledge and math: HumanEval sits at 41.5 against 55.5 for Qwen2.5-7B, and its RL-thinking AIME score of 58.4 trails Qwen3.5-9B-Thinking's 73.4, which JetBrains attributes to a training mix weighted toward code.
Mellum2 ships with a built-in multi-token prediction (MTP) head used only during training; it's removed at inference, so it isn't a usable draft model out of the box. RedHat AI published a speculator checkpoint for the Thinking variant, served through vLLM's --speculative-config with the dflash method, but it requires a vLLM nightly build rather than a stable release.
JetBrains positions Mellum2 for routing and prompt classification inside IDE and agent pipelines, RAG context compression and summarization, and sub-agent tasks like planning and validation, in addition to general code completion and private self-hosted deployment of proprietary code. It's intentionally text- and code-only, with no multimodal support.







