Multi-Query Attention (MQA) (MQA)

Also known as: MQA

Quick definition

An attention variant in which multiple query heads share a single set of key and value projections.

An attention variant in which multiple query heads share a single set of key and value projections.

Sharing keys and values can speed autoregressive decoding by reducing cache size, though it changes the model's representational trade-offs.

Example: A production decoder serves more concurrent requests because each token requires a smaller KV cache.

Common use cases: Efficient transformers, low-memory inference, and scalable generation.

Examples

  • A production decoder serves more concurrent requests because each token requires a smaller KV cache.

Use cases

  • Efficient transformers, low-memory inference, and scalable generation.

Frequently asked questions

What is Multi-Query Attention (MQA)?

An attention variant in which multiple query heads share a single set of key and value projections.

What should I know about Multi-Query Attention (MQA)?

Sharing keys and values can speed autoregressive decoding by reducing cache size, though it changes the model's representational trade-offs.

Categories and tags