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
run_compileorchestrator ships in v0.68.1
`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.70 cross-tokenizer ULD when both are live. prepare_distill_dataset (tokenizer bridge + dataset prep) ships in v0.68.1.
`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 convert_apple_adapter ships in v0.68.1 (Apple's adapter spec is still moving).
`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 train --backend ollama|mlx --model <id> [--train-method dpo|kto|orpo](systemd / launchd cron glue) ships in v0.68.1
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)](/docs/data-engineering-pro) —
soup build+soup expectbuild on the same TOCTOU helper consolidated here. - [Loop hardening (v0.70)](/docs/loop-hardening) — cross-tokenizer ULD pairs with
soup distill-prompt. - [MLX backend](/docs/mlx-backend) — what
soup apple-adapterextends.