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.

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.

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.75.2, 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. From the CLI the llm_text and judge nodes are offline stubs: the command passes no provider, so llm_text writes llm_text(offline): <rendered prompt> into each row and judge passes every row with true. The provider path (ollama, anthropic, vllm) exists only on the Python function run_recipe, which also takes resume=True; the CLI has no resume option. 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; an offline stub from the CLI, as above
  • code — RLVR-sandbox code execution (config.code)
  • judge — keeps the rows an LLM judge answers OK to; from the CLI 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 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.

Tool endpoints live

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

Trainer plugins lazy-imported live

6 trainer plugins ship with v0.53.7 lazy-import wiring:

  • 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.