Can a 3B Parameter LLM on a Laptop Solve Real GitHub Issues?
M3 Pro MacBook Pro · Ollama · Zero Cloud API CostsAfter aggressive optimization, the 3B model generates 100% apply-clean patches for 6 easiest SWE-bench Lite instances.
One patch (django-10914) achieves 50% similarity to the gold fix - correctly outputting FILE_UPLOAD_PERMISSIONS = 0o644.
For django-11179, the model finds the exact right file and function (deletion.py:277) but adds the wrong line.
The bottleneck is no longer patch generation - it's code reasoning about root causes.
Resolve rate comparison. SWE-bench Lite = 300 curated instances from 11 Python repos. Our agent generates patches but hasn't resolved any instances yet (0% resolve rate).
Identifies the correct file to modify in 85%+ of cases. Generates syntactically valid Python code. Produces structurally sound patches with proper context lines. Understands the general area of the bug.
Misidentifies root cause - applies superficial fixes instead of addressing the real bug. Adds unnecessary code rather than modifying the right lines. Cannot reason about complex code interactions across modules.
Instead of asking a 3B model to produce perfect unified diffs (which they can't), we ask for structured SEARCH/REPLACE blocks and programmatically build the patch. This compensates for small model limitations.
Two-stage retrieval: regex extraction of file paths and identifiers from the issue, followed by grep-based search. LLM narrows down candidates only when needed.
Unlike cloud agents that stuff 100k+ tokens, we work within 4k-8k context. Forces surgical precision and reduces noise for the small model.
No fine-tuning, no few-shot examples consuming context. The system prompt is under 200 tokens. All intelligence comes from the base model + good tooling.
| Instance | Status | Patch Size | Time | Diff |
|---|---|---|---|---|
| Loading results... | ||||
3B models have limited code understanding. Multi-file patches are rare. Complex logic changes beyond simple fixes are out of reach. No test execution feedback loop.
Add iterative refinement with test feedback. Try 7B-14B models (llava, deepseek-coder). Implement RAG over repo history. Add multi-turn agent loop with tool use.