Docs cockpit

posttrainllm Docs

The operating surface for the Mac-local specialist factory: current state, attempts, exactness audits, technique inventory, public artifacts, and the learning path.

53 Attempts
39 Exact
83 Audit rows
285 Docs

Library

285 visible docs from the rendered repo corpus.

No docs match the current filter.

Core

92 docs
Agent Runtime Core

posttrainllm agent <model> --tools tools.json is the product surface for the on-device agent SLM factory. The CLI loads a model (browser-trained .tinygpt, HuggingFace dir, or finetuned sp...

Async tool-call dispatch — investigated, skipped Core

Why async tool dispatch in AgentLoop doesn't justify the work at current bottleneck shape. Logged so the decision doesn't get re-litigated.

Attempt Ledger Core

This ledger records meaningful posttrainllm attempts as worked, failed, regressed, inconclusive, or not yet tried. It is the human-readable companion to run folders and factory reports.

Audit 2026 Core

After ~70 techniques shipped across the project, this doc is the honest reckoning. Each entry: what it claimed, what we measured, and

Benchmark First Run Core

the existing in-process MLX inference path. This is the "smoke test" that proves the scaffold produces real numbers; it is not a publishable benchmark (n=5, no energy metrics, tiny model).*

Benchmark Harness Design Core

"most powerful inference engine for modern transformers" claim; nothing about that claim is credible without a reproducible measurement frame.*

BPE Browser Scoring Core

How a Mac-trained BPE checkpoint gets a row on the browser leaderboard without the leaderboard ever needing to know what "BPE" means.

Browser Notes Core

Phase 4–5. Move training/inference into the browser after the Python reference is correct. Order: PyTorch reference → WASM CPU → WebGPU.

Capability matrix — modalities × actions Core

Exhaustive map of input modalities posttrainllm supports and what operations (train, distill, tune, quantize, etc.) are available for each. Honest status per cell — what's shipped, what's partial, what's only roadmapped.

CITATIONS Core

Every architectural claim in posttrainllm's code + docs traces back to a primary source here. If a claim doesn't have a citation in this file, treat it as informed-opinion-not-evidence an...

Cold Start Results Core

Date: 2026-05-30 Branch: worktree agent-acdbc93fc70df3aed Target machine: M3 Max, 36 GB RAM, macOS 25.5 Build: xcodebuild -scheme posttrainllm -configuration Release (LLVM optimisation on)

Constrained Generation Core

Reliable JSON output is the most common production failure mode for small (1-3B) LLMs in agent loops. Even when the model "knows" how to produce JSON, its sampler picks a wrong byte ~1 in...

Cpu Speedup Results Core

Status: implemented, measured, four items shipped. Numbers in this doc were recorded against the worktree binary built at the same SHA as the diff that introduced the items. Comparison ba...

Cpu Utilization Research Core

Status: research + recommendations. No code shipped. Numbers are estimates unless explicitly called out as measured.

Data Perf Core

Two complementary data-pipeline regularisers for the Mac trainer:

Dataset Inventory Core

Live snapshot of ~/.cache/posttrainllm/datasets/ (not checked into the repo). Last refreshed 2026-06-17. Sizes are directory totals; row counts are from decoded JSONLs where available, ot...

Dataset inventory — what's available, sizes, schemas Core

Reference doc for every dataset wired into posttrainllm — registry entries, what they're for, how to pull them, what the records look like after conversion, and known gotchas (gated datasets, parquet decode).

Decision Log Core

This is the meta-log: not the lessons learned, not the open questions, but the moments the direction actually changed. Across one long working session on posttrainllm, the project drifted...

Deploy Core

The browser app in browser/ is a Vite static build — no server, no API. It loads a pre-compiled WASM module from browser/public/, so the deploy environment does not need Emscripten; it on...

Determinism Core

posttrainllm train --seed <UInt64> now seeds both of posttrainllm's two randomness surfaces:

Distillation Core

Distillation is the post-training technique where a SMALL model ("student") is trained to match a LARGER model's ("teacher's") output distribution on a corpus. The result: students that s...

Doc Status Core

This registry labels the major documentation surfaces so old roadmap material does not compete with the active factory path.

Docs Quality Audit Core

This page tracks whether posttrainllm documentation is actually world-class, not just large.

DRILLDOWN Core

Started 2026-06-11 after the "miner stopping 30 min before the diamond" check. Closed 2026-06-12 with the full table below.

Evolution Strategies Core

ES is a finite-difference approach to optimisation: at every step, we sample K random perturbations of the current parameters, evaluate each perturbed model on a shared batch, and update ...

Exactness Completion Audit Core

This audit answers one question: are the posttrainllm docs now exact enough to be trusted as the operating system for the project?

External Products Reviewed Core

This page records products, startups, papers, and blogs that changed the posttrainllm roadmap. It is a teardown ledger: what we learned, what we stole, what we rejected, and what still ne...

Fa 2 Backward Notes Core

Implementation log for the second half of task #47. Forward landed last session (webgpu/attention_fa2.wgsl + tests/test_fa2_parity.mjs + docs/fa2_forward_notes.md); this is the runway for...

Fa 2 Forward Notes Core

Implementation log for task #47 (FA2 in WGSL), forward-only. Backward will be a separate session — see "What's still needed" at the bottom.

Feature audit (2026-05-31) — moved Core

Verification results absorbed into docs/PLAN.md §1. Kept here only as the audit's historical anchor.

Feature Ideas Core

A backlog of concrete features for the browser posttrainllm, drawn from the famous educational GPT projects worth learning from. Source repos are filtered to

First specialist run — toolcall-v1 findings Core

End-to-end first specialist training on M5 Pro. What worked, what didn't, what was unblocked, and what to try next.

Gallery V 2 Plan Core

The browser playground ships v1 of the gallery: four bundled .bin checkpoints (Shakespeare, TinyStories, Python, Q&A chat) served from browser/public/gallery/. This doc lays out the next ...

Galore And Stability Core

This page documents the five posttrainllm train flags introduced in the Tier-2 stability batch:

Github Data Integration Core

posttrainllm fetch-github pulls structured training data from GitHub for the code-specialist agent track (debugger, reviewer, commit-message generator). It is the GitHub-side counterpart ...

Gradient Checkpointing Results Core

This doc captures the measurements from wiring custom gradient checkpointing into the Mac training path (Tier 1.7 of the single-machine roadmap). The numbers below were collected on an M5...

GRPO CLARIFY Core

Status: PRD (pre-experiment). Owner: Sarthak. Date: 2026-06-12.

HF Datasets Integration Core

posttrainllm download-dataset and posttrainllm list-datasets give the on-device agent-factory direct access to HuggingFace's 100k+ dataset hub. This document covers how to use them, how t...

History Coverage Audit Core

This audit tracks how much of posttrainllm's historical work is normalized into the structured attempt ledger, classified as technique inventory, or intentionally left as narrative/refere...

Industry Learning Roadmap Core

This is the external learning track for posttrainllm. Use it after the repo-local archive/learning_roadmap.md: CS336 is the spine, and company docs/blogs are the applied case studies.

Interpretability Core

Two interpretability surfaces ship in the browser playground:

Kv Cache Optimization Core

Date: 2026-05-30 Status: implemented (worktree), unmerged Target HEAD: 645c2f4 (main)

Leaderboard Core

The posttrainllm leaderboard at /leaderboard.html ranks small, browser-runnable language models on a curated set of benchmarks. Three properties are non-negotiable:

Learn Core

You can write code. You have never built or trained a neural network. This guide takes you, in order, through everything in this repository until none of it is a black box.

Learning Pipeline Core

The owner's learning track is now explicitly ground-up. It still reinforces the posttrainllm factory, but it does not start with post-training jargon.

Learning Progress Core

This tracker makes the owner learning pipeline measurable. The goal is to learn from the ground up while using posttrainllm as the lab.

Lm Eval Integration Core

This doc describes how posttrainllm plugs into EleutherAI's lm-evaluation-harness, the canonical eval framework behind the HuggingFace Open LLM Leaderboard. With the wiring in this commit...

LoRA Guide Core

Phase 3. LoRA adapts an already-trained, frozen base model by training small low-rank matrices inside selected linear layers.

Mac App Plan Core

The browser playground is the on-ramp. The Mac app is the depth: same architecture, same .tinygpt file format, ~20-30× the training throughput. This doc translates roadmap lever 20 into a...

MAP Core

This restructure split, merged, and archived a few docs. Use this table to find where the content of any old path now lives.

Memory Tradeoffs Core

What fits on a 48 GB Mac for training is dominated by four memory costs: weights, optimizer state, gradients, and per-step activations. This guide explains each in concrete numbers and th...

Model Guide Core

Phase 1–2. Build a tiny GPT-style causal language model. First goal is

MoE Core

MoE replaces a transformer block's single dense MLP with N "expert" MLPs plus a learned router that picks the top-K experts for each token. The result: a model with ~N× the parameter capa...

MTP Core

Standard language-model training predicts ONE token ahead per position. Multi-Token Prediction (MTP) predicts H tokens ahead per position simultaneously, using H output heads that share t...

NEXT Core

This is the active queue. It intentionally ignores most historical PRDs.

Notes Core

How a documented scaffold became a verified, end-to-end implementation of the modern LLM stack: a GPT trained from scratch, adapted with LoRA, ported to hand-written WebAssembly kernels, ...

Online Softmax In Attention Core

Audience: an ML-curious engineer who can read C++/WGSL but hasn't derived the trick before. This doc walks through what "online softmax" means, why it matters for attention specifically, ...

Optimizers Core

posttrainllm ships five optimizers, selectable on posttrainllm train, sft, and dpo via --optimizer {adamw|lion|sophia|muon|adafactor}. Default is adamw (preserves backward compatibility —...

Pace Handoff 2026 06 10 Core

posttrainllm (the factory) refocuses on local-LLM research. This doc freezes the state of everything posttrainllm owes or has delivered to Pace (the consumer), so either repo can pick up ...

Pace Landing Draft Core

action). Sub-head: "CodeVetter is a desktop review cockpit for the diffs your agent ships. Catch what Cursor, Claude Code, and Devin missed — vulnerabilities, regressions, and silent drif...

Pace Model Manifest Core

Canonical inventory of all models Pace needs (goal set 2026-06-10: all roles decided with runnable artifacts by end of day). One row per role; this doc is the single source of truth — upd...

Peft Variants Core

A bundle of parameter-efficient fine-tuning (PEFT) flavours, all wired into the existing finetune / sft / dpo commands as opt-in flags. The default behaviour (vanilla LoRA r=4 α=8 on q/v ...

Perf Audit Mlxfast Tied Core

Two-item perf + correctness audit, scope-limited to:

Perf Quest Core

A working document for the in-flight push to give users on the latest Chrome every GPU acceleration the platform exposes — without ever degrading model quality. Started during the HN-laun...

Perf Research Core

A working document for the "best in market" target. Tonight's session landed KV-cached sampling (~2× sustained), 4-bit palettization (6× smaller files), and the ANE conversion path. This ...

Performance Core

How fast posttrainllm trains, what has been done to speed it up, and what is left. All numbers are from an Apple M5 Pro laptop.

Planner Lock 2026 06 19 Core

This is the stop point for planner-model churn. Starting tomorrow, planner work should be integration, routing, latency, and daily-use fixes, not another base-model search.

posttrainllm — master plan (shipped / skipped / TODO) Core

Single source of truth for what's shipped, skipped, and still to build. Consolidated from docs/roadmap/*, docs/progress.md, docs/backlog.md, docs/feature_audit_2026_05_31.md, and docs/roadmap/recent_research.md (paper catalogue). Replaces them as the canonical reference; the older docs are now pointer stubs or archived under docs/archive/.

Precision Core

How posttrainllm ensures every accelerated code path preserves model quality before it activates for the user. The non-negotiable rule from the opportunistic-acceleration scope (see docs/...

Progress dashboard — moved Core

Consolidated into docs/PLAN.md §1 (shipped). Headline metrics live there.

PROJECT RECOMMENDATION CONTEXT Core

Generated: 2026-07-02T00:00:00.000Z

Pruning Core

Pruning is the post-training technique where you remove parts of a trained model and accept a small quality hit in exchange for a smaller model. There are two flavours here, with very dif...

Q&A Log Core

A chronological reconstruction of the working session — the questions asked, what shipped in response. Format is question-then-answer, with an Outcome line per entry pointing at what actu...

Quality Bundle Core

Three loose pieces of the build/test infrastructure shipped together so the next agent inherits a CI floor that catches the obvious regressions before they reach main.

Quantization Expansion Core

This drop ships four new quantization features on top of the existing AWQReader (HF AWQ safetensors loader) and HQQ (storage-only Half-Quadratic Quantization) that already live in the tree:

Quickstart Core

quickstart turns a data file into a trained, runnable specialist on your Mac with one command and zero ML knowledge: it inspects the data, auto-picks a base from the gallery, infers a LoR...

README Core

This is the canonical entrypoint for posttrainllm documentation.

RETROSPECTIVE Core

Written 2026-06-11 after the clarify-v1 experiment failed and the small-specialist training bet closed. This doc replaces no other; it records what we learned at high cost so future work ...

ROI-ordered backlog — moved Core

Consolidated into docs/PLAN.md §3 (TODO). Tier A/B/C/D ordering preserved.

Session Retrospective Core

This document captures a single long working session on posttrainllm — what was believed coming in, what the contradictions turned out to be, what got shipped, and what the transferable l...

Session retrospective — 2026-05-31 Core

Multi-hour session that took posttrainllm from "Wave 2.5 stalled" to "every CLI verified + first specialist trained end-to-end + ROI-ordered backlog." What shipped, what was learned, what to pick up next.

Speculative Heads Core

Two joint-trained draft-head architectures that bolt onto a frozen base LM and propose multiple tokens per base-forward, verified in a single extra base forward pass. Implemented in the n...

Streaming Llm Kivi Core

Two changes that let posttrainllm sample survive arbitrarily long generations on a memory-bounded Mac:

Study Guide Core

The technical material this session touched, organized so you can pick what to learn at your own pace. The chapters are thematic, not chronological. Each one answers the same two question...

Test Coverage Core

posttrainllm targets EXEMPLARY test coverage across all three runtimes: Swift (native Mac), Python (reference impl), and TypeScript (browser).

Tool-call extractor (mini-router) Core

Design + training recipe for posttrainllm's tiny encoder model that picks which tool a user query needs, before the full LM forward pass.

Training Guide Core

posttrainllm train --depth N derives every pretrain hyperparameter from one number — architecture and the learning-rate / batch / step schedule — following the nanochat surface (karpathy/...

Using posttrainllm with Continue.dev / Cline / Aider Core

posttrainllm exposes an Ollama-compatible HTTP surface so it drops straight into Continue.dev, Cline, and Aider configs as a local provider. Setup + caveats.

V 11 Baselines 2026 06 09 Core

This document records the v9 baseline against each of the six v11 ship-gate dimensions (pace-planner-v11-ship-gate.md). Frozen at commit time. Not for revision — v11 progress measured aga...

Validation Report Core

This doc captures the validation runs and workflows that exercise the features shipped in Phases 1-10. The goal isn't peer-review rigour — it's enough evidence that each surface RUNS end-...

Wwdc 2026 Impact Core

Researched 2026-06-10 via two web sweeps (platform + product). Sources at bottom; unverified items marked. macOS 27 is "Golden Gate", fall 2026.

YOCO Results Core

This doc captures the implementation and smoke-test measurements for YOCO (Lin et al., 2024) in the Mac training path (Tier 3.8 of the single-machine roadmap). All numbers below were coll...

Factory

13 docs

Techniques

5 docs

Learning

40 docs
Advanced architecture, RAG/agents, eval & ML system design — interview-grade map Learning

Senior/staff topics spanning modern transformer architecture, the linear-algebra↔transformers whiteboard, RAG, agents, evaluation (LLM-as-judge, perplexity, contamination), ML system-design rounds, and classic-ML depth — each with the best external source and repo anchor.

Advanced LLM inference & serving — interview-grade map Learning

Senior/staff inference-optimization interview topics — KV cache & paging, batching, speculative decoding, quantization, attention kernels/variants, long context, serving architecture — mapped to the best external source and to where this repo touches it.

Advanced LLM training & post-training — interview-grade map Learning

Senior/staff interview topics for LLM training at scale (parallelism, precision, MoE, data) and post-training (RLHF/DPO/GRPO/reward modeling/distillation), each mapped to the best external source and to where this repo touches it.

Agent context as a memory hierarchy Learning

The L1/L2/L3 framing for agent context engineering — what we stole from the Shortcut vertical-agents essay and where each steal lives in this repo.

App Intents Comparison Learning

Status: research landed 2026-06-07 Supports: docs/prds/factory-planner-v7-tools-in-prompt.md

Apple on-device Foundation Models — what they are, and where they fit (and don't) Learning

What Apple's FoundationModels framework + on-device model give you, the bridge we built to score it on our gates, the measured verdict (can't ground actions; 4096-token context can't hold a tool catalog; not faster), and the strategic decision — use it as a free floor for routing, never as a dependency.

Castform's RL fine-tune platform — what we stole Learning

Patterns lifted from castform.com (RL fine-tune SaaS) into posttrainllm's specialist-training surface. Sibling page to docs/learn/agent-context-hierarchy.md.

Competitive landscape — fine-tune, eval, interpretability Learning

A 2026 map of the products around "make a model good at your task" and "is my agent any good," with the Mac-first whitespace called out. Evidence behind docs/sessions/2026-06-13-market-landscape-mac-first.md.

Coverage Map Learning

This map is the guarantee that the learning corpus covers everything in the project. The ground-up curriculum.md is the spine (10 modules, first principles to self-improving factory). Thi...

Curriculum Learning

This is the owner learning roadmap from first principles to a self-improving factory for Mac-local specialist models: a self-improving factory in practice, not a pile of disconnected cour...

Diversity-driven small-model reasoning (Spectrum-to-Signal) Learning

Three transferable training methods from the VibeThinker papers — Diversity-Exploring Distillation, MaxEnt-Guided Policy Optimization (MGPO), and specialist weight-merging — mapped to where each upgrades our own self-improvement loop. The "how a 3B matches flagship reasoning" recipe, and why one of its steps is the direct antidote to the negative transfer we measured.

Dossier Learning

Status: v1 research synthesis landed 2026-06-07 Supports: docs/prds/factory-ane-inference-pace.md

Eval Matrix 2026 06 08 Learning

v8 was trained on v5's 248-row corpus + 59 hand-crafted examples targeting v2's failure modes (semantic disambiguation, multi-element reasoning, abstract reference). Same hyperparameters ...

Eval Methodology 2026 06 08 Learning

endpoint that runs zero model inference. Every Pace LoRA we trained scores ≤ this baseline. The fixtures test framework, not model.

External References Learning

Curated articles, papers, and projects relevant to posttrainllm. Each entry is one-sentence-what + one-sentence-why-for-us + link, per the docs preference for leaning on authoritative ext...

Journal Learning

A running log of questions, hunches, "wait, why does anyone do it this way?" moments, and tangents that come up during the curriculum sessions.

Learn Learning

posttrainllm's learning corpus — a ground-up curriculum from "what's a neural net" to modern training mechanics, plus reference + research notes.

Llm Mechanics Fundamentals Learning

For a 12-layer Huge model: ~108 matmuls in the body + ~1 input lookup + 1 output projection = ~110 matmuls per next-token prediction.

M 6 Findings Learning

Empirical diagnostic of the ANECCompile / runtime failure on the Qwen3-0.6B stateful CoreML path.

Mac-local AI mastery map — what's buildable, what's built, the distributed boundary Learning

The learning + build agenda for mastering Mac-local AI. Every capability buildable on a single Mac, annotated with fleet coverage (built / partial / to-learn), plus an explicit single-machine ↔ distributed boundary. The spine for "learn everything + build everything buildable on this Mac."

Mathematically essential vs engineering optimization Learning

The single most useful lens on this project — which parts compute the model's function (irreducible math, the correctness oracle) vs which parts only make that function cheaper/faster (the optimization layer). Plus the one number that polices the boundary: loss drift.

Model vs agent — what's actually different Learning

The architectural distinction between a fine-tuned model and the agent that runs it, and what "making a good model into an agent" actually requires. Mapped onto this repo.

Qwen 3 Vl Mrope Deepstack Learning

Documented 2026-06-08 from huggingface/transformers/src/transformers/models/qwen3_vl/modeling_qwen3_vl.py. Closes research tasks #277 and #278.

RL + multi-autonomous-agents roadmap — the AI game as a Mac-local RL environment Learning

Parked blueprint. The fleet's AI game (autonomous characters in a world) is already a multi-agent RL environment — the scarcest RL ingredient. This is the plan to turn it into a self-improving-agents testbed on the Mac, and the staged roadmap toward multi-agent dynamics. Revisit after distillation + the first GRPO loop.

Session 01 Neural Net Basics Learning

input → same output, every time.

Session 01 Neural Net Basics Dense Learning

A neural net is, at the bottom, a function:

Session 02 Gradient Descent Learning

Before we can search for "good" values, we need to define what good means. The whole search machinery is built on this one definition.

Session 03 Non Linearities Learning

What can this setup not do, and how do we fix it?

Session 04 Ml Paradigms Learning

When people say "supervised learning," "neural net," "gradient descent," "RL," "tree regression" — they're naming things from three different axes that are mostly independent and freely c...

Session 05 Scaling Learning

You just watched a 22M-param model learn English structure but flunk basic factual recall. The natural question: what changes at 100M, at 1B, at 100B? And: is bigger the only knob?

Session 06 Tokenization Embeddings Learning

Sessions 1–5 covered what a neural net IS and what it learns. But we've been hand-waving over a key question: the model is a function on numbers. Where do the numbers come from when the i...

Session 07 Behavior Learning Learning

A language model's job is: given the text so far, predict the next token. An agent's job is: given the situation, pick an action. Both are "functions on data" — the math we built in Sessi...

Session 08 Training Mechanics Learning

Session 2 covered gradient descent in the abstract: pick parameters, compute loss, take a step. Sessions 3–7 covered what the model IS, what data goes in, what paradigms exist. But the ac...

Session 09 Tensors Learning

Session 2's model was y = mx + b: one input scalar x, two scalar parameters m and b. A transformer does the same kind of arithmetic — multiply, add, repeat — but over vectors and matrices...

Session 10 Attention Learning

By now a sequence is a matrix: (seq_len, d_model), one vector per token (Session 6), and you can trace a matmul's shapes (Session 9). But those token vectors are still isolated — nothing ...

Session 11 Evals Rewards Learning

You can now train and post-train a model (Module 9). The dangerous moment is right after: a number went up and it feels like progress. Most of the skill in this factory is refusing to bel...

Small Model Tool Calling Playbook Learning

SFT tricks, RL, eval, on-device serving — distilled to what's stealable on a Mac.

Speech & systems topics — interview-grade map Learning

Voice-pipeline latency, WER, speech-to-speech, fine-tuning debugging, feature selection, queues vs websockets, FSDP2 — each mapped to the best external source and to where this codebase (or Pace) actually does it.

The WebGPU execution model (for reading our shaders) Learning

The mental model you need to read posttrainllm's WGSL compute kernels and explain them to another engineer — device/queue, pipeline, dispatch, workgroups, invocations, bind groups, the memory hierarchy — then how our matmul + attention shaders map onto it.

Tool Calling Frontier Parity Learning

metric, an honest size curve, and a distillation result that closes most of the gap.

Learning

1 docs

PRDs

65 docs
5.1 Reasoning On 22M PRDs

Train a 22M-class model with reasoning-style supervision (GRPO / DAPO on verifiable rewards; SFT-on-traces as the warm-up), publish the

5.2 Testtime Compute Scaling PRDs

Run the Snell et al. 2024 methodology end-to-end at 22M: vary the test-time compute budget (N samples for Best-of-N, M tokens in CoT, K depth in tree search) and measure the quality-vs-FL...

5.3 Vision Language Toy PRDs

Train a LLaVA-style VL model from scratch on M5 Pro: pre-trained ViT encoder (frozen first cut) + small projector + small-from-scratch posttrainllm decoder + cross-attention or projector....

5.4 Diffusion Lm Micro PRDs

Train a small (22M-class) diffusion language model from scratch on the masked-denoising objective (Austin et al. 2021; DiffusionBERT, Sahoo et al. 2024). Different generation paradigm tha...

5.5 Sparse MoE Kernels PRDs

Build the missing-upstream Metal kernels (sparse top-K routing, scatter_add equivalent, expert-parallel matmul gather) so MoE in posttrainllm can run hard routing — actually skipping inac...

5.6 Tts Toy PRDs

Train a from-scratch autoregressive decoder over discrete audio tokens (EnCodec codebook IDs) conditioned on text, à la VALL-E / MusicGen. Single-speaker (LJSpeech), recognizable-but-not-...

5.7 Explainer Video Model PRDs

Build the smallest useful "explainer video" system: prompt or document → script → storyboard DSL → deterministic SVG/Canvas renderer → MP4 with captions + voiceover. NOT a competitor to S...

A 1 First Specialist Tool Caller PRDs

Ship one trained specialist that beats Pace's current 0-shot floor (qwen3-4b-instruct-2507) on BFCL average by ≥ 3pp on a Mac-runnable artifact (≤ 8 GB on disk). Validates the platform's ...

B 1 Second Specialist Shell Or SQL PRDs

Run the factory recipe shape against SQL to validate that the platform is not accidentally tied to a tool-calling target. Same factory loop, different data and eval.

B 10 Quality Classifier PRDs

Ship posttrainllm quality-classify <corpus.txt> that scores every document on an educational-quality axis, writes the per-doc scores to a sidecar, and filters to a top-X% subset for downs...

B 11 Wsd Schedule PRDs

Add --lr-schedule wsd to posttrainllm train (posttrainllm finetune / sft / distill get it for free since they share the optimizer wrapper) with three flags: --warmup N (steps to peak LR),...

B 12 Loss Spike Recovery PRDs

Add a grad-norm tracker that triggers an automatic `--resume <step-K>

B 13 Interp On Checkpoints PRDs

Replay the shipped interp tools (posttrainllm sae, posttrainllm memit, posttrainllm rome, posttrainllm patch, posttrainllm causal-trace) across the multi-checkpoint history a single postt...

B 14 Speculative Decoding PRDs

Wire --draft-model <path> into posttrainllm serve and posttrainllm sample so a small "draft" model proposes K tokens per step and the target model verifies them in one parallel forward. E...

B 15 Layerwise Lr Decay SFT PRDs

Add --llrd γ to posttrainllm sft (and the DPO family for symmetry). For γ < 1, each transformer block's LR is multiplied by γ^(depth_from_top), so the embedding + lower blocks see exponen...

B 16 M 5 Na Prefill Bench PRDs

Verify, on posttrainllm's actual MLX path, the Apple ML Research, 2026 claim that the M5 Neural Accelerator delivers 3.5–4× faster prefill vs M4 on the same workload. Bump mlx-swift to th...

B 17 Saelens Interop PRDs

Add posttrainllm sae export --format saelens <input.sae> --out <dir> that converts our shipped .sae sidecar format to the SAELens on-disk format (Neuronpedia ingest target). One-way expor...

B 18 Nanochat Depth Knob PRDs

posttrainllm train --depth 12 ... should auto-derive d_model, n_heads, d_mlp, peak_lr, batch_size, and total_steps from compute- optimal scaling laws. UX win — most users don't want to tu...

B 19 Group Sae PRDs

Add posttrainllm sae --group-layers SPEC so a single SAE is trained on the concatenated activations of a contiguous block of layers — e.g. --group-layers "0-3,4-7,8-11,12-15" trains 4 SAE...

B 2 B 7 Router Family PRDs

Bundle the four router items from PLAN.md Tier B into one coordinated PRD because they are sequentially dependent on each other:

B 21 Micro Automixer PRDs

Replace the current "hand-wave a 50/30/20 code/web/math split" pattern with a small AutoMixer-style ratio search. Train ~6–12 short proxy runs across candidate ratios, score them on a fix...

B 23 Agent Eval Protocol PRDs

Replace single-shot agent eval runs with the Poolside-class protocol: each task is run K times under fixed budget constraints, results are averaged with confidence intervals, and the exac...

B 25 Scaledown Specialist PRDs

Train a Mac-runnable specialist that takes (query, long_context) and returns the subset of sentences relevant to the query — i.e. extractive compression. Submit to the public ScaleDown Ch...

B 26 Deferred Tools PRDs

Today, posttrainllm serve --tools <catalog.json> injects every tool's full JSON schema into the system prompt of every request via ServeToolsSpec.systemPrompt() (DynamicGrammar.swift). Fo...

B 28 Composite Reward Framework PRDs

Ship a typed CompositeReward abstraction: a reward is a bag of named scalar dimensions + weights → total. Every dimension is independently logged, plotted, and inspectable. DPO / ES / GRP...

B 31 Gallery And Project Pins PRDs

browser/public/gallery/manifest.json so it lists not just the browser-loadable from-scratch .bin models but also the

B 32 Eval Ci Gate PRDs

Ship posttrainllm eval-gate — a single command that runs a project's declared eval suites against a model + adapter, compares to a stored baseline, and exits non-zero when any suite regre...

B 33 Laptop Finetune Onboarding PRDs

posttrainllm quickstart <data.jsonl> takes a user's task data and walks them to a trained, evaluated, runnable specialist on their Mac with one command and zero prior knowledge — auto-pic...

B 34 Batched Eval Runtime PRDs

Make tinyGPT's eval harness fast and scalable by stealing the two oMLX techniques that fit eval's workload — continuous batching and a

B 35 Local Agent Vertical Poc PRDs

Prove the local-only specialist agent thesis on one concrete vertical: a code reviewer that runs entirely on the user's Mac on a posttrainllm fine-tuned 12B model, with zero cloud depende...

B 5 Cloud Escalate Training PRDs

Train a specialist to emit {"defer_to_cloud": true, "reason": "..."} when it shouldn't answer itself — too uncertain, off-domain, or explicitly destructive — instead of fabricating. Today...

B 6 Mac App Demo PRDs

The product-shaped artifact that the platform's pitch hinges on: a Mac app the user can open, point at their data, pick a base model, train a LoRA, and run inference on the specialist the...

B 8 Multilingual Specialist PRDs

Train a multilingual SFT/LoRA specialist on a Sarvam-Edge or Airavata base (both are Indic-LLM bases optimized for English + 10+ Indian languages) for a Mac-runnable Indic-capable agent. ...

B 9 Energy Per Token PRDs

Measure energy-per-generated-token across the model zoo and across training runs. Surface a j_per_token column on the SLM leaderboard and a per-epoch number on training runs. Answers "wha...

C 10 Train Run Dashboard PRDs

Ship a browser page (/train-viewer.astro) that drag-drops a posttrainllm train run-history directory (or watches it live via OPFS on the same machine) and renders the canonical live-train...

C 3 Dora Ondisk Format PRDs

DoRA already trains in-session under posttrainllm sft (default PEFT variant since 2026-05; PeftVariants.swift). It does NOT yet persist to disk in a reusable format — the adapter lives on...

C 4 Tool Extractor BPE PRDs

posttrainllm train-extractor (the mini-router-trainer that ships the "intent + tool" classifier on top of the residual stream) currently assumes a byte-level tokenizer. Bases the user act...

C 5 Decode Jitter Thermal PRDs

Add scripts/bench_decode_thermal.py that runs the existing decode bench in a sustained loop for N minutes (default 30), captures per-window p99 tok/s + die temperature + power draw via po...

C 9 Determinism Harness PRDs

Add posttrainllm train --replay-step N --replay-from <ckpt> that runs exactly step N of an earlier training run, deterministically. The output is a logged forward + backward trace identic...

Capability retention under fine-tuning (PRD — backlog) PRDs

Measure and preserve a small model's GENERAL intelligence when we specialize it (tool-calling, style, persona). This session proved specialization erodes breadth — a retention eval battery + retention techniques, run on every fine-tune. Future work; captured for later.

Continual Learning Loop PRDs

promote it. The model gets better from real usage — and privacy isn't a compliance checkbox, it's the default.

E 6 Eval Scaledown PRDs

Ship posttrainllm eval-scaledown <model> that runs the official ScaleBench harness against a posttrainllm-loaded model and emits results in the shared E0 EvalCompare.Row schema. B25 speci...

Factory Completeness Tracker PRDs

Tracks the "make the factory complete" thrust spawned 2026-06-07.

Factory Planner V 7 Tools In Prompt PRDs

Owner approved the previously gated v7 work. The first implementation slice landed:

Factory Vision M 4 Architecture Decision PRDs

The VLM elf shipped M1+M2+M3 cleanly. At M3 (and after the leverage-first gate added to the PRD mid-flight), the elf identified that UI-Venus-1.5-2B is the best open-weights student base ...

Factory Vision M 4 Impl Plan PRDs

Context already shipped (M1-M3):

Factory Vision Specialist PRDs

M1-M3 are shipped. The M4 architecture decision is now made in factory-vision-m4-architecture-decision.md: Option A, full Qwen3-VL port with UI-Venus-1.5-2B as base.

Game-as-RL-environment PoC (PRD) PRDs

Turn the fleet's AI game (autonomous characters in a world) into a Mac-local RL environment and train a self-improving NPC with GRPO. Environments are the scarcest RL ingredient — we own a live one. The parked trigger (distillation closed + a working GRPO loop) is now MET.

Gepa Prompt Evolution PRDs

Apply GEPA (Genetic-Pareto Prompt Evolution, ICLR 2026 Oral) to automate the system-prompt + action-description iteration loop. Stop hand-tuning prompts; let evolutionary search find the ...

GPU RESEARCH BACKLOG PRDs

The PRDs below can't be finished-and-verified in a CPU sandbox: they need a GPU (training is the deliverable), special hardware, network installs, or are multi-week from-scratch model bui...

Local-model arena — turn-based strategy, self-play RLVR (PRD) PRDs

Pit Mac-local models against each other and against frontier models in turn-based strategy games, then self-play-RL a local model until it beats a frontier model playing zero-shot. The match win/lose IS a verifiable reward — RLVR with no hand-authored golds or checker.

Macos 26 Int 8 Ane Handoff Port PRDs

Status: IN PROGRESS (2026-06-10) — Phase A SHIPPED, Phase B in flight. Spawned out of the 2026-06-09 research sweep + anemll-vs-M8 decision. Target: 17 tok/s → ~30 tok/s on the existing Q...

Multi-turn / agentic tool-calling eval (PRD) PRDs

A Mac-local, frontier-gated, STATEFUL multi-turn eval — the single biggest blind spot in our tool-calling work. Single-turn numbers (88.7 for our best 4B) overstate agentic ability; small models are known to cliff hard on multi-turn. This is the prerequisite for judging any model as an agent/planner.

Pace Planner V 11 Ship Gate PRDs

v1 through v10 of the Pace planner cycled because we trained → measured → argued whether the version was better. No fixed bar, no fixed eval, no immutable record of pass criteria. The v8 ...

Pace Planner V 11 Training Data PRDs

Produce ~450 training rows that teach a Qwen3-0.6B planner to emit three new intent classes:

Pace Task Loop V 1 PRDs

Status: PRD (2026-06-10). Triggered by a real user moment: bulk-downloading files via the Claude browser extension was painfully slow. The standing rule (memory pace-does-it-not-claude): ...

PRIORITY PRDs

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

QLoRA Large Model Finetune PRDs

Status: PRD (2026-06-10). Phase-3 centerpiece of the roadmap (specialist close-out → VLM/Pace → this). Implements the 2026-06-10 strategic shift: focus moves from training small models to...

Quantized Inference Swift PRDs

Status: PRD (2026-06-09). Phase 1 SHIPPED 2026-06-10 (serve --quantize); native packed load (the design below) still open.

README PRDs

Active work starts in ../NEXT.md, not here.

Self-improving agents — the closed loop (PRD) PRDs

Close the act -> score -> learn -> curriculum loop so a Mac-local agent improves itself with NO teacher, using a verifiable reward. The smallest proof: a teacher-free ReST loop on the file-ops env that raises pass-rate round over round. The compounding engine: an automatic curriculum that keeps proposing tasks at the edge of the agent's ability.

Specialist Pace Planner PRDs

Owner approval for heavy work was granted. LM Studio is reachable at http://127.0.0.1:1234/v1/models and includes qwen/qwen3-30b-a3b.

STATUS PRDs

Historical, code-cross-checked status of every active PRD in docs/prds/. Each verdict was verified against native-mac/Sources/, scripts/, evals/, and browser/src/ — not the PRD's own stat...

Tinygpt Product Thesis PRDs

Status: positioning doc (2026-06-10). Written as the specialist track closes (v11 = final 0.6B planner run, verdict pending) and focus shifts to fine-tuning/distilling larger open models....

Vlm Ab Uivenus Vs Qwen 3vl PRDs

Status: PRD (2026-06-09). The 2026-06-09 research sweep flagged Qwen3-VL-2B as a competitor to our UI-Venus-1.5-2B port target. This A/B decides which one we actually port to MLX-Swift / ...

Recipes

15 docs
Automix Recipes

Stop hand-waving "50/30/20 code/web/math". posttrainllm automix searches the ratio: sample candidate mixes, score each with a short proxy train run, fit a quadratic surrogate, and propose...

B 25 Scaledown Recipes

and outputs an extractive compressed document — a subset of the original sentences that preserves the answer-relevant span — and submit to the ScaleDown.ai challenge.

Balanced training mix via reasoning-depth classification Recipes

Use B30 ahead of B29 to control single-hop / multi-hop / comparison ratios in the SFT corpus.

Cookbook Character Specialist Recipes

What this is not: a magic 70B replacement. The goal is a small specialist that stays in character on a narrow world better and faster than the base model.

Cookbook Personal Code Specialist Recipes

What this is not: an editor plugin. Continue.dev and Aider already know how to call OpenAI-compatible local servers; posttrainllm only has to serve the model.

Cookbook Pydantic Ai Recipes

What this is not: automatic correctness. Pydantic validates shape; your eval still has to measure whether the values are right.

Cookbook Smolagents Recipes

What this is not: a claim that a tiny model beats a frontier model on broad agent tasks. This is for narrow specialists: function calls, schemas, repo idioms, and other repeated local pat...

Distill Specialist Recipes

Compress a big model's capability on your task into a small, cheap, local model on the Mac. This is the validated cost-compression lane — the lever that

Distillation Fc Recipes

(3.8B) on function-call accuracy while running 15-30× faster and using 150× less memory on the same Mac.

Eval gate (CI / pre-commit) Recipes

Gate a posttrainllm specialist in CI — `posttrainllm eval-gate` exits non-zero when any declared eval suite regresses past threshold, on a self-hosted Mac runner so the model never leaves the device.

Eval Planner Recipes

Use this when a Pace planner candidate needs an unhappy-path score that is publishable or comparable across runs. Model selection itself is locked in docs/planner-lock-2026-06-19.md; this...

From .atraj rollouts to a trained specialist Recipes

B22 + B29 + B30 + posttrainllm sft chained — the closed substrate→training loop, V1.

Mlx Export Recipes

Use posttrainllm export-mlx when a posttrainllm-trained artifact needs to leave the posttrainllm binary and be loaded from Python MLX, MLX-Swift, or another Mac-local tool.

Pace Planner Recipes

The factory's first product-validating arc. Distill Pace's qwen3-30b-a3b planner into a small student. See docs/prds/specialist-pace-planner.md for full spec.

README Recipes

Copy-paste workflows for using posttrainllm specialists outside the core CLI.

Research

8 docs

Roadmap

13 docs

Training

4 docs

Artifacts

1 docs

Parked

6 docs

Archive

10 docs
Annotated Transcript Archive

The conversation, condensed. Long replies have been squeezed to their actionable conclusion; emoji-free; some early phases reconstructed from compressed records. What follows is a chat-st...

Evaluation Archive

Phase 9 — and ongoing. Know what the model is actually doing.

Learning Roadmap Archive

The path to learning the whole stack without drowning in complexity. This is the curriculum; model_guide.md, lora_guide.md, and browser_notes.md are the implementation detail.

Lessons Archive

What didn't work, what surprised me, and what I'd carry forward. The kernel optimisations are documented in docs/performance.md and the milestones in docs/archive/status.md. This is the m...

Parked Multi Model Archive

User decision (this session): hold these four options and focus on the HF-compat capabilities (SwiGLU + RoPE + GQA + BPE tokenizer) first. Once those land, the Mac app can load any modern...

Phase 9 10 Status Archive

This doc closes out the remaining Phase 9 (quantization) and Phase 10 (architecture menu) items. For each: what's shipped today, and for the items not yet shipped, what's needed to land t...

Recent Research Archive

The 2024-2026-era body of work that informed Tier 1-3. Each entry is just enough context to know whether to dig in.

Shared Vs Native Archive

posttrainllm will ship as two binaries: a browser playground (Chromium + M-series targeted) and a native macOS app (M-series only). They are separate implementations of the same model, op...

Status Archive

A review-oriented snapshot of where posttrainllm stands. The detailed docs are linked at the bottom; this page is the map.

Watch The Model Think Archive

The posttrainllm playground has a small interpretability lever bolted onto the Sample card: click any byte the model just generated and see the two things the model "actually knew" at tha...

Sessions

9 docs
2026 06 05 Eval First Sessions

be training the model and working on site projects. Before firing the long training run (N02), close every gap that would block scoring the resulting model — schema, harness, baseline com...

2026 06 06 Mac Specialist Platform Sessions

benchmarks." The real thesis is: a Mac app where individuals build a specialist for their specific task — bring data, pick a teacher, ship a fast/cheap/comparable-quality model. Distillat...

2026 06 06 Specialist Embedder Blocker Sessions

PRD: docs/prds/specialist-embedder.md

2026 06 06 Vllm Mlx Investigation Sessions

Recommendation: partial-proceed. Do not wrap vllm-mlx into posttrainllm serve yet. Keep native serve as the default and as the eval/logprob backend. Treat vllm-mlx as a production-chat ca...

2026 06 08 Factory Validation Night Sessions

real FC specialist. Find every gap.

2026 06 13 Market Landscape Mac First Sessions

(fine-tune SaaS) and "is my agent any good" (eval/observability). Where does a Mac-first SLM toolkit fit, and what is genuinely unowned? Triggered by the castform.com scan; researched the...

2026 06 16 Distill To Self Improvement Sessions

Date: 2026-06-16. The arc, the decisions, and the transferable lessons. Numbers and mechanics live in tool-calling-frontier-parity.md §8.1–8.5; this is the meta-narrative.

2026 06 17 Stepback Inventory Roi Sessions

Date: 2026-06-17. A deliberate pause to inventory the assets, name the wall, and rank what's next by ROI — before committing to another build. Narrative of the arc lives in the 2026-06-16...

2026 06 17 Vercel Eve And Local Agents Sessions

Date: 2026-06-17 (afternoon). Companion to the morning's step-back. Captures the strategic decision triggered by Vercel's Eve launch (blog, public preview June 2026).

Specialists

3 docs