-
Notifications
You must be signed in to change notification settings - Fork 944
[mcore_bridge] update docs #6431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mcore_bridge] update docs #6431
Conversation
Summary of ChangesHello @Jintao-Huang, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request primarily enhances the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this 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 updates the documentation for mcore_bridge, adding examples for full and LoRA weight management. The changes also include minor refactoring in the Python codebase to align with the new documentation. The documentation is mostly clear and helpful, but I've pointed out a potentially confusing line in the LoRA code example in both the Chinese and English documents. The code changes are correct and consistent.
| # 准备LoRA并加载 | ||
| peft_model = prepare_mcore_model(mg_model) | ||
| print(f'peft_model: {peft_model}') | ||
| # bridge.load_weights(mg_model, 'adapter-path', is_peft_format=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commented-out line # bridge.load_weights(mg_model, 'adapter-path', is_peft_format=True) might be confusing for users. This example primarily demonstrates how to save LoRA weights, not how to load them. If this line is intended to show how to load LoRA weights, it would be better to move it to a separate example or add a comment explaining its purpose. If it's not relevant to this example, removing it would improve clarity.
| # Prepare LoRA and load | ||
| peft_model = prepare_mcore_model(mg_model) | ||
| print(f'peft_model: {peft_model}') | ||
| # bridge.load_weights(mg_model, 'adapter-path', is_peft_format=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commented-out line # bridge.load_weights(mg_model, 'adapter-path', is_peft_format=True) could be confusing for users. The example's main purpose is to demonstrate how to save LoRA weights, not load them. If this line is meant to show how to load LoRA weights, consider moving it to a separate, dedicated example or adding an explanatory comment. If it's not relevant to this example, it would be clearer to remove it.
No description provided.