Papers
Topics
Authors
Recent
Search
2000 character limit reached

MI300X Transformer Sizing Rules

Updated 24 November 2025
  • The paper presents a systematic methodology that derives transformer and MoE sizing rules from microbenchmark results, kernel roofline analyses, and hardware constraints.
  • Using concrete metrics like head dimension multiples of 64 and FLOP-size thresholds, the guidelines ensure that each GEMM and attention operation achieves optimal performance.
  • These rules integrate strategies in batch–sequence tiling, MLP/MoE expansion, and interconnect configuration to avoid underutilization bottlenecks and maximize throughput.

MI300X-aware transformer sizing rules are systematic guidelines for parameterizing transformer and mixture-of-experts (MoE) models to maximize throughput and efficiency on AMD Instinct MI300X GPUs. These rules are directly motivated by microbenchmark results, kernel roofline analyses, and hardware characteristics (GEMM throughput, HBM bandwidth, interconnect topology) observed in large-scale pretraining deployments on pure AMD clusters. MI300X-aware sizing covers every dimension of transformer and MoE layer parameterization—including head count, hidden width, MLP expansion, expert counts, and batch/sequence tile sizes—to exploit MI300X’s full-stack hardware and networking features and systematically avoid underutilization bottlenecks (Anthony et al., 21 Nov 2025, Ambati et al., 31 Oct 2025).

1. Attention Block Sizing Principles

Transformer attention on MI300X is governed by three primary constraints: head dimension alignment, GEMM size, and batch–sequence tiling. These constraints ensure high kernel utilization for both GEMM-based attention and projection operations.

  • Head dimension divisibility: For transformer hidden size HH, number of attention heads aa, and per-head dim dh=H/ad_h = H/a, the constraint:

dh  must be a multiple of 64, typically  dh≥128d_h \;\text{must be a multiple of 64, typically}\; d_h \ge 128

Ensures the QKTQK^T and output projection GEMMs hit MI300X’s high performance regime (outer dim ≥512\ge 512, inner dim ≥1024\ge 1024). Too small dhd_h results in severely reduced matrix multiply efficiency (utilization U=0.15U=0.15 for dh=64d_h=64, aa0 for aa1) (Ambati et al., 31 Oct 2025).

  • GEMM FLOP-size constraint: For a single GPU, maximum throughput is achieved when

aa2

(with aa3 micro-batch size, aa4 sequence per GPU, aa5 heads, aa6 per-head dim), ensuring that the QKaa7 and aa8 projection reaches MI300X’s aa9200 TFLOP/s peak. Example: dh=H/ad_h = H/a0 FLOPs.

  • Batch–sequence tiling: The grouped dimension dh=H/ad_h = H/a1 must be divisible by dh=H/ad_h = H/a2 (ideally dh=H/ad_h = H/a3), aligning matrix shapes to rocBLAS/hipBLASLt’s preferred tiles and preventing inefficient memory access patterns (Anthony et al., 21 Nov 2025).

2. MLP and MoE Block Sizing

Fully Connected (MLP) and MoE layers follow a set of expansion, tiling, and FLOP-scale rules directly informed by MI300X microbenchmarks.

  • Feedforward expansion: Use a dh=H/ad_h = H/a4 expansion for the pre-activation width (not traditional dh=H/ad_h = H/a5), i.e.,

dh=H/ad_h = H/a6

for SwiGLU activation. This maintains model quality while keeping GEMM sizes above the dh=H/ad_h = H/a7 GFLOP threshold on MI300X, optimizing throughput (Anthony et al., 21 Nov 2025).

  • Expert MLP tiling: For dh=H/ad_h = H/a8 experts per layer and local tokens per expert dh=H/ad_h = H/a9,

dh  must be a multiple of 64, typically  dh≥128d_h \;\text{must be a multiple of 64, typically}\; d_h \ge 1280

Ensures dh  must be a multiple of 64, typically  dh≥128d_h \;\text{must be a multiple of 64, typically}\; d_h \ge 1281 and dh  must be a multiple of 64, typically  dh≥128d_h \;\text{must be a multiple of 64, typically}\; d_h \ge 1282 shapes meet or exceed dh  must be a multiple of 64, typically  dh≥128d_h \;\text{must be a multiple of 64, typically}\; d_h \ge 1283 FLOPs, maintaining kernel efficiency. For example, dh  must be a multiple of 64, typically  dh≥128d_h \;\text{must be a multiple of 64, typically}\; d_h \ge 1284, dh  must be a multiple of 64, typically  dh≥128d_h \;\text{must be a multiple of 64, typically}\; d_h \ge 1285 yields dh  must be a multiple of 64, typically  dh≥128d_h \;\text{must be a multiple of 64, typically}\; d_h \ge 1286.

  • MoE expert count and widths: Empirically,

dh  must be a multiple of 64, typically  dh≥128d_h \;\text{must be a multiple of 64, typically}\; d_h \ge 1287

(where dh  must be a multiple of 64, typically  dh≥128d_h \;\text{must be a multiple of 64, typically}\; d_h \ge 1288 is top-dh  must be a multiple of 64, typically  dh≥128d_h \;\text{must be a multiple of 64, typically}\; d_h \ge 1289 routing) provides maximal kernel occupancy and minimizes all-to-all shuffle volume. Each expert’s pre-activation and post-activation widths mirror the MLP rule to retain architectural and FLOP parity with dense blocks.

