← Latest papers
🤖 machine learning

Pretraining large language models with MXFP4

This paper identifies that quantizing weight gradients (Wgrad) is the primary cause of instability in full-pipeline FP4 training of large language models and demonstrates that deterministic Hadamard rotations, rather than stochastic rounding, are essential to restore convergence stability.

Original authors: Musa Cim, Poovaiah Palangappa, Miro Hodak, Ravi Dwivedula, Meena Arunachalam, Mahmut Taylan Kandemir

Published 2026-05-12
📖 4 min read☕ Coffee break read

Original authors: Musa Cim, Poovaiah Palangappa, Miro Hodak, Ravi Dwivedula, Meena Arunachalam, Mahmut Taylan Kandemir

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to teach a giant, brilliant student (a Large Language Model) to write stories. Usually, to keep this student learning effectively, you give them notes written in high-quality, detailed ink (called FP8 precision). This works well, but the notes are heavy, taking up a lot of space in the student's backpack and slowing down how fast they can read them.

Researchers wanted to see if they could switch to ultra-lightweight notes written in just 4 bits of information (MXFP4). These notes are tiny and fast, promising to make the student learn much quicker. However, there's a catch: when they tried using these tiny notes for the entire learning process, the student often got confused, started making wild guesses, and failed to learn anything (the training "diverged").

The paper asks: Why does this happen, and how do we fix it?

The Experiment: A Three-Step Test

The researchers set up a controlled experiment to figure out exactly where the problem lies. They broke the learning process into three stages and slowly swapped the heavy notes for the light notes, one stage at a time:

  1. Forward Pass (Fprop): The student reads the question.
  2. Activation Gradients (Dgrad): The student figures out how much they misunderstood the question.
  3. Weight Gradients (Wgrad): The student updates their brain (the "weights") to remember the lesson for next time.

The Findings:

  • Stage 1 & 2: When they used light notes just for reading and figuring out misunderstandings, the student did fine. They learned almost as well as with the heavy notes, just needing a few extra practice questions.
  • Stage 3 (The Problem): The moment they switched to light notes for updating the brain (Wgrad), the student started to spiral out of control. The researchers found that this specific step is the "weak link." It's like trying to write a complex math correction on a tiny, crumpled piece of paper; the details get lost, and the student learns the wrong lesson.

The Failed Fixes: Adding Randomness

When the student started failing, the researchers tried a common trick: Stochasticity (adding randomness).

  • The Analogy: Imagine the student is confused, so you tell them, "Just guess randomly!" or "Spin a wheel to decide your answer."
  • The Result: This didn't work. In fact, adding randomness to the tiny notes made the errors worse. The "noise" of the random guesses amplified the tiny errors already present in the light notes, causing the training to crash completely.

The Winning Fix: The Deterministic Shuffle

The researchers then tried a different approach: Deterministic Hadamard Rotations.

  • The Analogy: Instead of guessing randomly, imagine the student has a special, rigid ruler that perfectly rearranges the tiny notes before they are written down. This ruler doesn't add randomness; it simply organizes the information in a specific, predictable way so that the tiny notes don't get crumpled or lost.
  • The Result: This worked perfectly. By using this specific, predictable "rearranging" method, the student could use the tiny, fast notes for the entire process (reading, analyzing, and updating) without getting confused.

The Bottom Line

The paper concludes with two main takeaways:

  1. The Bottleneck: The main reason 4-bit training fails isn't because the notes are too small generally; it's specifically because the brain-updating step (Wgrad) is too sensitive to the tiny errors in those notes.
  2. The Solution: To make 4-bit training work, you don't need to add more randomness. You need structure. By using a specific, predictable mathematical shuffle (Hadamard rotation), you can stabilize the process.

The Payoff:
When they fixed the problem with this "rearranging ruler," the system became 20% faster at each step of learning. Because the student learned stably without needing extra practice questions, the whole process finished about 10% faster from start to finish compared to the old, heavy-ink method.

In short: You can use the super-fast, tiny notes, but only if you organize them perfectly before writing them down. If you just throw in some randomness, it breaks everything.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →