BENO / README.md
OneScience's picture
Upload folder using huggingface_hub
7087ec2 verified
|
Raw
History Blame Contribute Delete
4.66 kB
---
license: apache-2.0
language:
- en
tags:
- OneScience
- BENO
- elliptic PDEs
- boundary-embedded neural operator
frameworks: PyTorch
---
<p align="center">
<strong>
<span style="font-size: 30px;">BENO</span>
</strong>
</p>
# Model Overview
BENO is a boundary-embedded neural operator developed by researchers at Peking University for solving elliptic PDEs subject to complex boundary conditions. It enables rapid prediction of steady-state physical fields across varying geometries and nonhomogeneous boundary conditions.
Paper: [BENO: Boundary-embedded Neural Operators for Elliptic PDEs](https://openreview.net/forum?id=ZZTkLDRmkg)
# Model Description
BENO employs a boundary-embedded neural operator architecture that combines a dual-branch graph neural network with a Transformer. Trained on the BENO dataset, it predicts steady-state physical fields governed by elliptic PDEs such as the Poisson and Laplace equations on complex geometries with nonhomogeneous boundary conditions.
# Use Cases
| Use Case | Description |
| ---------- | --------------------------------- |
| Elliptic PDE solving | Rapidly approximate steady-state boundary-value problems such as the Poisson and Laplace equations |
| Complex boundary modeling | Capture the effects of free-form boundaries, irregular domains, and nonhomogeneous boundary values on the solution field |
| Steady-state field prediction | Predict equilibrium physical fields determined jointly by source terms and boundary conditions |
| Numerical solver acceleration | Replace or augment conventional FEM, FDM, and FVM workflows to improve inference efficiency |
# 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](https://web-2069360198568017922-iaaj.ksai.scnet.cn:58043/home)
## 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
```bash
modelscope download --model OneScience/BENO --local_dir ./BENO
cd BENO
```
### Set Up the Runtime Environment
**DCU Environment**
```bash
# 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**
```bash
# 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 Data
The OneScience community provides the `beno` dataset for training. Download it with the command below and verify that the data path in `config/config.yaml` is configured correctly:
```bash
modelscope download --dataset OneScience/beno --local_dir ./data
```
The complete dataset is also available from the [official download link](https://drive.google.com/file/d/11PbUrzJ-b18VhFGY_uICSciCkeGrsaTZ/view).
### Training
Single GPU:
```bash
python scripts/train.py
```
Multiple GPUs:
```
torchrun --standalone --nnodes=<num_nodes> --nproc_per_node=<num_GPUs> scripts/train.py
```
### Model Weights
This repository will provide weights trained on the BENO dataset in the `weights/` directory. The weights will be uploaded soon.
### Inference
```bash
python scripts/inference.py
```
### Evaluation and Visualization
```bash
python scripts/result.py
```
# Official OneScience Resources
| Platform | OneScience Repository | Skills Repository |
| --- | --- | --- |
| Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
| GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
# Citations and License
- Original BENO paper: [BENO: Boundary-embedded Neural Operators for Elliptic PDEs](https://proceedings.iclr.cc/paper_files/paper/2024/file/218ca0d92e6ed8f9db00621e103dc70c-Paper-Conference.pdf)
- This repository retains source attribution and has been adapted for automated execution through OneScience and ModelScope. Before public redistribution, verify the applicable licensing requirements of the upstream project.