Conversation
Summary of ChangesHello, 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 refines the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
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
|
# Conflicts: # src/twinkle/server/tinker/common/compat_base.py # src/twinkle/server/tinker/common/megatron_model.py
There was a problem hiding this comment.
Code Review
This pull request introduces a fix for log probabilities (logps) handling by refactoring the ModelOutput and LossOutput data structures and updating the model and loss calculation logic to correctly propagate logps. A significant portion of the changes involves updating documentation and examples to use newer models and reflect the API changes. I've found a couple of issues: some leftover debugging code in an example script that is now broken, and some inconsistencies in model IDs within the documentation.
I am having trouble creating individual review comments. Click here to see my feedback.
cookbook/megatron/tp.py (68-69)
This block of code seems to be leftover from debugging. The _temp variable is not used anywhere. Furthermore, the call to TwinkleCompatModelBase._get_forward_output is now incorrect as its signature has changed to include logps, and this call will raise a TypeError. This code should be removed.
docs/source_en/Usage Guide/Quick-Start.md (877)
The model_id here and in other examples in this file (lines 880, 906, 914) is missing the ms:// prefix. Other documentation files and examples in this PR consistently use the ms:// prefix for ModelScope models (e.g., 'ms://Qwen/Qwen3-4B'). For consistency, the prefix should be added here as well.
model = TransformersModel(model_id='ms://Qwen/Qwen3-4B', remote_group='default', device_mesh=device_mesh)
PR type
PR information
Write the detail information belongs to this PR.
Experiment results
Paste your experiment result here(if needed).