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.
中文说明
FLARE:管道流动
本模型包复现了 FLARE:快速低秩注意力路由引擎中的二维 Pipe 实验。模型包含八个路由块,宽度为 64,有八个注意力头,每个头有 128 个潜在查询。模型根据 129x129 网格上的弯管坐标预测水平速度。
结果
使用 1,000 个训练样本完成了一次 500 轮的完整训练。重新加载最佳模型权重(检查点)(checkpoint)后,在 200 个样本上得到的相对 L2 为 0.00324737,论文报告 0.00285(高约 13.94%)。最佳模型权重(检查点)使用同一测试集选出,论文未说明归一化方式时,本实现使用恒等归一化。这些因素限制了比较的可比性。原始指标和图见 results/。
下载
hf download OneScience-Group/FLARE --local-dir ./FLARE
cd FLARE
原始 Geo-FNO Pipe 数组可从 OneScience/HO-FNO-Pipe 的 ModelScope 数据集获取。本 Hugging Face 模型仓库不包含原始数据集。
modelscope download --dataset OneScience/HO-FNO-Pipe --local_dir ./data
Pipe_X.npy 和 Pipe_Y.npy 包含坐标,Pipe_Q.npy 包含目标流场。代码读取前 1,000 个样本用于训练,之后 200 个用于测试,使用 Q 的通道 0。请从模型目录运行命令。发布配置从 data/ 读取并写入 results/。
环境与使用方法
在已分配的 GPU/DCU 上使用 Python 3.10 和 PyTorch,并使用 onescience[cfd-gpu] 或 onescience[cfd-dcu] 及 requirements.txt。
python scripts/inference.py
python scripts/result.py
如需重新进行完整训练,将随附的 weight/ 和 results/ 移至模型包外,再运行 python scripts/train.py。发布的推理(inference)流程支持移动后的数据目录,同时保留对模型和预处理设置的检查。
模型权重(检查点)为 weight/best_model.pth(SHA256 0614e1c38d42ccdaca786986b7db3790b91c6d37d25f3e2bedf1361427e969b2)。数据来源为 Geo-FNO。再次分发前请核对原始数据条款。
- Downloads last month
- 165