github MakazhanAlpamys/Soup v0.71.18
v0.71.18 — Distill + agent depth

latest releases: v0.76.1, v0.76.0, v0.75.2...
4 months ago

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-policy replaces 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 mixture ratio·teacher + (1-ratio)·student, then accumulates length-normalised reverse-KL KL(student || teacher) on the full distributions (differentiable w.r.t. the student only). Tune the rollout with training.minillm_rollout_length (auto min(max_length, 32)).
  • Cross-tokenizer ULD for fully-disjoint tokenizers (#258). training.uld_strategy: wasserstein_aligned aligns 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 RLVR code_exec sandbox 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 your soup.yaml for serverless GPU training. The config YAML is base64-embedded as data (no interpolation, no secrets). --gpu accepts t4 / l4 / a10g / a100 / a100-80gb / l40s / h100. Default is plan-only (write the stub + print the modal run command); --cloud-submit submits 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 — never evaled. soup_version is validated against a PEP 440-ish allowlist and repr()-embedded as defence-in-depth.
  • Sandbox isolation. soup agent eval --sandbox reuses the v0.25.0 RLVR code_exec isolation (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_aligned is 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.

Don't miss a new Soup release

NewReleases is sending notifications on new releases.