Half-precision inference of AI weather prediction models: negligible loss of skill at a fraction of the cost
Stefan Siegert
Abstract
AI weather prediction models are released with 32-bit (fp32) weights and run in fp32 by default, although current GPUs compute much faster in 16-bit formats. We run five publicly available models -- Aurora, Pangu-Weather, FourCastNet, SFNO and FastNet -- on a single 16 GB GPU from 52 initial dates in 2024, in fp32 and with their networks in half precision (fp16), and verify the forecasts against ERA5. The physical state must stay in fp32: converting the whole model rounds it in physical units, which in fp16 overflows and in bf16 discards meaningful information. With the state, its normalisation and denormalisation in fp32, running the network in fp16 changes the global RMSE by at most 1.4%, and by about 0.5% or less for four of the five models, equivalent to less than one hour of lead time up to day 8 and at most two hours at day 10. The differences show no systematic pattern by region, scale or for tropical and extratropical storms, apart from a small tropical penalty in FourCastNet, and fp16 leaves the CRPS, spread and calibration of Aurora's ensemble almost unchanged. No value overflowed fp16's numeric range (+/-65,504); the largest stay 38 to 544 times below it. A 10-day forecast in fp16 is 1.3-3.5 times faster than in fp32 and uses 1.4-3.7 times less energy. Sensitivity experiments show that rules of thumb from other applications of reduced precision carry over only partly: the first and last layers dominate for some models but not for others, and no type of layer is sensitive on its own. For running AI weather models on a single GPU, fp16 with the state in fp32 is practically lossless at a fraction of the cost. bf16, often preferred for its wider range, is as fast but less accurate than fp16 for every model, and simple 8-bit quantisation costs far more skill.
Create a lesson
Related papers
Comparing Data-Driven and Numerical Weather Prediction Forecasts of Extreme Weather: A Review
Shared title terminology · Gabriele Messori, Hiu-Wang Lau, Chenyu Dong et al.
Ensemble Covariance Propagation with Machine Learning Weather Prediction Models in a Realistic Data Assimilation System
Shared title terminology · Simon Toedtli, David Ahijevych, Wei Wang et al.
An all-weather microwave-based AI retrieval of pan-Arctic melt pond fraction
Shared title terminology · Sara Aparício, Simon Driscoll, Mark R. Drinkwater et al.
Towards operational data-driven regional weather forecasting: extreme-event skill and near-real-time verification with HRRRCast
Shared title terminology · Daniel Abdi, Isidora Jankov, Vanderlei Vargas et al.
Beyond Resolution: Inference-Time Parameterized Temporal Consistency in Generative Regional Climate Downscaling
Shared title terminology · Luca Glawion, Julius Polz, Harald Kunstmann et al.
Run it Back: Autoregression vs. Video Diffusion for Final-Conditioned Weather Trajectories
Shared title terminology · Jerry Lin, Elizabeth A. Barnes