Skip to content

remove hf_grouped lora error#75

Merged
Jintao-Huang merged 3 commits into
modelscope:mainfrom
Jintao-Huang:support_hf_grouped_lora
May 13, 2026
Merged

remove hf_grouped lora error#75
Jintao-Huang merged 3 commits into
modelscope:mainfrom
Jintao-Huang:support_hf_grouped_lora

Conversation

@Jintao-Huang
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown

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

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 enables support for Hugging Face grouped LoRA in the GPT bridge by adding a support flag and replacing strict ValueErrors with informative warnings when LoRA weight conversion is not directly supported. Feedback focuses on correcting minor formatting issues in the warning messages, such as punctuation placement and spacing, and suggests refactoring the duplicated warning string into a shared constant to improve maintainability.

'You can solve this issue by setting `--merge_lora true`.')
logger.warning_once(
'Since this model\'s transformers and megatron have different expert weight organization '
'methods, LoRA weights may not be available for inference. It is recommended to set '
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

There's a minor formatting issue in the warning message. The period for --merge_lora true should be outside the backticks, and a space is needed before the next sentence for better readability.

Suggested change
'methods, LoRA weights may not be available for inference. It is recommended to set '
'methods, LoRA weights may not be available for inference. It is recommended to set `--merge_lora true`. '

'weight organization methods, LoRA weight conversion is not supported. '
'You can solve this issue by setting `--merge_lora true`.')
logger.warning_once(
'Since this model\'s transformers and megatron have different expert weight organization '
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This warning message is duplicated from earlier in the function (around line 944). To improve maintainability, consider extracting the message into a shared constant.

Additionally, this instance has the same formatting issue as the first one: the period should be outside the backticks for --merge_lora true, and a space is needed before the next sentence.

Suggested change
'Since this model\'s transformers and megatron have different expert weight organization '
'methods, LoRA weights may not be available for inference. It is recommended to set `--merge_lora true`. '

@Jintao-Huang
Copy link
Copy Markdown
Collaborator Author

vllm-project/vllm#40005

@Jintao-Huang Jintao-Huang changed the title support hf_grouped lora remove hf_grouped lora error May 13, 2026
@Jintao-Huang Jintao-Huang merged commit 37f7507 into modelscope:main May 13, 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