[feat] support HyperParallel Context Parallel feature (#10559)

Co-authored-by: wcrzlh <weichaoran@huawei.com>
This commit is contained in:
Chaoran Wei
2026-06-22 07:40:44 +08:00
committed by GitHub
parent 8792f06161
commit 802bcfe969
3 changed files with 200 additions and 6 deletions

View File

@@ -500,6 +500,10 @@ class FinetuningArguments(
)
},
)
hyper_parallel_cp_size: int = field(
default=1,
metadata={"help": "Context parallel size used when `use_hyper_parallel=True`."},
)
use_muon: bool = field(
default=False,
metadata={"help": "Whether or not to use the Muon optimizer."},
@@ -576,6 +580,7 @@ class FinetuningArguments(
assert self.finetuning_type in ["lora", "oft", "freeze", "full"], "Invalid fine-tuning method."
assert self.ref_model_quantization_bit in [None, 8, 4], "We only accept 4-bit or 8-bit quantization."
assert self.reward_model_quantization_bit in [None, 8, 4], "We only accept 4-bit or 8-bit quantization."
assert self.hyper_parallel_cp_size > 0, "`hyper_parallel_cp_size` must be greater than 0."
if self.stage == "ppo" and self.reward_model is None:
raise ValueError("`reward_model` is necessary for PPO training.")