By combining the advantages of state space models (SSMs) with attention mechanisms, SAMBA presents a hybrid neural architecture that enables effective, scalable language modeling with an almost infinite context length. SAMBA surpasses both pure attention-based and SSM-based models on a variety of reasoning, comprehension, and coding metrics when trained on SlimPajama with consistent setups. The model processes sequences up to 256K tokens with little fine-tuning, achieving exceptional speed and extrapolation capacity.By combining the advantages of state space models (SSMs) with attention mechanisms, SAMBA presents a hybrid neural architecture that enables effective, scalable language modeling with an almost infinite context length. SAMBA surpasses both pure attention-based and SSM-based models on a variety of reasoning, comprehension, and coding metrics when trained on SlimPajama with consistent setups. The model processes sequences up to 256K tokens with little fine-tuning, achieving exceptional speed and extrapolation capacity.

How Hybrid AI Models Balance Memory and Efficiency

Abstract and 1. Introduction

  1. Methodology

  2. Experiments and Results

    3.1 Language Modeling on vQuality Data

    3.2 Exploration on Attention and Linear Recurrence

    3.3 Efficient Length Extrapolation

    3.4 Long-Context Understanding

  3. Analysis

  4. Conclusion, Acknowledgement, and References

A. Implementation Details

B. Additional Experiment Results

C. Details of Entropy Measurement

D. Limitations

\

A Implementation Details

\ For the GLA layer in the Sliding GLA architecture, we use the number of heads dm/384, a key expansion ratio of 0.5, and a value expansion ratio of 1. For the RetNet layer we use a number of head that is half of the number of attention query heads, key expansion ratio of 1 and value expansion ratio of 2. The GLA and RetNet implementations are from the Flash Linear Attention repository[3] [YZ24]. We use the FlashAttention-based implementation for Self-Extend extrapolation[4]. The Mamba 432M model has a model width of 1024 and the Mamba 1.3B model has a model width of 2048. All models trained on SlimPajama have the same training configurations and the MLP intermediate size as Samba, unless otherwise specified. The training infrastructure on SlimPajama is based on a modified version of the TinyLlama codebase[5].

\ Table 10: Detailed hyper-parameters of the SAMBA models trained at different scales. We only show the optimization settings for the first training phase of the 3.8B model.

\ In the generation configurations for the downstream tasks, we use greedy decoding for GSM8K, and Nucleus Sampling [HBD+19] with a temperature of τ = 0.2 and top-p = 0.95 for HumanEval. For MBPP and SQuAD, we set τ = 0.01 and top-p = 0.95.

B Additional Experiment Results

\ Figure 6: Training loss curves of Samba 1.7B and Mistral 1.6B models during 500 steps of instruction tuning on Passkey Retrieval with 4K sequence length. We plot the loss curves for both models using the simple moving average of window size 10.

\

\ Figure 7: Overall passkey retrieval accuracy on the 256K document length of Samba 1.7B and Mistral 1.6B models during 500 steps of instruction tuning.

\

C Details of Entropy Measurement

\

\

D Limitations

Although Samba demonstrates promising memory retrieval performance through instruction tuning, its pre-trained base model has retrieval performance similar to that of the SWA-based model, as shown in Figure 7. This opens up future direction on further improving the Samba’s retrieval ability without compromising its efficiency and extrapolation ability. In addition, the hybridization strategy of Samba is not consistently better than other alternatives in all tasks. As shown in Table 2, MambaSWA-MLP shows improved performance on tasks such as WinoGrande, SIQA, and GSM8K. This gives us the potential to invest in a more sophisticated approach to perform input-dependent dynamic combinations of SWA-based and SSM-based models.

\

:::info Authors:

(1) Liliang Ren, Microsoft and University of Illinois at Urbana-Champaign (liliangren@microsoft.com);

(2) Yang Liu†, Microsoft (yaliu10@microsoft.com);

(3) Yadong Lu†, Microsoft (yadonglu@microsoft.com);

