Skip to content

v0.53.6 / v0.53.7 — Plugins live, Anthropic API, tool endpoints

v0.53.6 — SoupPluginCallback live

The v0.45.0 BasePlugin protocol is now wired into every HF Trainer via SoupPluginCallback. One bad plugin can't crash training — exceptions in plugin hooks are caught and logged, the trainer keeps going.

A plugin takes effect when your own Python entry point calls register_plugin(...) and then runs the trainer in the same process, as the Plugin System page shows. soup plugins list, enable and disable run in a process of their own and see nothing that a stock soup command registered, and nothing is auto-discovered at startup, so soup train on its own never fans Trainer events into a plugin you installed.

(Since closed in v0.76.0: Soup now discovers installed distributions that publish the soup_cli.plugins entry-point group, when you run soup plugins and again when a training run builds the plugin callback. A third-party entry point stays disabled, with none of its code imported, until you run soup plugins enable <name>, which saves the opt-in in ~/.soup/plugins.json and imports it. soup plugins install now exits 2 and installs nothing. See Discovery and opt-in.)

Anthropic-compatible /v1/messages endpoint

bash
soup serve --model ./output --backend transformers
# POST http://localhost:8000/v1/messages — Anthropic Messages shape

v0.53.6 ships the transformers backend; v0.53.7 adds vLLM parity plus Anthropic-shape SSE streaming.

(Since v0.77.2: on the transformers backend and the MoLE runtime a reply cut at max_tokens without an end token reports stop_reason: "max_tokens", in the JSON reply and in the streamed message_delta, and end_turn otherwise (#2380); through v0.77.1 these two always reported end_turn. temperature (0 to 2) and top_p (0 to 1) in the request are applied, with the server defaults 0.7 and 0.9 when omitted, and a value out of range, null, a boolean or a string is a 400 Invalid request (#2388). The vLLM backend converts the request with the same function. See Inference Server.)

N-gram speculative decoding

prompt_lookup_num_tokens is plumbed through _generate_response, so n-gram (prompt-lookup) decoding can stand in as a draft where a draft model is overkill. It is a Python-level hook: no soup serve flag or soup.yaml key builds the n-gram config at v0.77.0 (nothing outside utils/ngram_spec.py constructs one), so the server cannot turn it on (see Plugin System).

v0.53.7 — Data Recipe DAG live runner

bash
soup data recipe --execute --output ./out recipe.yaml

Runs the validated DAG node by node, in topological order. Through v0.75.2, from the CLI the llm_text and judge nodes were offline stubs: the command passed no provider, so llm_text wrote llm_text(offline): <rendered prompt> into each row and judge passed every row with true, silently. The provider path (ollama, anthropic, vllm) existed only on the Python function run_recipe, which also takes resume=True; the CLI has no resume option.

(Since closed in v0.76.0, #817 and #922: soup data recipe --execute takes --provider ollama|anthropic|vllm with optional --model and --base-url, or the explicit opt-in --offline for the placeholder behaviour. A recipe with an llm_text or judge node and neither flag exits 2 and writes nothing. The full rules are under Data Recipe DAG.) The six node kinds:

  • seed — load a starting JSONL (config.path, under the working directory, not a symlink)
  • llm_text — config.prompt, formatted per row; placeholder text under --offline, as above
  • code — RLVR-sandbox code execution (config.code)
  • judge — keeps the rows an LLM judge answers OK to; with --offline it keeps every row
  • validator — keeps rows that match config.regex (tested against config.field, default text) and/or validate against a JSON Schema in config.schema (applied to the whole row; needs the jsonschema package). At least one of the two is required; there is no pydantic mode
  • sampler — writes every row it receives to <output>/<node-name>.jsonl; it does not subsample

A recipe is a YAML file of nodes and edges. This one runs end to end offline with soup data recipe --execute --offline --output ./out recipe.yaml (without --offline or --provider it exits 2, because it has an llm_text and a judge node) and writes ./out/out.jsonl:

yaml
nodes:
  - {name: seed1, kind: seed, config: {path: prompts.jsonl}}
  - {name: llm1, kind: llm_text, config: {prompt: "Answer: {prompt}"}}
  - {name: judge1, kind: judge}
  - {name: out, kind: sampler}
edges:
  - [seed1, llm1]
  - [llm1, judge1]
  - [judge1, out]

Node names match [a-z0-9][a-z0-9_-]*. At most 256 nodes, 1,024 edges and a 1 MiB file; cycles, self-loops, duplicate edges and unknown node kinds are rejected, and the recipe file must not be a symlink. After each node a checkpoint and a per-node sidecar (.checkpoint.json, .node-<name>.jsonl) are written into the output directory.

Since v0.77.2 (#2226, #2274) --execute refuses, with exit 1 and after it has validated the recipe but before it opens a seed file or writes anything, a recipe or seed file that is one of the paths the runner would write (the checkpoint, the sampler output and the node sidecars), naming both paths and leaving the input unchanged (an --output that is the recipe file itself is refused even earlier, before the recipe is read). For example, a recipe whose seed reads out/out.jsonl and whose --output is ./out answers --output './out\out.jsonl' is the same file as seed seed1.path 'out/out.jsonl'; choose a different --output (the separator shown is the platform's). Through v0.77.1 the runner did not check.

Tool endpoints live

text
POST /v1/tools/python      # RLVR sandbox + 5s timeout + 512MB RLIMIT; since v0.77.0 501 where OS-level isolation is unavailable
POST /v1/tools/web_search  # bearer-auth; 403 at v0.77.0, see below
POST /v1/tools/bash        # runs under OS-level isolation since v0.74.0; 501 where that isolation is unavailable (Windows included)

(Since v0.77.0 both code routes need --tool-auth-token on every bind, loopback included, and answer 401 without it, and /v1/tools/python answers 501 wherever /v1/tools/bash does (#2166, #2174). The isolation cuts the network; the code still runs as the server's user. See Inference Server.)

(At v0.77.0 a request to /v1/tools/web_search on the transformers backend that passes the auth (401) and payload (400) checks answers 403 web_search disabled (empty domain allowlist): no flag or config key sets the allowlist, and the search backend returns nothing unless Python code replaces it. The vLLM, SGLang and DeepSpeed-MII backends have no tool routes. See Inference Server.)

Trainer plugins lazy-imported live

6 trainer plugins ship with v0.53.7 lazy-import wiring. (At v0.77.0 nothing calls them: there is no soup.yaml key for them and no command reaches instantiate_trainer_plugins, so the six names are a library allowlist, not something a run can turn on.)

  • grokfast — gradient grokking filter
  • spectrum — top-k parameter selection
  • llmcompressor — compressed inference export
  • sonicmoe — MoE routing acceleration
  • cce_plugin — Cut Cross-Entropy as a plugin
  • math_verify — math RLVR plugin

Markdown + data forge polish

  • soup data ingest now does heading-aware Markdown splits (one JSONL row per section)
  • soup data decontaminate --benchmark-file <path> accepts operator-supplied corpora
  • soup data forge --judge-provider {ollama,anthropic,vllm} live
  • soup data preprocess AOT-tokenizes → Arrow shards (live)

Tests

  • v0.53.6: 7,998 → 8,051 (+53)
  • v0.53.7: 8,051 → 8,162 (+111)

See also

Soup is free and Apache-2.0. If it saved you a training run, starring the repo costs nothing and helps most. You can also fund the GPU time behind the work a 4 GB laptop cannot reach.