<?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: Rahul Kumar</title>
    <description>The latest articles on DEV Community by Rahul Kumar (@rahukiitp).</description>
    <link>https://dev.to/rahukiitp</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%2F4199868%2F34223459-14d1-44ec-9604-6e814d182677.jpg</url>
      <title>DEV Community: Rahul Kumar</title>
      <link>https://dev.to/rahukiitp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rahukiitp"/>
    <language>en</language>
    <item>
      <title>LazyDecider: I taught an open-weight agent to fine-tune a model while I slept</title>
      <dc:creator>Rahul Kumar</dc:creator>
      <pubDate>Sat, 24 Oct 2026 08:37:54 +0000</pubDate>
      <link>https://dev.to/rahukiitp/lazydecider-i-taught-an-open-weight-agent-to-fine-tune-a-model-while-i-slept-40b</link>
      <guid>https://dev.to/rahukiitp/lazydecider-i-taught-an-open-weight-agent-to-fine-tune-a-model-while-i-slept-40b</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week3-2026-10-19"&gt;Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady&lt;/a&gt;&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%2Fvhkc7xt5cp0tydlumi3j.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%2Fvhkc7xt5cp0tydlumi3j.png" alt="LazyDecider — an open-weight agent keeps the winning configs and reverts the rest, while you nap" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;I am lazy in the specific way engineers are lazy: I will happily spend a week automating a job that takes ten minutes, as long as I never have to do the ten minutes again. The ten-minute job here is &lt;strong&gt;hyperparameter babysitting&lt;/strong&gt; — change the learning rate, kick off a run, stare at a loss curve, change the LoRA rank, repeat until the model is good or you're asleep at your desk.&lt;/p&gt;

&lt;p&gt;So I flipped it. &lt;strong&gt;LazyDecider&lt;/strong&gt; is a small overnight lab that fine-tunes a decision model &lt;em&gt;while I sleep&lt;/em&gt;. A &lt;strong&gt;local, open-weight agent (Gemma 4 E4B)&lt;/strong&gt; reads the experiment log, proposes one training config with a one-line reason, an &lt;strong&gt;ASHA&lt;/strong&gt; pruner trains it and kills it early if it's losing, and the run is &lt;strong&gt;kept only if it beats the current best&lt;/strong&gt; on a frozen split — otherwise reverted. In the morning the winner is retrained once and scored on a &lt;strong&gt;sealed&lt;/strong&gt; test set, and a &lt;strong&gt;Tinker&lt;/strong&gt; run confirms the recipe transfers to a bigger model.&lt;/p&gt;

&lt;p&gt;The effort it saves: I never babysit a hyperparameter sweep again. I wake up, open &lt;code&gt;REPORT.md&lt;/code&gt;, and read what the agent tried, why, and which config won — for ~$0, on a laptop, with no cloud meter spinning overnight.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The result:&lt;/strong&gt; a 0.8B decision model found autonomously that lands &lt;strong&gt;0.770 accuracy&lt;/strong&gt; and a very low &lt;strong&gt;KL-from-gold of 0.094&lt;/strong&gt; on a sealed test — the metric that actually matters on this benchmark — with its strongest trained domain being invoice processing at &lt;strong&gt;0.840&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;th&gt;Accuracy ↑&lt;/th&gt;
&lt;th&gt;KL from gold ↓&lt;/th&gt;
&lt;th&gt;Brier ↓&lt;/th&gt;
&lt;th&gt;ECE ↓&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Prior / Uniform&lt;/td&gt;
&lt;td&gt;reference&lt;/td&gt;
&lt;td&gt;~0.470&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Zero-shot base&lt;/td&gt;
&lt;td&gt;no training&lt;/td&gt;
&lt;td&gt;0.483&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tinker 4B (confirm)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;cloud referee&lt;/td&gt;
&lt;td&gt;0.601&lt;/td&gt;
&lt;td&gt;0.642&lt;/td&gt;
&lt;td&gt;0.172&lt;/td&gt;
&lt;td&gt;0.094&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LazyDecider 0.8B&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;the winner&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.770&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.094&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.051&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0.145&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

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

