Running DeepSeek on Domestic AI Accelerators: INT8 Precision and Performance Trade-offs

    This article explains how to deploy DeepSeek on domestic AI accelerators that lack native low-precision floating-point (such as FP8) support. It covers why equal bit width does not guarantee equal results, how fine-grained quantization grouping protects accuracy, the difference between uniform INT8 scales and floating-point scales within a group, why FP8 weights cannot be losslessly converted to INT8, and how the placement of scale multiplication affects kernel throughput. It also introduces power-of-two scales as a hardware-friendly option and closes with a practical deployment checklist.

    1. Background: Why “the Same Bit Width” Does Not Mean “the Same Results”

    When deploying models like DeepSeek—which rely on low-precision floating-point formats for training and inference—on domestic AI accelerators that lack native low-precision floating-point (such as FP8) compute support, engineering teams commonly ask one question: since both INT8 and FP8 are 8 bits, can we simply “squeeze” weights and activations into INT8 and get the same accuracy and throughput?

    The answer is no—but it is also not true that “INT8 is always worse.” What really determines the success of low-precision quantization is not bit width, but the design of quantization granularity and the distribution characteristics of numerical scales within each group. Once you separate these two concerns, the trade-offs become clear.

    2. The Accuracy Side: Fine-Grained Grouping Is the First Factor

    The most common failure mode in low-precision quantization is “one outlier ruining an entire block of data.” In both activations and weights, value distributions tend to be long-tailed: a few tokens and a few channels exhibit outliers that are orders of magnitude larger. If a coarse-grained scheme shares a single scale across an entire tensor (per-tensor) or an entire row (per-row), that outlier pushes the scale up, compressing the vast majority of normal values into an extremely narrow representable range and sharply reducing effective precision.

    Fine-grained group quantization works by shrinking the range that shares one scale:

    • Activations: one scale shared per token per 128 channels, i.e., 1×128 grouping;
    • Weights: one scale shared per 128×128 block;
    • Scale selection: computed online in real time from the absolute maximum (amax) of the current tile, rather than relying on fixed values from offline statistics.

    The benefit is that the contamination radius of an outlier is confined to a single small group. One anomalous value affects at most the 128 numbers in its group, while all other groups retain full representational precision. It is worth stressing that this layer of benefit is independent of whether the underlying format is FP8 or INT8—only after grouping is fine enough (down to 128) does the real difference between the two formats move to the intra-group level.

    3. Intra-Group Differences: Uniform Scale vs. Floating-Point Scale

    Grouping solves the “inter-group” problem. Within a group, one fundamental difference remains:

    • Floating-point (e.g., E4M3): non-uniform scale, spanning roughly 18 binades (the interval between two adjacent powers of two) from the smallest subnormal number up to 448, with constant relative precision within each binade. This means smaller values within the group still retain relative precision, which is friendly to dynamic range.
    • INT8: uniform scale, with approximately constant absolute error, so values close to zero have larger relative error.

    The conclusion is not “INT8 cannot be used,” but rather: once the group length converges to 128, the intra-group dynamic range has already been significantly compressed, and the relative error introduced by a uniform scale is acceptable in most scenarios. Exactly how much accuracy is lost must be measured on the target task—you cannot simply copy conclusions from floating-point schemes. The recommended validation path is: first run a layer-by-layer quantization error scan (such as cosine similarity or MSE) on a validation set, then perform end-to-end evaluation of task metrics, and apply mixed-precision fallback (for example, keeping a few individual layers in BF16) to the layers most sensitive to quantization.

    4. A Common Pitfall: Published Weights Cannot Be Converted Losslessly

    Many teams assume that “since the official weights are FP8, converting them to INT8 is just swapping the container.” This is wrong. E4M3 values do not fall on a uniform grid, so mapping them directly to INT8 requires re-quantization, which introduces secondary error that is uncontrollable.

    The correct approach is to start from the original BF16/FP16 weights and perform INT8 calibration from scratch, rather than converting from already-quantized FP8 weights. Calibration data should cover the real business distribution, and scales should use online amax or percentile statistics with truncation to avoid extreme outliers dominating.

    5. The Performance Side: Where the Scale Is Multiplied Determines Whether the Kernel Can Hit Peak Throughput

    Once accuracy is settled, performance hinges on one question: when the hardware does not support intra-block scaling, where do you multiply by the scale?

    When the matrix unit does not support “intra-block scaling,” the only option is to pull out the partial sum every 128 elements along the K dimension, multiply by that block’s scale, and accumulate into a high-precision accumulator. This is the typical approach for low-precision floating-point schemes on general-purpose tensor cores. The engineering essentials are:

    1. Align the segment length with the scale grouping length so that “multiply by scale” and “promote accumulation precision” happen in the same step, avoiding an extra pass;
    2. Keep the accumulator in high precision (such as FP32/INT32) to prevent overflow and precision collapse over long K accumulation;
    3. Align tile sizes with the grouping to reduce tail fragmentation and branching.

    Illustrative pseudocode:

    1. acc = 0.0 # high-precision accumulator
    2. for k0 in range(0, K, 128):
    3. tile = load_A(k0, k0+128) * scaleA[k0//128] # take partial products per segment
    4. w = load_B(k0, k0+128) * scaleB[k0//128]
    5. acc += partial_dot(tile, w) # accumulate into high precision
    6. out = acc

    The same segmentation idea transfers directly to an INT8 kernel: promote the partial sums of INT8 dot products to INT32 accumulation, then multiply by the scale per block.

    6. Making the Scale a Power of Two: A Hardware-Friendly Design for Domestic Chips

    A further way to reduce the cost of scale multiplication is to constrain the scale to a power of two (i.e., keep only the exponent, in an 8-bit exponent-only format with no mantissa). For integer arithmetic, multiplying by a power of two is equivalent to a bit shift:

    • It introduces no rounding error;
    • The scale can be fed directly into the matrix unit’s scaling path, far cheaper than multiplying by an arbitrary high-precision floating-point scale;
    • The hardware implementation is simpler and throughput is easier to max out.

    This kind of “exponent-style scale” scheme has been explicitly regarded as a design direction for next-generation domestic accelerators. The engineering trade-off is that the power-of-two constraint makes scale values coarser, which must be compensated for by finer grouping (smaller tiles) to offset the accuracy loss.

    7. Deployment Checklist

    1. Prioritize quantization granularity of 1×128 (activations) and 128×128 (weights), with scales taken online from amax;
    2. Do not convert FP8 weights to INT8—go back to BF16 and recalibrate;
    3. In the kernel, use K-direction segmentation, multiply partial sums by the scale, and accumulate in high precision, with segments aligned to groups;
    4. Evaluate the power-of-two scale scheme first, replacing multiplication with shifts;
    5. Accuracy must be measured end-to-end, with mixed-precision fallback for sensitive layers;
    6. Use monitoring, alerting, and logging services to track online quantization error and throughput, forming a sustainable closed loop for tuning.

    Summary: Running large models on domestic accelerators without native FP8 relies on fine-grained grouping to hold accuracy, and on segment-wise scale multiplication + high-precision accumulation + power-of-two shift scales to unlock performance. The two are not mutually exclusive—the key is to design all three things—grouping granularity, scale characteristics, and the placement of scale multiplication—properly at the same time.