Skip to content
PodSubs
ShowsPeopleGuestsJobsNewsEvents
More
BlogPodCred
Menu
ShowsPeopleGuestsJobsNewsEventsBlogPodCredNetworksSign in
Join nowSign in
  • Shows
  • People
  • Jobs
  • News
  • More
    • Guests
    • Events
    • Blog
    • PodCred
    • Networks
    Join nowSign in

Mechanical Dreams

Mechanical Dreams artwork

Scaling Laws for Precision

Mar 19, 202621 minAudio
ShareXLinkedInFacebookWhatsAppEmail

In this episode: • Introduction to Precision in Scaling Laws: Linda introduces the new paper which adds precision as a third variable to the Chinchilla scaling laws. Professor Norris reflects on how precision is usually treated as an afterthought. • The Post-Training Quantization Paradox: The hosts discuss the surprising finding that overtraining models on too much data actually makes them degrade worse when applying post-training quantization. • Effective Parameters and Low-Precision Training: Linda explains the concept of effective parameter count, and how lowering precision in weights, activations, and KV cache shrinks the model's effective size multiplicatively. • Finding the Compute-Optimal Precision: Professor Norris is surprised to learn that compute-optimal pretraining precision is around 7 to 8 bits, completely independent of the compute budget unless model size is constrained. • A Unified Scaling Law and Takeaways: The episode wraps up by bringing pretraining and post-training precision into a single mathematical framework, discussing what this means for the future of model training.

Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.

Transcript

From the show.

## Introduction to Precision in Scaling Laws

Norris: Welcome back to Mechanical Dreams, the podcast where we try to find the signal in the noise of machine learning research. I am Professor Norris, and as always, I am joined by my brilliant student, Linda. Linda: Hi everyone! Today we have a really exciting paper that adds a whole new dimension to a topic we discuss all the time on this show: scaling laws. Norris: Ah, scaling laws. The trusty old Chinchilla rules. You get more compute, you scale up your parameters and your dataset size in roughly equal proportions, and everyone is happy. What could possibly be missing? Linda: Well, what if I told you there is a third dial you can turn? The paper I brought today is called Scaling Laws for Precision by Tanishq Kumar, Zachary Ankner, and a massive team across Harvard, Stanford, MIT, and others. They ask a very simple but profound question: how does the bit precision of your model fit into these scaling laws? Norris: That is interesting. You know, back in my day, we just trained everything in 32-bit floating point and did not think twice. Now, everyone is obsessed with 16-bit, 8-bit, or even 4-bit. But usually, precision is treated as a complete afterthought. You train the massive model, and then you squeeze it down to fit on a GPU so you can actually serve it to users. Linda: Exactly! And that is the exact paradigm this paper challenges. Deep learning is definitely trending towards lower precision. We have seen frontier models like the Llama-3 series trained in BF16, and there is a huge push towards FP8. The next generation of hardware will even support FP4. But up until now, the scaling laws we use to predict loss simply do not account for the quality degradation and cost savings of lower precision. Norris: I suppose that makes sense. Work on scaling laws usually tries to abstract away all those fine-grained implementation details to find universal mathematical forms. But quantization research is entirely about the details. How you quantize, what you quantize, when you quantize it. Bridging those two worlds sounds mathematically messy. Linda: It definitely could be, but the authors managed to find a really elegant functional form. They ran over 465 pretraining runs, sweeping over parameters, data, and precisions from 3 to 16 bits. They basically built precision-aware scaling laws for both training and inference, testing up to 1.7 billion parameter models on up to 26 billion tokens. Norris: Four hundred and sixty-five pretraining runs? I hope they have a good cloud computing budget. But I am intrigued. I have always been a bit skeptical of this race to the bottom with quantization. At some point, you just lose too much information, right? You cannot just represent Shakespeare with a single bit. Linda: Well, you might be surprised by how far you can push it, but you are right that there is a cost. And the most fascinating part of this paper is how they quantify that cost. They show some wild results about what happens when you train a model for a really long time and then try to quantize it post-training. Norris: Wait, training for too long makes quantization worse? Now you really have my attention. We are always told more data is strictly better. Let us dive into that.

## The Post-Training Quantization Paradox

