Skip to content

[bugfix] fix vit_lora tp#5

Merged
Jintao-Huang merged 3 commits into
modelscope:mainfrom
Jintao-Huang:fix_vit_lora_tp
Mar 31, 2026
Merged

[bugfix] fix vit_lora tp#5
Jintao-Huang merged 3 commits into
modelscope:mainfrom
Jintao-Huang:fix_vit_lora_tp

Conversation

@Jintao-Huang

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements a monkey-patch for LoraModel to enable gradient averaging across tensor parallel domains for MegatronModule and adds peer-to-peer communication settings. It also introduces extensive test files for LLMs and MLLMs. Review feedback identifies a critical recursion bug in the monkey-patching implementation, suggests expanding support to other PEFT layers, and recommends removing hardcoded environment variables and dead code from the test scripts.

Comment thread src/mcore_bridge/tuners/patcher.py Outdated
Comment thread src/mcore_bridge/tuners/patcher.py Outdated
Comment thread tests/test_llm.py
Comment thread tests/test_llm.py
Comment thread tests/test_mllm.py
@Jintao-Huang

Copy link
Copy Markdown
Collaborator Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a monkey-patch for LoraModel to support gradient averaging in Megatron modules and adds comprehensive test suites for LLMs and MLLMs. Review feedback identifies several improvement opportunities, including removing hardcoded environment variables in tests to support varied environments, fixing a potential recursion bug in the patching logic by returning early, and cleaning up extensive commented-out code in the test files.

Comment thread tests/test_llm.py
Comment thread tests/test_mllm.py
Comment thread src/mcore_bridge/tuners/patcher.py Outdated
Comment thread tests/test_llm.py
Comment thread tests/test_mllm.py
@Jintao-Huang Jintao-Huang merged commit 412d4ff into modelscope:main Mar 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant