/orchestra:local-distillation-labfrom orchestra
Trains a local student model on a Mac and compares post-training methods (SFT, distillation, pedagogical) to measure which actually improves a captured workload.
Ships in orchestra. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Train a local student model and measure which post-training method actually moves a captured workload — without spending on hosted training. The student samples/learns on your Mac; the only optional spend is a frontier teacher you can almost always avoid.
This is the missing weight-update rung: optimize-workload (GEPA) explicitly does not
train; prepare-verifier-handoff jumps to hosted RL. This skill is what sits between them.
If the workload only needs prompt/route changes, use
../optimize-workload/SKILL.md. If it genuinely needs hosted
multi-step RL, use ../prepare-verifier-handoff/SKILL.md.
limited_zapier
hands the model the gold tools). Report the realistic-setting number alongside.Dense-biased post-training methods differ by where the bias points and how concentrated it is (the concentration axis is what causes collapse):
| Arm | What | Bias | Note |
|---|---|---|---|
| B | baseline, no train | — | the floor |
| S | rejection-sampling SFT (STaR) | toward student's own passes | shifts curve up, same ceiling |
| O | off-policy distillation | toward a same-family teacher's completions | recipe-matched = cheap signal |
| P | pedagogical / OPSD-style | toward teacher, surprisal-gated | down-weights unlearnable tokens |
Arm P has a full playbook — finding trajectories that are both correct and
learnable from privileged context (answer keys, execution feedback, verifier
traces, oracle labels), the headroom proof, the useful-quadrant cut, and the
rung menu — in references/pedagogical-arm.md.
Not covered yet (add when needed): true on-policy distillation — student samples its own rollout, teacher grades each token by reverse-KL. Its higher practical ceiling comes from on-policy state coverage (no exposure-bias gap). Arms O/P here train on teacher completions (off-policy data) and are honest SFT-family methods.
capture-evidence). Expand the dataset — a frozen 18/6 overfits instantly; use a real
train/dev plus a held-out domain for OOD transfer.param_delta = Σ|after−before| over trainable params is nonzero.best. Save adapters.d_t).mlx_lm (even 0.31.3, which ships gemma4_text.py): the mlx-vlm
conversions carry a language_model. multimodal prefix and the text-int4 fails on k_norm
(QK-norm). Train Gemma-4 via mlx-vlm 0.6.2: mlx_vlm.load(path) -> (model, processor),
text forward = model.language_model(ids) -> logits, inject LoRA into model.language_model
with mlx_lm.tuner.utils.linear_to_lora_layers, generate via mlx_vlm.generate(...). Gemma-3
loads natively in mlx_lm (use for fast kernel smokes only).apply_chat_template returns a BatchEncoding, not flat ints — coerce.R + λ·G_spike is an anti-stall scaffold for binary R; on a
partial-credit env prefer the product partial_credit · G_spike (keeps the
correct-AND-learnable conjunction).caffeinate -i + JSON checkpoints +
highest-information-arm-first within the approved overnight envelope.examples/)forced_likelihood.py — kernel #1: per-token student logp + surprise gap d_t = logπ(a_max) − logπ(τ_t) over a forced completion. Validate full-pass == incremental (~0 err).
d_t is the same-family/concentration meter and the input to G_spike.kernel2_mlxvlm.py — kernel #2: weighted LoRA-SFT on real Gemma-4 via mlx-vlm. w=1 → plain
SFT; w=σ(κ(logp−γ)) → surprisal gate. Proves the weight update.bench8h.py — the B/S/O/P arm orchestrator with budget, checkpoints, and learning curves.End with: trainable student + loader confirmed (weight update proven); teacher choice; arm × eval
table (dev + OOD + d_t) with learning curves; the distill/pedagogical/climb verdict; saved
adapter paths; result type (training / heldout / blocked); one recommended next action.
references/pedagogical-arm.md — arm P in depth: privileged-context pedagogy, correctness-vs-learnability scoring, rung menu.../optimize-workload/SKILL.md — the prompt rung before this.../prepare-verifier-handoff/SKILL.md — hosted RL after.../understudy/SKILL.md — the local specialization sequencing (model ladder) in its routing section.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub understudylabs/orchestra-agent-tools --plugin orchestra43 skills in this plugin
/audit-verifier-reliabilityUse when deciding whether a verifier reward is trustworthy for optimization./calibrate-difficultyMeasure per-band model headroom from a local, source-bound run artifact before investing in training./capture-evidenceUse when a developer wants to build an eval from their real LLM app before changing anything — "measure how my app is doing today", "build an eval from my workload", "we have no baseline", "is my current model actually good". Turns the workload into auditable local artifacts (harness, metric, frozen splits, baseline); has a public-benchmark on-ramp when no traces exist./check-routing-healthUse when a developer asks "is Orchestra causing my errors", "which workloads are routed", "is my routing config actually taking effect", "is my provider healthy", "are there 500s on staging", "what's our error rate", "where is my gateway spend going", or wants self-service diagnostics without asking the team. Reads the hosted reporting endpoints with the developer's sk_* key./compare-model-sweepUse when a developer wants to compare candidate models — any mix of local, gateway, or frontier — on the same eval and see quality, latency, cost, and reliability side by side. "Which model should I use", "sweep these models on my benchmark", "compare Gemma vs the frontier on my eval". To stand up and serve a local candidate first, use run-local-model-lab./compare-trajectoriesUse when you need to know HOW two model runs differ behaviorally on the same tasks, not just THAT one scores higher — per-task trajectory diffing that classifies the gap as persistence/recovery, knowledge, or format/parsing. "why does the bigger model pass these", "is this gap RL-shaped", "diff these two trajectory runs", "where do the trajectories diverge", "what would distillation buy me". The behavioral complement to compare-model-sweep.Other plugins' skills for the same job