Skip to content

[Mamba] Add float16 support for SSM cache dtype#18444

Merged
Fridge003 merged 1 commit intosgl-project:mainfrom
danielafrimi:f16_ssm_cache
Feb 12, 2026
Merged

[Mamba] Add float16 support for SSM cache dtype#18444
Fridge003 merged 1 commit intosgl-project:mainfrom
danielafrimi:f16_ssm_cache

Conversation

@danielafrimi
Copy link
Contributor

This PR adds float16 as a supported option for --mamba-ssm-dtype, enabling FP16 SSM cache for Mamba-based models like NemotronH.

Signed-off-by: root <dafrimi@nvidia.com>
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Feb 8, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @danielafrimi, 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 introduces support for float16 as a data type for the Mamba SSM cache. This enhancement allows Mamba-based models, such as NemotronH, to utilize FP16 for their SSM states, potentially leading to reduced memory consumption and improved computational efficiency. The changes involve updating both the user-facing documentation and the internal argument parsing logic to recognize and accept float16 as a valid option.

Highlights

  • Mamba SSM Cache: Added float16 as a supported data type for the Mamba SSM (State Space Model) cache, expanding options for memory and performance optimization for models like NemotronH.
  • Documentation Update: Updated the server arguments documentation to reflect the new float16 option for --mamba-ssm-dtype.
  • Argument Choices: Modified the internal MAMBA_SSM_DTYPE_CHOICES list to include float16, enabling its selection programmatically.

🧠 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
  • docs/advanced_features/server_arguments.md
    • Added float16 to the list of available options for the --mamba-ssm-dtype command-line argument.
  • python/sglang/srt/server_args.py
    • Extended the MAMBA_SSM_DTYPE_CHOICES list to include float16.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 correctly adds float16 as a supported option for the Mamba SSM cache data type. The changes are straightforward, updating the list of choices for the --mamba-ssm-dtype server argument and its corresponding documentation. The implementation is consistent with the PR's goal of enabling FP16 SSM cache for Mamba-based models. While the changes are correct, I recommend adding a test case to verify the float16 functionality to prevent potential regressions in the future.

@Fridge003 Fridge003 merged commit e422bca into sgl-project:main Feb 12, 2026
53 of 61 checks passed
Johnsonms pushed a commit to Johnsonms/sglang that referenced this pull request Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants