tiny-model-lab
AGENTS.md0 starsChanged 56 days agoMITView on GitHub
A map, not a manual. Each line below exists because something went wrong without it. Taking a narrow task from idea to an embedded model of kilobytes-to-low-megabytes that runs locally, in a browser or on a device — and, more often, discovering early that it should not be a model at all. Every experiment names a specific existing thing it must beat, with a measured number. Not "improve accuracy". A named baseline. If you cannot name one, the task is…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 32,671 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository6 other files it gives its agents.
- architecture-selectionSkill
- dataset-synthesisSkill
- design-evalSkill
- export-pipelineSkill
- quantization-strategySkill
- tiny-model-triageSkill
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
Do not skip step 1. Do not skip the baseline in step 3.
- Very specific: line 32
Read from experiment.yaml: size budget, latency band, wall-clock cap, patience.
- Distinctive: line 33
When a gate fails it returns a remediation — follow it rather than improvising.
- Distinctive: line 36
Never extend patience mid-run to rescue a plateau.
≈ “Common” is an estimate: at least 1 in 5 of the 41,581 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — tiny-model-lab
A map, not a manual. Each line below exists because something went wrong without it.
What this repo is for
Taking a narrow task from idea to an embedded model of kilobytes-to-low-megabytes that runs locally, in a browser or on a device — and, more often, discovering early that it should not be a model at all.
The rule that matters most
Every experiment names a specific existing thing it must beat, with a measured number. Not "improve accuracy". A named baseline. If you cannot name one, the task is not scoped yet and no training should start.
Ties go to the baseline. It ships without weights.
Order of operations
/scope <task>→task-triagesubagent → producesexperiments/<slug>.yamlor a refusal- Where a contract field would otherwise carry a number nobody measured, triage writes an open
experiments/<slug>.spike.mdinstead — one question, one threshold, what changes if the answer is no, and a box of at most 480 minutes./spike <question or path>runs it;python -m harness spikeschecks them. A spike produces a finding, never a run.
- Where a contract field would otherwise carry a number nobody measured, triage writes an open
/data <experiment-path>→data-buildersubagent → dataset with an untouchable held-out split/experiment <path>→trainersubagent → baseline first, then the model/gate <run>→evaluatorsubagent → promote / iterate / stop/ship <run>→embeddersubagent → export, verify numerically, write the model card
Do not skip step 1. Do not skip the baseline in step 3.
Stop conditions are enforced, not advisory
Read from experiment.yaml: size budget, latency band, wall-clock cap, patience.
When a gate fails it returns a remediation — follow it rather than improvising.
The remediation exists because the improvisation was already tried.
Never extend patience mid-run to rescue a plateau. Change something structural or stop. A new seed is not a structural change.
Stack defaults
- Browser or cross-platform target → PyTorch + MPS, because ONNX and Core ML export paths are mature
- Artifact stays local → MLX (no first-class converter to Core ML or ONNX exists)
- Training tiny models on MPS is fine; serving from MPS is not
Where to look
| You need | Read |
| Should this be a model at all? | .claude/skills/tiny-model-triage/ |
| How to get labels | .claude/skills/dataset-synthesis/ |
| What architecture | .claude/skills/architecture-selection/ |
| Fitting a size budget | .claude/skills/quantization-strategy/ |
| Getting it into a product | .claude/skills/export-pipeline/ |
| Is the feature good? | .claude/skills/design-eval/ |
| Why the harness is shaped this way | docs/harness-design.md |
| Concepts, analogy-first | docs/concepts.md |
Conventions
experiments/holds three kinds of committed file: contracts (<slug>.yaml), refusals (<slug>-refused.md) and spike records (<slug>.spike.md). Only the first unlocks trainingruns/holds manifests; corpora and checkpoints are gitignoredchampion/holds exactly one promoted model, changed only viaharness/promote.py- Provenance is committed; artifacts are not
- Report p95 latency measured warm, plus cold start separately
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

