yury-lysogorskiy commited on
Commit
59e2ae4
·
verified ·
1 Parent(s): 2f3d0f4

rework model card from foundation.md (model tables, downloads, fine-tuning) + ASL license

Browse files
Files changed (1) hide show
  1. README.md +176 -13
README.md CHANGED
@@ -11,11 +11,14 @@ tags:
11
  - materials-science
12
  ---
13
 
14
- # GRACE foundation models
15
 
16
- This repository distributes **GRACE** (Graph Atomic Cluster Expansion) machine-learning
17
- interatomic potentials foundation models fitted with
18
- [GRACEmaker / tensorpotential](https://github.com/ICAMS/grace-tensorpotential).
 
 
 
19
 
20
  ## License
21
 
@@ -23,21 +26,117 @@ interatomic potentials — foundation models fitted with
23
  License (ASL).** By downloading or using any model from this repository you agree to the terms
24
  of the ASL: <https://github.com/ICAMS/grace-tensorpotential/blob/master/LICENSE.md>
25
 
26
- ## Contents
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
  Each model is provided as two `.tar.gz` archives:
29
 
30
- - `models/<model>-model.tar.gz` — the deployable TensorFlow `SavedModel` directory
31
  (used by the ASE `TPCalculator`). UQ-enabled models embed an uncertainty head, and many
32
  archives also bundle `kokkos.npz` for LAMMPS-Kokkos deployment.
33
- - `checkpoints/<model>-checkpoint.tar.gz` — the training checkpoint
34
- (`model.yaml`, `checkpoint.index`, `checkpoint.data-*`, and `gmm_artifacts.npz` for UQ models).
 
 
 
 
 
 
 
 
 
35
 
36
- ## Usage
 
 
 
37
 
38
- These models are normally fetched automatically by the `tensorpotential` / GRACEmaker
39
- tooling (`grace_models`, `TPCalculator`, foundation-model presets). They can also be
40
- downloaded directly, e.g.:
41
 
42
  ```python
43
  from huggingface_hub import hf_hub_download
@@ -48,7 +147,7 @@ path = hf_hub_download(
48
  )
49
  ```
50
 
51
- ## Versioning
52
 
53
  Revisions are pinned via immutable git tags so downloads are reproducible:
54
 
@@ -56,3 +155,67 @@ Revisions are pinned via immutable git tags so downloads are reproducible:
56
  - **`kk`** — model archives that additionally bundle the LAMMPS-Kokkos export (`kokkos.npz`).
57
 
58
  `main` always points at the latest revision.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  - materials-science
12
  ---
13
 
14
+ # Pretrained GRACE Foundation Models
15
 
16
+ This repository distributes pretrained **GRACE** (Graph Atomic Cluster Expansion) machine-learning
17
+ interatomic potentials, fitted with [GRACEmaker / tensorpotential](https://github.com/ICAMS/grace-tensorpotential).
18
+ The model tables and usage notes below are adapted from the
19
+ [GRACEmaker documentation](https://github.com/ICAMS/grace-tensorpotential/blob/master/docs/gracemaker/foundation.md).
20
+
21
+ > **Use the "Full Name" column** to refer to a model in LAMMPS and ASE.
22
 
23
  ## License
24
 
 
26
  License (ASL).** By downloading or using any model from this repository you agree to the terms
27
  of the ASL: <https://github.com/ICAMS/grace-tensorpotential/blob/master/LICENSE.md>
28
 
29
+ ---
30
+
31
+ ## SMAX models
32
+
33
+ Reference: [arXiv](https://arxiv.org/abs/2602.23489)
34
+
35
+ The **SMAX** (**Maximum Entropy**) models are trained on a chemistry-agnostic dataset generated via a multicomponent
36
+ maximum information entropy structure generation protocol.
37
+
38
+ Unlike traditional datasets that focus on low-energy equilibrium structures, SMAX is constructed to deliberately sample
39
+ broad and diverse regions of configurational space. This provides a robust physical prior for atomic interactions across the entire periodic table, enabling accurate modeling of large-strain phase transformations, defects in complex alloys, and reaction barriers in catalytic systems.
40
+
41
+ **Custom Cutoffs & Interaction Ranges:** SMAX models utilize a **custom element-dependent cutoff radius** ranging from
42
+ **5.0 Å to 7.5 Å**.
43
+
44
+ **Recommendation:** For most general-purpose applications, we recommend using the **SMAX-OMAT** models.
45
+ They offer the best balance of structural robustness (from SMAX) and high-precision energy/force accuracy (from OMat24).
46
+
47
+ #### Single-layer, local models
48
+
49
+ | Model Name | Full Name | Size | κ_SRME | Description |
50
+ | :---- | :---- | :---- | :---- | :---- |
51
+ | GRACE-1L-SMAX-L | GRACE-1L-SMAX-large | large | 0.696 | Single-layer local (SMAX) |
52
+ | **GRACE-1L-SMAX-OMAT-L** | **GRACE-1L-SMAX-OMAT-large** | **large** | 0.338 | **Single-layer local (SMAX + OMat24)** |
53
+
54
+ #### Two-layer, semilocal models
55
+
56
+ | Model Name | Full Name | Size | κ_SRME | Description |
57
+ | :---- | :---- | :---- | :---- | :---- |
58
+ | GRACE-2L-SMAX-M | GRACE-2L-SMAX-medium | medium | 0.469 | Two-layer semi-local (SMAX) |
59
+ | GRACE-2L-SMAX-L | GRACE-2L-SMAX-large | large | 0.444 | Two-layer semi-local (SMAX) |
60
+ | **GRACE-2L-SMAX-OMAT-M** | **GRACE-2L-SMAX-OMAT-medium** | **medium** | 0.197 | **Two-layer semi-local (SMAX + OMat24)** |
61
+ | **GRACE-2L-SMAX-OMAT-L** | **GRACE-2L-SMAX-OMAT-large** | **large** | 0.191 | **Two-layer semi-local (SMAX + OMat24)** |
62
+
63
+ ## OMAT models
64
+
65
+ Reference: [npj Comp. Mat.](https://www.nature.com/articles/s41524-026-01979-1), [arXiv](https://arxiv.org/abs/2508.17936)
66
+
67
+ The base models (**-OMAT**) are trained on the [OMat24](https://huggingface.co/datasets/fairchem/OMAT24#omat24-dataset) dataset.
68
+ The fine-tuned versions (**-OMAT-ft-E**) are derived from these base models by fine-tuning with more emphasis on energies.
69
+ All models listed use a fixed **6 Å cutoff**.
70
+
71
+ #### Single-layer, local models
72
+
73
+ | Model Name | Full Name | Size | κ_SRME | Description |
74
+ |:---|:---|:---|:---|:---|
75
+ | **GRACE-1L-OMAT** | GRACE-1L-OMAT | small | 0.398 | Single-layer local |
76
+ | GRACE-1L-OMAT-M-base | GRACE-1L-OMAT-medium-base | medium | 0.380 | Single-layer local (base) |
77
+ | **GRACE-1L-OMAT-M** | GRACE-1L-OMAT-medium-ft-E | medium | 0.417 | Single-layer local (finetuned on energy) |
78
+ | GRACE-1L-OMAT-L-base | GRACE-1L-OMAT-large-base | large | **0.354** | Single-layer local (base) |
79
+ | **GRACE-1L-OMAT-L** | GRACE-1L-OMAT-large-ft-E | large | 0.383 | Single-layer local (finetuned on energy) |
80
+
81
+ #### Two-layer, semilocal models
82
+
83
+ | Model Name | Full Name | Size | κ_SRME | Description |
84
+ |:---|:---|:---|:---|:---|
85
+ | **GRACE-2L-OMAT** | GRACE-2L-OMAT | small | 0.288 | Two-layer semi-local |
86
+ | GRACE-2L-OMAT-M-base | GRACE-2L-OMAT-medium-base | medium | 0.212 | Two-layer semi-local (base) |
87
+ | **GRACE-2L-OMAT-M** | GRACE-2L-OMAT-medium-ft-E | medium | 0.217 | Two-layer semi-local (finetuned on energy) |
88
+ | GRACE-2L-OMAT-L-base | GRACE-2L-OMAT-large-base | large | **0.165** | Two-layer semi-local (base) |
89
+ | **GRACE-2L-OMAT-L** | GRACE-2L-OMAT-large-ft-E | large | 0.186 | Two-layer semi-local (finetuned on energy) |
90
+
91
+ ## OAM models
92
+
93
+ Reference: [npj Comp. Mat.](https://www.nature.com/articles/s41524-026-01979-1), [arXiv](https://arxiv.org/abs/2508.17936)
94
+
95
+ These models are first pre-trained on **OMat24** and then fine-tuned on a combination of the [sAlex](https://huggingface.co/datasets/fairchem/OMAT24#salex-dataset) dataset (10.4M structures) and the [MPtraj](https://figshare.com/articles/dataset/Materials_Project_Trjectory_MPtrj_Dataset/23713842?file=41619375) dataset (1.58M structures).
96
+
97
+ #### Single-layer, local models
98
+
99
+ | Model Name | Full Name | Size | F1 | κ_SRME | Description |
100
+ | :--- |:---| :--- |:---|:---| :--- |
101
+ | GRACE-1L-OAM | GRACE-1L-OAM | small | 0.824 | 0.516 | Single-layer local |
102
+ | GRACE-1L-OAM-M | GRACE-1L-OMAT-medium-ft-AM | medium | 0.800 | 0.411 | Single-layer local |
103
+ | GRACE-1L-OAM-L | GRACE-1L-OMAT-large-ft-AM | large | 0.815 | **0.377** | Single-layer local |
104
+
105
+ #### Two-layer, semilocal models
106
+
107
+ | Model Name | Full Name | Size | F1 | κ_SRME | Description |
108
+ | :--- |:--- | :--- |:---| :--- | :--- |
109
+ | GRACE-2L-OAM | GRACE-2L-OAM | small | 0.880 | 0.294 | Two-layer semi-local |
110
+ | GRACE-2L-OAM-M | GRACE-2L-OMAT-medium-ft-AM | medium | 0.881 | 0.200 | Two-layer semi-local |
111
+ | GRACE-2L-OAM-L | GRACE-2L-OMAT-large-ft-AM | large | 0.889 | **0.168** | Two-layer semi-local |
112
+
113
+ ---
114
+
115
+ ## Repository layout
116
 
117
  Each model is provided as two `.tar.gz` archives:
118
 
119
+ - `models/<full-name>-model.tar.gz` — the deployable TensorFlow `SavedModel` directory
120
  (used by the ASE `TPCalculator`). UQ-enabled models embed an uncertainty head, and many
121
  archives also bundle `kokkos.npz` for LAMMPS-Kokkos deployment.
122
+ - `checkpoints/<full-name>-checkpoint.tar.gz` — the training checkpoint required for
123
+ fine-tuning (`model.yaml`, `checkpoint.index`, `checkpoint.data-*`, plus `gmm_artifacts.npz`
124
+ for UQ models).
125
+
126
+ ## Downloading Foundation Models
127
+
128
+ The recommended way is the `grace_models` utility shipped with `tensorpotential`:
129
+
130
+ - `grace_models list` — view the list of available models.
131
+ - `grace_models download <model_name>` — download a specific model (SavedModel).
132
+ - `grace_models checkpoint <model_name>` — download a model's training checkpoint.
133
 
134
+ By default all foundation models are stored in `$HOME/.cache/grace`; override with the
135
+ `GRACE_CACHE` environment variable. The downloaded models can be used for simulations in
136
+ **ASE** and **LAMMPS** — see the
137
+ [GRACEmaker quickstart](https://github.com/ICAMS/grace-tensorpotential/blob/master/docs/quickstart.md).
138
 
139
+ You can also fetch archives directly from this repo:
 
 
140
 
141
  ```python
142
  from huggingface_hub import hf_hub_download
 
147
  )
148
  ```
149
 
150
+ ### Versioning
151
 
152
  Revisions are pinned via immutable git tags so downloads are reproducible:
153
 
 
155
  - **`kk`** — model archives that additionally bundle the LAMMPS-Kokkos export (`kokkos.npz`).
156
 
157
  `main` always points at the latest revision.
158
+
159
+ ---
160
+
161
+ ## Fine-tuning foundation models
162
+
163
+ Fine-tuning is performed from **checkpoints** (not SavedModels). Run `grace_models list`
164
+ to see which models expose a `CHECKPOINT:` field; download with
165
+ `grace_models checkpoint <MODEL-NAME>` (or it is fetched automatically when needed).
166
+
167
+ Generate a fine-tuning `input.yaml` interactively with `gracemaker -t`, or add to the
168
+ `potential` section manually:
169
+
170
+ ```yaml
171
+ potential:
172
+ finetune_foundation_model: GRACE-1L-OAM
173
+ shift: auto # automatically align FM energies with your DFT reference data
174
+ # reduce_elements: True # if True - select from original models only elements present in the CURRENT dataset
175
+ ```
176
+
177
+ ### Automatic energy shift correction (`shift: auto`)
178
+
179
+ When `shift: auto` is set alongside `finetune_foundation_model`, GRACEmaker computes optimal
180
+ per-element energy shifts that minimize the difference between the foundation model's
181
+ predictions and your reference DFT data, injecting them via `ConstantScaleShiftTarget` before
182
+ training. This is useful when your DFT settings differ from the foundation model's training
183
+ data (systematic energy offset) and leads to faster convergence.
184
+
185
+ `shift: auto` is independent of `data::reference_energy`. Typical usage:
186
+
187
+ * `reference_energy: 0` (or dict) — set your DFT reference frame
188
+ * `shift: auto` — align the FM output to your DFT reference frame
189
+
190
+ ### Learning rate & initial metrics
191
+
192
+ Use a small `learning_rate` and evaluate initial metrics:
193
+
194
+ ```yaml
195
+ fit:
196
+ opt_params: {learning_rate: 0.001, ... }
197
+ eval_init_stats: True
198
+ ```
199
+
200
+ ### Frozen-weights fine-tuning
201
+
202
+ To mitigate catastrophic forgetting, restrict training to selected variables via
203
+ `trainable_variable_names`:
204
+
205
+ ```yaml
206
+ # GRACE-2L models
207
+ fit:
208
+ trainable_variable_names: ["I2/reducing_", "rho/reducing_", "I1/reducing_"]
209
+ ```
210
+
211
+ ```yaml
212
+ # GRACE-1L models
213
+ fit:
214
+ trainable_variable_names: ["rho/reducing_"]
215
+ ```
216
+
217
+ Discover variable names with:
218
+
219
+ ```bash
220
+ grace_utils -p ~/.cache/grace/checkpoints/SOME_FOUNDATIONAL_MODEL_NAME/model.yaml summary -v 1
221
+ ```