[model] support Qwen3.5 series models#76
Conversation
Summary of ChangesHello @hjh0119, 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 significantly expands the model support within the Twinkle framework by integrating the Qwen3.5 series of large language models. The changes involve a substantial overhaul of the model loading and configuration system, introducing a more modular 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for the Qwen3.5 series of models. The changes include a significant and well-designed refactoring of the model creation process, moving towards a more extensible loader pattern. It adds model-specific components for Qwen3.5, such as a custom RMSNorm and attention implementation to handle its heterogeneous architecture. Overall, the changes are a solid improvement. I have identified one critical bug related to an incorrect super() call that would cause runtime errors, and a minor issue regarding unused imports in a new example script. After addressing these points, the PR should be in good shape.
| """ | ||
|
|
||
| def __init__(self, config, submodules: SelfAttentionSubmodules, *args, **kwargs): | ||
| super(SelfAttention, self).__init__(config, submodules, *args, attention_type='self', **kwargs) |
There was a problem hiding this comment.
The super() call is incorrect. super(SelfAttention, self) calls the __init__ of SelfAttention's parent class, skipping the initialization logic within SelfAttention itself. This will lead to AttributeErrors at runtime because attributes expected to be set by SelfAttention.__init__ will be missing.
To fix this, you should use super().__init__(...) which correctly calls the parent class (SelfAttention) constructor.
| super(SelfAttention, self).__init__(config, submodules, *args, attention_type='self', **kwargs) | |
| super().__init__(config, submodules, *args, attention_type='self', **kwargs) |
No description provided.