awallace3 commited on
Commit
846870e
·
verified ·
1 Parent(s): ccbf549

Document the weight sets, including ap2_tf_paper

Browse files
Files changed (1) hide show
  1. README.md +43 -3
README.md CHANGED
@@ -1,3 +1,43 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ ---
4
+
5
+ # QCMLForge pretrained models
6
+
7
+ Pretrained checkpoints for [QCMLForge](https://github.com/Awallace3/qcmlforge)
8
+ (`apnet_pt`). Files are resolved on demand by
9
+ `apnet_pt.hf_pretrained`; set `QCMLFORGE_AUTO_DOWNLOAD_PRETRAINED=1` to allow
10
+ non-interactive downloads.
11
+
12
+ ## APNet2 weight sets
13
+
14
+ | `weights=` | files | description |
15
+ |---|---|---|
16
+ | `qcmlforge` (default) | `am_ensemble/am_{0..4}.pt`, `ap2_ensemble/ap2_{0..4}.pt` | APNet2 ensemble trained by QCMLForge. |
17
+ | `ap2_tf_paper` | `ap2_tf_paper/atom_models/atom{0..4}.pt`, `ap2_tf_paper/pair_models/pair{0..4}.pt` | The AP-Net2 ensemble published with the paper ([`zachglick/apnet`](https://github.com/zachglick/apnet)), converted from TensorFlow. |
18
+
19
+ ```python
20
+ from apnet_pt.pretrained_models import apnet2_model_predict
21
+
22
+ pred = apnet2_model_predict(dimers, weights="ap2_tf_paper")
23
+ ```
24
+
25
+ ### About `ap2_tf_paper`
26
+
27
+ These are the original TensorFlow SavedModel weights converted to PyTorch
28
+ checkpoints, not a retrained approximation: every atom-model tensor transfers
29
+ bit-exactly, and predictions match recorded TensorFlow output to ~1e-6 on
30
+ multipoles and ~1e-4 kcal/mol on interaction energies (float32 reduction order).
31
+
32
+ Two things they require, both handled by `weights="ap2_tf_paper"`:
33
+
34
+ - each `pair{i}` must be loaded with its own `atom{i}` — the checkpoints carry
35
+ no embedded atom submodel;
36
+ - `quadrupole_scale` must be `1.5` (it is stored in the checkpoint config, not
37
+ the state dict; dropping it shifts electrostatics by ~0.5 kcal/mol with no
38
+ error).
39
+
40
+ They also cannot be loaded by the fused `APNet2_AM_MPNN` model.
41
+
42
+ Details, the parity table, and the conversion procedure:
43
+ [docs/apnet2-tensorflow-weights.md](https://github.com/Awallace3/qcmlforge/blob/main/docs/apnet2-tensorflow-weights.md).