(4) Yelong Shen, Microsoft (yelong.shen@microsoft.com);

(5) Chen Liang, Microsoft (chenliang1@microsoft.com);

(6) Weizhu Chen, Microsoft (wzchen@microsoft.com).

:::


:::info This paper is available on arxiv under CC BY 4.0 license.

:::

[3] https://github.com/sustcsonglin/flash-linear-attention

\ [4] https://github.com/datamllab/LongLM/blob/master/selfextendpatch/Llama.py

\ [5] https://github.com/jzhang38/TinyLlama

Market Opportunity
null Logo
null Price(null)
--
----
USD
null (null) Live Price Chart
Disclaimer: The articles reposted on this site are sourced from public platforms and are provided for informational purposes only. They do not necessarily reflect the views of MEXC. All rights remain with the original authors. If you believe any content infringes on third-party rights, please contact service@support.mexc.com for removal. MEXC makes no guarantees regarding the accuracy, completeness, or timeliness of the content and is not responsible for any actions taken based on the information provided. The content does not constitute financial, legal, or other professional advice, nor should it be considered a recommendation or endorsement by MEXC.

You May Also Like

Haier Shines at Australian Open 2026: Official Partner Elevates the Game with Smart Innovation and Purpose

Haier Shines at Australian Open 2026: Official Partner Elevates the Game with Smart Innovation and Purpose

MELBOURNE, Australia, Jan. 25, 2026 /PRNewswire/ — Haier, the world’s No.1 major home appliance brand, continues its strategic partnership with the Australian Open
Share
AI Journal2026/01/26 11:30
ZKP Takes Center Stage With $5M Rewards as BCH Pushes Toward $1K and Zcash Sees Whale Demand

ZKP Takes Center Stage With $5M Rewards as BCH Pushes Toward $1K and Zcash Sees Whale Demand

Explore how Bitcoin Cash builds momentum, Zcash sees growing whale interest, and ZKP runs a live presale auction with a structured $5M reward campaign.
Share
coinlineup2026/01/26 11:00
Coinbase Issues Cryptocurrency Call to US Justice Department: “Solve Urgent Problems!”

Coinbase Issues Cryptocurrency Call to US Justice Department: “Solve Urgent Problems!”

The post Coinbase Issues Cryptocurrency Call to US Justice Department: “Solve Urgent Problems!” appeared on BitcoinEthereumNews.com. Coinbase, the largest cryptocurrency exchange in the United States, stated that there should be uniform cryptocurrency regulation in the country. At this point, Coinbase sent a letter to the US Department of Justice requesting that federal regulators prevent state regulations from conflicting with national crypto policies and ensure uniform regulatory clarity. Coinbase’s request comes after the state of Oregon filed a lawsuit against Coinbase for unregistered securities, despite the SEC withdrawing its lawsuit against the cryptocurrency exchange. Coinbase states that although the country’s top regulator, the SEC, withdrew its lawsuit, states are filing lawsuits in defiance of the SEC’s decision. In the letter, addressed by Coinbase Legal Counsel Paul Grewal, he stated: “Despite the Trump administration’s positive regulatory efforts, crypto companies are being negatively impacted by states’ flawed interpretations of securities laws and their divergent actions. If Oregon can sue us for services that are legal under federal law, we have a problem. It has long been clear that the current patchwork of state laws is not only inefficient, but also slows innovation and harms consumers. At this point, the Justice Department should take steps to address the pressing issues by calling on Congress to step in and enact comprehensive and uniform regulations.” Oregon Attorney General Dan Rayfield filed a lawsuit against Coinbase last April, alleging that Coinbase was promoting the sale of unregistered cryptocurrencies to individuals in Oregon. *This is not investment advice. Follow our Telegram and Twitter account now for exclusive news, analytics and on-chain data! Source: https://en.bitcoinsistemi.com/coinbase-issues-cryptocurrency-call-to-us-justice-department-solve-urgent-problems/
Share
BitcoinEthereumNews2025/09/18 05:06