Small Coding Models, Real Tasks

Which open model of 4.7B parameters or less should you run on a laptop for Python work? Thirty models (31 configurations) scored on the same 611 prompts, the best ones run as coding agents on 100 real developer requests, and every fine-tuning attempt that did not help.

84 / 100best small agent: FrogNano-4B, thinking on, on real dev requests (Opus: 100)
3.8 to 5.6 GBpeak memory of that agent on a 16 GB MacBook Air, 4-bit MLX
40 / 100best single-shot score at this size on the same requests
0fine-tuning methods that beat the untrained model (LoRA, SFT, DPO, RL)
New: the 8 GB 1-bit Inkling-2-Mini scores 93/100 on the same real requests. See all five quants tested.

1. Single-shot: one answer per prompt

Greedy decoding, thinking off, 1,536-token answer limit, bf16 on vLLM. Click a column to sort. Grey rows are references outside the size class or run differently.

Modelusage2 /100HumanEval+ /164dev /150synthetic /197All /611

Thinking-only models (DASD-4B-Thinking 158, Nanbeige4.1-3B 2) mostly ran out of the 1,536 tokens while thinking, so their scores say little about the models. Ministral-3-3B scored 83 as run because 393 answers opened with a doubled code fence that the scorer read as empty. Differences under about 10 on All are not significant (paired exact McNemar test).

2. As coding agents: real developer requests in a tool loop

The 100 usage2 requests, run with tools (read and edit files, run code and tests, finish). A task passes when hidden checks pass on the final code. One run each. Opus and Sonnet 5.5 score 100/100 on these requests answering once, without tools.

Sampled runs move by several points between repeats, so single-run gaps under about 6 tasks are noise. FrogNano: 72 with its original settings, 84 with thinking on, 150 steps, card sampling and a nudge when a reply has no tool call (p = 0.017). Qwen3-4B-Instruct-2507's 18 is mostly malformed tool calls under its own template.

3. On a Mac

FrogNano-4B in 4-bit MLX on a fanless 16 GB MacBook Air: peak memory 3.8 to 5.6 GB, about 20 tokens per second once warm, a median of about 8 to 9 minutes per agent task. It runs fully offline.

4. What did not work

All tested against the untrained model with paired exact McNemar tests. Training data came from Claude references or the model's own verified answers, never from public test sets.

What did help: a better agent loop (more steps, card sampling, thinking with a nudge) and a better base model. The model weights were never improved.

Run it on your model

The 100 requests, hidden checks, reference solutions and a one-file scorer are public: datasets/nahuel990/usage2. Want a small model added here? Open a discussion in this Space's Community tab with the model id.

Method