Table of Contents
Coding assistants are the single workload where self-hosting genuinely competes with commercial offerings on quality (open-weight models like DeepSeek-Coder are within striking distance of Cursor's defaults) but the cost math is more nuanced than "LLM tokens per minute". This guide breaks down the total cost of running a self-hosted coding assistant for a team of developers.
For a team of 20 developers: a single RTX 5090 (32 GB) running DeepSeek-Coder 33B INT4 + an embedding model handles the load at £399/mo = £18/seat/month. GitHub Copilot is £15/seat. Cursor is £16/seat. Self-hosting wins on data residency and customisation; SaaS wins on operational simplicity and IDE polish.
Anatomy of a coding assistant stack
A self-hosted coding assistant is not just a model. It is:
- Code-specialised LLM — DeepSeek-Coder 6.7B/33B, Code Llama, Codestral 22B. The thing that completes code.
- Embedding model — BGE-large or nomic-embed for codebase indexing. Powers "chat with my codebase" queries.
- Reranker — BGE-reranker or ColBERT to refine retrieved code chunks.
- IDE plugin — Continue.dev, Tabby, OpenInterpreter, or a custom one. Connects the editor to the API.
- Vector store — Qdrant, pgvector, or ChromaDB. Stores embeddings of your codebase.
- Auth + routing — LiteLLM in front, per-user API keys.
The model is roughly 60% of the VRAM and 80% of the latency budget. The rest matters operationally but is rarely the cost driver.
Which model? DeepSeek-Coder vs Code Llama vs Codestral
Honest 2026 ranking for self-hosted coding tasks:
| Model | Params | VRAM (INT4) | HumanEval | Notes |
|---|---|---|---|---|
| DeepSeek-Coder V2 Lite | 16B | 10 GB | ~80% | Best per-VRAM. MoE. |
| DeepSeek-Coder 33B | 33B | 18 GB | ~84% | Top open coder. Single 5090 fits. |
| Codestral 22B | 22B | 12 GB | ~78% | Mistral. Strong on Python. |
| Code Llama 13B | 13B | 8 GB | ~67% | Older but well-tooled. |
| Code Llama 34B | 34B | 18 GB | ~73% | Pre-DeepSeek. Skip in 2026. |
| Qwen 2.5 Coder 32B | 32B | 20 GB | ~85% | Newest; strongest on competitive coding. |
For most teams in 2026 the right pick is DeepSeek-Coder 33B AWQ-INT4 on a single RTX 5090, with Qwen 2.5 Coder 32B as the alternative for teams whose workload is mostly competitive-style coding (LeetCode, Codeforces). See our best GPU for Code Llama for the older Code Llama sizing.
Hardware sizing
For each team size, the GPU configuration we recommend:
| Team size | Recommended GPU | Stack | Monthly |
|---|---|---|---|
| 1–5 devs (solo / pair) | RTX 5060 Ti 16 GB | DeepSeek-Coder 6.7B FP16 + BGE-small | £399 |
| 5–20 devs | RTX 5090 32 GB | DeepSeek-Coder 33B INT4 + BGE-large + reranker | £899 |
| 20–50 devs | RTX 6000 Pro 96 GB | DeepSeek-Coder 33B FP8 + multiple embedding models | £399 |
| 50–200 devs | 2× RTX 5090 OR 1× 6000 Pro | Tensor-parallel + dedicated embedding card | £399–1,099 |
| 200+ devs | Multi-GPU cluster + load balancer | 2 nodes minimum, sticky routing | £1,800+ |
Embeddings + reranker (the hidden cost)
Codebase indexing is the silent VRAM consumer. For a 1M-line codebase indexed with BGE-large embeddings:
- Initial indexing job: ~30 minutes on the 5090 (one-time, can run alongside the LLM)
- Steady-state: re-embed changed files. ~50 GB of vector index lives in Qdrant.
- Live query path: embed query (5 ms) → retrieve top 50 (~10 ms) → rerank to top 5 (~50 ms) → LLM completion.
VRAM-wise, BGE-large is ~1 GB and BGE-reranker is ~1 GB. Comfortable on the same card as a 33B INT4 model on a 32 GB GPU. Tight on a 16 GB card — for teams larger than ~10 devs, the embedding pipeline starts wanting its own card.
Cost per developer-seat
| Team size | Monthly server | Per-seat (self-hosted) | Per-seat (Cursor) | Per-seat (Copilot) |
|---|---|---|---|---|
| 5 devs | £119 | £34 | £16 | £15 |
| 10 devs | £119 | £17 | £16 | £15 |
| 20 devs | £399 | £18 | £16 | £15 |
| 50 devs | £899 | £22 | £16 | £15 |
| 100 devs | £899 | £11 | £16 | £15 |
| 200 devs | £1,800 | £9 | £16 | £15 |
Self-hosting becomes meaningfully cheaper than commercial offerings somewhere around 20 developers, and dramatically cheaper at 100+. Below 10 devs, GitHub Copilot is just easier and cheaper.
Self-hosted vs Cursor / Copilot / Codeium
What works
- Codebase stays private. No code shipped to a US-based provider.
- Custom fine-tunes. Train on your codebase's patterns, idioms, internal libraries.
- Pin model versions. Cursor changes its default model quietly; you do not.
- Cost flat. Per-seat scales with team size, but server cost does not.
- Compliance. SOC 2, ISO 27001 audits do not need a vendor questionnaire.
Where it breaks
- You operate it. Updates, monitoring, debugging are your problem.
- IDE integration is rougher. Cursor/Copilot have spent years polishing the editor side.
- Latency budget is tight. Sub-100ms for inline completion is hard to hit consistently.
- Quality slightly behind Claude / GPT-4o. Open coding models close the gap quarterly but never quite match.
- Below 10 devs the math does not work. Just buy Copilot.
When the math flips
Three thresholds where the right answer changes:
- 10 devs — break-even between Copilot ($150/mo) and a small dedicated GPU.
- 50 devs — the team becomes large enough that customisation (fine-tuning on your codebase, custom prompts, internal libraries in context) starts paying back the operational cost.
- 200 devs — load balancing across multiple GPU servers, sticky session routing, dedicated embeddings infrastructure. Becomes a real platform.
Bottom line
Self-hosting a coding assistant pays off above ~20 developers, dramatically pays off above ~100, and is mostly about privacy below that threshold. The actual server bill is the easy part of the math; the engineering investment in IDE integration and prompt tuning is what eats most teams' time.
For the underlying GPU pick, see best GPU for Code Llama and best GPU for DeepSeek. For the broader cost landscape, our cost per 1M tokens reference.