Norris: So, right before the break, you dropped a massive bombshell on my traditional view of deep learning. You are telling me that training a model on more data can actually make it perform worse? That violates everything the scaling laws hold dear! Linda: It sounds crazy, I know! But the key here is what happens after the training is done. Let's talk about Post-Training Quantization, or PTQ. To understand the paradox, we first need to talk about overtraining. Professor, what is the Chinchilla optimal ratio of tokens to parameters? Norris: It is roughly 20 tokens per parameter. So if you have a one billion parameter model, you ideally want to train it on about 20 billion tokens to optimally balance compute and performance. Linda: Exactly. But in practice, nobody actually stops there anymore. Because serving the model at inference time is the real bottleneck, companies train much smaller models for way, way longer. Llama-3-8B, for example, was trained with a token-to-parameter ratio of around 2000! That is a hundred times the Chinchilla recommendation. Norris: Right, because a smaller model is cheaper to run for millions of users, even if you had to burn a mountain of cash upfront to make it smart. It is an industry standard at this point. Linda: Well, the authors found a massive catch to that industry standard. They modeled the loss degradation caused by post-training quantization, which they call delta-PTQ. And they discovered that this degradation scales roughly as a power law of the token-to-parameter ratio. In other words, the more you overtrain a model, the more sensitive it becomes to being quantized. Norris: Wait, let me make sure I am visualizing this math correctly. If I have a fixed model size, and I just keep pumping more and more high-quality tokens into it during pretraining, the base 16-bit model gets better. But if I then snap those weights down to, say, 4-bit integers for deployment, the drop in quality is actually steeper for the model that saw more data? Linda: Not just steeper, Professor! If you push the token count high enough, there is an analytical 'critical dataset size'. Past that point, the degradation from quantization actually outweighs the pretraining gains. Adding more tokens actively increases your final loss. The extra data actively harms your inference-time model. Norris: That is absolutely fascinating. And honestly, a bit terrifying if you are sitting on a massive compute cluster right now. But why does that happen? Mathematically or intuitively, what is going on inside the network? Linda: The authors offer a really intuitive explanation for it. As models train on more and more data, they have to compress an increasingly massive amount of information into the exact same number of parameters. The weights become highly optimized and tightly tuned. Because of that extreme compression, any perturbation to those weights—like rounding them off to fit into a 4-bit lattice—causes catastrophic damage. Norris: Ah, I see! It is like building a house of cards. A lightly trained model is a sturdy little pyramid. You can bump the table—or quantize it—and it is fine. But a massively overtrained model is a towering, intricate castle. You flick one card by rounding a decimal point, and the whole thing comes crashing down. Linda: That is a perfect analogy. And just to be sure this wasn't an artifact of one specific algorithm, the researchers replicated this finding across different quantization methods. They used GPTQ, AWQ, and even naive Round-To-Nearest quantization. The trend holds across the board. The more you overtrain, the more fragile the model becomes to precision drops. Norris: So, if I am a practitioner, the old strategy of 'train the heck out of a small model and then compress it' is fundamentally flawed at extreme scales. You are basically paying for compute that destroys your deployment performance. Linda: Exactly. And this leads right into the second half of the paper. If post-training quantization scales so poorly, the natural solution is to account for precision during the training process itself. Norris: Ah, Quantization-Aware Training, or even full low-precision training. Let me guess, by introducing the noise during training, the model learns to build a sturdier house of cards? Linda: You are spot on! But the way they model how low-precision training affects the scaling laws is completely ingenious. They introduce a concept called 'effective parameter count'.

## Effective Parameters and Low-Precision Training

