Switch language한국어
Back to the list

Paged Attention in Large Language Models LLMs

TL;DR AI

Key summary

2 min read
  1. Model configuration uses 524,288 bytes per token for KV storage, gPT-style config with 32 layers, 32 heads, 128 head dim, fp16 storage.

  2. Naive allocator pre-allocates memory for 2048 tokens per request, mAX_SEQ_LEN set to 2048 tokens.

  3. Request usage actually uses memory for 500 tokens on average, aVG_RESPONSE set to 500 tokens.

  4. Naive allocator pre-allocation results in about 1024 MB reserved per request calculation based on KV_BYTES_PER_TOKEN and MAX_SEQ_LEN.

  5. Request usage actual memory written per request is about 250 MB based on AVG_RESPONSE and KV_BYTES_PER_TOKEN.

Read the original