<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Inference on VRAM Diary</title><link>https://vramdiary.com/tags/inference/</link><description>Recent content in Inference on VRAM Diary</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 29 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://vramdiary.com/tags/inference/index.xml" rel="self" type="application/rss+xml"/><item><title>Things llama.cpp taught me the hard way</title><link>https://vramdiary.com/posts/llama-cpp-lessons/</link><pubDate>Thu, 29 Oct 2026 00:00:00 +0000</pubDate><guid>https://vramdiary.com/posts/llama-cpp-lessons/</guid><description>&lt;p>Every model in my lab runs on mainline llama.cpp, built from source on each machine, one systemd service per model. These are the things that cost me hours.&lt;/p>
&lt;h2 id="builds">Builds&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>V100 builds need &lt;code>-DCMAKE_CUDA_ARCHITECTURES=70&lt;/code>&lt;/strong> set explicitly, or they crash.&lt;/li>
&lt;li>&lt;strong>Every RPC node must run the same commit.&lt;/strong> Mismatched builds across a pool cause trouble.&lt;/li>
&lt;li>&lt;strong>Keep builds current.&lt;/strong> A month-old build was behind my &lt;a href="https://vramdiary.com/posts/loops-and-quants/">repetition loops&lt;/a>.&lt;/li>
&lt;/ul>
&lt;h2 id="memory">Memory&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>The KV cache piles onto whichever GPU has the least free VRAM.&lt;/strong> One card can OOM while the pool&amp;rsquo;s total looks fine. Watch each card, not the total.&lt;/li>
&lt;li>&lt;strong>&lt;code>-ub 512&lt;/code> roughly halves the working buffers&lt;/strong> and buys back context.&lt;/li>
&lt;li>&lt;strong>&lt;code>-ub 2048&lt;/code> plus unified memory made the 27B output gibberish.&lt;/strong> Not slow. Gibberish.&lt;/li>
&lt;li>&lt;strong>q8_0 KV cache&lt;/strong> looked the same as f16 to me, at half the memory.&lt;/li>
&lt;/ul>
&lt;h2 id="prompt-cache-and-swap">Prompt cache and swap&lt;/h2>
&lt;p>Each box has a &lt;strong>128GB host-RAM prompt cache plus two 128GB swapfiles&lt;/strong>. When a chat gets evicted, it swaps back in instead of being re-read from scratch. On long chats that&amp;rsquo;s the difference between a quick reply and a long wait for the prompt to be processed again.&lt;/p></description></item></channel></rss>