<?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: Durvesh</title>
    <description>The latest articles on DEV Community by Durvesh (@durveshhhhh).</description>
    <link>https://dev.to/durveshhhhh</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%2F4256075%2Fd73b8d7d-eb7a-457b-a195-dcb807e8b3ff.jpg</url>
      <title>DEV Community: Durvesh</title>
      <link>https://dev.to/durveshhhhh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/durveshhhhh"/>
    <language>en</language>
    <item>
      <title>How do you prove a smaller checkpoint hasn't lost accuracy? (not just "trust me")</title>
      <dc:creator>Durvesh</dc:creator>
      <pubDate>Tue, 24 Nov 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/durveshhhhh/how-do-you-prove-a-smaller-checkpoint-hasnt-lost-accuracy-not-just-trust-me-lo</link>
      <guid>https://dev.to/durveshhhhh/how-do-you-prove-a-smaller-checkpoint-hasnt-lost-accuracy-not-just-trust-me-lo</guid>
      <description>&lt;p&gt;Checkpoint compression sounds simple: store less, use less disk, upload faster. The hard part is proving it didn't quietly break your model. "The file is smaller" is not evidence. I needed something that would actually catch a bug if I introduced one.&lt;/p&gt;

&lt;p&gt;Here's the method I ended up with, built into Efficio, an open-source PyTorch training library.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with "looks fine to me"
&lt;/h2&gt;

&lt;p&gt;If you shrink a checkpoint (say, storing optimizer state in 8-bit instead of fp32), the obvious test is: resume training, check the final loss, see if it's close to the un-shrunk version. But "close" compared to what? Loss is noisy between runs even with &lt;em&gt;no&lt;/em&gt; compression at all, just from floating-point nondeterminism and scheduling. Without a baseline, you can't tell "acceptable approximation" from "silent bug."&lt;/p&gt;

&lt;h2&gt;
  
  
  A noise baseline
&lt;/h2&gt;

&lt;p&gt;So I measure the noise floor first: resume training from an &lt;em&gt;exact&lt;/em&gt; checkpoint (no compression at all) but inject 1e-6 relative weight noise, basically floating-point-level perturbation that should be harmless. Run it, measure the final loss gap versus a clean run. That gap is pure numerical noise — the best-case variance you'd see from nothing going wrong at all.&lt;/p&gt;

&lt;p&gt;Then I test the actual compression modes (light: 8-bit optimizer state; smallest: light + fp16 weights) the same way, and compare their final-loss gap against that noise floor.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule
&lt;/h2&gt;

&lt;p&gt;A compression mode passes only if its loss gap is within &lt;strong&gt;3x the noise gap&lt;/strong&gt;, with a floor (0.05 loss or 3 accuracy points, whichever is more lenient) so a tiny noise baseline doesn't make the bar impossibly strict.&lt;/p&gt;

&lt;p&gt;This matters because it's falsifiable. If someone introduces a bug tomorrow, the test catches it, because "quietly worse than noise" fails. "Looks about the same" wouldn't have.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it looks like in practice (T4 GPU)
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Size vs. exact&lt;/th&gt;
&lt;th&gt;Passed the 3x-noise test&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;light&lt;/td&gt;
&lt;td&gt;~2.0x smaller (AdamW transformer)&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;smallest&lt;/td&gt;
&lt;td&gt;~2.9x smaller (AdamW transformer)&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;light&lt;/td&gt;
&lt;td&gt;~1.6x smaller (ResNet-18, SGD)&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;smallest&lt;/td&gt;
&lt;td&gt;~2.6x smaller (ResNet-18, SGD)&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For a LoRA-style run where only trainable weights are saved, a checkpoint went from 44.23 MB to 1.61 MB, same approach: verified against the noise floor, not just eyeballed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this lives
&lt;/h2&gt;

&lt;p&gt;This is part of Efficio, which also handles resuming training across Colab/Kaggle disconnects and saving checkpoints to Hugging Face Hub or Drive instead of a VM disk that disappears with the session.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip install efficio
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;PyPI: &lt;a href="https://pypi.org/project/efficio/" rel="noopener noreferrer"&gt;https://pypi.org/project/efficio/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/HuNTer8272/Efficio" rel="noopener noreferrer"&gt;https://github.com/HuNTer8272/Efficio&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Benchmarks (full methodology + code): &lt;a href="https://github.com/HuNTer8272/Efficio/tree/main/benchmarks" rel="noopener noreferrer"&gt;https://github.com/HuNTer8272/Efficio/tree/main/benchmarks&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Curious if others have used a noise-floor-style baseline for other things, not just checkpoints — I'd guess it generalizes to any "does this optimization silently hurt correctness" question.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>pytorch</category>
      <category>python</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
