Four Over Six: More Accurate NVFP4 Quantization with Adaptive Block Scaling
This paper introduces "Four Over Six" (4/6), an adaptive block-scaling technique for NVFP4 quantization that reduces quantization error by dynamically adjusting block scales to better handle large values, thereby achieving training and inference performance closer to BF16 with minimal computational overhead.
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 pack a massive library of books into a tiny, portable suitcase. The books represent the "brain" of a Large Language Model (AI), and the suitcase represents the computer's memory. To fit everything in, you need to shrink the books.
For a long time, we've been using a method called BF16 (a standard, high-precision format) which is like packing the books in sturdy, heavy boxes. It's accurate, but the suitcase gets full fast. Recently, engineers tried switching to NVFP4, a much smaller format. Think of NVFP4 as a set of tiny, lightweight origami boxes. They fit way more books in the suitcase and make the AI run faster, but there's a catch: because the boxes are so small, some of the "big" books get squished, crumpled, or lose their pages. This "crumpling" is called quantization error, and it makes the AI make mistakes.
The Problem: The "Rough Edge" of Small Boxes
The paper explains that NVFP4 has a weird quirk. It has specific sizes it can hold: 0.5, 1, 1.5, 2, 3, 4, and 6.
- If a book is exactly size 4, it fits perfectly.
- If a book is size 5, it doesn't fit. You have to force it into the size 4 box or the size 6 box.
- If you force a size 5 book into a size 4 box, you lose a lot of information (it gets crushed). If you force it into a size 6 box, you waste a lot of space (it rattles around).
The authors found that the "crushing" happens most often with books that are almost as big as the biggest box (the "near-maximal" values). In the standard method, the suitcase is sized to hold the absolute biggest book possible (size 6). But this leaves a huge gap where books of size 5 get squished badly.
The Solution: "Four Over Six" (4/6)
The authors, Jack Cook and his team, came up with a clever trick called Four Over Six.
Imagine you are packing a suitcase. Instead of forcing every single item to fit into a "Size 6" box, you look at each group of items.
- The Old Way: You assume every group needs a "Size 6" box. If a group has a book that is size 5, you crush it.
- The 4/6 Way: You check the group. If the biggest book in that specific group is only size 5, you say, "Okay, we don't need a Size 6 box for this group. Let's use a Size 4 box instead."
By switching to a smaller "Size 4" box for that specific group, the "Size 5" book (which is now relatively smaller compared to the box limit) fits much more comfortably. It's no longer being crushed against the edge.
The Analogy:
Think of it like a video game character jumping.
- Standard NVFP4: The game assumes the character can jump up to 10 feet. If they try to jump 9 feet, the game rounds it down to 8 feet (a big drop).
- 4/6 Method: The game checks the specific level. If the highest platform is only 6 feet high, it switches the "jump limit" to 6 feet. Now, a 5-foot jump is rounded to 6 feet (or 4 feet) much more accurately. The character doesn't fall as far.
How It Works in Practice
The paper describes a smart algorithm that looks at every small chunk of data (called a "block") before packing it:
- It tries packing the chunk into a "Size 6" box and calculates how much information is lost.
- It tries packing the same chunk into a "Size 4" box and calculates the loss.
- It picks whichever box causes less damage (less error).
Usually, for chunks with very big numbers, the "Size 4" box is the winner because it makes the "near-maximal" numbers fit better.
The Results
The team tested this on a massive AI model called Nemotron 3 Nano (30 billion parameters).
- Training: When they trained the AI using 4/6, the AI learned better and made fewer mistakes compared to the standard NVFP4 method. It got much closer to the performance of the heavy, slow "BF16" method, but kept the speed and size benefits of NVFP4.
- Speed: They showed that this "smart packing" doesn't slow down the computer. It adds less than 15% extra work, which is a tiny price to pay for much better accuracy.
- Existing Models: They also tried this on already-trained models (like Llama and Qwen). Even without re-training, using 4/6 made these models smarter and more accurate on tests like reading comprehension and logic puzzles.
The Bottom Line
The paper claims that by simply being smarter about which box size to use for different groups of data—sometimes using a "4" instead of a "6"—you can stop the "crushing" of important information. This makes low-precision AI (NVFP4) much more accurate, allowing us to run bigger, faster AI models on current hardware without them losing their "brainpower."
They even released the code (kernels) so others can use this "smart packing" method on NVIDIA's newest Blackwell GPUs.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.