Manuscript Offprint

arXiv:2610.05458

Measuring and Reducing Cross-Vendor Mismatch in Language Models

Erland Hilman Fuadi, Chong Tian, Xiaosong Ma, Qirong Ho

ABSTRACT

Running the same language model on different graphics processing unit (GPU) vendors can produce different logits, even when the model weights and inputs are the same. We analyze cross-vendor mismatch in two dense and two mixture-of-experts (MoE) models with five metric families, namely bitwise equality, logit differences, top-K consistency, token agreement, and task accuracy. We trace one source of the mismatch to accumulation order inside vendors' matrix instructions. Upcasting to FP32 reduces the dense model's logit error by 43% at three times the runtime, yet keeping only the MLPs in BF16 retains 94% of this gain at 1.3 times the runtime, so most of the cost of full upcasting buys little. In the MoE models, FP32 and FP16 both lower the probability error but raise the logit error and change expert selection, and FP16 fails in the dense model. An output-head low-rank adapter (LoRA) does not help either, since the final hidden state does not predict the mismatch. The mismatch also carries into training. With every seed fixed, a student distilled from a teacher running on AMD answers 431 MMLU questions differently from one distilled from the same teacher on NVIDIA. Under FP32 upcasting, bitwise equality barely changes while the output distributions move most of the way to the reference, so judging cross-vendor agreement by a single measure misreads both its cost and its gains. Code is available at https://github.com/crova-project/crova.

Figure

Figure 1: Cross-vendor mismatch spans the execution hierarchy. Inter-framework studies address differences in models, frameworks, and tensor-operation choices. At lower levels, kernel and hardware arithmetic can introduce additional numerical differences. The hierarchy organizes the analysis of how these differences propagate through model outputs and behavior.

1 INTRODUCTION

Large language models (LLMs) are increasingly developed and deployed across heterogeneous hardware and software environments (Chen et al., 2025). Different execution stacks implement floating-

*Corresponding author: erland.fuadi@mbzuai.ac.ae

(a) Query · L5

Figure

(b) Layer 0

Cross-vendor difference

Hidden feature index

(c) Last layer

(e) Router · L12

(d) Across layers

(f) Layer 0

(g) Last layer

Hidden feature index

(h) Across layers

Figure 2: Cross-vendor differences in a Jais dense model (Jais Team, 2026, a–d) and OLMoE MoE model (Muennighoff et al., 2025, e–h). Components (a/e) and first blocks (b/f) receive identical inputs. Last-block outputs (c/g) and layer curves (d/h) use independent full forwards, allowing differences to propagate. The curves show the mean absolute difference across all tokens and hidden features at each block output.

point arithmetic differently, producing different outputs across GPU vendors even when the model weights and inputs are unchanged, which we call cross-vendor mismatch (Li et al., 2024; Zahid et al., 2024). In our measurements, fewer than one in ten output logits of an 8B model are bit-identical between an NVIDIA and an AMD GPU. This matters when a model developed on one vendor is used on another, since its output values determine the probabilities and choices used in later computation. These differences raise questions about the reliability and reproducibility of LLMs across execution environments (Chauvin et al., 2025; Yuan et al., 2025), and assessing them requires examining both the generated answers and the numerical values that produce them.

The consequences of cross-vendor mismatch depend on how these outputs are used. For example, in knowledge distillation (KD), the teacher's probability distribution supplies the student's training targets (Hinton et al., 2015). Differences in these probabilities change the targets even when the teacher selects the same token. Reinforcement learning (RL) also uses output probabilities to compute training objectives, making consistency between generation and training relevant to learning (Qi et al., 2025; Zhong et al., 2026). During generation, a small numerical difference can change the selected token when competing scores are close. In mixture-of-experts (MoE) models, router values determine expert selection and mixture weights, and a changed selection changes which parameters process the token (Ma et al., 2025). These choices affect computation and the final answer.

Reducing mismatch requires understanding where the numerical differences arise, from execution frameworks down to hardware arithmetic, as illustrated in Figure 1. Prior work mainly studies inter-framework mismatch in the upper parts of this hierarchy (Ma et al., 2025; Qi et al., 2025; Zhang et al., 2026; Zhong et al., 2026). Other cross-accelerator work validates alternative training stacks against NVIDIA-based frameworks through forward-precision and training-loss comparisons (Chen et al., 2025). Our work focuses on cross-vendor mismatch at the lower levels of the hierarchy. Here, the underlying matrix arithmetic can differ in its rounding and accumulation behavior across GPU architectures (Li et al., 2024). This is a non-trivial problem that requires deeper investigation at the machine-code level. Matching the model code and framework settings alone therefore does not ensure the same numerical behavior across vendors.

How agreement is measured decides what a study concludes, and prior work measures it incompletely. Deterministic-inference work targets bitwise-identical outputs (He & Lab, 2025; Zhang et al., 2025; Yang et al., 2026) or identical token sequences (Gond et al., 2026; Chu et al., 2026), and LayerCast (Yuan et al., 2025) judges FP32 upcasting by the spread of accuracy, response length, the first divergent token, and the top-1 probability across NVIDIA configurations only, never across vendors, with its cost reported against full FP32 rather than native BF16. These measures can miss most of what cross-vendor mismatch changes. An intervention can leave bitwise equality, generated tokens, and accuracy almost unchanged while moving the output distribution substantially toward the reference, and an analysis built on those measures alone would conclude that it does nothing.

The output distribution is what distillation and reinforcement learning consume, and a cost measured against the wrong baseline hides what an intervention actually costs. Judging cross-vendor agreement therefore requires several metric families at once.

We study cross-vendor mismatch as both an analysis of the disagreement and a comparison of ways to reduce it. We connect internal values, including router values and expert selections in MoE models, to five output-level metric families, and trace the differences arise down to the matrix operations that accumulate them. We then ask where the mismatch can be reduced, by changing the arithmetic format (Qi et al., 2025; Yuan et al., 2025; Cooper et al., 2026) or by correcting only the output with a low-rank adapter (Hu et al., 2022), and whether it carries into distillation. We find that the mismatch is widespread and survives the obvious fixes, that most of the gain from higher precision comes without its cost, and that judging agreement by bitwise equality alone misses what matters.

Our contributions are as follows.

  1. We characterize cross-vendor mismatch in denses and MoE models with five families of agreement measures, from bitwise equality to task accuracy, and trace where it arises by comparing values across layers and isolating accumulation paths in matrix multiplication.

  2. We examine where the mismatch can be reduced, comparing precision changes throughout the forward pass, higher precision in selected modules only, and a low-rank correction at the output head, together with their cost.

  3. We examine how the choice of agreement measure changes the assessment of each intervention, contrasting bitwise equality with the output distributions and choices that downstream uses consume.

  4. We test whether the mismatch carries into downstream training by distilling a teacher run on each vendor and precision into the same student.

References (55)