Norris: So, right before the break you left me hanging with this concept of 'effective parameter count'. How exactly does that solve our post-training quantization paradox, and more importantly, how does it change the way we train? Linda: It completely reframes the relationship between model size and precision. The authors propose that parameters and bit precision actually act interchangeably. A model with fewer parameters but higher precision can achieve the exact same loss as a model with more parameters but lower precision. Norris: That makes intuitive sense. You are basically saying there is a unified currency of 'information capacity'. So, instead of plugging the raw parameter count N into the Chinchilla scaling laws, we plug in this new effective parameter count, N-effective? Linda: Exactly! They substitute N with N-effective in the standard Chinchilla formula. And the mathematical form they found for N-effective is beautiful. It is simply N multiplied by a saturating exponential based on the bit precision. Norris: Ah, a saturating exponential. I love those. That implies that going from, say, 3 bits to 4 bits buys you a massive increase in effective parameters, but going from 8 bits to 16 bits gives you almost nothing. The returns diminish rapidly. Linda: Nailed it, Professor. They found that if you are just quantizing the weights, the performance gains essentially saturate around 6 to 7 bits per weight. Any bits you add after that are mostly just wasting memory. Norris: But wait, quantizing just the weights is what we call Quantization-Aware Training. That is great for saving memory at inference, but it does absolutely nothing to speed up the pretraining process. Modern GPUs require both inputs to a matrix multiplication to be in the same precision. If you multiply a 4-bit weight by a 16-bit activation, the hardware still computes it in 16-bit. Linda: I knew you would bring that up! To get actual compute savings during training, you have to do full Low-Precision Training. That means quantizing the weights, the activations, and the KV cache for the attention mechanism. Norris: Oh boy. Sweeping the precision of weights, activations, and the KV cache independently? That sounds like a combinatorial nightmare for fitting a clean scaling law. Do they interact in some horrible, highly non-linear way? Linda: That is the best part! They don't. The authors tested arbitrary combinations of precisions across the three components and found that their effects are completely independent and multiplicative. Norris: Multiplicative? Are you saying that if 4-bit weights reduce my effective parameter count by 20 percent, and 4-bit activations reduce it by another 20 percent, I just multiply those penalties together? Linda: Yes! The N-effective formula factorizes perfectly. It becomes N times the weight penalty factor, times the activation factor, times the KV cache factor. But here is the catch: those three components are not equally sensitive to precision drops. Norris: Let me guess. The activations are the troublemakers. In my experience, activation outliers are what always blow up low-precision training runs. Linda: As always, your intuition is spot on. The paper confirms that activations are significantly more sensitive to quantization than the weights. In fact, if they dropped the activation precision to 3 bits, the training runs often just diverged completely. The KV cache also becomes highly sensitive once you drop below 4 or 5 bits. Norris: That perfectly aligns with the headaches practitioners face. So, if we are doing fully quantized training to save compute, every component is eating away at our effective parameter count multiplicatively. The classic Chinchilla compute optimization must look wildly different when you account for all of this. Linda: It really does. Because compute cost scales linearly with precision, you now have a four-way tug-of-war between parameter count, dataset size, precision, and your compute budget. And when you run the optimization math on that, the results are completely counterintuitive. Norris: You are keeping me in suspense, Linda. If I have a massive fixed compute budget, what is the mathematically optimal precision I should be training my models in?

## Finding the Compute-Optimal Precision

Norris: Alright Linda, you have kept me in suspense long enough. If I have a massive fixed compute budget, and we know that every component's precision eats away at my effective parameter count, what is the mathematically optimal precision I should be training my models in? Linda: Drumroll please... the compute-optimal pretraining precision is around 7 to 8 bits. Norris: 7 to 8 bits? That is oddly specific, and surprisingly moderate. It means the standard practice of training everything in 16-bit is actually suboptimal. Linda: Exactly! The math shows that 16-bit has a ton of unnecessary bits. You are spending a massive amount of compute on precision that barely increases your effective parameter count. That compute would be much better spent just increasing the actual parameter count or training on more data. Norris: But what about the other extreme? Everyone is racing to do 4-bit, 2-bit, or even 1-bit training right now. Are you saying that is a bad idea too? Linda: The scaling laws strongly suggest it might be. The problem with dropping below 4 bits during pretraining is that your effective parameter count plummets. To maintain the same loss scaling, you have to increase your actual model size disproportionately. The paper calculates that you would need to make the model more than four times larger to compensate for the degradation of sub-4-bit training. Norris: Ah, I see the trap. Making the model four times larger completely wipes out the compute savings you got from using lower precision in the first place. You are stepping over dollars to pick up pennies. Linda: Exactly, Professor. But here is the real kicker, and the thing that blew my mind the most: that 7 to 8 bit optimum is, in general, completely independent of your compute budget. Norris: Wait, hold on. Let me process that. If my lab gets a grant that 10x-es our compute budget, the original Chinchilla laws tell me I should scale up both my model size and my dataset size. You are telling me I should not scale up my precision? Linda: That is right! If you are jointly optimizing parameters, data, and precision all at once, the mathematical minimum of the loss function gives you an implicit equation where the optimal precision converges to a constant. Whether you are training a tiny experimental model or a GPT-4 class behemoth, the sweet spot for precision stays anchored around 7 to 8 bits. Norris: That is a beautiful theoretical result. But practically speaking, that is not how we build models in the real world. We usually do not jointly optimize all three. A company will decide, 'We want to train an 8 billion parameter model so it fits on a specific consumer GPU,' and then they just dump as much compute into it as possible. Linda: The authors thought of that exact scenario! And this is where the story takes a fascinating turn. If your model size, N, is fixed in advance, that independence rule ceases to be true. In a constrained model size setting, the compute-optimal precision actually grows slowly with your compute budget. Specifically, it scales logarithmically with compute. Norris: Oh, that is brilliant! Let me see if I can synthesize why that happens. We established in chapter two that overtraining a model on too much data makes it fragile. If my parameter count is locked, and I keep throwing more and more compute at it in the form of tokens, I am going to hit severely diminishing returns. Linda: Yes, you hit the overtraining wall! Norris: So, to avoid that wall, precision acts as a new relief valve! Instead of just burning compute on more tokens, which does barely anything, you spend that extra compute on increasing the precision. By raising the precision, you increase the 'effective parameter count' without changing the actual parameter count. You are essentially making the fixed-size model smarter so it can absorb the extra data. Linda: I could not have said it better myself. For highly overtrained models, like the Llama-3 or Gemma-2 series, training in higher precision might actually be the compute-optimal move. It brings those massively overtrained models closer to true pretraining optimality by reducing the ratio of tokens to effective parameters. Norris: This paper really is a masterclass in connecting the dots. It takes all these disparate empirical headaches we face and binds them together with a clean mathematical framework. But we still have one loose thread. How does this all tie back to the post-training quantization paradox we started with? Linda: That is the grand finale! The authors ultimately unify these pretraining precision laws with the post-training degradation laws into one single, master functional form. And the interaction between the two reveals a massive silver lining to low-precision training. Norris: A silver lining? Well, I am all ears. Let us dig into this unified scaling law right after the break.

