EagleMeshTransformer

Model Overview

EagleMeshTransformer is a multiscale Mesh Transformer developed by the LIRIS research laboratory in Lyon, France, for fluid prediction on dynamic unstructured meshes. It is particularly well suited to unsteady turbulent flows and problems involving long-range dependencies in flow fields.

Paper: EAGLE: Large-scale Learning of Turbulent Fluid Dynamics with Mesh Transformers.

Model Description

EagleMeshTransformer uses a multiscale Mesh Transformer architecture trained on the EAGLE dataset to predict velocity and pressure fields in complex unsteady flows.

Use Cases

Use Case Description
Unsteady turbulent flow prediction Predict velocity and pressure fields in complex, aperiodic turbulent flows involving drones, jets, wakes, and similar systems
Unstructured-mesh simulation Process irregular mesh data defined on complex geometries
CFD surrogate acceleration Provide fast approximations of conventional Navier–Stokes and CFD simulations
Long-horizon physical prediction Predict the evolution of physical states through autoregressive rollouts

Usage

1. OneCode

Use the online OneCode environment for an intelligent, one-click AI for Science (AI4S) programming experience:

Launch OneCode for one-click AI4S programming

2. Manual Setup

Hardware Requirements

  • A GPU or DCU is recommended.
  • A CPU can be used for import checks and small-scale pipeline validation, but full training and inference will be slow.
  • DCU users must install DTK in advance. DTK 25.04.2 or later, or the OneScience-recommended version for the target cluster, is recommended.

Download the Model Package

hf download OneScience-Group/EagleMeshTransformer --local-dir ./EagleMeshTransformer
cd EagleMeshTransformer

Set Up the Runtime Environment

DCU Environment

# Activate DTK and Conda first
conda create -n onescience311 python=3.11 -y
conda activate onescience311
# Installation with uv is also supported
pip install onescience[cfd-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/  --trusted-host mirrors.onescience.ai

GPU Environment

# Activate Conda first
conda create -n onescience311 python=3.11 -y libstdcxx-ng=12 libgcc-ng=12 gcc_linux-64=12 gxx_linux-64=12
conda activate onescience311
# Installation with uv is also supported
pip install onescience[cfd-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/  --trusted-host mirrors.onescience.ai

Synthetic Data Validation

The default configuration points to the synthetic data directory in this repository and sets training.max_epoch to 1. Generate a minimal EAGLE NPZ dataset to validate the training and inference pipelines:

python scripts/fake_data.py

Training Data

The OneScience community provides the EAGLE dataset for training. Download it with the command below and verify that the data path in conf/config.yaml is configured correctly.

hf download --repo-type dataset OneScience-Group/eagle --local-dir ./data

Training

Single GPU:

python scripts/train.py

Multiple GPUs:

torchrun --nproc_per_node=8 --nnodes=1 --rdzv_id=1000 --rdzv_backend=c10d --max_restarts=0 --master_addr="localhost" --master_port=29500 scripts/train.py

Training saves best_model.pth in the weight/ directory.

Model Weights

This repository will provide pretrained EagleMeshTransformer weights in the weights/ directory. The weights will be uploaded soon.

Inference

python scripts/inference.py

Inference results are saved to result/output/.

Evaluation and Visualization

python scripts/result.py

Official OneScience Resources

Citations and License


中文说明

模型概览

EagleMeshTransformer 是法国里昂 LIRIS 实验室开发的一种多尺度 Mesh Transformer,用于动态非结构化网格上的流体预测。它特别适合非稳态湍流以及涉及流场长距离依赖关系的问题。

论文 EAGLE:使用 Mesh Transformer 大规模学习湍流动力学。

模型描述

EagleMeshTransformer 使用在 EAGLE 数据集上训练的多尺度 Mesh Transformer 架构,预测复杂非稳态流动中的速度场和压力场。

使用场景

使用场景 说明
非稳态湍流预测 预测涉及无人机、射流、尾迹及类似系统的复杂非周期湍流中的速度场和压力场
非结构化网格模拟 处理定义于复杂几何形状上的不规则网格数据
计算流体力学(CFD)代理加速 对常规 Navier–Stokes 和计算流体力学模拟提供快速近似
长时程物理预测 通过自回归滚动预测物理状态的演化

使用方法

1. OneCode

在 OneCode 在线环境中体验智能一键 AI for Science(AI4S)编程。

启动 OneCode,体验一键 AI4S 编程

2. 手动设置

硬件要求

  • 建议使用 GPU 或 DCU。
  • 可使用 CPU 检查导入和验证小规模流程,完整训练和推理(inference)的速度会较慢。
  • DCU 用户须提前安装 DTK。建议使用 DTK 25.04.2 或更高版本,或使用 OneScience 为目标集群推荐的版本。

下载模型包

hf download OneScience-Group/EagleMeshTransformer --local-dir ./EagleMeshTransformer
cd EagleMeshTransformer

配置运行环境

DCU 环境

# Activate DTK and Conda first
conda create -n onescience311 python=3.11 -y
conda activate onescience311
# Installation with uv is also supported
pip install onescience[cfd-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/  --trusted-host mirrors.onescience.ai

GPU 环境

# Activate Conda first
conda create -n onescience311 python=3.11 -y libstdcxx-ng=12 libgcc-ng=12 gcc_linux-64=12 gxx_linux-64=12
conda activate onescience311
# Installation with uv is also supported
pip install onescience[cfd-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/  --trusted-host mirrors.onescience.ai

合成数据验证

默认配置指向本仓库中的合成数据目录,并将 training.max_epoch 设为 1。生成最小 EAGLE NPZ 数据集以验证训练和推理流程。

python scripts/fake_data.py

训练数据

OneScience 社区提供用于训练的 EAGLE 数据集。使用以下命令下载,并确认 conf/config.yaml 中的数据路径配置正确。

hf download --repo-type dataset OneScience-Group/eagle --local-dir ./data

训练

单 GPU

python scripts/train.py

多 GPU

torchrun --nproc_per_node=8 --nnodes=1 --rdzv_id=1000 --rdzv_backend=c10d --max_restarts=0 --master_addr="localhost" --master_port=29500 scripts/train.py

训练将 best_model.pth 保存至 weight/ 目录。

模型权重

本仓库将在 weights/ 目录提供预训练 EagleMeshTransformer 权重。权重文件将于近期上传。

推理

python scripts/inference.py

推理结果保存至 result/output/。

评估与可视化

python scripts/result.py

OneScience 官方资源

引用与许可证

Downloads last month
9
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for OneScience-Group/EagleMeshTransformer