Computer Science > Computation and Language
Title:Hybrid-Recast: Converting Qwen3 to a GQA-Mamba2 Hybrid
Abstract:Hybrid-Recast converts a pretrained Transformer into a hybrid attention and state-space model. Starting from Qwen3-8B, we replace grouped-query attention (GQA) with Mamba2 in 17 of its 36 decoder layers and retain GQA in the other 19. We transfer pretrained weights and train the resulting Qwen3-Hybrid-Mamba2-8B model in four stages to recover performance after conversion. The four stages use approximately 15 billion tokens in total, equivalent to 0.042% of the 36 trillion pretraining tokens reported for Qwen3. The hybrid model scores 93.48 on GSM8K and 90.70 on MMLU-Redux under our evaluation protocol, retaining 97.5% and 97.7% of the corresponding Qwen3-8B scores. Including the fixed Mamba2 states, the hybrid model requires 35.0% less cache memory per request at 1,024 cached tokens and 45.7% less at 8,192, calculated from BF16 tensor sizes. We also reduce communication during distillation by transferring teacher hidden states and applying the teacher's output projection on the student side. At the same global batch size and sequence length, this change reduces the measured time per distillation step from 394.8 s to 9.3 s.
| Comments: | Technical report, 16 pages, 11 figures |
|---|---|
| Subjects: | Computation and Language (cs.CL) |
| Cite as: | arXiv:2612.04818 [cs.CL] |
| (or arXiv:2612.04818v1 [cs.CL] for this version) | |
| https://doi.org/10.48550/arXiv.2612.04818 arXiv-issued DOI via DataCite (pending registration) |
Submission history
Access Paper:
Additional Features
- Audio Summary
Current browse context:
References & Citations
- Google Scholar
- Semantic Scholar
BibTeX formatted citation
Bookmark
Bibliographic and Citation Tools
Code, Data and Media Associated with this Article
Demos
Recommenders and Search Tools
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.