Repository navigation
Add a PEFT pre-wrap hook to training model setup - #7529
Levius-Fubuki wants to merge 1 commit into
Conversation
Signed-off-by: levius <2114377220@qq.com>
7a5c6b2 to
44f136f
Compare
|
@maanug-nv @NVIDIA/mcore-oncall Following up on the scope/interface question from #7269. I have rebased this PR onto current The proposed adapter contract is Could a vetter also authorize NVIDIA CI for the latest signed commit, |
What does this PR do?
Add an optional config-driven PEFT hook to training model setup. Configured adapters are applied to model chunks before distributed wrapping and optimizer construction. The hook preserves user-owned hooks and places requested freeze hooks after adapter insertion. Config export rejects PEFT objects whose constructor state cannot be serialized.
Issue tracking
Related to #7269. This PR provides the training integration seam; the migrated performant LoRA, canonical LoRA, and DoRA components are tracked by #7271, so it does not close #7269.
Validation
Rebased onto
mainat728ef1414008ce4b51ce1c0db86993c3eb871601. The conflict resolution retains the upstream batch, scheduler, RL, and configuration-finalization methods. The model-setup regression test now uses the current native config container andTrainState.torch.distributed.runwith--noconftest; only the upstreamrun_configfixture was supplied separately to avoid GPU/data session fixtures. This is not a CUDA or CI-parity run.tools/autoformat.shin check-only mode passed, including Black, isort, Pylint, Ruff, and mypy for the selected test file. Additional scoped isort/Black/Ruff/Pylint checks andgit diff --checkpassed.7a5c6b224: A100-PCIE-40GB, one-rank NCCL/DDP forward/backward/AdamW step; adapter weights changed while base weights stayed unchanged. GPU validation has not been rerun on this rebased revision.NVIDIA CI remains pending vetter authorization.