ppo-critic can train - #2023
Open
Hyperion-shuo wants to merge 15 commits into
Open
Conversation
added 15 commits
June 22, 2026 15:05
support rollout_is_veto_negative_adv_only
hhaAndroid
reviewed
Aug 18, 2026
| @@ -0,0 +1,109 @@ | |||
| from pathlib import Path | |||
Collaborator
There was a problem hiding this comment.
建议先提供一个最简的以 gsm8k 为 demo 例子的 qwen3.5 ppo 配置例子,作为全局入口
| @@ -360,10 +357,11 @@ class BaseRLTrainerConfig(BaseModel): | |||
| seed: int = 42 | |||
| debug_rollout: bool = False | |||
| debug_rollout_dir: Path | str | None = None | |||
| rollout_exporter: Callable[[list[list[RolloutState]], int], None] | None = None | |||
Collaborator
There was a problem hiding this comment.
导出需要自定义吗?目前的 debug_save 无法满足需求吗/
| @@ -451,6 +451,10 @@ class RLColocateTrainerConfig(BaseRLTrainerConfig): | |||
| validation. Defaults to False. | |||
| exp_tracker (Literal["tensorboard", "jsonl"]): Experiment tracker type. | |||
| Defaults to "tensorboard". | |||
| discard_initial_rollout_batches (int): Number of initial complete | |||
Contributor
Author
There was a problem hiding this comment.
这个可以去掉了,测试下来没啥用
之前主要因为ppo容易长度崩溃,所以想把第一个长度比较短的batch数据丢掉
| @@ -767,6 +804,14 @@ def _resume_train_controller_and_state(self, checkpoint_path: Path | str) -> Pat | |||
| with train_state_path.open("r") as f: | |||
| train_state = json.load(f) | |||
| self._cur_step = train_state["cur_step"] | |||
| rng_state_path = checkpoint_path / self._SAVE_RNG_STATE_PATH | |||
| if rng_state_path.exists(): | |||
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.
No description provided.