Skip to main content
← Back to glossary

Sparse attention

Performance

A technique that reduces long-context attention cost by letting only a subset of key/values (tokens or blocks) take part in each computation, selected by a scoring mechanism. In llama.cpp 0.8.0, QSA/DSA sparse attention is handled by a fused masking operation in ggml.

Related articles

This term in other languages