LLM Precision Selection: BF16, FP8, INT4, and MXFP4

    Low-precision number formats are not simply a matter of going narrower or staying conservative—BF16, FP8, INT4, and MXFP4 each fit different resource constraints, hardware capabilities, and task-quality tolerances. This guide explains why LLMs use low precision, how formats evolved from FP32 down to FP4, how scaling granularity (per-tensor, per-channel, and microscaling) affects quality, how to understand MXFP4's E2M1 elements and E8M0 scale factors, and how to choose INT4. It includes a decision checklist covering training, hardware, task, and bottleneck, a benefits-versus-risks comparison, and practical deployment guidance for a stable rollout.

    The bottom line: there is no best precision format, only the right fit

    In large-model engineering, low-precision number formats are not simply “the narrower the better,” nor “the more conservative the safer.” BF16, FP8, MXFP4, and INT4 each correspond to different resource constraints, hardware capabilities, and task-quality tolerances. A more reliable principle is:

    • Training side: Start with BF16 for the best stability and compatibility; if you need throughput, then evaluate FP8’s native training support.
    • Inference side: Step down according to constraints—from BF16/FP16 to FP8 and INT8, then to INT4/FP4.
    • When memory is insufficient: Don’t fixate only on INT4/FP4. Also evaluate higher precision combined with distributed inference, weight offloading, and cache compression.
    • Precision-sensitive tasks: Prefer to retain higher precision, or use mixed precision with sensitive-layer protection.
    • Validation: Don’t rely on perplexity alone. Also check task accuracy, long-context consistency, hallucination rate, P99 latency, and throughput.

    Put another way, the essence of low-precision selection is not picking the “newest format,” but picking a solution whose risk is acceptable under your current hardware, current task, and current capacity constraints.


    Why LLMs need low precision: first identify the real bottleneck

    Large models use low-precision formats usually not because a given format is inherently advanced, but because it relieves a specific resource bottleneck. There are three common bottleneck types:

    Bottleneck Cause Typical scenario Value of low precision
    Memory capacity Weights and activations fill up GPU memory, so the model can’t be fully loaded A hundred-billion-parameter model won’t run on a single GPU Reduces storage density, directly saving memory
    Memory bandwidth Autoregressive decoding reads the weights for every generated token, so bandwidth often becomes the limiting factor Low-concurrency, long-context, chat inference Reduces the volume of weight reads, potentially lowering latency
    Communication bandwidth During multi-GPU parallelism, activations, gradients, or weight shards must be transferred across devices Tensor parallelism, pipeline parallelism Reduces the number of bytes transferred, but may introduce dequantization or synchronization overhead

    One point deserves special emphasis: autoregressive inference is often memory-bandwidth-bound, not compute-bound. As a result, the reduction in memory reads brought by low precision often matters more than “multiplying matrices faster.” In latency-sensitive scenarios, 4-bit formats may deliver clear benefits, but this usually requires that:

    • The hardware or software stack has good support for the low-precision format;
    • Quantization error does not significantly damage task quality;
    • Extra overhead such as dequantization, group scaling, and memory-access patterns does not cancel out the gains.

    Therefore, low-precision selection cannot be divorced from the specific bottleneck. If the model simply won’t fit, solve capacity first; if latency is high but memory is ample, optimize bandwidth and the inference path first; if distributed communication is the bottleneck, low precision can help reduce transfer volume, but you must weigh the combined cost of communication and dequantization.


    From FP32 to FP4: how precision formats evolved

    Low-precision formats didn’t appear overnight. They broadly evolved along a path from “high dynamic range first” to “storage density first.”

    Step 1: From FP32 to FP16/BF16

    FP32 is the most traditional high-precision floating-point format, but its storage and computation costs are high. FP16 and BF16 both use 16-bit representation, but with different emphases:

    • FP16: 5-bit exponent, 10-bit mantissa. It has relatively better precision but a smaller dynamic range, so training may require more careful loss scaling.
    • BF16: 8-bit exponent, 7-bit mantissa. Its exponent range is close to FP32, giving it a larger dynamic range. It usually reduces reliance on loss scaling and is better suited to large-model training.

    BF16 became a common baseline in large-model training not because it wins on every metric, but because it strikes a good balance among stability, compatibility, and engineering cost. For most training tasks, BF16 is a robust starting point.

    Step 2: From 16-bit to FP8/INT8

    FP8 is an important direction for further reducing storage and bandwidth costs. There are two common FP8 forms:

    • E4M3: 1 sign bit, 4 exponent bits, 3 mantissa bits. Precision-oriented, often used for forward computation.
    • E5M2: 1 sign bit, 5 exponent bits, 2 mantissa bits. Dynamic-range-oriented, often used for backward gradients.

    A common engineering pairing is “E4M3 forward, E5M2 backward,” but this is not a universal rule. The actual effect depends on the training task, optimizer, gradient distribution, hardware instruction support, and calibration method.

    Public cases have shown that native FP8 training or inference can be deployed under specific model structures, task data, and hardware platforms. Whether it fits your scenario still needs empirical validation, including:

    • Whether the hardware supports the corresponding FP8 instructions;
    • Whether the framework supports FP8 operators;
    • Whether quantization calibration is adequate;
    • Whether training loss remains stable;
    • Whether inference quality meets business requirements.

    Step 3: Below 8-bit to FP4/INT4

    When the bit width drops to 4 bits or lower, the numeric space becomes very sparse. At this point, a single scale factor is often insufficient, and you must rely on finer-grained scaling strategies. The core difficulty of FP4, MXFP4, and INT4 is not “whether it fits,” but “whether it’s still usable after it fits.”

    In particular, FP4 formats such as MXFP4 must rely on block-level shared scale factors to adapt to local numeric ranges. Otherwise, extremely small or large values can cause severe distortion.


    Choosing scaling granularity: per-tensor, per-channel, or microscaling?

    Quantization is not just converting floating-point numbers into low-bit integers or low-bit floats. More importantly, it’s about how scale factors are shared. Coarser scaling granularity is simpler to implement; finer granularity better handles local numeric differences.

    Scaling method Granularity Advantages Disadvantages When to use
    Per-tensor The entire tensor shares one scale factor Simple to implement, low overhead Struggles to accommodate both large and small values and outliers Suited to initialization or simple weight quantization; risky at low bit widths
    Per-channel One scale factor per output channel Usually better precision than per-tensor Still not robust enough for local outliers in activations Suited to weight quantization or scenarios with clear per-channel differences
    Microscaling (MX) One scale factor shared per 32 elements Adapts to local dynamic range, balancing hardware efficiency and precision Requires extra storage for scale factors, more complex to implement Suited to ultra-low-bit formats like FP4/MXFP4

    A common misconception in low-precision quantization is: as long as the overall error is small, the model is fine. In reality, outliers in large models are often local. A tensor’s overall range may look normal, yet a small block within it may contain extreme maxima or minima. If scaling granularity is too coarse, these local anomalies force the global scale factor to become conservative, compressing most normal values too finely.

    The key insight of the microscaling paradigm is this: outliers are often local, so quantization should be localized too. Splitting a tensor into small blocks and computing a scale factor for each block independently can improve the usability of low-bit formats with almost no significant increase in storage pressure.


    Understanding MXFP4: E2M1 elements and E8M0 scale factors

    MXFP4 is a typical microscaling format. It consists of two parts:

    1. Element format: E2M1, a 4-bit float;
    2. Shared scale factor: E8M0, an 8-bit exponent format.

    The 4 bits of E2M1 are allocated as follows:

    • 1 sign bit;
    • 2 exponent bits;
    • 1 mantissa bit.

    Its representable positive values typically include:

    Encoding Sign Exponent Mantissa Value
    0000 0 00 0 0
    0001 0 00 1 0.5
    0010 0 01 0 1.0
    0011 0 01 1 1.5
    0100 0 10 0 2.0
    0101 0 10 1 3.0
    0110 0 11 0 4.0
    0111 0 11 1 6.0

    As you can see, E2M1’s maximum representable value is only 6.0, and its spacing between values is uneven. If you use E2M1 directly to represent real weights or activations, values can easily go out of range or lose too much information. That’s why MXFP4 relies on E8M0 as a block-level scale factor.

    Typically, an MXFP4 block contains 32 E2M1 elements and one shared E8M0 scale factor. The dequantization process can be simplified as:

    1. def dequantize_mx_block(block_e2m1, scale_e8m0):
    2. if scale_e8m0 == 0xFF:
    3. return [float('nan')] * 32
    4. scale = 2.0 ** (scale_e8m0 - 127)
    5. return [decode_e2m1(x) * scale for x in block_e2m1]

    The logic here is: first use E8M0 to bring the block’s overall magnitude back into a reasonable range, then use E2M1 to express the relative precision within the block. In other words, E8M0 handles “magnitude” and E2M1 handles “detail.” Only by combining the two can a 4-bit float become practically usable.

    Note that MXFP4 is not naturally suited to all models, all tasks, and all hardware. It’s more appropriate when all of the following conditions are met simultaneously:

    • The hardware or inference framework supports the MX family of formats;
    • The model tolerates 4-bit weights or 4-bit activations to some degree;
    • Task quality after quantization has been validated as acceptable;
    • Precision loss can be reduced through mixed precision or sensitive-layer protection.

    How to choose INT4: common implementations, scaling methods, and engineering notes

    Compared to FP4, INT4 appeared earlier in the large-model community and is easier to understand. But INT4 doesn’t mean “crudely truncating weights to 4 bits.” In practice, INT4 usually relies on finer-grained scaling and zero-point design.

    Common INT4 approaches

    Common INT4 implementations include:

    • GPTQ: Often used for post-training quantization, typically with per-group or per-channel scaling, optimizing quantization error using calibration data.
    • AWQ: Emphasizes protecting activation-sensitive channels, selecting which to keep at higher precision or how to adjust scaling via an activation-aware approach.
    • NF4: Common in low-precision fine-tuning scenarios such as QLoRA, using a non-uniform quantization method combined with block-level scale factors.
    • Custom INT4 kernels: Some hardware or inference engines provide native INT4 support; otherwise, computation usually requires dequantizing to FP16/BF16 or INT8 first.

    The key isn’t 4 bits, it’s scaling granularity

    INT4 typically uses the following scaling methods:

    • Per-channel scaling: One scale factor per output channel, suited to weight quantization.
    • Group scaling: One scale factor shared per 32, 64, 128, or some block size, better suited to capturing local distributions.
    • Zero-point quantization: Using a zero-point to improve adaptation to asymmetric distributions.

    If scaling granularity is too coarse, INT4 easily compresses most weights into just a few integer values, severely compressing the model’s capacity. Conversely, appropriate group scaling and activation-aware methods can significantly improve INT4’s usability.

    INT4’s hardware and fallback issues

    INT4’s benefits depend heavily on hardware and the software stack. If the hardware has no native INT4 compute units, or the inference framework has no well-optimized INT4 kernel, then INT4 may just be “stored at low bits, computed at high bits.” In this case, memory and bandwidth benefits may still exist, but compute benefits may not be significant.

    So when selecting, ask three questions:

    1. Does the hardware support INT4 or an equivalent low-bit compute path?
    2. Is the overhead of dequantizing back to FP16/BF16 acceptable?
    3. After going low-precision, is a fallback path retained so you can switch quickly if quality degrades?

    For critical workloads, INT4 should not be treated as an irreversible choice, but as an engineering option that is monitorable and reversible.


    Precision selection checklist: training, hardware, task, and bottleneck

    To avoid choosing formats by feel, you can break the decision process into a checklist you can tick off.

    1. First, determine training or inference

    • If training, first assess whether BF16 is stable.
    • If training needs throughput, then assess whether FP8 has native support.
    • If inference, step down according to memory, latency, and quality tolerance.
    • For low-bit weight inference, prefer formats with mature implementations.

    2. Then, determine whether the hardware supports it

    • Does the hardware natively support the target format?
    • Does the framework have the corresponding operators?
    • Is dequantization back to FP16/BF16 needed?
    • Will dequantization overhead cancel out the memory or bandwidth gains?
    • Are there mature kernels, not just a generic implementation?

    If the hardware doesn’t support it, a low-precision format may not deliver the desired benefits. In that case, prioritize options with a more mature software stack, such as BF16, FP16, or INT8.

    3. Evaluate the task’s tolerance for precision

    • Does the task rely heavily on long-chain reasoning?
    • Does it involve code generation, math, or multi-step planning?
    • Is it very sensitive to hallucination rate?
    • Can sensitive layers be protected via mixed precision?
    • Is there a sufficient evaluation set to verify quality degradation?

    For tasks like code generation, complex reasoning, and math, be more conservative and prefer FP8 or higher precision. For tasks like summarization, classification, and casual chat, you can step down more aggressively to INT4/FP4.

    4. Determine the bottleneck type

    • Memory won’t fit: prioritize reducing weight storage, but also evaluate distributed approaches, offloading, and compression.
    • Memory-bandwidth-bound: low-bit weights may directly reduce read volume.
    • Insufficient compute throughput: low-precision gains depend on hardware compute support.
    • Communication-bandwidth-bound: low precision can reduce transfer volume, but weigh dequantization and synchronization costs.

    5. Keep alternative paths

    Low precision isn’t the only solution. When memory runs short, besides INT4/FP4, you can also consider:

    • Higher precision with tensor or pipeline parallelism;
    • Offloading weights to CPU or NVMe;
    • Activation compression or cache compression;
    • Dynamic quantization combined with mixed precision;
    • Keeping BF16/FP16 for critical layers and low precision for the main body.

    So when you must fit weights into limited memory, FP4 or INT4 may be one viable option, but it should not be described as the only choice.


    Benefits and risks: what low precision actually buys you

    The benefits of low-precision formats are usually direct, but the risks often show up at the model-quality level. Here’s a simplified comparison:

    Dimension BF16 FP8 INT4 MXFP4/FP4
    Memory usage Baseline Reduced Significantly reduced Significantly reduced
    Bandwidth benefit Baseline Clear Clear Clear
    Compute benefit Hardware-dependent Good when hardware-supported Depends on hardware and kernel Depends on hardware and format support
    Training stability Good Needs validation Usually not suited to direct training Usually needs more complex training or fine-tuning strategies
    Inference risk Low Medium Medium-high Medium-high
    Hardware dependency Low High Medium-high High
    Fallback cost Low Medium Medium Medium-high

    The benefits side can be quantified:

    • Lower bit width means less weight storage;
    • Less weight read volume may lower inference latency;
    • On hardware with native low-precision support, compute throughput may improve;
    • In multi-GPU communication scenarios, fewer bytes may be transferred.

    The risk side is more subtle:

    • Quantization error may affect logical consistency;
    • Poor handling of activation outliers can cause local collapse;
    • Errors may accumulate during long-text generation;
    • Some layers are more sensitive to quantization and need mixed-precision protection;
    • Low-precision solutions may depend on specific frameworks or hardware, raising migration costs.

    So low-precision selection can’t look only at “how much memory was saved.” It must also look at “whether the quality loss is controllable, whether the performance gains are real, and whether failures are reversible.”


    FAQ: how to choose, how to configure, and how to avoid pitfalls

    1. BF16 or FP16?

    For training large models, usually prefer BF16. Its exponent range is closer to FP32, giving a larger dynamic range and usually better stability. FP16 isn’t unusable, but training may need more careful loss scaling and stability validation.

    For inference only, prefer BF16 if the hardware supports it better; if certain hardware is more maturely optimized for FP16, you can also compare empirically.

    2. How to pair FP8’s E4M3 and E5M2?

    The common approach is:

    • Use E4M3 for the forward pass, leaning toward precision;
    • Use E5M2 for backward gradients, leaning toward dynamic range.

    But this is only a rule of thumb. Whether it actually works depends on the model structure, gradient distribution, optimizer, and hardware support. Don’t apply this pairing directly to your own business model just because some paper or framework uses it.

    3. What are MXFP4’s 32-element block and E8M0?

    In MXFP4, every 32 E2M1 elements share one E8M0 scale factor. E8M0 is an 8-bit exponent format used to express block-level scaling. E2M1 itself can represent only a very limited set of values, so it must rely on the block-level scale factor to bring values back into a reasonable range.

    Without E8M0, E2M1 alone would be very fragile; without an appropriate block size, local outliers could also break the quantization effect.

    4. INT4 or FP4?

    INT4 and FP4 aren’t a matter of “whoever is newer wins.” The main differences are in numeric representation and scaling mechanisms:

    • INT4 is typically integer quantization, relying on scale factors and zero-points, with common implementations like GPTQ, AWQ, and NF4.
    • FP4 uses a floating-point-style representation, such as E2M1, often combined with a microscaling factor like MXFP4.
    • INT4’s software ecosystem may be more mature, but hardware support isn’t necessarily native.
    • FP4 may be more flexible in adapting to dynamic range, but it demands more from hardware and frameworks.

    When selecting, don’t look only at the format name. Look at: which implementation is more mature, which kernel is faster, which solution is more stable in quality, and which solution is easier to fall back from.

    5. How to validate a low-precision model?

    At minimum, validate the following:

    • Memory usage;
    • Throughput, e.g., tokens/s;
    • First-token latency and P99 latency;
    • Task accuracy;
    • Long-context consistency;
    • Hallucination rate;
    • Sensitivity of critical layers;
    • Whether mixed precision can restore quality;
    • Whether there’s a way to quickly fall back to a high-precision path.

    In particular, don’t look at perplexity alone. Lower perplexity doesn’t mean factual accuracy, logical coherence, and business metrics are all fine.


    Practical recommendations: a stable path to deployment

    For most teams, the following path works well:

    1. Use BF16 as the default baseline
      Start training and general inference with BF16 for the best compatibility and relatively high stability.

    2. Evaluate FP8 only when training needs throughput
      Confirm hardware, framework, and task stability first, then consider FP8. Don’t switch wholesale without calibration and validation.

    3. Evaluate INT4/FP4 when memory is short, but don’t ignore alternatives
      INT4 or FP4 can reduce storage pressure, but also evaluate distributed inference, weight offloading, compression, and mixed precision.

    4. For INT4, prefer mature implementations
      For example GPTQ, AWQ, or NF4, and confirm support for group scaling, per-channel scaling, and fallback mechanisms.

    5. For FP4, prefer microscaling solutions
      If you use a format like MXFP4, confirm whether the hardware or framework supports E8M0 scale factors and block-level dequantization.

    6. Keep high precision for critical layers
      For sensitive modules like attention, normalization, and the first and last layers, you can use mixed precision, keeping BF16 or FP16.

    7. Build a fallback mechanism
      Before deploying a low-precision solution for critical workloads, retain a high-precision inference path so you can switch quickly if quality degrades.

    The essence of low-precision format selection is striking a comprehensive tradeoff among memory, throughput, latency, precision, and engineering complexity. No format is inherently better than others—only whether it fits the current task. Only by understanding each format’s bit allocation, scaling mechanism, and failure boundaries can you turn low precision from a “parameter game” into an engineering decision that is verifiable, reversible, and deployable.