[Feature] Support repetition early stop (#3024)

* support repetition early stop and support user to set the parameter

* remove log

* fix codestyle

* add the early_stop_config to rollout_config

* update config and EarlyStopper class

* fix the bug for triton

* modify the stop method

* update description

* modify the usage for stop_flags

---------

Co-authored-by: Yuanle Liu <yuanlehome@163.com>
This commit is contained in:
Zero Rains
2025-07-29 22:42:54 +08:00
committed by GitHub
parent 3214fb5393
commit b2f9a42d87
13 changed files with 575 additions and 4 deletions

View File

@@ -57,6 +57,7 @@ class RolloutModelConfig:
disable_any_whitespace: bool = True,
enable_logprob: bool = False,
graph_optimization_config: str = None,
early_stop_config: str = None,
local_rank: int = 0,
):
# Required parameters
@@ -100,6 +101,7 @@ class RolloutModelConfig:
self.enable_logprob = enable_logprob
self.graph_optimization_config = graph_optimization_config
self.local_rank = local_rank
self.early_stop_config = early_stop_config
def __str__(self):
return "\n".join(f"{k}: {v}" for k, v in self.__dict__.items())