← TinyGPT · docs · devlog · roadmap · speedup
source: docs/prds/PRIORITY.md · view on GitHub ↗

PRD Priority Triage

Last updated: 2026-07-02

This file is the working priority map for every PRD currently on disk.

Active work still starts from:

  1. PROJECT_STATUS.md
  2. docs/NEXT.md
  3. docs/factory/

Use this file only when a factory task needs a PRD-level acceptance checklist.

Current Factory Gaps

These are the real gaps before building the next candidate:

  1. Target lock — SQL is selected for the first factory POC. The expanded Qwen3-0.6B live run improved from 0.160 to 0.860 on 50 non-overlapping heldout rows and was correctly marked retry-data; the next gate is preference tuning or a public benchmark slice.
  2. Canonical run command/readoutFactoryRun and FactoryRunFolder define the schema/readout and tinygpt factory-run renders/validates a complete run folder. The next missing piece is wiring real eval/train commands to emit those files automatically.
  3. Live baseline eval — done for expanded SQL POC on Qwen3-0.6B.
  4. Dataset manifest — expanded manifest exists with 108 train, 50 heldout, 108 preference rows across five SQLite domains.
  5. First SFT candidate — done for expanded SQL POC; next candidate should use DPO/SimPO on SQL-only and failure-derived preference pairs.
  6. Before/after report — score delta, regressions, cost, latency, RAM, tok/s, artifact, and decision.
  7. Specialist package — only if the decision is ship.

Low-Compute Evidence

Verified on 2026-07-02 without model training, GPU sweeps, sudo, or network installs:

Canonical rerun command:

bash evals/low-compute-prd-sweep.sh

The sweep may populate /tmp/gpt2-tok from Hugging Face for the C4 tokenizer fixture. Set TINYGPT_FETCH_TOKENIZER_FIXTURE=0 to skip that fetch in offline environments.

AreaEvidence
Run artifact schemaFactoryRun typed schema added in native-mac/Sources/TinyGPTIO/FactoryRun.swift; direct typecheck passes with swiftc -typecheck.
Eval gates / protocolevals/eval-gate-smoke.sh passes, including pass/fail exits, repeated-pass uncertainty, protocol env, and baseline restamp.
Onboarding / run planningevals/quickstart-smoke.sh passes for chat/tool-call fixture planning and missing-file failure.
Trace-to-data loopevals/traces-to-data-smoke.sh passes for tool-echo filtering, exact dedupe, MinHash thresholding, dry-run, and deferred judge rejection.
Factory run folderfactory-run-folder-smoke.sh passes for canonical run-folder write/read/validate/report generation.
Router / deferred tools / escalationrouter-bakeoff-smoke.sh, b26-deferred-parity-smoke.sh, and escalate-smoke.sh pass.
Batched eval runtimeevals/b34-throughput-smoke.sh passes against a local OpenAI-compatible mock, proving bounded-concurrent request submission and speedup reporting without a model server.
Pure Swift helper logicevals/swift-pure-model-smoke.sh passes for B28 composite rewards, B11 WSD schedule math, B12 spike recovery, B15 layer-wise LR factors, and B18 depth-derived hyperparameters without building the MLX package graph.
Data quality / mix / compressionquality-filter-smoke.sh, automix-smoke.sh, compress-smoke.sh, and scaledown-smoke.sh pass.
Repro / interp / packagesdeterminism-smoke.sh, interp-replay-smoke.sh, and project-validate-smoke.sh pass.
Packaging/exportexport-mlx-smoke.sh passes for committed .tinygpt fixture export and synthetic adapter export; Python mlx loader execution skipped when mlx is unavailable.
Specialist eval fixtureseval-sql-smoke.sh, milu-smoke.sh, review-smoke.sh, and reasoning-classifier-smoke.sh pass.
SQL factory POCsql-poc-smoke.sh and sql-poc-expanded-smoke.sh pass, including row-level SQL failure traces and generated preference pairs.
Tokenizer/router pathextractor-bpe-smoke.sh passes with the temporary GPT-2 tokenizer fixture prepared by low-compute-prd-sweep.sh.
Measurement harness mathbench_energy.py --self-test and bench_decode_thermal.py --self-test pass without sudo or a model server.

Package-level Swift builds that touch MLX need the full Xcode beta developer dir because global xcode-select points at Command Line Tools, which do not include metal. Use:

DEVELOPER_DIR=/Applications/Xcode-27.0.0-Beta.app/Contents/Developer \
  swift build --build-system native --product tinygpt

Remaining gates that are not part of the low-compute sweep:

P0 — Build Next

These directly support the first canonical factory run.

PRDPriorityUse now for
A1 first-specialist-tool-callerP0Template for the first target’s train/eval/package loop. Update mentally from “BFCL tool-caller” to “selected factory target”.
B33 laptop-finetune-onboardingP0Canonical CLI orchestration. Recast as quickstart/factory-run emitting the run schema, not just onboarding.
B32 eval-ci-gateP0Baseline/candidate gate shape and failure exit semantics.
B23 agent-eval-protocolP0Repeated passes, fixed budgets, uncertainty, and resource accounting.
B31 gallery-and-project-pinsP0Project pins, package validation, and artifact identity. Mostly shipped; use the remaining pieces only if packaging blocks the run.
B10 quality-classifierP0Data filtering sidecar for target data if quality/noise is a problem. Already has a useful V1.
B21 micro-automixerP0Data-mix search before training if the target has multiple data sources. Use dry-run/lightweight mode first.

