Skip to content

agentic RL top-p replay - #88

Merged
willisguo14 merged 3 commits into
prodfrom
willis/top-p-agentic-rl
Sep 15, 2026
Merged

willisguo14 merged 3 commits into
prodfrom
willis/top-p-agentic-rl

Conversation

@willisguo14

Copy link
Copy Markdown

summary

replay SGLang's recorded per-token sampling support when rollout-top-p < 1. (SGLang PR)

scope

agentic RL

--rollout-top-p 0.9
--train-backend megatron
--use-session-server
--custom-generate-function-path miles.rollout.generate_hub.agentic_tool_call.generate

out of scope: other generation paths, PP, speculative decoding, PD disaggregation, true-on-policy mode

tests

PYTHONPATH="$REPO/src:$REPO/submodules/miles:$REPO/submodules/sglang/python:$REPO/submodules/harbor/src:$REPO/submodules/megatron-
lm${PYTHONPATH:+:$PYTHONPATH}"

cd "$REPO/submodules/miles"

python -m pytest -q \
  tests/fast/router/test_sessions.py \
  tests/fast/rollout/generate_utils/test_openai_endpoint_utils.py

CUDA_VISIBLE_DEVICES='' TORCH_COMPILE_DISABLE=1 \
python -m pytest -q \
  tests/fast/backends/megatron_utils/test_top_p_replay.py

python -m torch.distributed.run \
  --standalone --nnodes=1 --nproc_per_node=4 \
  tests/e2e/precision/test_top_p_sampling_replay.py

@willisguo14
willisguo14 marked this pull request as ready for review September 14, 2026 16:54
@willisguo14
willisguo14 requested a review from a team September 14, 2026 16:54

@DavidBellamy DavidBellamy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread miles/backends/megatron_utils/model.py
Comment thread miles/rollout/generate_utils/sample_utils.py
@willisguo14
willisguo14 enabled auto-merge (squash) September 15, 2026 16:44
@willisguo14
willisguo14 merged commit 48dc21b into prod Sep 15, 2026
5 checks passed
@willisguo14
willisguo14 deleted the willis/top-p-agentic-rl branch September 15, 2026 16:44
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.

2 participants