---
title: "Discussion on \"How much memory does a KV cache take? Read config.json and multiply\" | Hashnode"
description: "Discussion on \"How much memory does a KV cache take? Read config.json and multiply\". The KV cache costs 2 × layers × kv_heads × head_dim × 2 bytes per token in bf16. Nothing else goes into it — not the parameter count, not the hidden size, not the number on the model page.\nFor Qwen3-3"
url: "https://hashnode.com/posts/how-much-memory-does-a-kv-cache-take-read-config-json-and-multiply/6aeec74ee4e6157118c4a009"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How much memory does a KV cache take? Read config.json and multiply](https://pm25coder.hashnode.dev/how-much-memory-does-a-kv-cache-take-read-config-json-and-multiply?utm_source=hashnode&utm_medium=feed)

The KV cache costs 2 × layers × kv\_heads × head\_dim × 2 bytes per token in bf16. Nothing else goes into it — not the parameter count, not the hidden size, not the number on the model page. For Qwen3-3

Nov 7 · 5 min read · pm25coder.hashnode.dev  
Read the article

## Written by

[pm25coder](https://hashnode.com/@pm25coder)

@pm25coder

  
[View profile](https://hashnode.com/@pm25coder)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
