CFO-Burgers-Flow

Model Introduction

CFO-Burgers-Flow predicts continuous-time trajectories of the one-dimensional Burgers equation from an initial state.

Paper: CFO: Learning Continuous-Time PDE Dynamics via Flow-Matched Neural Operators.

Model Description

This package reproduces the paper's Table 1 Burgers experiment with 100% time sampling and the Quintic CFO method. A time-conditioned 1D U-Net learns a continuous-time velocity field, and RK4 integrates the predicted trajectory.

Intended Use

Task Description
Burgers forecasting Predict a full space-time trajectory from an initial field
PDE surrogate research Study continuous-time neural operators

Usage

1. OneCode

Open the OneCode environment.

2. Manual Setup

Hardware requirements

A GPU or DCU is recommended. CPU inference is possible but slower.

Download the Model Package

hf download OneScience-Group/CFO-Burgers-Flow --local-dir ./CFO-Burgers-Flow
cd CFO-Burgers-Flow

Set Up the Runtime Environment

DCU environment

conda create -n onescience311 python=3.11 -y
conda activate onescience311
pip install onescience[cfd-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
pip install scipy pyyaml matplotlib

GPU environment

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
pip install onescience[cfd-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
pip install scipy pyyaml matplotlib

Training Data

The OneScience/CFO-Burgers dataset on ModelScope provides the original Burger.mat and DATA_MANIFEST.json. Place both files in data/. The original data came from the paper authors' CFO data download page. The file has 1200 trajectories; the model uses 1000/100/100 train/validation/test trajectories, with a fixed split seed of 43.

This Hugging Face repository contains the model only, not a Hugging Face dataset mirror. Do not use a Hugging Face dataset download command until such a dataset repository exists.

Training

From the model package root, run:

python scripts/train.py

The configured run uses 60,000 training steps.

Checkpoint

The trained checkpoint is weight/best_model.pth (7,308,542 bytes; SHA256 7287ce3dddb7f620f75d7ab6a9dc8ce9fa313b67e87566e8c19841effc79e42b). The reproduced test trajectory relative L2 is 0.00347142; the paper's Table 1 reports 0.00589 +/- 0.00079 across multiple runs, so these are not identical statistical settings.

Inference

python scripts/inference.py

Evaluation and Visualization

python scripts/result.py

Official OneScience Information

Citation and License

Paper: CFO. Official implementation: CFO_official. The original data's redistribution terms should be checked separately from the official code license.

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

Paper for OneScience-Group/CFO-Burgers-Flow