Anti-trend Insurance (v0.68.0)
Five-bet hedge against paradigm shifts. If prompt engineering keeps winning, soup compile keeps you covered. If prompt costs wall out, soup distill-prompt migrates the system prompt into weights. soup compile-tools does the same trick for tool descriptions. soup apple-adapter targets Apple FoundationModels on iOS 26+. And soup local-rl builds a personal-LLM feedback flywheel from thumbs-up/down on your own machine.
soup compile — DSPy + GEPA + TextGrad prompt-program compiler
soup compile ./program.py --eval ./suite.yaml \
--optimizer mipro --max-iters 500 --output ./compiled.jsonClosed optimiser allowlist of 5: mipro, gepa, textgrad, copro, bootstrap_fewshot. Hard bound MAX_COMPILE_ITERS=1000.
validate_program_pathrequires.py, cwd containment,os.lstat + S_ISLNKrejection via sharedpaths.enforce_under_cwd_and_no_symlinkCompileResultenforces finite-score (no NaN / ±Inf), iterations ≥ 0- Module is
commands/compile_cmd.pybecausecompileis a Python builtin - Live as of v0.71.13 (behind the
[compile]extra) —run_compiledispatches DSPy / GEPA / TextGrad;soup compile-toolsoptimises tool schemas too;--plan-onlystill renders the plan and exits 0
soup distill-prompt — long prompts → small fine-tunes
soup distill-prompt --traces ./traces.jsonl \
--teacher meta-llama/Llama-3-70B --student mistralai/Mistral-7B-v0.3 \
--strategy sft --output ./dataset.jsonlClosed strategy set {sft, preference, kl}. Teacher / student IDs capped at 512 chars; null-byte + empty rejected. Composes with v0.71 cross-tokenizer ULD. Live as of v0.71.13 (behind the [compile] extra) — prepare_distill_dataset calls the teacher once per trace via the v0.20 providers and emits sft/kl messages or preference chosen/rejected pairs.
soup compile-tools — textual gradients over tool descriptions
soup compile-tools ./spec.json --eval ./eval.jsonl --optimizer textgradSpec extension allowlist {.json, .yaml, .yml} (case-insensitive on Windows). TextGrad / GEPA optimise tool descriptions so model picks them more accurately. Composes with v0.46 Agent Forge — Agent Forge parses the spec, ToolCompile optimises descriptions.
soup apple-adapter — HF ↔ MLX ↔ Apple FoundationModels
soup apple-adapter ./adapter \
--direction hf-to-apple --output ./apple-bundle --signClosed direction allowlist of 4: hf-to-mlx, mlx-to-hf, hf-to-apple, mlx-to-apple. Explicit S_ISDIR + symlink rejection on source. sign must be real bool (bool-as-int defence). Reuses v0.60 Part B signing infrastructure and extends the v0.25 MLX backend. Live as of v0.71.21 — convert_apple_adapter does the PEFT ↔ mlx-lm round trip for hf-to-mlx / mlx-to-hf (real bf16 adapter smoke); the *-to-apple directions stay upstream-gated (exit 3) until Apple's on-device adapter spec settles.
soup local-rl — personal-LLM feedback flywheel (LIVE)
soup local-rl init --db ~/.soup/local.db
soup local-rl record --db ~/.soup/local.db \
--prompt "summarise my last commit" --response "..." --thumb up
soup local-rl status --db ~/.soup/local.db
soup local-rl harvest --db ~/.soup/local.db --output ./pairs.jsonl
soup train --task dpo --data ./pairs.jsonl --base-model llama3:8b- POSIX
0o600SQLite,interactions+thumbstables (idempotentCREATE TABLE IF NOT EXISTS) - Parameterised inserts, 16 KiB prompt + 16 KiB response caps, null-byte rejection
harvestwalks thumbs byts ASC, emits oneDpoPair{prompt, chosen, rejected}per prompt with both an up and down (last-writes-win dedup), atomic JSONL write viatempfile.mkstemp + os.replacesoup local-rl trainis live as of v0.71.13 —--onceharvests the latest thumbs DPO pairs and runs a real nightly DPO/KTO/ORPO train via asoup trainsubprocess (astatetable skips re-runs with no new feedback or fewer than--min-pairs); without--onceit renders an injection-safe systemd.service/.timer+ launchd.plistscheduler scaffold
Numbers
+204 tests in v0.68.0 (11,021 → 11,225) across 6 new test files. 2 POSIX-only symlink tests skip on Windows.
See also
- Data engineering pro (v0.69) —
soup build+soup expectbuild on the same TOCTOU helper consolidated here. - Loop hardening (v0.70) — cross-tokenizer ULD pairs with
soup distill-prompt. - MLX backend — what
soup apple-adapterextends.