&lt;p&gt;There are two ways to see LazyDecider, from "just look" to "watch it work":&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Interactive UI — the night dashboard (hosted on Render):&lt;/strong&gt; &lt;a href="https://lazydecider-demo.onrender.com" rel="noopener noreferrer"&gt;https://lazydecider-demo.onrender.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A static web page that replays the &lt;strong&gt;real&lt;/strong&gt; overnight run from the committed logs: Gemma's config proposals and one-line reasons, the ASHA &lt;strong&gt;keep/revert&lt;/strong&gt; decisions, the learning-curve and results charts, and the sealed-test table. Nothing is faked — it reads the actual experiment log.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Walkthrough video (~3.5 min, narrated):&lt;/strong&gt; a guided tour — the task and model, the exact configs Gemma proposed with the ASHA keep/revert calls, the "can't cheat" guardrails, and every sealed-test number — ending with a &lt;strong&gt;live playground finale&lt;/strong&gt; where the real 0.8B model is driven on three invoices: a clean match returns &lt;code&gt;approve · 83%&lt;/code&gt;, an over-invoiced case is flagged for &lt;code&gt;review&lt;/code&gt;, and an under-delivered case returns &lt;code&gt;manual review&lt;/code&gt;.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://lazydecider-demo.onrender.com/assets/lazydecider_slides.mp4" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;lazydecider-demo.onrender.com&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&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/rahuls321" rel="noopener noreferrer"&gt;
        rahuls321
      &lt;/a&gt; / &lt;a href="https://github.com/rahuls321/autoresearch-finetune-lab" rel="noopener noreferrer"&gt;
        autoresearch-finetune-lab
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      LazyDecider — an open-weight agent fine-tunes a decision model overnight on a laptop; ASHA prunes, Tinker confirms.
    &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;lazylab&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://raw.githubusercontent.com/rahuls321/autoresearch-finetune-lab/main/artifacts/lazydecider_cover.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Frahuls321%2Fautoresearch-finetune-lab%2Fmain%2Fartifacts%2Flazydecider_cover.png" alt="LazyDecider — an open-weight agent keeps the winning configs and reverts the rest, while you nap"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;An overnight lab that fine-tunes a small &lt;strong&gt;decision model&lt;/strong&gt; for the
