tinycode
A coding agent small enough for a small local model.
IThe problem
Large coding agents send long prompts and offer many tools. A small model loses track of them. tinycode is an agent built for small models. The benchmark below runs a 1.7-billion-parameter model on a 6 GB graphics card.
tinycode talks to any OpenAI-compatible server, for example llama-server. It keeps the prompt short and gives the model three tools.
IIHow it keeps a small model on track
bash, read with line numbers, and edit, which replaces exact text. bash runs with pipefail, so tests | tail keeps the exit code of the tests.IIIMeasured against opencode
The repository has 18 coding tasks. Each task has a repo, a task text and a check script. Some checks add hidden tests after the agent finishes. I ran tinycode and opencode on the same tasks with the same model.
| Tasks | tinycode | opencode 1.19.5 |
|---|---|---|
| 01–10: small fixes and features | 10/10 | 10/10 |
| 11–18: traps, hidden tests, a large file, speed, a refactor | 7/8 | 6/8 |
Setup. LFM3-1.7B (Q6_K) on llama-server, RTX 3060 6 GB, one run per task and agent.
Limits. One run per task and one model, so a one-task difference is not a result. Both agents fail task 16, a parser with strict edge cases. Run times vary up to ten times between runs, so compare pass counts first. tinycode runs shell commands without asking, so run it only in a folder you can restore, such as a git checkout.