Skip to content

[FEA] AI-Search-Plugin: drop-in components for search-agent RL post-training on slime and verl - #539

Merged
shijieliu merged 3 commits into
NVIDIA:mainfrom
cb521:fea-ai-search-plugin
Nov 10, 2026
Merged

shijieliu merged 3 commits into
NVIDIA:mainfrom
cb521:fea-ai-search-plugin

Conversation

@cb521

@cb521 cb521 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds examples/AI-Search-Plugin, an installable package of opt-in components that speed up RL post-training of search agents (AI search / deep research) on existing RL frameworks (slime, verl), plus documentation of where the time goes.

What's in it

  • src/ai_search_plugin/: component registry and slime / verl entry points. 22 components ported, 5 registered as stubs (documented in docs/PORTING.md). Every component is opt-in; ai-search-plugin list shows switches, defaults and status. No hard runtime dependencies (torch / slime / verl / SGLang / Megatron are imported lazily).
  • README.md / README.zh-CN.md: what AI-search post-training is, the multi-turn tool-use family and hard scenarios, components grouped by the problem they solve, results.
  • EXPERIMENTS.md / EXPERIMENTS.zh-CN.md: method, configs, per-pair speed results, health checks, per-stage time breakdown, per-workload component ablations.
  • docs/COMPONENTS.md, docs/PORTING.md, examples/{slime,verl}/ launch templates, tests/.

Results (same training, against each framework's fastest config we found that keeps samples at most 2 steps stale; same node, both orders, health-checked on both sides, independently reviewed):

Workload Baseline Speed-up [95% CI] Time saved
Search-R1 (Qwen2.5-7B, 1× B300) slime 1.170× [1.164, 1.177] ~15%
Search-R1 (Qwen2.5-7B, 1× B300) verl 1.002× [0.984, 1.021] tie
ASearcher (Qwen2.5-7B, 1× B300) verl 1.167× [1.131, 1.208] ~14%
Libra (Qwen3-14B, 1× B200) slime 1.219× [1.133, 1.310] ~18%
Qwen3-Next 80B-A3B (4× B300) verl 1.560× [1.389, 1.719] ~36%

Caveats are listed in the README and EXPERIMENTS (e.g. the Qwen3-Next row covers one simulated-search scenario).

Limitations

  • The numbers were measured with the original implementation this package was ported from; the packaged version has not been run end to end on GPU.
  • Only CPU tests run in this PR (243 passed, 2 skipped without a slime checkout). GPU tests (tests/gpu/) and the Ray integration test (tests/integration/) are included but were not run.
  • Requires pip >= 23 to install (pip 22 builds an empty package).

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes. (CPU tests only; GPU / integration tests included but not run)
  • The documentation is up to date with these changes.

🤖 Generated with Claude Code

Drop-in components that speed up RL post-training of search agents on slime and verl.

- README (en, zh): what AI-search post-training is, the multi-turn tool-use family and
  hard scenarios, components grouped by the problem they solve, speed-ups and where time goes
- EXPERIMENTS (en, zh): method, configs, per-pair speed results, health checks, time
  breakdown, per-workload ablations, training effect (not reviewed), not measured
- src/ai_search_plugin: component registry, slime / verl entry points and adapters;
  22 components ported, 5 stubs
- tests: CPU tests (243 passed, 2 skipped); GPU and integration tests included, not run here
- examples: slime and verl launch templates
- docs: COMPONENTS.md (switches, measured effect, test coverage), PORTING.md (sources, changes)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: binc <[email protected]>
@cb521 cb521 changed the title examples: add AI-Search-Plugin [FEA] AI-Search-Plugin: drop-in components for search-agent RL post-training on slime and verl Nov 7, 2026
@greptile-apps

greptile-apps Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 1/5

[Medium impact] The changes affect RL training and rollout workflows only for teams that install and enable this package.

The PR is not ready to merge because four earlier blocking findings remain unfixed.

Findings

  1. P1 Cancelled searches block repeat calls ▶
  2. P1 Different tools call one function ▶
  3. P1 Direct HTTP remains enabled ▶
  4. P1 Pipeline batches exceed their budget ▶
  5. P2 Old runs keep batch references ▶
  6. P2 Coverage rows have wrong headings ▶

Summary

Adds an opt-in search-agent training plugin for slime and verl, with launch examples, component docs, experiment results, and tests.

  • Operators can choose plugin components for slime or verl.
  • Rollout work stays within a staleness limit while the trainer overlaps other steps.
  • Repeated or slow read-only tool calls can finish with fewer waits.
  • Weight updates can use faster engine hooks while refreshing cached request state.
  • Training can reuse compiled work and avoid repeating some shared computation.
  • MoE training can balance expert work and plan routing communication ahead of each step.
  • The docs explain the plugin's components, setup, and measured workloads.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A["Choose components"] --> B["Build plan"]
    B --> C["Environment and launch arguments"]
    C --> D["slime training hooks"]
    C --> E["verl external modules"]
    D --> F["Selected patches in workers"]
    E --> F
    C --> G["SGLang startup hooks"]
Loading

Reviews (3) · Last reviewed commit: "examples: apply the repository's pre-com..." · Reviewed by Greptile

@shijieliu

Copy link
Copy Markdown
Collaborator

@cb521 could you add the license?

binc-maker and others added 2 commits November 8, 2026 15:55
Rename docs/PORTING.md to docs/IMPLEMENTATION-NOTES.md and keep what helps a
user: scope and naming conventions, components that are not included, test
notes and what was not run, components that are present but not registered,
and what is left for each stub. Drop the source-repository, branch and commit
references and the history of how the code was prepared. Update the links and
the stub docstrings that point to it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: binc <[email protected]>
…-Plugin

Run black and isort over the plugin's Python files, rename a few identifiers
that codespell reads as typos, add te and retriev to the codespell ignore list
(the Transformer Engine value and a tool-name stem), and exclude the plugin from
the repository's mypy hook, as sid-gr-inference already is. No change in
behaviour; the CPU tests pass.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: binc <[email protected]>
@shijieliu
shijieliu merged commit f8267f6 into NVIDIA:main Nov 10, 2026
1 check passed
shijieliu added a commit to shijieliu/recsys-examples that referenced this pull request Nov 12, 2026
Merge main up to 476cdc0: NVIDIA#544 and NVIDIA#547 in DynamicEmb; NVIDIA#535, NVIDIA#537,
NVIDIA#539 and NVIDIA#540 outside it.

- NVIDIA#544 deduplicates int32 keys as int64 in _dedup_indices and returns
  them in the input's dtype, as this branch did. The merge keeps main's
  widening (indices_64bit) and drops this branch's copy of it, so the
  keys are widened once. It keeps this branch's structure: a sharding on
  the hierarchical dist keeps its unique keys sized on the device, and
  TorchRec's dists slice them to the count. The docstring says both.
- NVIDIA#544 also bucketizes an int32 key as the int64 key of its value. The
  hierarchical dist's own bucketize still reads a key in its own width;
  the next commit gives it int32 keys as int64.
- DynamicEmb_APIs.md: main's paragraph on how the rules read a key, then
  this branch's line that the hierarchical dist takes roundrobin and
  hash_roundrobin only.
- test_sequence_embedding_fw.py and test_twin_module.py: main's int32
  runs (NVIDIA#544) and no-grad forward (NVIDIA#547), with this branch's checks that
  a sharding took the dist it was given (check_path, check_totals).
- NVIDIA#547 (a no-grad training forward releases its slot pins, after
  refreshing its slots past a rehash) merges without conflicts next to
  this branch's row map and load_from_flat_by.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants