github MakazhanAlpamys/Soup v0.71.10
v0.71.10 — RAG family

latest releases: v0.77.1, v0.77.0, v0.76.1...
4 months ago

What's New — RAG family goes live

v0.71.10 lifts four v0.62.0 schema-only stubs to fully live implementations, completing Soup's retrieval-augmented + activation-steering stack.

  • RAFT span-mask trainer (#199) — data.format='raft' now trains with an answer-only loss mask over golden + distractor documents, deterministic [doc-N] citation ids, and a per-token loss-weight boost on cited spans. build_raft_prompt shuffles distractors reproducibly by (raft_shuffle_seed, row_index). Recipe: raft-llama3-8b.
  • Two-stage RA-DIT orchestrator (#200) — soup ra-dit --retriever-config r.yaml --generator-config g.yaml trains the retriever, auto-links it into the generator config, and runs stage 2 in one shot. Generator-stage configs also auto-link the latest registered RA-DIT retriever during soup train.
  • Live activation steering (#201) — soup steer train --method caa|iti|repe now fits real CAA / ITI / RepE direction vectors from contrastive pairs and attaches them to the Registry. soup serve --steer <name> --steer-strength <s> installs a live decode-time forward hook (residual for CAA/RepE, attn o_proj-input for ITI).
  • Citation-faithful eval + diagnose (#202) — new soup eval citation <data> [--style bracket|inline|footnote] scores citation precision/recall/F1; soup diagnose gains a 7th failure mode (citation) that checks whether the golden [doc-N] is actually cited.

Install / Upgrade

pip install --upgrade soup-cli        # 0.71.10
pip install 'soup-cli[train]'         # + torch/transformers/peft/trl for live training

Security

No new CVEs. All new file I/O (RAFT contrastive pairs, RA-DIT YAML configs, steering vectors, citation eval data) is cwd-contained with O_NOFOLLOW + os.fstat symlink/TOCTOU rejection, size caps, and the shared enforce_under_cwd_and_no_symlink helper. Steering vector names reject path separators and shell metacharacters; --steer/--base inputs are length-capped, null-byte-rejected, and Rich-markup-escaped before any error panel.

Known Limitations

  • RAFT distractor shuffle is deterministic, not per-epoch — order is fixed for a row across epochs; vary data.raft_shuffle_seed between runs for different permutations.
  • RA-DIT records the paired retriever, it does not fuse weights — stage-2 generator training is RAFT-style robustness training; the linked retriever is used at deploy/serve time per the Meta RA-DIT recipe.
  • soup eval citation on RAFT rows needs the train-time --shuffle-seed — the golden [doc-N] id depends on the shuffle permutation.
  • citation_faithful is gated to task in {sft, pretrain} — DPO/GRPO/etc. rejected at config load.
  • soup steer apply is preview-only — the live decode hook lives in soup serve --steer; standalone apply renders the resolved plan.
  • soup serve --steer requires --backend transformers.

Full changelog: https://github.com/MakazhanAlpamys/Soup/blob/main/CHANGELOG.md

Don't miss a new Soup release

NewReleases is sending notifications on new releases.