3. Hardware-Driven Constraints and Interconnect Sizing

Sizing rules are deeply influenced by MI300X’s hardware features—HBM bandwidth, capacity, and interconnects.

  • HBM bandwidth: Sustained on-device memory bandwidth is QKTQK^T0–QKTQK^T1 TB/s (PyTorch memcpy). Fused kernels (Conv1d, RMSNorm, Muon, FlashAttention) must be sized so their per-kernel memory traffic does not exceed QKTQK^T2, otherwise HBM-bound slowdowns occur, especially at QKTQK^T3 (Anthony et al., 21 Nov 2025).
  • InfinityFabric / intra-node collective bandwidth: Per-GPU intra-node (xGMI) bandwidth is QKTQK^T4 (QKTQK^T5 GPUs/node, QKTQK^T6 GB/s links), favoring parallelism sharded only across full nodes to keep all-to-all communication collective (Anthony et al., 21 Nov 2025).
  • Pollara Interconnect: Each GPU NIC is QKTQK^T7, giving QKTQK^T8 per node. AllReduce performance plateaus at collective message sizes QKTQK^T9–≥512\ge 5120. A gradient fusion buffer ≥512\ge 5121 saturates the bus-bandwidth curve and balances communication–computation overlap.

4. HBM Capacity, Model Size, and Activation Footprints

Total model and activation footprints are limited by MI300X’s HBM capacity.

  • Parameter and activation budgeting: For ≥512\ge 5122 layers, hidden size ≥512\ge 5123,

≥512\ge 5124

Where ≥512\ge 5125 is number of model parameters (total), ≥512\ge 5126 activation footprint, and ≥512\ge 5127bytes per parameter/activation (FP16/FP32). ≥512\ge 5128 on MI300X (Ambati et al., 31 Oct 2025).

  • Working set for memory bandwidth: Activation working set per layer,

≥512\ge 5129

≥1024\ge 10240 should reach at least ≥1024\ge 10241–≥1024\ge 10242 to saturate ≥1024\ge 10243–≥1024\ge 10244 measured bandwidth.

5. Practical Sizing Workflow and Algorithmic Summary

A practical MI300X-centric sizing workflow synthesizes the prior constraints into actionable steps:

  1. Choose a hidden size ≥1024\ge 10245 divisible by ≥1024\ge 10246 (e.g., ≥1024\ge 10247, ≥1024\ge 10248, ≥1024\ge 10249).
  2. Set feedforward width dhd_h0, leveraging SwiGLU if possible.
  3. Select expert count dhd_h1 so dhd_h2 and enable top-1 routing.
  4. Verify each critical GEMM operation (dhd_h3 and dhd_h4) meets the dhd_h5 GFLOP threshold.
  5. Align all major dimensions by dhd_h6 (preferably dhd_h7) to ROCm BLAS tile size preferences.
  6. Use fused kernels for layer norm and attention to remain compute-bound, avoiding the dhd_h8 TB/s HBM bandwidth limits.
  7. Set gradient fusion to dhd_h9 MiB for communication–computation overlap at Pollara’s saturation point.

Collectively, this process ensures that every block and operation remains in the high-efficiency operational regimes pinpointed by empirical MI300X microbenchmarks (Anthony et al., 21 Nov 2025, Ambati et al., 31 Oct 2025).

6. Model Size, Batch, and Sequence Scaling Trade-offs

Scaling rules on MI300X are characterized by quadratic costs in hidden size and thresholds on working-set memory:

  • Model size: U=0.15U=0.150. Doubling hidden size U=0.15U=0.151 increases memory requirements U=0.15U=0.152.
  • Sequence length:

U=0.15U=0.153

e.g., U=0.15U=0.154, U=0.15U=0.155 gives U=0.15U=0.156 tokens in FP16.

  • Batch size tuning: For full HBM bandwidth, select U=0.15U=0.157.
  • Utilization: Keep each GEMM shape U=0.15U=0.158 to maintain U=0.15U=0.159, targeting dh=64d_h=640 per the empirical utilization curves.

7. Implications, Limitations, and Ongoing Research

The MI300X-aware sizing rules, as described by leading research groups (Anthony et al., 21 Nov 2025, Ambati et al., 31 Oct 2025), demonstrate that MI300X’s compute and memory systems support transformer and MoE model design choices qualitatively distinct from legacy GPU worlds, notably by incentivizing highly regular, tile-aligned layouts and lower expansion ratios. The rules reflect a paradigm shift towards tightly hardware–software codesigned architectures, offering throughput and latency competitive with state-of-the-art base models (e.g., Qwen3, Gemma3, Llama-3, OLMoE) at comparable or smaller parameter scales. A plausible implication is that future model and compiler designs targeting MI300X are likely to further reduce per-layer irregularities and harness cross-node collectives for scalable pretraining and inference. The current sizing rules are also constrained by specific kernel and interconnect implementations; continued advances in the ROCm software stack and collective communication are likely to evolve the practical optima in the coming generation of AMD server hardware.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to MI300X-Aware Transformer Sizing Rules.