← sources

Gemma 4 12b 8Q Heretic Oneshot Coding

source: reddit (reddit:LocalLLaMA)published 2026-06-04 05:46ingested 2026-06-04 09:47

retained text

<table> <tr><td> <a href="https://www.reddit.com/r/LocalLLaMA/comments/1twelo6/gemma_4_12b_8q_heretic_oneshot_coding/"> <img alt="Gemma 4 12b 8Q Heretic Oneshot Coding" src="https://external-preview.redd.it/Nm9xeTc2dXljNzVoMcMa91fWY6Aufx7YPk-xxFVwCcLDAeayl-MBNBc7r43e.png?width=640&amp;crop=smart&amp;auto=webp&amp;s=b95701c9aa7c9f87d5f839a21bb2540ad91c37d9" title="Gemma 4 12b 8Q Heretic Oneshot Coding" /> </a> </td><td> <!-- SC_OFF --><div class="md"><p>I was pretty impressed with the Gemma 4 12b release today and saw that the heretic version dropped. I was already getting refusals from the 8Q official model and decided to see how the heretic did oneshotting a retro game. It did so with ease. The single prompt start to finish ate 45k tokens total. </p> <ul> <li><strong>Hardware Stack:</strong> Ryzen 9 9950X + AMD RX 6800 (16GB VRAM) via Vulkan back-end 32GB 6000 System Ram.</li> <li><strong>Model &amp; Config:</strong> <code>H-gemma-4-12B-heretic-Q8.gguf</code> running with 8-bit KV Cache (<code>--cache-type-k q8_0 --cache-type-v q8_0</code>).</li> <li><strong>Generation Speed:</strong> Rock solid, staying completely flat between <strong>18.44 t/s and 18.93 t/s</strong> across all 4turns.</li> <li><strong>Context Scaling:</strong> Speed barely degraded even though active context scaled all the way up to <strong>23,125 tokens</strong> by the final turn.</li> <li><strong>The Big Run:</strong> Turn 2 generated <strong>4,372 tokens of continuous code</strong> (writing the 467-line game) in a single continuous 4-minute stream at 18.76 t/s.</li> <li><strong>Prompt Processing:</strong> Started at <strong>228.79 t/s</strong> from a clean slate and naturally scaled down to <strong>157.72 t/s</strong> as the context depth increased.</li> <li><strong>Cache Efficiency:</strong> <code>llama-server</code> successfully utilized context checkpoints and Longest Common Prefix (LCP) similarity, hitting <strong>91.7% and 96.4% cache reuse</strong> on subsequent turns to bypass massive re-evaluations.</li> </ul> <p>Here's my llama.cpp. ./llama.cpp/build/bin/llama-server -m /home/dsmason321/models/H-gemma-4-12B-heretic-Q8.gguf -c 256000 --jinja --chat-template-file /home/dsmason321/llama.cpp/models/templates/custom_pub_chat_template_gemma4.jinja --reasoning off --cache-type-k q8_0 --cache-type-v q8_0</p> <p>Here is the prompt. </p> <p>Act as an expert Senior Frontend Developer and Game Designer. Your task is to write a complete, fully functional, and visually polished &quot;Retro Cyberpunk Brick Breaker&quot; game contained within a single, self-contained HTML file. </p> <p>You must deliver the absolute final code without placeholders, ellipses (...), or missing implementations. The game must be fully playable the moment it is saved and opened in a browser.</p> <p>### Technical Architecture</p> <p>- Language: HTML5, CSS3, and Vanilla JavaScript.</p> <p>- Rendering: HTML5 &lt;canvas&gt; API.</p> <p>- File Structure: Single file. All CSS inside &lt;style&gt; tags, all JavaScript inside &lt;script&gt; tags.</p> <p>- Assets: NO external images, audio files, or libraries. All visual assets (player paddle, ball, bricks, particles) must be drawn programmatically using Canvas 2D context drawing methods (gradients, rects, arcs).</p> <p>### Game Mechanics &amp; Specifications</p> <ol> <li><p>Core Loop: A paddle at the bottom bounces a ball upward to destroy grid-based bricks at the top. Destroying all bricks triggers a &quot;Victory&quot; state; losing the ball past the bottom edge subtracts a life.</p></li> <li><p>Controls: Smooth mouse tracking or Left/Right Arrow keys to move the paddle. Ensure the paddle is securely bounded within the canvas width.</p></li> <li><p>Physics: Realistic angle reflections based on where the ball hits the paddle (hitting the edge of the paddle shoots the ball out at a sharper angle).</p></li> <li><p>Progression &amp; Score:</p> <p>- Implement a scoring system (e.g., 10 points per brick).</p> <p>- Track player lives (start with 3).</p> <p>- Display Current Score, High Score (save/load from localStorage), and Remaining Lives as a clean HUD at the top.</p></li> <li><p>Game States: Clear &quot;Start Screen&quot; (click to play), &quot;Game Over Screen&quot;, and &quot;Victory Screen&quot; with an instant keyboard or click restart trigger.</p></li> <li><p>Local LLM Safety Feature (Crucial): Keep the brick grid size modest (e.g., 4 rows by 8 columns) to ensure the loops do not cause performance throttling or memory leaks on lower-compute local inference.</p></li> </ol> <p>### Aesthetic &amp; Visual Polish</p> <p>- Theme: Cyberpunk / Neon Synthwave.</p> <p>- Background: Deep midnight black or dark purple gradient.</p> <p>- Elements: Use bright neon colors (cyan, magenta, electric lime) for bricks and paddle.</p> <p>- Juiciness: Implement a simple particle explosion effect when a brick is destroyed (generate 5-8 tiny crumbling particle objects that fade out over a few frames).</p> <p>- Add a subtle glow effect to the canvas elements using `ctx.shadowBlur` and `ctx.shadowColor`.</p> <p>### Implementation Requirements</p> <p>- Wrap the entire script cleanly.</p> <p>- Ensure all variable initializations, event listeners, state reset loops, and the requestAnimationFrame update loop are completely written out.</p> <p>- Do not add text commentary before or after the code block so the raw output can be stripped easily. Begin directly with &lt;!DOCTYPE html&gt;.</p> </div><!-- SC_ON --> &#32; submitted by &#32; <a href="https://www.reddit.com/user/devildip"> /u/devildip </a> <br /> <span><a href="https://v.redd.it/l5lftvtyc75h1">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/LocalLLaMA/comments/1twelo6/gemma_4_12b_8q_heretic_oneshot_coding/">[comments]</a></span> </td></tr></table>

document fetched 2026-06-04 09:47