Writing code models that run on 8 GB
22 models with published weights that fit in 8 GB — a phone, a base iPad, an Air. Counted at four-bit quantisation, weights only, leaving the machine about a third of its memory and a gigabyte for context: room for roughly 7 billion parameters. A mixture of experts is counted in full, because it is held in full even though only a few experts compute.
The memory of a phone, a base iPad or an entry-level laptop. What fits is small: models of a few billion parameters, quick and cheap to run, good at summarising, classifying and simple extraction, and out of their depth on long reasoning. This is also where on-device makes the most sense, because the alternative is a network round trip for something that takes a moment.
Models and agents for reading a codebase and changing it, rather than writing a snippet. The boards that matter here are the ones that run against real repositories — SWE-bench, SWE-rebench, Terminal-Bench — because a model can write a plausible function and still fail to make a test pass. Note whether what you are looking at is a model or an agent: an agent brings the harness, the file access and the loop, and is priced for it.
- CodeLlama-7b-Python-hfCode Llama7.0B≈4.5 GB at 4-bit
- Nxcode-CQ-7B-orpoNTQAI7.0B≈4.5 GB at 4-bit
- OlympicCoder-7Bopen-r17.0B≈4.5 GB at 4-bit
- Qwen2.5-Coder-7BAlibaba7.0B≈4.5 GB at 4-bit2 also selling it hosted
- Qwen2.5-Coder-7B-InstructAlibaba7.0B≈4.5 GB at 4-bit4 also selling it hosted
- codegemma-7b-itGoogle7.0B≈4.5 GB at 4-bit1 also selling it hosted
- deepseek-coder-7b-instruct-v1.5deepseek-ai7.0B≈4.5 GB at 4-bit1 also selling it hosted
- Magicoder-S-DS-6.7BIntellligent Software Engineering (iSE)6.7B≈4.4 GB at 4-bit
- deepseek-coder-6.7b-instructDeepSeek6.7B≈4.4 GB at 4-bit
- CodeLlama-7b-Instruct-hfCode Llama6.7B≈4.4 GB at 4-bit
- CodeLlama-7b-hfCode Llama6.7B≈4.4 GB at 4-bit
- sqlcoder-7b-2Defog.ai6.7B≈4.4 GB at 4-bit
- starcoder2-3bbigcode3.0B≈2.0 GB at 4-bit1 also selling it hosted
- Qwen2.5-Coder-3B-InstructAlibaba3.0B≈2.0 GB at 4-bit3 also selling it hosted
- replit-code-v1-3bReplit3.0B≈2.0 GB at 4-bit
- replit-code-v1_5-3bReplit3.0B≈2.0 GB at 4-bit
- stablecode-completion-alpha-3b-4kStability AI3.0B≈2.0 GB at 4-bit
- stablecode-instruct-alpha-3bStability AI3.0B≈2.0 GB at 4-bit
- stable-code-3bStability AI2.8B≈1.8 GB at 4-bit1 also selling it hosted
- stable-code-instruct-3bStability AI2.8B≈1.8 GB at 4-bit
- deepseek-coder-1.3b-instructdeepseek-ai1.3B≈0.8 GB at 4-bit
- DeciCoder-1bDeci AI1.1B≈0.7 GB at 4-bit