Skip to content

[Canonical LoRA] feat: Support more flexible target_modules#1799

Merged
yaoyu-33 merged 1 commit into
NVIDIA-NeMo:mainfrom
HollowMan6:canonical_mla
Dec 26, 2025
Merged

[Canonical LoRA] feat: Support more flexible target_modules#1799
yaoyu-33 merged 1 commit into
NVIDIA-NeMo:mainfrom
HollowMan6:canonical_mla

Conversation

@HollowMan6

@HollowMan6 HollowMan6 commented Dec 23, 2025

Copy link
Copy Markdown
Member

What does this PR do ?

e.g., for MLA (DeepSeek V3 arch models), we should also be able to support all linear layers LoRA via setting target_modules as: ["linear_kv_down_proj","linear_kv_up_proj","linear_q_down_proj","linear_q_up_proj","linear_q_proj","linear_proj","linear_fc1_up","linear_fc1_gate","linear_fc2"]

Changelog

  • Not hard coding the possible supported target_modules and using endswith to matching target module names instead.

GitHub Actions CI

See the CI sectionin the Contributing doc for how to trigger the CI. A Nvidia developer will need to approve and trigger the CI for external contributors.

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

If you haven't finished some of the above items you can still open "Draft" PR.

Additional Information

  • Related to # (issue)

✨ Presented to you with Mind Lab - A Lab for Experiential Intelligence.

e.g., for MLA (DeepSeek V3 arch models), we should also be able
to support all linear layers LoRA via setting `target_modules` as:
["linear_kv_down_proj","linear_kv_up_proj","linear_q_down_proj","linear_q_up_proj","linear_q_proj","linear_proj","linear_fc1_up","linear_fc1_gate","linear_fc2"]

Signed-off-by: Hollow Man <hollowman@opensuse.org>
@copy-pr-bot

copy-pr-bot Bot commented Dec 23, 2025

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@yaoyu-33

Copy link
Copy Markdown
Contributor

/ok to test 5543bee

@yaoyu-33 yaoyu-33 merged commit 1c5fa2c into NVIDIA-NeMo:main Dec 26, 2025
49 checks passed
@HollowMan6 HollowMan6 deleted the canonical_mla branch December 26, 2025 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants