<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Cliff K</title>
    <description>The latest articles on DEV Community by Cliff K (@megalodon).</description>
    <link>https://dev.to/megalodon</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4204324%2F00a13194-fea8-4363-bfe3-f89dbb3b3b44.png</url>
      <title>DEV Community: Cliff K</title>
      <link>https://dev.to/megalodon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/megalodon"/>
    <language>en</language>
    <item>
      <title>I let my coding agent tune my local LLMs: 3x faster prompts on an 8 GB AMD GPU</title>
      <dc:creator>Cliff K</dc:creator>
      <pubDate>Sat, 31 Oct 2026 21:40:39 +0000</pubDate>
      <link>https://dev.to/megalodon/i-let-my-coding-agent-tune-its-own-local-llm-3x-faster-prompts-on-an-8-gb-amd-gpu-8eo</link>
      <guid>https://dev.to/megalodon/i-let-my-coding-agent-tune-its-own-local-llm-3x-faster-prompts-on-an-8-gb-amd-gpu-8eo</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Update (Nov 3, v0.2.0):&lt;/strong&gt; the project is now called &lt;a href="https://github.com/cliffkoome/local-llm-speedtune" rel="noopener noreferrer"&gt;&lt;strong&gt;local-llm-speedtune&lt;/strong&gt;&lt;/a&gt;. It was tune-my-llm, then llamacpp-speedtune, and old links redirect. It now picks the best &lt;strong&gt;inference engine&lt;/strong&gt; first, then the backend, then the flags. It asks all its questions up front, gives you a finish time, runs while you're away, and saves each model's best config. It also has a &lt;strong&gt;2-minute check&lt;/strong&gt;, &lt;strong&gt;export to Ollama&lt;/strong&gt; and &lt;strong&gt;community results&lt;/strong&gt;. Details are in the skill section below.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I run a 35B MoE model (Qwen3.6-35B-A3B) as the main model for &lt;a href="https://opencode.ai" rel="noopener noreferrer"&gt;OpenCode&lt;/a&gt;, on a very ordinary PC: Ryzen 7 5700X, 32 GB DDR4, and a &lt;strong&gt;Radeon RX 6600 XT with 8 GB of VRAM&lt;/strong&gt;. It worked, but long sessions felt sluggish, and every guide I read said the same thing: &lt;em&gt;on AMD, just use llama.cpp with Vulkan.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmhkcwn4stelu4utmdbb1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmhkcwn4stelu4utmdbb1.png" alt="Before vs after results table" width="799" height="598"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So I asked my coding agent to verify that, and to find the best config for every model I have. It took a day of experiments. The headline result, measured at the point where OpenCode compacts its context:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Qwen3.6-35B-A3B at 49K tokens&lt;/th&gt;
&lt;th&gt;Backend&lt;/th&gt;
&lt;th&gt;Key flags&lt;/th&gt;
&lt;th&gt;Prompt reading&lt;/th&gt;
&lt;th&gt;Generation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Before&lt;/td&gt;
&lt;td&gt;Vulkan&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;--n-cpu-moe 33&lt;/code&gt;, &lt;code&gt;-ub 512&lt;/code&gt;, q8_0 cache&lt;/td&gt;
&lt;td&gt;172 t/s&lt;/td&gt;
&lt;td&gt;19.2 t/s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;After&lt;/td&gt;
&lt;td&gt;HIP (ROCm)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;--n-cpu-moe 34&lt;/code&gt;, &lt;code&gt;-ub 2048&lt;/code&gt;, f16 cache, &lt;code&gt;-t 8&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;526–562 t/s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;24–25 t/s&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Re-reading a full 49.5K context went from ~4.8 minutes to ~95 seconds. On six real OpenCode tasks the tuned config passed &lt;strong&gt;6/6&lt;/strong&gt; (the old one 5/6), and tasks with long prompts finished about &lt;strong&gt;2× faster&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Then I packaged the whole process as an open-source agent skill, &lt;a href="https://github.com/cliffkoome/local-llm-speedtune" rel="noopener noreferrer"&gt;&lt;strong&gt;local-llm-speedtune&lt;/strong&gt;&lt;/a&gt;, so your agent can do the same on your hardware.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why "tok/s on an empty prompt" is the wrong benchmark for agents
&lt;/h2&gt;

&lt;p&gt;A coding agent isn't a chatbot. Every turn, OpenCode resends ~12K tokens of system prompt and tool definitions plus the whole conversation. With a 64K context it auto-compacts at roughly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;usable = ctx − max(0.15 · ctx, 16000)   →   ~49.5K at 64K
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So the model spends its life between ~12K and ~49.5K tokens deep. A config that wins at depth 0 can lose badly at 48K, and &lt;strong&gt;prompt-reading speed at depth matters as much as generation speed&lt;/strong&gt;. Measurements were taken at the depths the agent actually works at (16K–48K), not just at 0, then confirmed in a real &lt;code&gt;llama-server&lt;/code&gt; at the full 64K.&lt;/p&gt;

&lt;p&gt;(One side effect: at 32K context OpenCode reserves 16K, which leaves a 32K model only ~4.7K tokens of working room after the system prompt. Context size choices look very different once you do this maths.)&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned (some of it surprised me)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. "Vulkan is best on AMD" was only half true.&lt;/strong&gt; With a fair comparison (same llama.cpp commit, flash attention on):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Qwen3.6 MoE was &lt;strong&gt;47–55% faster at reading and 22–35% faster at generating on HIP/ROCm&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Dense 7B/3B models &lt;em&gt;generated&lt;/em&gt; up to 28% faster on Vulkan.&lt;/li&gt;
&lt;li&gt;Gemma-4 12B only fit on Vulkan at all. HIP wanted 1.1 GB more compute buffer, and ROCm can't spill to RAM.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The fix: build llama.cpp with &lt;strong&gt;both&lt;/strong&gt; backends (&lt;code&gt;-DGGML_HIP=ON -DGGML_VULKAN=ON&lt;/code&gt;). &lt;code&gt;--list-devices&lt;/code&gt; then shows &lt;code&gt;ROCm0&lt;/code&gt; and &lt;code&gt;Vulkan0&lt;/code&gt;, and in router mode each preset picks its own:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[qwen3.6-35b-a3b]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="py"&gt;device&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;ROCm0&lt;/span&gt;
&lt;span class="py"&gt;n-cpu-moe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;34&lt;/span&gt;
&lt;span class="py"&gt;ubatch-size&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;2048&lt;/span&gt;
&lt;span class="py"&gt;cache-type-k&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;f16&lt;/span&gt;
&lt;span class="py"&gt;cache-type-v&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;f16&lt;/span&gt;
&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nn"&gt;[gemma-4-12b]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="py"&gt;device&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;Vulkan0&lt;/span&gt;
&lt;span class="py"&gt;ubatch-size&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;1024&lt;/span&gt;
&lt;span class="py"&gt;cache-type-k&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;q8_0&lt;/span&gt;
&lt;span class="py"&gt;cache-type-v&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;q8_0&lt;/span&gt;
&lt;span class="py"&gt;no-mmproj-offload&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One server, one port, and every model on its best backend. Switching models in OpenCode switches the whole config.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. &lt;code&gt;-ub 2048&lt;/code&gt; nearly doubled prompt speed&lt;/strong&gt; for the MoE with experts in RAM (328 → 599 t/s at 16K). Dense models fully on the GPU barely cared.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. q8_0 KV cache isn't free.&lt;/strong&gt; On HIP, generation was 10% slower than with f16 at 16K and 23% slower at 45K (20.0 vs 26.0 t/s). Use f16 wherever it fits, and treat q8_0 as the floor (not q4) for tool calling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. SMT threads hurt.&lt;/strong&gt; &lt;code&gt;-t 16&lt;/code&gt; on an 8-core/16-thread CPU halved MoE generation (27.9 → 12.7 t/s). Anything from 4 to 12 threads performed the same.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. llama-bench doesn't load vision encoders.&lt;/strong&gt; Gemma looked fine in benchmarks, but behind the real server, with its mmproj on the GPU, it spilled past 8 GB: 121 t/s reading at 28K. With &lt;code&gt;--no-mmproj-offload&lt;/code&gt; it read at &lt;strong&gt;212 t/s&lt;/strong&gt;, and an image still takes only ~11 s. Always validate in the real server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. The draft model made it slower.&lt;/strong&gt; Gemma's own assistant draft (&lt;code&gt;--spec-type draft-mtp&lt;/code&gt;) &lt;em&gt;halved&lt;/em&gt; generation speed (26 → 12–16 t/s, ~45% acceptance). N-gram speculation did nothing measurable either. Measure before you enable speculation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. OpenCode's title requests evict your conversation.&lt;/strong&gt; Every few turns OpenCode sends a tiny "name this conversation" prompt, which pushes the long conversation out of a single-slot server's KV cache. llama-server's RAM prompt cache (&lt;code&gt;--cache-ram&lt;/code&gt;, on by default) restores it: disabling it cost 7% and 46K extra tokens on a replayed 49-turn session. Leave it on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. No flag fixes a model that can't drive the agent.&lt;/strong&gt; On the same six tasks: Gemma-4 12B passed 5/6, Qwen2.5-7B passed 2/6, and Qwen2.5-Coder-3B passed &lt;strong&gt;0/6, without making a single tool call&lt;/strong&gt;. Check this &lt;em&gt;before&lt;/em&gt; spending hours tuning a model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing agents headless is full of traps
&lt;/h2&gt;

