[Rollout] Part 2: adapt RolloutController and Worker to RolloutState and adjust interface#1488
Merged
YanhuiDua merged 6 commits intoInternLM:rl_designfrom Feb 10, 2026
Merged
Conversation
…d update_status_from_finish_reason
f34dd51 to
9e009da
Compare
hhaAndroid
reviewed
Feb 10, 2026
…st interface to pause_generation and offload;
hhaAndroid
approved these changes
Feb 10, 2026
YanhuiDua
commented
Feb 11, 2026
| response_ids: list[int] | None = None | ||
| logprobs: list[float] | None = None | ||
| routed_experts: list[int] | RayObjectRef | None = None # type: ignore[valid-type] | ||
| finish_reason: str | None = None |
Collaborator
Author
There was a problem hiding this comment.
考虑多轮:假如一个prompt通过不同的工具调用产生的不同的轨迹怎么记录,是记录新的rolloutstate,还是包含多轮的信息比较好呢?
YanhuiDua
commented
Feb 11, 2026
| error_msg: str | None = None | ||
| seq_staleness: int = 0 # 整条序列的staleness,一般为最大的token_staleness | ||
| token_staleness: list[int] | None = None # 每一个token的staleness,长度和tokens保持一致 | ||
| loss_mask: list[int] | None = None # tokens + response_ids的长度 |
Collaborator
Author
There was a problem hiding this comment.
在多轮的情况下,比如说第二轮对话要删掉第一轮对话thinking的内容,loss_mask也要同时修改
YanhuiDua
added a commit
that referenced
this pull request
Apr 27, 2026
…and adjust interface (#1488) * [Rollout] Part 1.1: add return_routed_experts in sample_params and add update_status_from_finish_reason * [Rollout] Part 2: refactor RolloutController interface and use RolloutState * [Rollout] Part 2.1: adapt RolloutWorker to RolloutController * [Rollout] Part 2.2: add rollout ut * [Rollout] fix comments: 1. support error_msg in RolloutState; 2. adjust interface to pause_generation and offload; * [Rollout] fix comments: delete useless return
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RolloutController接口定义
RolloutWorker接口定义
TODO: