# AI for Science at Hugging Face

## Executive summary

This deep dive explores Hugging Science, Hugging Face's initiative to democratize open-source scientific AI. The focus is on AI weather forecasting, detailing how tools are used to make complex models accessible. Key projects include enabling the execution of models like Aurora using Hugging Face Jobs and developing 'downscalers'—small models trained to improve the spatial resolution of coarse-grained forecasts using auxiliary data and noise channels.

## Key takeaways

- AI for Science is a Platform, Not Just Models: Hugging Face functions as the 'GitHub of AI,' providing a platform for sharing scientific datasets, models, demos, and tools, which is crucial for collaboration in AI for science. (01:28)
- AI Weather Forecasting is Resource Efficient: Unlike traditional physics-based numerical models (which require supercomputers and are resource-intensive), AI models based on the Transformer architecture can run in minutes on a single GPU, making them highly accessible. (06:30)
- Downscalers Improve Local Detail: A 'downscaler' is a small model (e.g., ~2 million parameters) trained to enhance the resolution of a coarse field forecast by incorporating static data (like orography) and predicting a range of futures using noise channels. (09:40)
- Tools Address the Accessibility Gap: The primary goal of the team is to build tools and tutorials (e.g., using Hugging Face Jobs and Buckets) to allow the community to run, adapt, and fine-tune existing scientific models, rather than just providing the weights. (07:40)

## Technical details

- AI Weather Forecasting Architecture: AI weather models use a Transformer architecture, taking the current state of the atmosphere, passing it through an encoder, latent space, and then a decoder to predict the future state. The large model discussed is named Aurora. (06:50)
- Downscaler Mechanism: The downscaler requires two datasets: a coarse field (low resolution) and a fine field (high resolution). It is trained to learn the difference between these two fields, supplemented by static data (e.g., terrain elevation, time of year). (08:10)
- Stochasticity and Loss Functions: To account for atmospheric stochasticity, the downscaler uses 'noise channels' to predict a range of future states (probabilistic forecasting). The CRPS loss is used to evaluate both forecast accuracy and the logical spread of multiple members. (08:50)
- Execution Pipeline: The process involves preprocessing initial data (CPU) and then running the model (GPU) using Hugging Face Jobs. Data storage and initialization are managed via Hugging Face Buckets, with data streaming facilitated by external partners. (07:00)

## Practical implications

- The tools provided allow users to move beyond simply consuming pre-trained models and actively train their own specialized downscalers for specific geographic regions.
- The use of Hugging Face Jobs enables the execution of complex scientific models in minutes, significantly lowering the barrier to entry compared to traditional supercomputer requirements.
- The focus on open-source recipes and blog posts ensures that the complex process of AI for science is documented and accessible to non-expert users.

## Topics

AI for Science, Machine Learning, Climate Modeling, Open Source, Data Science, Hugging Science Organization, Differential Transformers, Aurora

Source: https://www.youtube.com/watch?v=oFI3ohzJDTY