## A Unified Scaling Law and Takeaways

Norris: Welcome back. Linda, before the break you mentioned a silver lining to low-precision training, and a grand unified mathematical formula that ties all of this together. Lay it on me. Linda: Here it is: when the authors combined their pretraining and post-training scaling laws into one unified formula, they found two competing effects at play during post-training quantization. Norris: Competing effects? Okay, well the first one must be the overtraining paradox we discussed. Since low-precision training shrinks your effective parameter count, the model has to cram more information into less space, making our metaphorical house of cards more fragile. Linda: Exactly, they call that the overtraining effect. But here is the second effect, the silver lining: robustification. Training with low-precision weights basically injects quantization noise into the model while it learns. It forces the network to adapt and build a sturdier structure from the ground up. Norris: Ah! So the model gets used to the noise during the pretraining phase. Which effect wins out in the end? The fragility from having a smaller effective parameter count, or the robustness from experiencing the noise early on? Linda: The robustification effect dominates! In practice, models trained in lower precision degrade significantly less when you apply post-training quantization. Their unified functional form beautifully predicts this exact tradeoff by looking at the gap between training precision and inference precision. Norris: That is a brilliant conclusion. So, to summarize for our listeners: if you just train a standard 16-bit model on a mountain of data, you will get a great pre-trained model, but it might fall apart when you compress it to serve to your users. Linda: Exactly. But if you design your training run with precision in mind—say, targeting that optimal 7 to 8-bit pretraining range—it not only optimizes your compute budget, but it also acts as an insurance policy. It guarantees your model is mathematically robust enough to handle extreme compression at deployment. Norris: This really changes how the industry should think about the whole machine learning pipeline. Precision is no longer just an engineering afterthought for the deployment team. It is a fundamental, mathematical pillar of the scaling laws from step one. Linda: I completely agree, Professor. It is time we start treating bits with just as much respect as we treat parameters and tokens! Norris: A perfect takeaway to end on. Thank you, Linda, for bringing in such a fantastic paper. And thank you all for listening to Mechanical Dreams. We will see you next week!

Open the transcript file

Hosts and Guests

Nobody is credited on this episode yet.

Credit the people on this episode

Be the first to rate this episode

More episodes

All episodes
  1. You don’t need long context

    Nov 12, 202620 minAudio

    In this episode: • The Context Window Arms Race: Professor Norris and Linda introduce the episode and discuss a new NVIDIA paper challenging the necessity of massive context windows, highlighting the hidden...

    Credit the people on this episode

  2. Scaling Hierarchical Networks

    Nov 11, 202621 minAudio

    In this episode: • Intro and The Bitter Lesson: Introducing the podcast and the Cartesia paper on Hierarchical Networks. • Scaling Ladders and The BPE Comparison: Discussing the compute efficiency gains of 1-stage...

    Credit the people on this episode

  3. Perturbing Inputs Improves Pretraining Distillation

    Nov 10, 202621 minAudio

    In this episode: • Introduction and Standard Distillation: Professor Norris and Linda introduce the podcast and set the baseline for standard knowledge distillation in language models. • The Core Idea of Perturbed...

    Credit the people on this episode

  4. Why is AI-generated language so hard to understand

    Nov 9, 202620 minAudio

    In this episode: • Introduction: The Reader-Patience Budget: Professor Norris and Linda introduce the episode's topic, discussing the growing sentiment that AI-generated text is becoming overly convoluted. • The...

    Credit the people on this episode

  5. Muse Glimmer 30B

    Nov 8, 202622 minAudio

    In this episode: • Introduction & Paper Overview: Professor Norris and Linda introduce the episode and the Muse Glimmer 30B paper, outlining its goal of bringing agentic capabilities to consumer hardware. • Architecture...

    Credit the people on this episode