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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Claude Code Fixed My Script And I Published Haiku-2 Anyway | FMN-GPT - CompactAI</title>
|
| 7 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 8 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 9 |
+
<link href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono&display=swap" rel="stylesheet">
|
| 10 |
+
<style>
|
| 11 |
+
:root {
|
| 12 |
+
--blue-900: #0a1628;
|
| 13 |
+
--blue-800: #0f2240;
|
| 14 |
+
--blue-700: #142d54;
|
| 15 |
+
--blue-600: #1a3a6b;
|
| 16 |
+
--blue-500: #2250a0;
|
| 17 |
+
--blue-400: #3a7bd5;
|
| 18 |
+
--blue-300: #6ba3f0;
|
| 19 |
+
--blue-200: #a8c8f5;
|
| 20 |
+
--blue-100: #d4e4fa;
|
| 21 |
+
--white: #ffffff;
|
| 22 |
+
--white-soft: #f0f4fa;
|
| 23 |
+
--white-muted: #c8d8ec;
|
| 24 |
+
--grid-line: rgba(255, 255, 255, 0.08);
|
| 25 |
+
--grid-line-major: rgba(255, 255, 255, 0.18);
|
| 26 |
+
--accent: #6ba3f0;
|
| 27 |
+
--accent-muted: #3a7bd5;
|
| 28 |
+
--font-sans: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
|
| 29 |
+
--font-mono: 'Geist Mono', 'SF Mono', 'Fira Code', monospace;
|
| 30 |
+
--container-max: 1100px;
|
| 31 |
+
}
|
| 32 |
+
* { box-sizing: border-box; margin: 0; padding: 0; }
|
| 33 |
+
html { font-size: 16px; scroll-behavior: smooth; }
|
| 34 |
+
body { font-family: var(--font-sans); background: var(--blue-900); color: var(--white-muted); line-height: 1.7; -webkit-font-smoothing: antialiased; }
|
| 35 |
+
a { color: var(--white); text-decoration: none; transition: color 0.15s ease; }
|
| 36 |
+
a:hover { color: var(--accent); }
|
| 37 |
+
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
|
| 38 |
+
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(10, 22, 40, 0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--blue-600); padding: 16px 0; }
|
| 39 |
+
nav .container { display: flex; justify-content: space-between; align-items: center; }
|
| 40 |
+
.nav-brand { font-size: 18px; font-weight: 600; color: var(--white); display: flex; align-items: center; gap: 8px; }
|
| 41 |
+
.nav-brand span { color: var(--accent); }
|
| 42 |
+
.nav-links { display: flex; gap: 32px; }
|
| 43 |
+
.nav-links a { font-size: 14px; font-weight: 500; color: var(--blue-200); }
|
| 44 |
+
.nav-links a:hover { color: var(--white); }
|
| 45 |
+
.post { padding: 140px 0 80px; }
|
| 46 |
+
.post-back { display: inline-block; color: var(--blue-200); font-size: 14px; margin-bottom: 32px; }
|
| 47 |
+
.post-back:hover { color: var(--accent); }
|
| 48 |
+
.post-back::before { content: '← '; }
|
| 49 |
+
.post-meta { display: flex; gap: 12px; margin-bottom: 20px; }
|
| 50 |
+
.post-date { font-size: 13px; color: var(--blue-200); font-family: var(--font-mono); }
|
| 51 |
+
.post-tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); background: rgba(107, 163, 240, 0.1); padding: 4px 10px; border-radius: 4px; }
|
| 52 |
+
.post h1 { font-size: 36px; font-weight: 700; color: var(--white); margin-bottom: 32px; line-height: 1.2; letter-spacing: -0.02em; }
|
| 53 |
+
.post-body p { font-size: 17px; line-height: 1.8; margin-bottom: 24px; color: var(--blue-200); }
|
| 54 |
+
.post-body p:first-of-type { font-size: 20px; color: var(--white-muted); }
|
| 55 |
+
.post-body h2 { font-size: 24px; font-weight: 600; color: var(--white); margin: 48px 0 20px; }
|
| 56 |
+
.post-body blockquote { border-left: 3px solid var(--accent); padding: 20px 24px; margin: 32px 0; background: var(--blue-800); border-radius: 0 8px 8px 0; }
|
| 57 |
+
.post-body blockquote p { font-size: 16px; font-style: italic; color: var(--blue-200); margin: 0; }
|
| 58 |
+
.post-body hr { border: none; height: 1px; background: var(--blue-600); margin: 48px 0; }
|
| 59 |
+
.code-block { background: var(--blue-800); border: 1px solid var(--blue-600); border-radius: 8px; padding: 20px; margin: 24px 0; font-family: var(--font-mono); font-size: 13px; overflow-x: auto; }
|
| 60 |
+
.code-block .comment { color: var(--blue-200); font-style: italic; display: block; margin-top: 4px; }
|
| 61 |
+
.cta-box { background: var(--blue-800); border: 2px solid var(--accent); border-radius: 12px; padding: 24px; margin: 32px 0; text-align: center; }
|
| 62 |
+
.cta-box a { color: var(--accent); font-weight: 600; font-size: 18px; word-break: break-all; }
|
| 63 |
+
.cta-box a:hover { color: var(--white); }
|
| 64 |
+
.cta-box p { margin: 12px 0 0; color: var(--blue-200); font-size: 14px; }
|
| 65 |
+
.post-footer { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--blue-600); }
|
| 66 |
+
.post-footer p { font-size: 14px; color: var(--blue-200); font-style: italic; margin: 0; }
|
| 67 |
+
footer { padding: 40px 0; background: var(--blue-800); border-top: 1px solid var(--blue-600); text-align: center; }
|
| 68 |
+
footer p { color: var(--blue-200); font-size: 14px; margin-bottom: 8px; }
|
| 69 |
+
footer a { color: var(--blue-200); }
|
| 70 |
+
footer a:hover { color: var(--accent); }
|
| 71 |
+
@media (max-width: 768px) { .post h1 { font-size: 28px; } .nav-links { display: none; } }
|
| 72 |
+
</style>
|
| 73 |
+
</head>
|
| 74 |
+
<body>
|
| 75 |
+
<nav>
|
| 76 |
+
<div class="container">
|
| 77 |
+
<a href="index.html" class="nav-brand"><span>/</span>FMN-GPT</a>
|
| 78 |
+
<div class="nav-links">
|
| 79 |
+
<a href="blog.html">Blog</a>
|
| 80 |
+
<a href="status.html">Model Status</a>
|
| 81 |
+
<a href="https://huggingface.co/CompactAI" target="_blank">HuggingFace</a>
|
| 82 |
+
</div>
|
| 83 |
+
</div>
|
| 84 |
+
</nav>
|
| 85 |
+
<main>
|
| 86 |
+
<article class="post">
|
| 87 |
+
<div class="container">
|
| 88 |
+
<a href="blog.html" class="post-back">Back to Blog</a>
|
| 89 |
+
<header>
|
| 90 |
+
<div class="post-meta">
|
| 91 |
+
<span class="post-date">2026-04-03</span>
|
| 92 |
+
<span class="post-tag">Progress Reports</span>
|
| 93 |
+
</div>
|
| 94 |
+
<h1>Claude Code Fixed My Script And I Published Haiku-2 Anyway</h1>
|
| 95 |
+
</header>
|
| 96 |
+
<div class="post-body">
|
| 97 |
+
<p>I asked Claude Code to fix my training script. It fixed almost every bug. Then it added SPIN. Then it made my models more efficient. Then I published Haiku-2. Then I added all the optimizations. Obviously that is what I needed to do.</p>
|
| 98 |
+
<blockquote>
|
| 99 |
+
<p>When an AI fixes your code better than you can, you have two choices: learn from it or publish first and optimize later. I chose the latter. Obviously.</p>
|
| 100 |
+
</blockquote>
|
| 101 |
+
<h2>Claude Code To The Rescue</h2>
|
| 102 |
+
<p>My training script was a mess. NaN losses. Gradient explosions. Memory leaks that made my GPU cry. I pasted the error logs into Claude Code. It responded with fixes. Not suggestions. Fixes. Actual working code.</p>
|
| 103 |
+
<div class="code-block">
|
| 104 |
+
<span class="comment"># Before Claude Code</span><br>
|
| 105 |
+
try:<br>
|
| 106 |
+
train_model()<br>
|
| 107 |
+
except:<br>
|
| 108 |
+
cry()<br>
|
| 109 |
+
<br>
|
| 110 |
+
<span class="comment"># After Claude Code</span><br>
|
| 111 |
+
try:<br>
|
| 112 |
+
train_model()<br>
|
| 113 |
+
except NanError:<br>
|
| 114 |
+
clip_gradients()<br>
|
| 115 |
+
lower_lr()<br>
|
| 116 |
+
retry()<br>
|
| 117 |
+
<span class="comment"># Still cries sometimes. But less.</span>
|
| 118 |
+
</div>
|
| 119 |
+
<p>It found bugs I did not know existed. It added error handling I forgot to write. It optimized memory usage I did not know could be optimized. I felt seen. I also felt embarrassed.</p>
|
| 120 |
+
<h2>Enter SPIN</h2>
|
| 121 |
+
<p>Then Claude Code suggested SPIN. Self-Play Fine-Tuning. An iterative training method that enables models to improve through self-play without additional data. The model generates responses, distinguishes its own outputs from human references, and iteratively refines its behavior.</p>
|
| 122 |
+
<p>I had never heard of SPIN. Claude Code had. It explained the algorithm. It showed me the implementation. It added the code to my training loop. I watched as my loss curve started doing something other than screaming into the void.</p>
|
| 123 |
+
<blockquote>
|
| 124 |
+
<p>SPIN is like having your model debate itself until it gets less wrong. I am not sure if that is efficient or just deeply meta. Either way, it works.</p>
|
| 125 |
+
</blockquote>
|
| 126 |
+
<h2>Efficiency Gains</h2>
|
| 127 |
+
<p>With SPIN enabled and the bugs fixed, my training became more efficient. The loss curve went down. Occasionally. When it felt like it.</p>
|
| 128 |
+
<p>Haiku-2 benefited from these improvements. It learned faster. It forgot less. It still outputs pipe characters sometimes. But now it outputs words too. Sometimes. Do not count on it.</p>
|
| 129 |
+
<h2>Haiku-2 Is Out</h2>
|
| 130 |
+
<div class="cta-box">
|
| 131 |
+
<a href="https://huggingface.co/CompactAI/TMLM-Haiku-2" target="_blank">https://huggingface.co/CompactAI/TMLM-Haiku-2</a>
|
| 132 |
+
<p>1M parameters. Can speak sometimes. Do not count on it. Open weights. Open hopes. Open questions about why it still says "|fdish|".</p>
|
| 133 |
+
</div>
|
| 134 |
+
<p>Haiku-2 is live on HuggingFace. It uses the optimized training script. It uses SPIN. It uses everything I added after publishing it. Obviously that is what I needed to do.</p>
|
| 135 |
+
<p>What can you expect? Sometimes it answers questions. Sometimes it outputs coherent sentences. Sometimes it remembers that Paris is a city and not a person named Pierre. Progress is slow. Progress is real. Progress is occasionally interrupted by pipe characters.</p>
|
| 136 |
+
<h2>The Optimization Timeline</h2>
|
| 137 |
+
<p>Let me be clear about the sequence of events:</p>
|
| 138 |
+
<div class="code-block">
|
| 139 |
+
<span class="comment"># My release strategy in chronological order</span><br>
|
| 140 |
+
Step 1: Publish Haiku-2<br>
|
| 141 |
+
Step 2: Realize script has bugs<br>
|
| 142 |
+
Step 3: Ask Claude Code for help<br>
|
| 143 |
+
Step 4: Claude Code fixes everything<br>
|
| 144 |
+
Step 5: Add SPIN<br>
|
| 145 |
+
Step 6: Optimize everything<br>
|
| 146 |
+
Step 7: Wonder why I did not do Step 3 first<br>
|
| 147 |
+
<span class="comment"># Obviously this is the correct order.</span>
|
| 148 |
+
</div>
|
| 149 |
+
<p>Would it have been smarter to optimize before publishing? Probably. Would that have been less fun? Definitely. I chose fun. I chose chaos. I chose publishing first and fixing later. Obviously that is what I needed to do.</p>
|
| 150 |
+
<h2>What SPIN Actually Does</h2>
|
| 151 |
+
<p>For those who care about the technical details: SPIN enables iterative self-improvement through a self-play mechanism inspired by game theory. The model generates responses, compares them to reference outputs, and updates its weights to favor human-like patterns.</p>
|
| 152 |
+
<p>In practice this means Haiku-2 gets better at not being wrong. It still gets wrong. Just less often. Just slightly less confusingly. Just enough that you might mistake it for competence if you are not paying attention.</p>
|
| 153 |
+
<h2>Why This Matters</h2>
|
| 154 |
+
<p>I am not competing with frontier models. I am competing with my previous self. Haiku-1.3 said "| as the USA | fdish|||||!@|". Haiku-2 says that sometimes too. But it also says "hello" sometimes. That is progress.</p>
|
| 155 |
+
<p>Claude Code helped me get there. SPIN helped me get there. Optimizations helped me get there. Publishing first and optimizing later helped me learn valuable lessons about workflow. Obviously that is what I needed to do.</p>
|
| 156 |
+
<h2>Final Thoughts</h2>
|
| 157 |
+
<p>Haiku-2 is out. It can speak sometimes. Do not count on it. The training script is fixed. SPIN is enabled. Optimizations are applied. All after publication. Obviously that is what I needed to do.</p>
|
| 158 |
+
<p>If you download Haiku-2, please be kind. It is trying its best. Its best is not good. But it is trying. Just like me. Just like all of us. Just like obviously what we all need to do.</p>
|
| 159 |
+
<hr>
|
| 160 |
+
</div>
|
| 161 |
+
<footer class="post-footer">
|
| 162 |
+
<p>Current status: Haiku-2 published. Optimizations added. SPIN enabled. Claude Code thanked. Obviously that is what I needed to do.</p>
|
| 163 |
+
</footer>
|
| 164 |
+
</div>
|
| 165 |
+
</article>
|
| 166 |
+
</main>
|
| 167 |
+
<footer>
|
| 168 |
+
<div class="container">
|
| 169 |
+
<p>Built with curiosity over compute</p>
|
| 170 |
+
<p>FMN-GPT by <a href="https://huggingface.co/CompactAI" target="_blank">CompactAI</a> | 2026</p>
|
| 171 |
+
</div>
|
| 172 |
+
</footer>
|
| 173 |
+
</body>
|
| 174 |
+
</html>
|