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

2025/10/28 17:13

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

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.
Share Insights

You May Also Like

Nieuwe reus betreedt crypto: Western Union lanceert Solana-stablecoin

Nieuwe reus betreedt crypto: Western Union lanceert Solana-stablecoin

Check onze Discord Connect met "like-minded" crypto enthousiastelingen Leer gratis de basis van Bitcoin & trading - stap voor stap, zonder voorkennis. Krijg duidelijke uitleg & charts van ervaren analisten. Sluit je aan bij een community die samen groeit. Nu naar Discord   De Amerikaanse betaalgigant Western Union stapt de cryptowereld binnen met de lancering van een eigen stablecoin op het Solana-netwerk. De CEO noemt het een ‘’grote stap richting snellere, efficiëntere en inclusievere betalingen’’ en dat lijken steeds meer grote spelers de laatste tijd te beseffen. USDTP-stablecoin op Solana De stap komt niet uit de lucht vallen, want Western Union heeft al vaker geflirt met het idee om stablecoins in te zetten voor hun wereldwijde geldtransferdienst. Deze maand kondigde CEO Devin McGranahan de lancering van een pilot aan voor stablecoin-betalingen. En in de zomer zei hij al dat het bedrijf stablecoins als een kans zien en niet als een bedreiging. Nu heeft Western Union in een persbericht aangekondigd dat het in de eerste helft van volgend jaar zijn eigen aan de Amerikaanse dollar gekoppelde crypto op de markt brengt: de U.S. Dollar Payment Token (USDPT). De munt wordt uitgegeven door de gereguleerde Anchorage Digital Bank en draait op het Solana-netwerk. Western Union wil met deze stablecoin zijn bestaande geldtransferdiensten moderniseren, zodat klanten in meer dan 200 landen makkelijker, sneller en goedkoper geld kunnen versturen of ontvangen zonder afhankelijk te zijn van de traditionele bankrails. Western Union werd in 1851 opgericht en verwerkt elke dag miljoenen transacties. Het bedrijf vormt eigenlijk een brug tussen mensen in verschillende landen die snel geld willen sturen of ontvangen, zonder dat beide partijen een bankrekening nodig hebben. Het bedrijf wil nieuwe technologieën gebruiken om klanten en gemeenschappen sterker te maken. Door de stap naar digitale valuta te zetten, kan Western Union met zijn eigen stablecoin USDPT ook zelf verdienen aan de groei van de cryptomarkt. Daarnaast komt er een Digital Asset Network, een systeem dat het makkelijker maakt om crypto om te zetten naar contant geld. Dankzij Western Union’s wereldwijde netwerk kunnen gebruikers straks hun digitale munten snel en eenvoudig “uitcashen” via aangesloten wallets en partners. “Ons Digital Asset Network en USDPT zullen een belangrijke rol spelen bij het realiseren van onze missie: financiële diensten voor iedereen, overal ter wereld toegankelijk maken,’’ aldus McGranahan. Waarom een eigen stablecoin? Voor Western Union biedt het gebruik van een (eigen) stablecoin meerdere grote voordelen Snellere transacties: Stablecoins maken internationale betalingen bijna real-time, in plaats van dagen via traditionele banken. Lagere kosten: Transacties via blockchain zijn vaak veel goedkoper, zeker bij grensoverschrijdende overschrijvingen. 24/7 beschikbaarheid: Anders dan banken werkt de blockchain dag en nacht, ook in het weekend. Directe brug tussen crypto en cash: Gebruikers kunnen stablecoins ontvangen of versturen en ze via Western Union’s netwerk snel omzetten naar contant geld. Meer controle en efficiëntie: Door een eigen stablecoin te gebruiken, behoudt Western Union zelf de controle over zijn geldstromen en kan het winst maken op transacties in plaats van afhankelijk te zijn van externe partijen. Het Solana-netwerk staat bovendien bekend om zijn bliksemsnelle transacties en extreem lage kosten: precies wat nodig is voor wereldwijde betalingen op grote schaal. Dankzij de samenwerking met de gereguleerde Anchorage Digital Bank kan Western Union dat doen op een manier die veilig, duurzaam en volledig compliant blijft met internationale regelgeving. Populariteit groeit dankzij nieuwe wetgeving Dat een bedrijf als Western Union, toch een dinosaurus in de financiële wereld, zich nu op crypto stort zegt natuurlijk veel. Maar sinds de GENIUS Act is goedgekeurd in de Verenigde Staten, de eerste federale wet die regulering invoert voor stablecoin, staan er meer grote spelers te trappelen om deze snelgroeiende markt te betreden. Deze maand nam Citi Ventures, de investeringsafdeling van de elfde grootste bank ter wereld Citigroup, nog een belang in het Londense fintech bedrijf BVNK, dat infrastructuur bouwt voor wereldwijde stablecoin-betalingen. En eerder dit jaar doken er al berichten op dat Citigroup samen met JPMorgan, Bank of America en Wells Fargo, gesprekken zouden voeren voor een gezamenlijke stablecoin-lancering. Sinds die wetgeving er is, durven meer bedrijven en gebruikers stablecoins te gebruiken, omdat ze nu weten dat het veilig en officieel gereguleerd is. Volgens een nieuw rapport van Artemis is het gebruik van stablecoins voor betalingen al met 70 procent gestegen sinds de GENIUS Act werd aangenomen. Best wallet - betrouwbare en anonieme wallet Best wallet - betrouwbare en anonieme wallet Meer dan 60 chains beschikbaar voor alle crypto Vroege toegang tot nieuwe projecten Hoge staking belongingen Lage transactiekosten Best wallet review Koop nu via Best Wallet Let op: cryptocurrency is een zeer volatiele en ongereguleerde investering. Doe je eigen onderzoek. Het bericht Nieuwe reus betreedt crypto: Western Union lanceert Solana-stablecoin is geschreven door Ivo Melchers en verscheen als eerst op Bitcoinmagazine.nl.
Share
2025/10/29 04:31