Upload folder using huggingface_hub
Browse files- LICENSE +21 -0
- NOTICE +25 -0
- README.md +138 -0
- mace-mpa-0-medium_32.zip +3 -0
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2024 MACE-MP
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
NOTICE
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MACE-MPA-0 (medium) — JAX re-export by CuspAI
|
| 2 |
+
===============================================
|
| 3 |
+
|
| 4 |
+
This artifact is a derivative work of MACE-MPA-0 medium.
|
| 5 |
+
|
| 6 |
+
Original work
|
| 7 |
+
-------------
|
| 8 |
+
Copyright (c) 2024 MACE-MP
|
| 9 |
+
Licensed under the MIT License. See LICENSE for the full text.
|
| 10 |
+
Upstream: https://github.com/ACEsuit/mace-foundations
|
| 11 |
+
|
| 12 |
+
Modifications
|
| 13 |
+
-------------
|
| 14 |
+
CuspAI re-exported the upstream PyTorch checkpoint
|
| 15 |
+
(mace-mpa-0-medium.model) to a JAX computation graph using tojax
|
| 16 |
+
(https://github.com/cusp-ai-oss/tojax). The model weights and architecture
|
| 17 |
+
are unchanged, bit-for-bit, from the upstream release. Numerical agreement
|
| 18 |
+
with the PyTorch reference was verified within rtol=1e-4, atol=1e-4 during
|
| 19 |
+
export. The file format changed from .model to a .zip containing a
|
| 20 |
+
jax.export graph plus msgpack-encoded parameters.
|
| 21 |
+
|
| 22 |
+
Attribution
|
| 23 |
+
-----------
|
| 24 |
+
Please cite Batatia et al. (2024), J. Chem. Phys. 163, 184110
|
| 25 |
+
(arXiv:2401.00096) when using this checkpoint in research.
|
README.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
license_link: LICENSE
|
| 4 |
+
library_name: kups
|
| 5 |
+
tags:
|
| 6 |
+
- chemistry
|
| 7 |
+
- materials-science
|
| 8 |
+
- molecular-dynamics
|
| 9 |
+
- interatomic-potential
|
| 10 |
+
- mlff
|
| 11 |
+
- jax
|
| 12 |
+
- mace
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# MACE-MPA-0 medium — JAX build
|
| 16 |
+
|
| 17 |
+
This repository hosts a JAX export of [MACE-MPA-0 medium](https://github.com/ACEsuit/mace-foundations) for use with [kUPS](https://github.com/cusp-ai-oss/kups), a JAX-native molecular-simulation toolkit. The artefact is a self-contained `.zip` containing the serialized JAX computation graph, the original model parameters, and the minimal metadata needed to run inference.
|
| 18 |
+
|
| 19 |
+
**Important:** this is a **re-export, not a retraining.** Weights and architecture are the originals released by the MACE team. CuspAI's only contribution is converting the PyTorch reference implementation to JAX via [tojax](https://github.com/cusp-ai-oss/tojax). Every scientific claim, citation, and credit belongs to the original authors.
|
| 20 |
+
|
| 21 |
+
## Included model
|
| 22 |
+
|
| 23 |
+
| File | Upstream | License | Paper |
|
| 24 |
+
|------|----------|---------|-------|
|
| 25 |
+
| `mace-mpa-0-medium_32.zip` (40 MB) | [MACE-MPA-0 medium](https://github.com/ACEsuit/mace-foundations) | [MIT](LICENSE) | Batatia et al., *J. Chem. Phys.* **163**, 184110 (2024); [arXiv:2401.00096](https://arxiv.org/abs/2401.00096) |
|
| 26 |
+
|
| 27 |
+
Cutoff radius 6.0 Å. Schema: `AtomGraphInput` (positions, atomic numbers, cell, pbc, edge index, cell offsets, batch index, charge, spin).
|
| 28 |
+
|
| 29 |
+
## Quick start
|
| 30 |
+
|
| 31 |
+
```sh
|
| 32 |
+
pip install kups[cuda]
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
```python
|
| 36 |
+
from huggingface_hub import hf_hub_download
|
| 37 |
+
from kups.potential.mliap.tojax import TojaxedMliap
|
| 38 |
+
|
| 39 |
+
path = hf_hub_download(
|
| 40 |
+
repo_id="CuspAI/kUPS-mace-jax",
|
| 41 |
+
filename="mace-mpa-0-medium_32.zip",
|
| 42 |
+
)
|
| 43 |
+
model = TojaxedMliap.from_zip_file(path)
|
| 44 |
+
# model.cutoff, model.params, model.call(atom_graph_input) are now available.
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
kUPS ships CLI wrappers that take a YAML config pointing at this zip:
|
| 48 |
+
|
| 49 |
+
```sh
|
| 50 |
+
kups_relax_mlff --config relax_mace.yaml
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
Example configs live in the kUPS [examples/](https://github.com/cusp-ai-oss/kups/tree/main/examples) directory.
|
| 54 |
+
|
| 55 |
+
## What's in the `.zip`
|
| 56 |
+
|
| 57 |
+
- `model.jax` — JAX computation graph, serialized via `jax.export`.
|
| 58 |
+
- `params.msgpack` — parameters as a msgpack-encoded list of arrays.
|
| 59 |
+
- `metadata.json` — cutoff radius and supported atomic numbers.
|
| 60 |
+
- `dtypes.json` — input dtypes for `AtomGraphInput`.
|
| 61 |
+
|
| 62 |
+
Exported with symbolic shapes (`--symbolic NSE`); accepts variable atom, system, and edge counts without recompilation.
|
| 63 |
+
|
| 64 |
+
## Model details
|
| 65 |
+
|
| 66 |
+
**Upstream:** [ACEsuit/mace-foundations](https://github.com/ACEsuit/mace-foundations) · **Checkpoint:** `mace-mpa-0-medium.model`
|
| 67 |
+
|
| 68 |
+
MACE-MPA-0 is a foundation-model member of the MACE family (Multi-ACE, a higher-body-order message-passing equivariant neural network), trained on the MPtrj + sAlex materials dataset covering 89 chemical elements. The "medium" variant is the default recommendation from the MACE team for general-purpose materials simulation.
|
| 69 |
+
|
| 70 |
+
**Original authors:** Ilyes Batatia, Philipp Benner, Yuan Chiang, Alin M. Elena, Dávid P. Kovács, Janosh Riebesell, and the rest of the MACE team (~100 collaborators). Corresponding author: Gábor Csányi (Cambridge).
|
| 71 |
+
|
| 72 |
+
**Supported elements:** atomic numbers 1–83, 89–94 (see `metadata.json` inside the zip).
|
| 73 |
+
|
| 74 |
+
**Intended use and limitations:** general-purpose materials modelling (energies, forces, stresses) at DFT/PBE+U accuracy. Not trained for isolated molecules; for molecular systems refer to MACE-OFF. See the [upstream README](https://github.com/ACEsuit/mace-foundations) for authoritative guidance.
|
| 75 |
+
|
| 76 |
+
**Citation:**
|
| 77 |
+
|
| 78 |
+
```bibtex
|
| 79 |
+
@article{batatia2024foundation,
|
| 80 |
+
title = {A foundation model for atomistic materials chemistry},
|
| 81 |
+
author = {Batatia, Ilyes and Benner, Philipp and Chiang, Yuan and Elena, Alin M.
|
| 82 |
+
and Kov{\'a}cs, D{\'a}vid P. and Riebesell, Janosh and others},
|
| 83 |
+
journal = {The Journal of Chemical Physics},
|
| 84 |
+
volume = {163},
|
| 85 |
+
number = {18},
|
| 86 |
+
pages = {184110},
|
| 87 |
+
year = {2024},
|
| 88 |
+
doi = {10.1063/5.0230281},
|
| 89 |
+
eprint = {2401.00096},
|
| 90 |
+
archivePrefix = {arXiv},
|
| 91 |
+
}
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
## Export pipeline and reproducibility
|
| 95 |
+
|
| 96 |
+
The archive was produced with the exporter in [tojax/examples/mlff/](https://github.com/cusp-ai-oss/tojax):
|
| 97 |
+
|
| 98 |
+
```sh
|
| 99 |
+
uv run python export_mace.py --output mace-mpa-0-medium_32.zip --symbolic NSE
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
tojax's export harness verifies numerical agreement with the PyTorch reference (default tolerances `rtol=1e-4`, `atol=1e-4`) before saving the archive.
|
| 103 |
+
|
| 104 |
+
## Changes from upstream
|
| 105 |
+
|
| 106 |
+
- **File format.** PyTorch `.model` → JAX-exported `.zip` (graph + msgpack params).
|
| 107 |
+
- **Weights.** Unchanged, bit-for-bit, from the upstream checkpoint.
|
| 108 |
+
- **Architecture.** Translated operation-for-operation; no approximations or substitutions.
|
| 109 |
+
- **Numerics.** Verified within `rtol=1e-4, atol=1e-4` against the PyTorch reference during export.
|
| 110 |
+
- **Cutoff and dtypes.** Preserved from upstream defaults (6.0 Å; float32 positions/cell/offsets, int64 indices, bool PBC).
|
| 111 |
+
- **Symbolic shapes.** Exports accept variable numbers of atoms, systems, and edges without recompilation.
|
| 112 |
+
|
| 113 |
+
## Attribution and license
|
| 114 |
+
|
| 115 |
+
This model exists because of the work of the MACE team. CuspAI's only contribution is the JAX export — we trained nothing, changed no weights, and designed none of the architecture. Please cite Batatia et al. (2024) when using this checkpoint in research.
|
| 116 |
+
|
| 117 |
+
The file `mace-mpa-0-medium_32.zip` is distributed under the MIT License; see [LICENSE](LICENSE) for the full text and [NOTICE](NOTICE) for attribution and modification details. The kUPS / tojax tooling citations:
|
| 118 |
+
|
| 119 |
+
```bibtex
|
| 120 |
+
@software{kups2026,
|
| 121 |
+
author = {{CuspAI}},
|
| 122 |
+
title = {kUPS},
|
| 123 |
+
year = {2026},
|
| 124 |
+
url = {https://github.com/cusp-ai-oss/kups},
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
@software{tojax2026,
|
| 128 |
+
author = {{CuspAI}},
|
| 129 |
+
title = {tojax},
|
| 130 |
+
year = {2026},
|
| 131 |
+
url = {https://github.com/cusp-ai-oss/tojax},
|
| 132 |
+
}
|
| 133 |
+
```
|
| 134 |
+
|
| 135 |
+
## Contact
|
| 136 |
+
|
| 137 |
+
- Issues with the JAX export or with kUPS: [github.com/cusp-ai-oss/kups/issues](https://github.com/cusp-ai-oss/kups/issues)
|
| 138 |
+
- Scientific questions about MACE: please direct to the upstream authors via [ACEsuit/mace-foundations](https://github.com/ACEsuit/mace-foundations).
|
mace-mpa-0-medium_32.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c5eb645f2dc2c904cfed1d364475202fdbb6309a5720de91e042dcb7d6ba7bf5
|
| 3 |
+
size 39681963
|