# Hugging Face — KV Cache from scratch in nanoVLM

- Company: Hugging Face (huggingface.co)
- Announced: 2025-06-04T00:00:00+00:00
- Subject: Platform
- Models affected: nanoVLM
- Source: https://huggingface.co/blog/kv-cache
- Record: https://forck.live/items/1682-kv-cache-from-scratch-in-nanovlm

This blog post explains the implementation of KV caching from scratch in the nanoVLM repository, a small pure PyTorch codebase for training Vision Language Models. It reports a 38% speedup in generation and discusses the theory behind KV caching and its practical application.

## Evidence

Verbatim from https://huggingface.co/blog/kv-cache:

> We have implemented KV Caching from scratch in our nanoVLM repository (a small codebase to train your own Vision Language Model with pure PyTorch). This gave us a 38% speedup in generation.

---

Record: https://forck.live/items/1682-kv-cache-from-scratch-in-nanovlm
Catalogue: https://forck.live/llms.txt
Feed: https://forck.live/feed.md