&lt;p&gt;Running OpenCode non-interactively in a benchmark harness broke in creative ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;opencode run&lt;/code&gt; waits forever on a non-TTY stdin → pass an empty stdin.&lt;/li&gt;
&lt;li&gt;OpenCode takes its working directory from &lt;code&gt;$PWD&lt;/code&gt;, not the process cwd, so my first runs edited files in the &lt;em&gt;benchmark&lt;/em&gt; folder → set &lt;code&gt;PWD&lt;/code&gt; explicitly.&lt;/li&gt;
&lt;li&gt;OpenCode identifies projects by git root commit, so copies of one repo collided → fresh &lt;code&gt;git init&lt;/code&gt; per run.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pkill -f &amp;lt;pattern&amp;gt;&lt;/code&gt; matched (and killed) the agent's own shell → kill by PID.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are all fixed in the scripts and documented in the repo's &lt;code&gt;gotchas.md&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The skill: let your agent do this for you
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/cliffkoome/local-llm-speedtune" rel="noopener noreferrer"&gt;&lt;strong&gt;local-llm-speedtune&lt;/strong&gt;&lt;/a&gt; is an &lt;a href="https://github.com/cliffkoome/local-llm-speedtune/blob/main/SKILL.md" rel="noopener noreferrer"&gt;Agent Skill&lt;/a&gt; plus scripts. It picks the best &lt;strong&gt;engine&lt;/strong&gt;, then the best &lt;strong&gt;backend&lt;/strong&gt;, then the best &lt;strong&gt;flags&lt;/strong&gt; for your hardware.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;llama.cpp is the default engine.&lt;/strong&gt; It runs on CUDA, HIP/ROCm, Vulkan, Metal or CPU, and it can split a model between GPU and RAM. The skill tries another engine only where the hardware gives it a real chance: ExLlama on NVIDIA when the model fits in VRAM, MLX on Apple Silicon, ik_llama.cpp for MoE models with experts in RAM, OpenVINO on Intel. A challenger has to win by measurement: at least 10% faster, at the same bits per weight, passing the same agent tasks. The agent may research what's current for your hardware online, but that research only proposes candidates. After the Vulkan lesson above, only measurements on your machine decide.&lt;/p&gt;

&lt;h3&gt;
  
  
  How a tune runs
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Inventory&lt;/strong&gt; (~2 min, read-only): GPU, VRAM, cores, &lt;strong&gt;RAM speed and channels&lt;/strong&gt;, the real PCIe link (AMD cards report a misleading x16), your models and whether they fit, the engines you already have, and your current settings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One round of questions&lt;/strong&gt;, with what it found filled in:

