-
Notifications
You must be signed in to change notification settings - Fork 282
Support qwen3 next #1076
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
base: main
Are you sure you want to change the base?
Support qwen3 next #1076
Conversation
Summary of ChangesHello @sufubao, 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 enhances the LightLLM framework by integrating the Qwen3Next model, which employs a sophisticated hybrid attention architecture. The changes involve a fundamental redesign of the memory management system to accommodate both traditional KV caches and new state buffers required by the linear attention layers. This includes the introduction of specialized weight and inference classes for Qwen3Next, backed by a comprehensive set of optimized Triton kernels to ensure efficient execution of its novel attention mechanisms. The overall aim is to broaden LightLLM's model compatibility and demonstrate support for cutting-edge, high-performance attention architectures. 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
|
Summary of ChangesHello @sufubao, 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 capabilities by integrating the Qwen3Next model. This integration involves a sophisticated hybrid attention mechanism, requiring a complete overhaul of memory management to support both traditional KV caching and novel Mamba-like state buffers. The changes also introduce a suite of optimized Triton kernels to ensure high performance for the new linear attention components, alongside general improvements to memory access patterns across existing models. 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 adds support for the qwen3next model, which appears to be a hybrid architecture combining standard attention with a Mamba-like linear attention mechanism. The implementation is well-structured across several new files. A significant part of this PR is also a beneficial refactoring that encapsulates direct access to the kv_buffer within the MemoryManager by introducing a get_kv_buffer method, improving code maintainability across several model implementations. I've identified a bug in the rmsnorm implementation for qwen3_moe and an inconsistency in its application, along with a minor comment style issue in the new qwen3next code. Overall, the changes are substantial and well-organized.
No description provided.