&lt;a href="https://huggingface.co/datasets/LocalLLaMA/typed-decisions" rel="nofollow noopener noreferrer"&gt;&lt;code&gt;LocalLLaMA/typed-decisions&lt;/code&gt;&lt;/a&gt;
benchmark — while you sleep. A &lt;strong&gt;local, open-weight agent (Gemma 4 E4B)&lt;/strong&gt; proposes hyperparameter
configs, a deterministic &lt;strong&gt;ASHA&lt;/strong&gt; rule kills losing runs mid-flight, the winner is retrained once and
scored on a &lt;strong&gt;sealed&lt;/strong&gt; test set, and a &lt;strong&gt;Tinker&lt;/strong&gt; run confirms the recipe on a bigger model. No
hand-tuning.&lt;/p&gt;
&lt;p&gt;Built for DEV Hacktoberfest 2026 Week 3 ("Slow and Steady"). Tags: &lt;code&gt;#devchallenge #hf26challenge&lt;/code&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model:&lt;/strong&gt; &lt;a href="https://huggingface.co/rahulkumar0612/lazydecider-0.8b" rel="nofollow noopener noreferrer"&gt;&lt;code&gt;rahulkumar0612/lazydecider-0.8b&lt;/code&gt;&lt;/a&gt;
— &lt;code&gt;unsloth/Qwen3.5-0.8B&lt;/code&gt; + a Clef joint decision head, LoRA fine-tuned.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live demo:&lt;/strong&gt; &lt;strong&gt;&lt;a href="https://lazydecider-demo.onrender.com" rel="nofollow noopener noreferrer"&gt;https://lazydecider-demo.onrender.com&lt;/a&gt;&lt;/strong&gt; — the overnight-run dashboard (source in &lt;code&gt;web/&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; the GitHub repo (&lt;code&gt;rahuls321&lt;/code&gt;) and the Hugging Face model (&lt;code&gt;rahulkumar0612&lt;/code&gt;) are both mine —
same author, two platforms.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Results (sealed test, 2,000 decisions)&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;How&lt;/th&gt;
&lt;th&gt;Accuracy&lt;/th&gt;
&lt;th&gt;KL↓&lt;/th&gt;
&lt;th&gt;Brier↓&lt;/th&gt;
&lt;th&gt;ECE↓&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Uniform / Prior&lt;/td&gt;
&lt;td&gt;no model&lt;/td&gt;
&lt;td&gt;~0.47&lt;/td&gt;
&lt;td&gt;0.35–0.44&lt;/td&gt;
&lt;td&gt;0.19–0.24&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Zero-shot base&lt;/td&gt;
&lt;td&gt;no training&lt;/td&gt;
&lt;td&gt;0.483&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;LazyDecider&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;…&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/rahuls321/autoresearch-finetune-lab" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The tuned model is &lt;strong&gt;published and runnable on Hugging Face&lt;/strong&gt; —&lt;br&gt;
&lt;a href="https://huggingface.co/rahulkumar0612/lazydecider-0.8b" rel="noopener noreferrer"&gt;&lt;code&gt;rahulkumar0612/lazydecider-0.8b&lt;/code&gt;&lt;/a&gt; (open weights, with a model card and the sealed-test eval results). The &lt;code&gt;.eval_results&lt;/code&gt; YAML is merged, so it will surface on the &lt;a href="https://huggingface.co/datasets/LocalLLaMA/typed-decisions" rel="noopener noreferrer"&gt;&lt;code&gt;typed-decisions&lt;/code&gt;&lt;/a&gt; leaderboard once a maintainer merges it. Download it, run it offline, or fork the recipe.&lt;/p&gt;

