Repository navigation
Add Mamba3 - #1021
Add Mamba3#1021Goekdeniz-Guelmez wants to merge 11 commits into
Conversation
- Implemented compute_dt_eff function for effective time delta calculation. - Enhanced ssm_attn to support effective dt for input weighting. - Introduced ssm_update_trap for Mamba-3 SSM updates with trapezoidal discretization. - Added new files for exponential Euler and exponential trapezoidal SSM implementations. - Updated existing SSM functions to accommodate new Mamba-3 features and maintain backward compatibility.
|
Do some weights on HF exist to test? |
Its prefill doesn't match its own decode recurrence: the next token's input term lands on the current token's output (scalar check: prefill 1.0 vs decode 0.5), and a multi-token continuation ignores the carried prev_Bx, so chunked prefill and prompt-cache continuation drift. Left out until upstream fixes it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XhEwWJCoJPXFyyCzp988Bx
|
Found an official model! aifeifei798/Mamba3-MIMO-Tiny-HF |
|
Had to remove some unneeded stuff in Reference code:Mamba3 module, This vs. official torch reference.
Top-1 predictions agree at all 229 positions in both precision modes. The final top-10 token IDs are identical too. inference |
- Removed the old Mamba3 model implementation and replaced it with a new architecture that includes significant changes to the model arguments and structure. - Updated the SSM (State Space Model) implementation to support the new Mamba3 architecture, including the removal of deprecated functions and parameters. - Introduced a new `Backbone` class to encapsulate the model layers and embedding logic. - Added unit tests for the new Mamba3 model, including tests for configuration loading, routing, rotary pairs, cached decoding, padding, quantization, and dimension validation. - Updated utility functions to support the new model configuration and ensure compatibility with existing code.
|
@michalk8 should be mergeable now! |
|
Or should I also add the custom kernel too? |
No description provided.