Table of Contents
Best local Copilot setup on RTX 5070: Qwen 2.5 Coder 14B Q4 for chat/generation (~9 GB) + a small FIM model like Qwen 2.5 Coder 1.5B for inline autocomplete (~1 GB) = ~10 GB total. Continue.dev in VS Code/JetBrains connects to Ollama on localhost. Latency: ~80–100 tok/s for chat, ~50–70 ms first token for autocomplete.
Best Coding Models for 12 GB
| Model | VRAM (Q4) | HumanEval | Best use |
|---|---|---|---|
| Qwen 2.5 Coder 14B | ~8.7 GB | ~89% | Chat, code review, generation |
| Qwen 2.5 Coder 7B | ~4.4 GB | ~88% | Fast generation, leaves room for FIM |
| DeepSeek Coder V2 Lite | ~9 GB | ~81% | Strong general coding |
| Llama 3.1 8B Instruct | ~5.2 GB | ~72% | General purpose, decent coding |
| Qwen 2.5 Coder 1.5B | ~1 GB | ~70% | Inline autocomplete / FIM |
| CodeLlama 13B | ~7.9 GB | ~67% | Older but still capable |
Recommended combo for 12 GB: Qwen 2.5 Coder 7B Q4 for chat (~4.4 GB) + Qwen 2.5 Coder 1.5B for inline autocomplete (~1 GB) = ~5.4 GB total, or Qwen 2.5 Coder 14B Q4 for chat only (~8.7 GB). The 14B model on benchmarks is close to GPT-4-level coding on HumanEval.
Continue.dev Setup
Continue.dev is the leading open-source Copilot replacement — available as a VS Code extension and JetBrains plugin.
- Install Continue from the VS Code marketplace or continue.dev
- Start Ollama with your coding model (see below)
- Configure Continue to use Ollama:
Cmd/Ctrl+Shift+P → "Continue: Open config"
Sample ~/.continue/config.json:
{
"models": [
{
"title": "Qwen 2.5 Coder 14B",
"provider": "ollama",
"model": "qwen2.5-coder:14b",
"apiBase": "http://localhost:11434"
}
],
"tabAutocompleteModel": {
"title": "Qwen 2.5 Coder 1.5B (FIM)",
"provider": "ollama",
"model": "qwen2.5-coder:1.5b",
"apiBase": "http://localhost:11434"
},
"embeddingsProvider": {
"provider": "ollama",
"model": "nomic-embed-text"
}
}
Ollama + Continue Setup
# Pull the coding models
ollama pull qwen2.5-coder:14b # ~8.7 GB download + storage
ollama pull qwen2.5-coder:1.5b # ~1 GB
ollama pull nomic-embed-text # ~0.5 GB (for codebase indexing)
# Start Ollama with persistent model loading
OLLAMA_KEEP_ALIVE=-1 ollama serve
# Verify
curl http://localhost:11434/api/tags
With OLLAMA_KEEP_ALIVE=-1, the 14B model stays resident in VRAM — no reload latency when you switch between the chat panel and inline autocomplete.
Autocomplete Latency
For inline autocomplete, first-token latency matters most — you need the suggestion to appear before the user continues typing (~100–200ms is the threshold for it feeling “live”).
| Model | First token (est.) | 50 tok/generation | Feel |
|---|---|---|---|
| Qwen 2.5 Coder 1.5B Q4 | ~20–30ms | ~0.5 s | Instant — best for autocomplete |
| Qwen 2.5 Coder 7B Q4 | ~50–80ms | ~0.7 s | Fast — acceptable for autocomplete |
| Qwen 2.5 Coder 14B Q4 | ~100–150ms | ~1.1 s | Slight delay — better as chat model |
The recommended split: use the 1.5B model for inline autocomplete (FIM) and the 14B model for the Continue chat panel. This gives instant tab-completions and high-quality chat/refactoring assistance from the same GPU.
Local vs GitHub Copilot
| Factor | RTX 5070 + Qwen 2.5 Coder | GitHub Copilot Pro |
|---|---|---|
| Monthly cost | £139/mo (GPU) + £0 per token | ~£10/mo (but model limited) |
| Code quality (14B) | ~89% HumanEval | GPT-4o based, very strong |
| Privacy | 100% local — code never leaves server | Code sent to GitHub/OpenAI |
| Context window | 128K (Qwen 2.5) — full file context | Typically 8–16K |
| Customisability | Fine-tune on your codebase (QLoRA) | No fine-tuning |
| Offline use | Yes — no internet required | No |
| Latency | ~50–150ms (local) | ~100–300ms (network) |
For teams with privacy requirements, the local setup wins decisively. For individual developers who don’t already have a GPU server, Copilot at £10/mo is cheaper. If you’re already using the RTX 5070 for other AI workloads, the coding assistant is essentially free.
Fill-in-the-Middle (FIM)
Qwen 2.5 Coder supports FIM tokens natively for inline autocomplete:
import ollama
def fim_complete(prefix: str, suffix: str, model="qwen2.5-coder:1.5b") -> str:
"""Fill in the middle between prefix and suffix."""
prompt = f"<|fim_prefix|>{prefix}<|fim_suffix|>{suffix}<|fim_middle|>"
response = ollama.generate(
model=model,
prompt=prompt,
options={"temperature": 0.1, "max_tokens": 100, "stop": ["<|endoftext|>"]}
)
return response["response"]
# Example
prefix = "def calculate_factorial(n):\n if n == 0:\n return 1\n "
suffix = "\n\nresult = calculate_factorial(5)"
completion = fim_complete(prefix, suffix)
print(completion) # "return n * calculate_factorial(n - 1)"
Build your local Copilot on RTX 5070
12 GB GDDR7 · Qwen 2.5 Coder 14B + 1.5B · Continue.dev · £139/mo · Order the RTX 5070 or compare all GPUs.