&lt;p&gt;Reproduce the pipeline in a few commands (full version in the README):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv venv &lt;span class="nt"&gt;--python&lt;/span&gt; 3.12 .venv
uv pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--python&lt;/span&gt; .venv/bin/python datasets unsloth tinker
.venv/bin/python src/prepare_data.py       &lt;span class="c"&gt;# download, seal, split&lt;/span&gt;
bash src/run_gemma_search.sh               &lt;span class="c"&gt;# let Gemma search overnight&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;Two &lt;strong&gt;open&lt;/strong&gt; partners do the heavy lifting, and that's deliberate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Gemma 4 E4B&lt;/strong&gt; is the &lt;em&gt;researcher&lt;/em&gt;. It runs on my laptop via a local MLX server (LM Studio / Bionic, MLX-4bit) — fully offline, zero cost per call — and genuinely reasons about what to try next. These are &lt;strong&gt;verbatim&lt;/strong&gt; one-line reasons from the real log (&lt;code&gt;source:gemma&lt;/code&gt;):

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;run 1 (kept):&lt;/em&gt; "Establish a standard fast head-only baseline with cosine schedule and zero label smoothing on soft targets."&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;run 2 (kept):&lt;/em&gt; "Enable LoRA fine-tuning on the backbone to see if adapted encoder representations improve beyond the head-only baseline."&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;run 3 (reverted):&lt;/em&gt; "Introduce label smoothing and increased weight decay on the unfrozen backbone to improve calibration while preserving high accuracy."&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Run 2 — Gemma's call to unfreeze the backbone with LoRA — dropped validation loss &lt;strong&gt;1.04 → 0.84&lt;/strong&gt;, the single biggest jump of the night. Runs 3–5 chased calibration, landed close, and were reverted. That keep-or-revert discipline is the difference between a search and a random walk.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tinker&lt;/strong&gt; (Thinking Machines) is the &lt;em&gt;independent referee&lt;/em&gt;. It fine-tunes a larger &lt;code&gt;Qwen3.5-4B&lt;/code&gt; with LoRA in the cloud, under a hard dollar cap, and re-scores on the &lt;strong&gt;same&lt;/strong&gt; sealed test — a clear lift over the zero-shot baseline (&lt;strong&gt;0.601 vs 0.483&lt;/strong&gt;). Different model, different hardware, same ruler: proof the pipeline isn't fooling itself.&lt;/li&gt;
&lt;li&gt;The base model is &lt;code&gt;unsloth/Qwen3.5-0.8B&lt;/code&gt; + a Clef joint-decision head, LoRA fine-tuned with &lt;strong&gt;Unsloth&lt;/strong&gt;; the live demo UI is a dependency-free static site &lt;strong&gt;hosted on Render&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The "can't cheat" part.&lt;/strong&gt; Early on, before guardrails, the loop found a "great" config suspiciously fast — a too-small validation subsample let a lucky run look like a winner. The agent wasn't cheating; it was optimizing the number I gave it. The lesson of autonomous tuning: &lt;em&gt;your agent will optimize your metric, not your intent.&lt;/em&gt; So I locked it down: the &lt;strong&gt;test set is sealed&lt;/strong&gt; (only its SHA-256 is committed; the worker literally can't read the cases), the &lt;strong&gt;scorer copies the dataset's grading arithmetic verbatim&lt;/strong&gt;, the worker &lt;strong&gt;strips &lt;code&gt;TINKER_*&lt;/code&gt; from its environment&lt;/strong&gt; so the free local loop can't spend a cent, and every finalist's config is &lt;strong&gt;committed to git before&lt;/strong&gt; its one-shot sealed read.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;This whole thing only works &lt;em&gt;because&lt;/em&gt; the pieces are open:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;agent and the model are both open weights&lt;/strong&gt;, so the entire lab runs on a laptop. Every proposal — and the retries when the model fumbles the JSON — is a free local inference call, so running the search night after night costs exactly nothing; a cloud API would turn that into a monthly bill.&lt;/li&gt;
&lt;li&gt;The resulting model is &lt;strong&gt;yours&lt;/strong&gt;. I pushed it to Hugging Face (&lt;a href="https://huggingface.co/rahulkumar0612/lazydecider-0.8b" rel="noopener noreferrer"&gt;&lt;code&gt;rahulkumar0612/lazydecider-0.8b&lt;/code&gt;&lt;/a&gt;) — run it
offline, inspect it, fork the recipe. Nothing is trapped behind someone else's endpoint.&lt;/li&gt;
&lt;li&gt;Open weights make the guardrails &lt;strong&gt;auditable&lt;/strong&gt;. "Can't cheat" is only credible when anyone can read the sealing logic and the scorer and check for themselves.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A closed API couldn't give me all three: free unlimited overnight reasoning, a model I fully own and can run offline, and a pipeline whose integrity anyone can verify.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Lazy Payoff
&lt;/h2&gt;

&lt;p&gt;I wake up, open &lt;code&gt;REPORT.md&lt;/code&gt;, and read what Gemma tried, why, and which config won — then one command retrains it and Tinker confirms it. The ten-minute job I automated (babysitting hyperparameter sweeps)? I never do it again — it happens while I sleep, for free, on my own laptop.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Render&lt;/strong&gt; — the live demo UI is hosted on Render as a static site, deployed straight from &lt;code&gt;render.yaml&lt;/code&gt; with zero build config: &lt;a href="https://lazydecider-demo.onrender.com" rel="noopener noreferrer"&gt;https://lazydecider-demo.onrender.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma&lt;/strong&gt; — Gemma 4 E4B is the autonomous researcher proposing every config locally and for free, with a real, reasoned experiment log.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Tinker&lt;/strong&gt; — a dollar-capped &lt;code&gt;Qwen3.5-4B&lt;/code&gt; LoRA confirm run that lifts clearly over the zero-shot baseline (0.601 vs 0.483) and independently validates the recipe.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>opensource</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
