# Modele przestrzeni stanów (Mamba)

EN: **State-space models (Mamba)** · id `ssm` · aliases: SSM, state space model, state-space model, model przestrzeni stanów, Mamba

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Sieci i modele generatywne](https://aiatlasgraph.com/t/neural.md) › [Architektury efektywne](https://aiatlasgraph.com/t/efficientarch.md) › Modele przestrzeni stanów (Mamba)

## Description

- PL: Rodzina modeli sekwencyjnych, które aktualizują stan o stałym rozmiarze zamiast przechowywać pełną macierz uwagi lub KV cache. Mamba wprowadza selektywny, zależny od wejścia mechanizm stanu; autorzy raportują liniowe skalowanie względem długości sekwencji i konkurencyjne wyniki na kilku modalnościach.
- EN: A family of sequence models that update a fixed-size state instead of storing a full attention matrix or KV cache. Mamba introduces a selective, input-dependent state mechanism; its authors report linear scaling with sequence length and competitive results across several modalities.

## In one sentence

- PL: To modele sekwencji, które aktualizują zwarty stan opisujący wcześniejsze informacje.
- EN: These sequence models update a compact state representing earlier information.

## Problem it solves

- PL: Przechowywanie i porównywanie całej historii danych staje się zbyt kosztowne, gdy sekwencja rośnie.
- EN: Storing and comparing the full data history becomes too costly as a sequence grows.

## What it does

- PL: Każdy nowy element zmienia stan o ustalonym rozmiarze; wybrane konstrukcje uczą się, które informacje przekazywać dalej, a które pomijać.
- EN: Each new element updates a fixed-size state; selected designs learn which information to carry forward and which to discard.

## Everyday example

- PL: Model przetwarza długie nagranie, aktualizując pamięć kolejnych dźwięków bez tworzenia pełnej tabeli ich wzajemnych powiązań.
- EN: A model processes a long recording, updating sound-history state without constructing a full table of relationships between all elements.

## This concerns you if you…

- PL: przetwarzasz bardzo długie sekwencje
- PL: szukasz alternatywy dla pamięci pełnej uwagi
- EN: process very long sequences
- EN: seek alternatives to full-attention memory

## Keywords

Mamba · S4 · selective scan · selective state spaces · discretization · linear-time recurrence

## How it works

- PL: Stan aktualizuje się przez wyuczoną dynamikę i bieżące wejście, a osobna projekcja tworzy wyjście. Warianty selektywne uzależniają parametry aktualizacji od tokenu, regulując zachowanie informacji; odpowiedni skan umożliwia równoległy trening takiej rekurencji.
- EN: State is updated through learned dynamics and current input, with a separate projection producing output. Selective variants make update parameters token-dependent to control information retention; suitable scans enable parallel training of this recurrence.

## Limits

- PL: Stan o stałym rozmiarze kompresuje historię i nie zapewnia bezpośredniego odczytu dowolnego tokenu. Stabilność dynamiki oraz implementacja skanu wpływają na uczenie i rzeczywisty koszt.
- EN: Fixed-sized state compresses history without direct access to arbitrary tokens. Dynamics stability and scan implementation affect learning and actual cost.

## Key terms

- PL: **model przestrzeni stanów**: Opis sekwencji przez aktualizowany stan wewnętrzny i funkcję odczytu.
- PL: **selektywna aktualizacja**: Zmiana pamięci sterowana treścią bieżącego wejścia.
- EN: **state-space model**: A sequence description using updated internal state and a readout function.
- EN: **selective update**: A memory update controlled by current input content.

## Know first

- [Sieci rekurencyjne (RNN) (Recurrent neural networks (RNN))](https://aiatlasgraph.com/t/rnn.md)
- [Algebra liniowa: wektory i macierze (Linear algebra: vectors and matrices)](https://aiatlasgraph.com/t/linearalgebra.md)

## Examples

- PL: Mamba · selektywne modele przestrzeni stanów · selektywne skanowanie
- EN: Mamba · selective state-space models · selective scan

## Related topics

Untyped, symmetric "see also" links.

- [Architektury hybrydowe: uwaga + warstwy liniowe (Hybrid architectures: attention plus linear/recurrent layers)](https://aiatlasgraph.com/t/hybridattention.md)
- [Warstwy z modelem w stanie ukrytym (Test-time training layers)](https://aiatlasgraph.com/t/tttlayers.md)

## Sources

- [Mamba: Linear-Time Sequence Modeling with Selective State Spaces](<https://arxiv.org/abs/2312.00752>) `mamba-2023` · by Albert Gu, Tri Dao
- [LLM Architecture Gallery: Hybrid Attention](<https://sebastianraschka.com/llm-architecture-gallery/hybrid-attention/>) `raschka-hybrid-attention-gallery` · by Sebastian Raschka

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/ssm · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
