RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Fredoline Eruo
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
Glossary / Transformer & LLM components / Flash Attention
Transformer & LLM components

Flash Attention

Flash Attention is a memory-efficient implementation of the attention mechanism that reduces memory usage from O(n²) to O(n) for sequence length n, while also being faster on modern GPUs.

The key insight: standard attention materializes the full N×N attention matrix in HBM (the slow GPU memory). Flash Attention tiles the computation, keeps intermediate results in fast SRAM, and never writes the full matrix to HBM. Same math, much less memory bandwidth pressure.

For local inference this matters most at long context. Without Flash Attention, a 32K-context generation on a 7B model can OOM a 24GB card; with Flash Attention, it fits with room to spare. llama.cpp added support in late 2024; vLLM and ExLlamaV2 use it by default.

Related terms

Context WindowKV Cache
Buyer guides
  • Best GPU for local AI →
  • Best laptop for local AI →
  • Best Mac for local AI →
When it doesn't work
  • CUDA out of memory →
  • Ollama running slowly →
  • ROCm not detected →