[v1] add init on rank0 for fsdp2 (#10264)

This commit is contained in:
jiaqiw09
2026-03-27 14:54:03 +08:00
committed by GitHub
parent d02fcd3588
commit df2e6edb7e
9 changed files with 84 additions and 12 deletions

View File

@@ -150,9 +150,6 @@ def load_adapter(model: HFModel, adapter_name_or_path: Union[list[str], str], is
@PeftPlugin("lora").register()
def get_lora_model(model: HFModel, config: LoraConfigDict, is_train: bool = False) -> HFModel:
if model.device.type == "meta":
raise ValueError("Currently lora stage does not support loading model by meta.")
adapter_name_or_path = config.get("adapter_name_or_path")
if adapter_name_or_path: