FLARE: Pipe flow

This package reproduces the two-dimensional Pipe experiment from FLARE: Fast Low-rank Attention Routing Engine. The model has eight routing blocks, width 64, eight attention heads, and 128 latent queries per head. It predicts horizontal velocity from curved-pipe coordinates on a 129x129 grid.

Results

One full 500-epoch run was completed on 1,000 training cases. The reloaded best checkpoint gives relative L2 0.00324737 on 200 cases, versus 0.00285 in the paper (about 13.94% higher). The same test set selected the best checkpoint, and the implementation uses identity normalization where the paper is not explicit. These are important limits on the comparison. Original metrics and figures are in results/.

Download

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

The original Geo-FNO Pipe arrays are available from the OneScience/HO-FNO-Pipe ModelScope dataset. This Hugging Face model repository does not include the raw dataset.

modelscope download --dataset OneScience/HO-FNO-Pipe --local_dir ./data

Pipe_X.npy and Pipe_Y.npy are coordinates; Pipe_Q.npy contains the target flow. The code reads the first 1,000 cases for training and the following 200 for testing, using Q channel 0. Run commands from the model directory; the published config reads data/ and writes to results/.

Environment and usage

Use Python 3.10, PyTorch on an allocated GPU/DCU, onescience[cfd-gpu] or onescience[cfd-dcu], and requirements.txt.

python scripts/inference.py
python scripts/result.py

For a new full training run, move the included weight/ and results/ outside the package, then run python scripts/train.py. Published inference accepts a relocated data directory while retaining checks on model and preprocessing settings.

Checkpoint: weight/best_model.pth (SHA256 0614e1c38d42ccdaca786986b7db3790b91c6d37d25f3e2bedf1361427e969b2). Source data: Geo-FNO. Check original data terms before redistribution.

Downloads last month
34
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Paper for OneScience-Group/FLARE