Skip to content

feat(benchmarks): replay recorded RL rollouts against inference servers - #4943

Draft
nxphi47 wants to merge 1 commit into
mainfrom
feat/rl-replay-bench
Draft

nxphi47 wants to merge 1 commit into
mainfrom
feat/rl-replay-bench

Conversation

@nxphi47

@nxphi47 nxphi47 commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Adds benchmarks/rl_replay/, a load generator that replays recorded multi-turn RL rollouts against an inference deployment, to measure what an RL run would get from it at a given number of rollouts in flight.

  • extract.py: reads a run's trace stream (monitors/file/traces) and writes one compact file per rollout: the trace's token tree plus, per model call, the completion length, the tool gap to the next call and the recorded prompt/cached token counts.
  • replay.py: keeps N rollouts in flight per a schedule of levels. Each turn's prompt is the recorded context with earlier completions replaced by what the replay generated, so the prefix cache behaves as in a live rollout; each call generates the recorded length (ignore_eos), then waits the recorded tool gap. Sends the same /inference/v1/generate requests as the renderer clients (sampling params are a JSON argument) and scrapes every engine's /metrics.
  • summarize.py: steady-state table per level: generated tok/s, computed vs ideal prefill, prefix-cache hit rate, KV usage, preemptions, TTFT, per-request decode tok/s, engine steps/s, speculative acceptance length.

Extract rollouts from a run's trace stream and replay them turn by turn at fixed
numbers of rollouts in flight, with the recorded completion lengths and tool gaps,
to measure steady-state generation throughput, computed vs ideal prefill, prefix-cache
hit rate, KV usage and per-request decode speed of an inference deployment.
@wiz-prime-intellect

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 2 Medium 2 Low
Software Management Finding Software Management Findings -
Total 2 Medium 2 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

This branch has not been deployed

No deployments
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.

1 participant