AMD optimizes GLM-5.3-Flash serving on MI300X/MI325X using 4-bit MXFP4 weights
AMD enables higher KV cache capacity on CDNA 3 GPUs by using MXFP4 weights as a storage format that converts losslessly to FP8 for prefill execution.
Summary
AMD has demonstrated a method to serve the GLM-5.3-Flash large language model on Instinct MI300X and MI325X GPUs using a 4-bit MXFP4 checkpoint. While the CDNA 3 architecture lacks native hardware instructions for FP4 or INT4, AMD utilizes a mathematical property where the model's MXFP4 expert matrices can be losslessly represented as FP8 128x128 blocks.
This optimization allows the system to use the smaller 173 GB MXFP4 checkpoint instead of the 306 GB FP8 version, significantly reducing the memory footprint of model weights. The reclaimed memory is redirected to the key-value (KV) cache, allowing for more concurrent long-context sessions and improved throughput in memory-constrained scenarios.
Technical implementation on CDNA 3 architecture
- Hybrid Execution Model: The system uses a disaggregated prefill-decode approach where the prefill stage executes using FP8 matrix instructions on bit-exact converted weights, while the decode stage retains the experts in 4-bit format.
- Memory Efficiency: On MI325X GPUs, the weight reduction frees 15.5 GiB per GPU, increasing KV cache capacity by up to 17%; on MI300X, this same reduction provides up to 31% more KV cache.
- Lossless Conversion: Every one of the 37,152 routed-expert matrices in the MXFP4 checkpoint is converted into FP8 128x128 blocks at load-time, ensuring that accuracy remains identical to the native FP8 checkpoint in needle-in-a-haystack tests.
- Performance Trade-offs: The 4-bit decode step is slightly slower (3.3% to 4.1%) than pure FP8 decode because the 4-bit expert kernel achieves approximately 1.6 TB/s compared to 5.2 TB/s for the FP8 kernel at standard decode batch sizes.
Why it matters
This development provides a workaround for developers using current-generation AMD Instinct hardware to run highly compressed models that were originally designed for the newer MI350 series. It demonstrates how software-level mathematical optimizations can extend the utility of existing AI hardware by maximizing available VRAM for long-context agentic workloads.
Original reference: rocm.blogs.amd.com →