<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>GenAI on Melchi</title><link>https://melchi.me/categories/genai/</link><description>Recent content in GenAI on Melchi</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 20 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://melchi.me/categories/genai/index.xml" rel="self" type="application/rss+xml"/><item><title>Understanding KV Cache: The Hidden Memory Cost of Serving LLMs</title><link>https://melchi.me/posts/kv-cache/</link><pubDate>Tue, 19 May 2026 17:45:00 +1000</pubDate><guid>https://melchi.me/posts/kv-cache/</guid><description>&lt;p&gt;&lt;em&gt;How attention architectures evolved to keep KV cache from eating your GPU, and what that means if you self-host.&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Already comfortable with KV cache and attention?&lt;/strong&gt; Skip the theory and jump straight to the &lt;a href="https://melchi.me/tools/kv-cache-calculator/" rel=""&gt;interactive &lt;strong&gt;KV Cache Calculator&lt;/strong&gt;&lt;/a&gt;
 to size VRAM for your model, batch size, and target GPU.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you&amp;rsquo;re planning to self-host a large language model, you&amp;rsquo;ve probably sized VRAM based on parameters alone. A 70B model in BF16 needs roughly &lt;strong&gt;140 GB&lt;/strong&gt; just for weights. That&amp;rsquo;s the easy part: 70 billion parameters × 2 bytes.&lt;/p&gt;</description></item><item><title>KV Cache Calculator</title><link>https://melchi.me/tools/kv-cache-calculator/</link><pubDate>Wed, 20 May 2026 00:00:00 +0000</pubDate><guid>https://melchi.me/tools/kv-cache-calculator/</guid><description>&lt;p&gt;This calculator estimates how much GPU memory you need to serve a large language model. It accounts for &lt;strong&gt;model weights&lt;/strong&gt;, the &lt;strong&gt;KV cache&lt;/strong&gt; (the part most people under-budget), activation/runtime overhead, and GPU memory currently available on common accelerators.&lt;/p&gt;
&lt;p&gt;Pair it with the &lt;a href="https://melchi.me/posts/kv-cache/" rel=""&gt;KV Cache blog post&lt;/a&gt;
. Paste a Hugging Face model id (e.g. &lt;code&gt;Qwen/Qwen2.5-7B-Instruct&lt;/code&gt;) to auto-fill the architecture, or pick a curated preset, then tweak any field in &lt;strong&gt;Advanced options&lt;/strong&gt; to override.&lt;/p&gt;</description></item></channel></rss>