# Pamięć HBM i ściana pamięci

EN: **High-bandwidth memory and the memory wall** · id `memorywall` · aliases: memory wall, ściana pamięci, HBM, high-bandwidth memory, memory bandwidth bottleneck

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Inferencja i infrastruktura](https://aiatlasgraph.com/t/systems.md) › [Akceleratory](https://aiatlasgraph.com/t/hardware.md) › Pamięć HBM i ściana pamięci

## Description

- PL: Moc obliczeniowa akceleratorów rośnie szybciej niż przepustowość pamięci, dlatego przesyłanie wag i KV cache z HBM może stać się wąskim gardłem. Jest to szczególnie istotne w fazie generowania tokenów przez LLM, zwłaszcza przy małych batchach.
- EN: Accelerator compute grows faster than memory bandwidth, so moving weights and KV cache from HBM can become a bottleneck. This is especially important during LLM token generation, particularly at small batch sizes.

## In one sentence

- PL: To sytuacja, w której obliczenia modelu ogranicza szybkość dostarczania danych z pamięci.
- EN: This occurs when the speed of supplying data from memory limits model calculations.

## Problem it solves

- PL: Masz szybki układ obliczeniowy, ale model nadal czeka na dane zamiast wykonywać pracę.
- EN: You have a fast computing chip, but the model still waits for data rather than doing useful work.

## What it does

- PL: Potrzebne ustawienia i zapisy rozmowy muszą docierać do obliczeń; gdy przepływ jest za wolny, dodatkowa moc pozostaje niewykorzystana.
- EN: Parameters and conversation state must reach the computation units; when data flow is too slow, extra computing capacity remains unused.

## Everyday example

- PL: Przy generowaniu krótkich odpowiedzi zauważasz, że zmniejszenie zapisu modelu pomaga bardziej niż szybsze jednostki obliczeniowe.
- EN: When generating short responses, you find that reducing the model's representation helps more than faster computation units.

## This concerns you if you…

- PL: model jest wolny mimo dużej mocy obliczeniowej
- PL: chcesz sprawdzić wpływ przepustowości pamięci
- EN: find a model slow despite substantial computing power
- EN: want to check memory-bandwidth effects

## Keywords

HBM · SRAM · memory bandwidth · arithmetic intensity · bandwidth-bound decoding · weight streaming

## How it works

- PL: Wykonanie pobiera wagi i stan modelu z pamięci urządzenia do jednostek obliczeniowych. Gdy operacja ma mało obliczeń na przesłany bajt, szybkość ogranicza transfer, nawet przy niewykorzystanej mocy arytmetycznej.
- EN: Execution transfers weights and model state from device memory to compute units. When operations perform little computation per transferred byte, bandwidth limits speed despite unused arithmetic capacity.

## Limits

- PL: Wąskie gardło zależy od batcha, długości kontekstu i operacji. Więcej jednostek obliczeniowych nie naprawia ograniczonego transferu; cache, kwantyzacja i ponowne użycie danych mają własne koszty.
- EN: Bottlenecks depend on batch size, context length and operations. More compute units cannot fix limited bandwidth; caches, quantisation and data reuse have their own costs.

## Key terms

- PL: **HBM**: Pamięć akceleratora zaprojektowana do przesyłania dużej ilości danych.
- PL: **intensywność arytmetyczna**: Liczba operacji przypadających na bajt przeniesiony z określonego poziomu pamięci.
- EN: **HBM**: Accelerator memory designed for high-volume data transfer.
- EN: **arithmetic intensity**: Operations performed per byte transferred from a specified memory level.

## Know first

- [Kernele mnożenia macierzy (GEMM) (Matrix multiplication kernels (GEMM))](https://aiatlasgraph.com/t/gemm.md)
- [Algebra liniowa: wektory i macierze (Linear algebra: vectors and matrices)](https://aiatlasgraph.com/t/linearalgebra.md)

## Examples

- PL: hierarchia pamięci HBM → SRAM · wzrost FLOPS a wzrost przepustowości · dekodowanie ograniczone pamięcią
- EN: HBM → SRAM memory hierarchy · FLOPS growth vs bandwidth growth · memory-bound decoding

## Related topics

Untyped, symmetric "see also" links.

- [Model roofline: obliczenia czy przepustowość pamięci (Roofline model and arithmetic intensity)](https://aiatlasgraph.com/t/roofline.md)
- [Zarządzanie KV cache (KV cache management)](https://aiatlasgraph.com/t/kvcache.md)

## Sources

- [AI and Memory Wall](<https://arxiv.org/abs/2403.14123>) `ai-memory-wall-2024` · by Amir Gholami, Zhewei Yao, Sehoon Kim, Coleman Hooper, Michael W. Mahoney, Kurt Keutzer (UC Berkeley)
- [How to Scale Your Model — How to Think About TPUs](<https://jax-ml.github.io/scaling-book/tpus/>) `scaling-book-tpus` · by Jacob Austin, Sholto Douglas, Roy Frostig, Anselm Levskaya, Reiner Pope i in. (Google DeepMind) · sponsored
- [How to Scale Your Model — All About Rooflines](<https://jax-ml.github.io/scaling-book/roofline/>) `scaling-book-rooflines` · by Jacob Austin i in. (Google DeepMind)
- [Making Deep Learning Go Brrrr From First Principles](<https://horace.io/brrr_intro.html>) `horace-he-brrr-2022` · by Horace He

---

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