&lt;ul&gt;
&lt;li&gt;what you use the models for&lt;/li&gt;
&lt;li&gt;which models to tune&lt;/li&gt;
&lt;li&gt;context size&lt;/li&gt;
&lt;li&gt;just you, or several users at once (if several won't fit, it says so in numbers)&lt;/li&gt;
&lt;li&gt;what matters most&lt;/li&gt;
&lt;li&gt;how long you can be away&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;what it may do while you're away&lt;/strong&gt;: build backends, install engines, download up to N GB, stop your model server, keep the computer awake&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can reply "all defaults" to most of them.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;A plan with a finish time&lt;/strong&gt;, e.g. &lt;em&gt;"3 models, about 1 h 40 min, done around 21:40"&lt;/em&gt;. Then you can leave.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The unattended run:&lt;/strong&gt; your current config is measured first, then engines, backends, flags and agent tasks. It resumes where it stopped if interrupted, never uses sudo, and never changes your live config while you're away.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Results:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;before/after for every model&lt;/li&gt;
&lt;li&gt;each model's best config saved as a &lt;strong&gt;profile&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;one endpoint for all of them (router presets, or llama-swap if models ended up on different engines)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You get a notification when it's done. The new config is applied only when you're back and say yes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Start with the 2-minute check
&lt;/h3&gt;

&lt;p&gt;Before spending any GPU time, find out whether tuning is worth it. The check reads your current settings and hardware and points out likely problems. It needs no config, runs no benchmarks and changes nothing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/cliffkoome/local-llm-speedtune &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;local-llm-speedtune/scripts
./quick_check.py &lt;span class="nt"&gt;--router&lt;/span&gt; http://127.0.0.1:8080      &lt;span class="c"&gt;# a llama-server router&lt;/span&gt;
./quick_check.py &lt;span class="nt"&gt;--preset&lt;/span&gt; ~/models/presets.ini       &lt;span class="c"&gt;# or a presets file&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;== qwen3.6-35b-a3b  (qwen35moe, MoE 8/256 experts, 40 layers, 20.6 GB)
   [big   ] Small batch size with experts in RAM
            fix: ubatch-size = 2048 and batch-size = 2048, if VRAM allows
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I ran it on my original, untuned presets file. It flagged the problems the tune later fixed: batch size 512 with experts in RAM, GPU layers left to &lt;code&gt;--fit&lt;/code&gt;, and every model on the same backend. On my tuned router it says all four models look tuned.&lt;/p&gt;

&lt;h3&gt;
  
  
  Three modes
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Check&lt;/th&gt;
&lt;th&gt;Quick tune&lt;/th&gt;
&lt;th&gt;Comprehensive tune&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Time&lt;/td&gt;
&lt;td&gt;~2 min, GPU stays free&lt;/td&gt;
&lt;td&gt;25–45 min per model&lt;/td&gt;
&lt;td&gt;1.5–3 h per model (run it overnight)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Does&lt;/td&gt;
&lt;td&gt;Reads current flags, rule-of-thumb findings, changes nothing&lt;/td&gt;
&lt;td&gt;Uses what's installed; key sweeps at your agent's max context; fit check; 2 agent tasks&lt;/td&gt;
&lt;td&gt;Everything: challenger engines, every backend, all sweeps at 3–4 depths, speculative decoding, session replay, 6 agent tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;One prompt to install and run it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Install the agent skill from https://github.com/cliffkoome/local-llm-speedtune (clone it into your skills folder, or into
~/local-llm-speedtune and read its SKILL.md if you don't support skills). Then use it to tune my local models.
Check my hardware first, then ask me all your questions in one go and tell me when it will be done.
After that, run it unattended to the end. Don't change my live server or agent config until I'm back and say yes.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Run the tune from an agent that isn't using the models being tuned.&lt;/strong&gt; A tune needs the whole GPU, so it unloads your live server's models. If your agent runs on one of them (OpenCode on local Qwen, in my case), the tune would stop the agent itself. Use an agent on a cloud model, or run the scripts yourself. The skill checks for this and stops rather than unloading its own model.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using Ollama?
&lt;/h3&gt;

&lt;p&gt;Ollama runs llama.cpp underneath but exposes fewer settings. The 2-minute check also reads Ollama's settings (&lt;code&gt;--ollama&lt;/code&gt;). If you're open to switching, the tune measures your Ollama setup as the baseline. If you want to stay on Ollama, &lt;code&gt;to_ollama.py&lt;/code&gt; turns the winning config into a Modelfile and service settings (&lt;code&gt;num_ctx&lt;/code&gt;, &lt;code&gt;num_gpu&lt;/code&gt;, &lt;code&gt;OLLAMA_KV_CACHE_TYPE&lt;/code&gt;, …). It also tells you what Ollama can't do, such as moving only the experts of an MoE model to RAM, or choosing a backend per model.&lt;/p&gt;

&lt;h3&gt;
  
  
  Share your numbers
&lt;/h3&gt;

&lt;p&gt;There's a &lt;a href="https://github.com/cliffkoome/local-llm-speedtune/tree/main/community" rel="noopener noreferrer"&gt;community results table&lt;/a&gt; and a short &lt;a href="https://github.com/cliffkoome/local-llm-speedtune/issues/new?template=share-results.yml" rel="noopener noreferrer"&gt;share-your-results form&lt;/a&gt;. After a tune, the skill offers to fill the form in for you. It never posts anything itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Honest limits:&lt;/strong&gt; the full workflow has only been run end to end on Linux with an AMD GPU and llama.cpp. The NVIDIA, Apple and Intel paths and the challenger engines follow each project's docs but haven't been run on real hardware yet. If you try them, results or an issue would help a lot, especially one where a challenger beats llama.cpp. The agent tasks currently support OpenCode, and adding another agent is one adapter function. Each agentic task was run once, so treat differences under ~20% on short tasks as noise.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further reading on DEV
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://dev.to/avatsaev/pro-developers-guide-to-local-llms-with-llamacpp-qwen-coder-qwencode-on-linux-15h"&gt;Engineer's Guide to Local LLMs with LLaMA.cpp on Linux&lt;/a&gt;: a good baseline setup for coding models.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/dmitryame/inside-my-llamacpp-setup-tuning-qwen-38-27b-for-512k-context-o3c"&gt;Inside My llama.cpp Setup: Tuning Qwen 3.8 27B for 512K Context&lt;/a&gt;: the same kind of tuning on a 128 GB Mac, at the other end of the hardware spectrum.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/abdulrahman_maslmany/prompt-caching-how-to-slash-local-llm-ttft-latency-2ei8"&gt;Prompt Caching: How to Slash Local LLM TTFT &amp;amp; Latency&lt;/a&gt;: more on why the cache behaviour in point 7 matters.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you run local models with a coding agent, I'd love to hear what your numbers look like before and after. Repo: &lt;a href="https://github.com/cliffkoome/local-llm-speedtune" rel="noopener noreferrer"&gt;https://github.com/cliffkoome/local-llm-speedtune&lt;/a&gt;&lt;/p&gt;

</description>
      <category>llamacpp</category>
      <category>localllm</category>
      <category>performance</category>
      <category>opensource</category>
    </item>
    <item>
      <title>typeghast: a typing game haunted by your coding agent's context window</title>
      <dc:creator>Cliff K</dc:creator>
      <pubDate>Fri, 30 Oct 2026 11:29:50 +0000</pubDate>
      <link>https://dev.to/megalodon/typeghast-a-typing-game-haunted-by-your-coding-agents-context-window-5hkn</link>
      <guid>https://dev.to/megalodon/typeghast-a-typing-game-haunted-by-your-coding-agents-context-window-5hkn</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week4-2026-10-26"&gt;Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;There's a dead stretch in every coding-agent session. You hand over a task, the agent starts reading files and running tests, and you sit there watching it scroll. Meanwhile, out of sight, its context window fills up with every file it read, every log it printed, every plan it revised. Past a certain point the agent starts to forget and to contradict itself. People call it &lt;strong&gt;context rot&lt;/strong&gt;, and &lt;a href="https://dev.to/enjoy_kumawat/context-rot-why-your-ai-coding-agent-gets-dumber-mid-session-and-how-i-stopped-it-3e9o"&gt;Context Rot: Why Your AI Coding Agent Gets Dumber Mid-Session&lt;/a&gt; by enjoy_kumawat describes it well.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;typeghast&lt;/strong&gt; turns that dead stretch into a typing game, and turns context rot into actual ghosts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fcliffkoome%2Ftypeghast%2Fmain%2Fassets%2Fdemo.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fcliffkoome%2Ftypeghast%2Fmain%2Fassets%2Fdemo.gif" alt="typeghast: typing what the agent just did while ghosts named after its context swarm the text, until a compact exorcises them" width="559" height="261"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You run it in a split pane next to your agent. It reads the agent's session as it happens and:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;gives you the agent's work to type.&lt;/strong&gt; A local Gemma model turns what the agent just did into short changelog lines: &lt;em&gt;"Implemented a cost pumpkin in the header for tracked sessions."&lt;/em&gt; So you learn what changed while you wait, instead of finding out from the diff afterwards.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;fills the screen with ghosts as the context fills up.&lt;/strong&gt; They drift over the words and hide letters. Some hunt your cursor. Near the peak they turn a rotten green.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;names every ghost after something haunting the context:&lt;/strong&gt; &lt;code&gt;ci logs&lt;/code&gt;, &lt;code&gt;webhook retries&lt;/code&gt;, &lt;code&gt;pagination test&lt;/code&gt;. They're the agent's past, still hanging around in the window, taking up space.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;exorcises them when you &lt;code&gt;/compact&lt;/code&gt; or &lt;code&gt;/clear&lt;/code&gt;.&lt;/strong&gt; The context drops and the ghosts flee.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pays you to type through it.&lt;/strong&gt; The score multiplier climbs to ×3 at the peak, and a 🎃 pumpkin in the corner shows what the session would have cost at API prices.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffdt31pko3m14s7psozrz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffdt31pko3m14s7psozrz.png" alt="Haunted mode: ghosts named after the agent's context drift over the line being typed, with the context meter and cost pumpkin in the header" width="800" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's the theme as I read it: a ghost in the machine that is literally the machine's own past, and a small ritual for laying it to rest.&lt;/p&gt;

&lt;p&gt;There's also a normal mode with no agent: you type today's top headlines from DEV, Lobsters and Hacker News. Type a headline without a mistake and its link unlocks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0ny9m2hmdwx1iyutv3du.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0ny9m2hmdwx1iyutv3du.png" alt="Normal mode: typing a trending DEV headline, with the unlocked link shown under the text" width="800" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;install &lt;/span&gt;github.com/cliffkoome/typeghast@latest
typeghast &lt;span class="nt"&gt;--demo&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;code&gt;--demo&lt;/code&gt; needs nothing else. It plays a made-up agent session, and you control the context with PgUp and PgDn. Home or ctrl+l compacts and triggers the exorcism. To play it for real, run plain &lt;code&gt;typeghast&lt;/code&gt; while a Claude Code session is working, and it finds the session on its own, or lets you pick one if several are running.&lt;/p&gt;

&lt;p&gt;Prebuilt binaries for Linux, macOS and Windows are on the &lt;a href="https://github.com/cliffkoome/typeghast/releases/tag/v0.1.0" rel="noopener noreferrer"&gt;v0.1.0 release&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/cliffkoome" rel="noopener noreferrer"&gt;
        cliffkoome
      &lt;/a&gt; / &lt;a href="https://github.com/cliffkoome/typeghast" rel="noopener noreferrer"&gt;
        typeghast
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A terminal typing game haunted by context rot
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;typeghast&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;A terminal typing game haunted by your coding agent's context window.&lt;/p&gt;

&lt;p&gt;📖 &lt;a href="https://dev.to/megalodon/typeghast-a-typing-game-haunted-by-your-coding-agents-context-window-5hkn" rel="nofollow"&gt;Read the story behind it on DEV&lt;/a&gt;
how it reads the agent's context, and how Gemma 4 went from 90 seconds per
batch to a few seconds.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/cliffkoome/typeghast/assets/demo.gif"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fcliffkoome%2Ftypeghast%2FHEAD%2Fassets%2Fdemo.gif" alt="typeghast: typing what the agent just did while ghosts named after its context swarm the text, until a compact exorcises them"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You kick off a coding agent, then wait. typeghast gives you something to do
in that terminal while it works, and it plays off what the agent is doing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You type what your agent just did.&lt;/strong&gt; A local open-weight model reads the
agent's session as it happens and writes short changelog lines for you to
type: &lt;em&gt;"Added retries with backoff to the webhook client so flaky
deliveries recover."&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ghosts are context rot.&lt;/strong&gt; The fuller the agent's context window gets, the
more ghosts drift over the words and hide letters. Some hunt your cursor
and as the haunting nears its peak they turn a rotten green. Each one is
named…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/cliffkoome/typeghast" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Go, &lt;a href="https://github.com/charmbracelet/bubbletea" rel="noopener noreferrer"&gt;Bubble Tea&lt;/a&gt; and Lip Gloss, MIT licensed. It's a single binary with no runtime dependencies.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Reading the agent's mind (well, its transcript)
&lt;/h3&gt;

&lt;p&gt;Claude Code writes each session to a JSONL file under &lt;code&gt;~/.claude/projects/&lt;/code&gt;. typeghast tails that file. Each reply records its token usage, so the context size is simple to get: input + cache reads + cache writes + output, taken from the latest reply.&lt;/p&gt;

&lt;p&gt;How full is "full"? A fixed number of tokens would be wrong for most models, so the haunting peaks at a fraction (default 40%) of the model's real context window. Window sizes and prices come from &lt;a href="https://github.com/BerriAI/litellm" rel="noopener noreferrer"&gt;LiteLLM's open model catalog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Two things in the transcript caught me out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Every reply is logged several times,&lt;/strong&gt; once per content block, up to four copies. Add up usage naively and the cost pumpkin overcharges you up to 4×. Usage is now counted once per message id.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Subagent turns are in the same file.&lt;/strong&gt; They cost money, so they count toward the pumpkin. But they run in their own context, so they must not count toward the ghosts.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The narrator: Gemma 4, on my own GPU
&lt;/h3&gt;

&lt;p&gt;Every few actions, typeghast sends a batch of them (files edited, commands run, what the agent said) to a model running locally in &lt;a href="https://ollama.com" rel="noopener noreferrer"&gt;Ollama&lt;/a&gt;. The model returns JSON: 2 to 4 sentences to type, plus 1 to 3 names for the ghosts. If Gemma is installed it's picked automatically.&lt;/p&gt;

&lt;p&gt;Here's real output from the session where I built the cost pumpkin:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Added tests for deduplicated spend and pricing logic.&lt;br&gt;
Implemented a cost pumpkin in the header for tracked sessions.&lt;br&gt;
Rendered a haunted frame from the session transcript.&lt;/p&gt;

&lt;p&gt;ghosts: &lt;code&gt;cost pumpkin&lt;/code&gt;, &lt;code&gt;haunted frame&lt;/code&gt;, &lt;code&gt;status.md&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  The part where Gemma 4 was unusable, and then wasn't
&lt;/h3&gt;

&lt;p&gt;I compared Gemma 4 12B with Qwen 2.5 7B on an AMD Radeon RX 6600. Both got the same four batches of real events from one of my sessions. Gemma's first run was a disaster:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;about 90 seconds per batch&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2 of 4 batches came back with no JSON at all&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;ollama show gemma4:12b&lt;/code&gt; gave it away: Gemma 4 has &lt;strong&gt;thinking on by default&lt;/strong&gt;. It was reasoning at length before every answer, and sometimes it ran out before it ever wrote the JSON. A typing game can't wait 90 seconds for its next sentence.&lt;/p&gt;

&lt;p&gt;The fix was one field in the request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Marshal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;map&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="n"&gt;any&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s"&gt;"model"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;  &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"stream"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="no"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"format"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="c"&gt;// Thinking models like Gemma 4 otherwise reason for minutes before&lt;/span&gt;
    &lt;span class="c"&gt;// answering, and sometimes run out before writing the JSON.&lt;/span&gt;
    &lt;span class="s"&gt;"think"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="no"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="c"&gt;// Narration comes in bursts; don't reload the model between them.&lt;/span&gt;
    &lt;span class="s"&gt;"keep_alive"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"30m"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="c"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Gemma 4 12B&lt;/th&gt;
&lt;th&gt;Qwen 2.5 7B&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;First call (loads the model)&lt;/td&gt;
&lt;td&gt;9 s&lt;/td&gt;
&lt;td&gt;5.4 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Later calls&lt;/td&gt;
&lt;td&gt;3.3–6.1 s&lt;/td&gt;
&lt;td&gt;1.5–1.8 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Valid JSON&lt;/td&gt;
&lt;td&gt;4/4 (was 2/4)&lt;/td&gt;
&lt;td&gt;4/4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sentences&lt;/td&gt;
&lt;td&gt;clean changelog lines, consistent tense&lt;/td&gt;
&lt;td&gt;choppier, mixed tenses&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Qwen is faster, but Gemma writes the better lines, and in play the speed doesn't matter. Narration runs in the background while you type the lines already queued, so you never see the wait. Gemma stays the default.&lt;/p&gt;

&lt;p&gt;It turns out &lt;code&gt;think: false&lt;/code&gt; matters for more than speed. &lt;a href="https://dev.to/homelabpm/ollama-skips-your-json-schema-when-a-thinking-model-answers-without-thinking-2916"&gt;Ollama skips your JSON schema when a thinking model answers without thinking&lt;/a&gt; by homelabpm explains why. On the same Ollama version I'm running, a thinking model only gets the format enforced &lt;em&gt;after&lt;/em&gt; its thinking block. With thinking off, the format applies from the very first token. typeghast also checks every reply and drops anything malformed.&lt;/p&gt;

&lt;p&gt;The comparison turned up one more bug. My prompt included example ghost names, and &lt;strong&gt;Qwen copied them word for word&lt;/strong&gt; in 3 of 4 batches. Whatever the agent had actually done, the ghosts came back as &lt;code&gt;model.go rewrite&lt;/code&gt;, &lt;code&gt;flaky test logs&lt;/code&gt; and &lt;code&gt;old todo list&lt;/code&gt;. I replaced the examples with an instruction: &lt;em&gt;take each name from the actions above, never invent one&lt;/em&gt;. After that, both models named real things every time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Making typing feel good
&lt;/h3&gt;

&lt;p&gt;A typing game lives or dies on feel, so:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Correct words flash gold.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Speed lines stream under the letters you just typed&lt;/strong&gt; once you pass 70 WPM. They grow longer and hotter (yellow, orange, red) up to 130, and they wrap back to the line above, so they don't vanish when you start a new line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The screen shakes, but only on big moments:&lt;/strong&gt; a perfect sentence, an unlocked link, every 25-word streak, an exorcism. Shaking on every word made the text jump while you were reading it, so I didn't.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Open Matters Here
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Agent transcripts are private by nature.&lt;/strong&gt; They hold your source code, your file paths, your shell commands, sometimes a secret printed in a log. Sending all of that to someone else's API to power a &lt;em&gt;typing game&lt;/em&gt; would be absurd. With an open-weight model in Ollama, the transcript is read from your disk and summarised on your GPU, and none of it leaves your machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It's free, so it can run constantly.&lt;/strong&gt; The narrator fires every few actions for as long as the agent works, all day if you let it. Each call is cheap, but metered calls add up. Locally the marginal cost is zero, so the game can narrate everything instead of rationing calls.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The narrator works offline.&lt;/strong&gt; No API key, no account, no rate limit, nothing to sign up for.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I could see inside it and fix it.&lt;/strong&gt; The Gemma problem was solvable because everything was open: I could read the model's capabilities, toggle its thinking mode, and compare it head to head with another open model on my own data, in an afternoon. With a closed endpoint I'd have been guessing at a black box.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nothing is locked in.&lt;/strong&gt; &lt;code&gt;--model&lt;/code&gt; takes any Ollama model, and with no model installed typeghast falls back to the agent's own words. The game still works for everyone. The open model is what makes it good.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma.&lt;/strong&gt; Gemma 4 12B is the default narrator. It writes every sentence you type and names every ghost, entirely on-device, and this post documents how I got it from about 90 seconds per batch to 3–6 seconds.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>gemma</category>
      <category>go</category>
    </item>
  </channel>
</rss>