P1 — Immediately After First Candidate

These are useful once the first SFT candidate exists or if the first run reveals the matching failure mode.

PRDPriorityTrigger
B28 composite-reward-frameworkP1Candidate has verifiable failures and needs DPO/RLVR/ReST-style reward integration.
self-improving-agentsP1First candidate produces traces and the reward is stable enough for a second round.
continual-learning-loopP1Factory needs repeated correction -> data -> train cycles.
B2-B7 router-familyP1Specialist wins narrowly but damages breadth; route instead of forcing one general model.
B26 deferred-toolsP1Tool catalog size becomes a real eval/runtime bottleneck.
B5 cloud-escalate-trainingP1Candidate must learn when local model should defer/escalate.
B34 batched-eval-runtimeP1Eval runtime blocks iteration speed.
C5 decode-jitter-thermalP1Candidate is good enough that sustained decode/thermal behavior matters.
B9 energy-per-tokenP1Candidate is good enough for power/energy comparison.
qlora-large-model-finetuneP1SFT on bf16/LoRA plateaus and memory blocks larger-base experiments.
C10 train-run-dashboardP1CLI run schema exists and needs a visual run reader.
B6 mac-app-demoP1CLI factory loop proves improvement; then build the minimal Factory Run Center.

P2 — Later Factory Support

Useful, but not needed before the first measured factory proof.

PRDPriorityWhy later
B1 second-specialist-shell-or-sqlP2Only after the first target proves the loop.
B8 multilingual-specialistP2Needs target-specific data/eval and should not compete with first proof.
B25 scaledown-specialistP2Good specialist candidate, but only if selected as the target.
E6 eval-scaledownP2Relevant only for B25/context-compression target.
B11 wsd-scheduleP2Training-quality polish unless first candidate shows LR schedule issues.
B12 loss-spike-recoveryP2Use when real training has instability, not before.
B15 layerwise-lr-decay-sftP2Tune after baseline SFT.
B18 nanochat-depth-knobP2Useful for from-scratch/pretrain ergonomics, not the current adapter loop.
C4 tool-extractor-bpeP2Relevant if mini-router/tool extraction becomes the selected path.
C9 determinism-harnessP2Keep reproducibility constraints, but bit-exact replay is not achievable on current MLX/Metal.
B14 speculative-decodingP2Runtime speed after quality is proven.
B16 m5-na-prefill-benchP2Hardware measurement after a candidate matters.
B13 interp-on-checkpointsP2Debugging/learning lane, not factory proof.
B17 saelens-interopP2Useful for analysis export; not active.
B19 group-saeP2Interpretability cost reduction; not active.
capability-retentionP2Important evaluation concept, but implement through the selected target’s regression suite first.
factory-planner-v7-tools-in-promptP2Use only if selected target is planner/tool-schema prompt work.
pace-task-loop-v1P2Pace app integration is separate from TinyGPT factory proof.

P3 — Parked Research

Keep these for learning/future expansion. Do not open during the factory proof.

PRDPriorityPark reason
5.1 reasoning-on-22MP3Tier 5 research; not current factory proof.
5.2 testtime-compute-scalingP3Tier 5 research.
5.3 vision-language-toyP3VLM/toy research.
5.4 diffusion-lm-microP3Diffusion LM research.
5.6 tts-toyP3Audio/TTS research.
5.7 explainer-video-modelP3Far-future multimodal/product research.
factory-vision-m4-impl-planP3VLM porting parked.
factory-vision-specialistP3VLM specialist parked.
vlm-ab-uivenus-vs-qwen3vlP3VLM decision parked.
game-rl-environment-pocP3RL environment research.
local-model-arena-selfplayP3Self-play research.
gepa-prompt-evolutionP3Prompt-evolution research; not factory proof.
B35 local-agent-vertical-pocP3Coding-agent product wedge is not the current TinyGPT center.
GPU-RESEARCH-BACKLOGP3Hardware-heavy backlog; use only after target proof.

Archive Candidates

These should not be selected for new work. Keep the files for history unless a future cleanup physically moves them into an archive directory and updates links.

PRDArchive reason
C3 dora-ondisk-formatShipped/closed.
quantized-inference-swiftShipped/closed.
multi-turn-agentic-evalShipped as eval infrastructure.
pace-planner-v11-training-dataData PRD shipped; later gate chose not to ship that planner.
pace-planner-v11-ship-gateDecision/gate doc honored; no build work.
specialist-pace-plannerTrack closed; pivoted to stock 4B/general planner lock.
factory-completeness-trackerTracking document; primitives mostly hold up in code.
factory-vision-m4-architecture-decisionDecision made; downstream VLM work parked.
tinygpt-product-thesisHistorical positioning; superseded by factory-first cleanup.
macos26-int8-ane-handoff-portNegative result; parked/closed.
5.5 sparse-moe-kernelsBlocked upstream; design note only.

Archive Policy

Do not move files during active build work. Soft-archive first by listing them above.

Physically move a PRD only when: