What's New — Distill + agent depth
Validated live on Windows + RTX 3050 (tiny-gpt2 + SmolLM2-135M).
- MiniLLM true on-policy rollout (#257).
soup train --minillm-enabled --minillm-on-policyreplaces the offline distribution blend with the real on-policy procedure of Gu et al. 2024 §3.1: each step samples a fresh autoregressive rollout from the per-token mixtureratio·teacher + (1-ratio)·student, then accumulates length-normalised reverse-KLKL(student || teacher)on the full distributions (differentiable w.r.t. the student only). Tune the rollout withtraining.minillm_rollout_length(automin(max_length, 32)). - Cross-tokenizer ULD for fully-disjoint tokenizers (#258).
training.uld_strategy: wasserstein_alignedaligns the student and teacher token sequences over their decoded character spans (offset-overlap when both decode to the same text, difflib Ratcliff-Obershelp char matching otherwise), so you can distill across genuinely different tokenizers — e.g. a GPT-2 BPE student from a Llama SentencePiece teacher. soup agent eval --sandbox(#110). Each heuristic-passing tool-call prediction is executed against a generated mock of the endpoint in the v0.25.0 RLVRcode_execsandbox and classified into ok / tool_error / timeout / arg_error. The endpoint path + required params + predicted arguments are base64-embedded as data (no code interpolation). Strong isolation (RLIMIT / namespaces / sandbox-exec) is POSIX-only; on Windows the subprocess + 5 s timeout + 10 KB output cap + network guard still apply.soup train --cloud modal(#16). No local GPU? Render a self-contained Modal.com app from yoursoup.yamlfor serverless GPU training. The config YAML is base64-embedded as data (no interpolation, no secrets).--gpuaccepts t4 / l4 / a10g / a100 / a100-80gb / l40s / h100. Default is plan-only (write the stub + print themodal runcommand);--cloud-submitsubmits live gated on a Modal token.
Install / Upgrade
pip install --upgrade soup-cli
# Modal cloud training (only for live submit):
pip install 'soup-cli[modal]'Security
- No code/secret interpolation in generated stubs. Both the agent-sandbox stub and the Modal app stub embed all user-derived data (tool path / args, the
soup.yaml) as base64 JSON decoded as data — neverevaled.soup_versionis validated against a PEP 440-ish allowlist andrepr()-embedded as defence-in-depth. - Sandbox isolation.
soup agent eval --sandboxreuses the v0.25.0 RLVRcode_execisolation (RLIMIT / namespaces / sandbox-exec on POSIX) + a network guard; argv-list subprocess (no shell), 5 s timeout, 10 KB output cap on every platform. - Path containment.
--config(Modal) is cwd-contained + symlink-rejected; the stub is written atomically under cwd. - The Modal stub never embeds API keys — Modal auth is via
modal setup/MODAL_TOKEN_ID+MODAL_TOKEN_SECRET.
Known Limitations
- On-policy rollout is O(L²) — re-forwards the full growing prefix each step (no KV cache); the live distill path clamps the rollout to
min(max_length, 32). A KV-cache variant is a perf follow-up. - ULD
wasserstein_alignedis a difflib heuristic, not an exact alignment — a student token may be mean-pooled against several teacher tokens. Adequate for distillation. - Modal live submit is not end-to-end validated (no Modal account); the plan-only render + the mockable submit seam are validated, and the token-gate / friendly-error paths are unit-tested.
- Modal is the only cloud backend so far (runpod / lambda extensible later).
- Agent-sandbox strong isolation is POSIX-only; Windows runs with reduced isolation (a friendly advisory is printed).
13656 → 13770 tests. Full changelog: CHANGELOG.md.