Model: Support IBM Granite (Dense/Mamba + MoE) #18040
Model: Support IBM Granite (Dense/Mamba + MoE) #18040Kangyan-Zhou merged 5 commits intosgl-project:mainfrom
Conversation
Summary of ChangesHello @blazingbhavneek, 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 SGLang's model compatibility by integrating IBM Granite 4.0 models, which previously lacked native support. The core of the work involves defining the model's hybrid architecture, which combines Mamba and attention layers with Mixture-of-Experts, and adapting SGLang's execution pipeline to efficiently handle these complex models. The provided benchmarks validate the functional correctness and performance parity with existing implementations, making these powerful models accessible to SGLang users. 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. 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 adds support for IBM Granite models, including both dense and hybrid Mamba-MoE variants. The changes are comprehensive, covering model configuration, implementation, server arguments, and documentation. The code is well-structured and appears to be a correct port from the vLLM implementation. I have one suggestion for refactoring duplicated code in the model implementation to improve maintainability.
|
/tag-and-rerun-ci |
1 similar comment
|
/tag-and-rerun-ci |
|
@blazingbhavneek can you resolve the conflict? I can help bypass CI and merge the PR |
c98f144 to
097924f
Compare
|
@Kangyan-Zhou Done! Re-based on recommendation of Alison Shao |
Motivation
Add Support for ibm-granite/granite-4.0-h-micro and its Dense variant
When I tried to run this model, i got the message:
This PR ports IBM Granite model from its vllm implementation
Modifications
Accuracy Tests
Command for SGLang Server:
python -m sglang.launch_server --model-path ibm-granite/granite-4.0-h-micro --port 30000Command for vLLM Server:
python3 -m vllm.entrypoints.api_server --tokenizer-mode auto --model ibm-granite/granite-4.0-h-micro --disable-log-requests --port 21000MMLU
granite-4.0-h-micro
vLLM
SGLang
granite-4.0-micro
vLLM
SGLang
GSM8K
granite-4.0-h-micro
vLLM
SGLang
granite-4.0-h-micro
vllm
SGLang
Benchmarking and Profiling
Checklist
Review Process
/tag-run-ci-label,/rerun-failed-ci,/tag-and-rerun-ci