Upload cg2all WebGPU fp16 & int8 weight bundles (CalphaBasedModel & CalphaBasedModel-FIX, CC-BY-4.0)
Browse files- README.md +60 -0
- ca-fix/fp16/manifest.json +0 -0
- ca-fix/fp16/weights.bin +3 -0
- ca-fix/int8/manifest.json +0 -0
- ca-fix/int8/weights.bin +3 -0
- ca/fp16/manifest.json +0 -0
- ca/fp16/weights.bin +3 -0
- ca/int8/manifest.json +0 -0
- ca/int8/weights.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
tags:
|
| 4 |
+
- protein
|
| 5 |
+
- webgpu
|
| 6 |
+
- coarse-grained
|
| 7 |
+
- backmapping
|
| 8 |
+
- se3-transformer
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# cg2all-webgpu
|
| 12 |
+
|
| 13 |
+
Browser (WebGPU / WGSL) weight bundles for **cg2all** Cα-trace → all-atom backmapping
|
| 14 |
+
(Heo & Feig, *One particle per residue is sufficient to describe all-atom protein structures*,
|
| 15 |
+
Structure 32(1):97–111, 2024 · code: [huhlim/cg2all](https://github.com/huhlim/cg2all), Apache-2.0 ·
|
| 16 |
+
weights: [Zenodo 8393343](https://zenodo.org/records/8393343), CC-BY-4.0).
|
| 17 |
+
Used by the `cg2all` block of [denovo.run](https://denovo.run) (runtime in `web/static/vendor/cg2all/`, tooling in `tools/cg2all/`).
|
| 18 |
+
|
| 19 |
+
| Variant | Checkpoint (Zenodo 8393343) | Behaviour |
|
| 20 |
+
| --- | --- | --- |
|
| 21 |
+
| `ca/` | `CalphaBasedModel.ckpt` (sha256 `c00cc1cc002c9db1aeb2a62558edd9948b783568f54cb1fa12584b2bed22e00c`) | Cα positions refined by the model |
|
| 22 |
+
| `ca-fix/` | `CalphaBasedModel-FIX.ckpt` (sha256 `785b804494c5e95349d2ee6bdaddf8859f14b09eee0601b0530b795a778a4acb`) | Input Cα kept exactly (`--fix`) |
|
| 23 |
+
|
| 24 |
+
Each `<variant>/<precision>/` holds `manifest.json` (tensor table, config, SHA-256) and `weights.bin`.
|
| 25 |
+
Tensors keep their PyTorch `state_dict` names. Only the radial-profile output layers
|
| 26 |
+
(`*.radial_func.net.6.weight`, 3.90 M of 4.05 M parameters) are reduced precision; embeddings,
|
| 27 |
+
LinearSE3 maps, norms and radial hidden layers stay float32. Compute is float32 in WGSL.
|
| 28 |
+
|
| 29 |
+
- `fp16`: radial output layers as IEEE half.
|
| 30 |
+
- `int8`: radial output layers as symmetric int8 with one fp16 scale per 16 consecutive weights.
|
| 31 |
+
|
| 32 |
+
| File | Size | SHA-256 |
|
| 33 |
+
| --- | --- | --- |
|
| 34 |
+
| `ca/fp16/weights.bin` | 8.06 MiB | `7c2766b55955ecab1c68a457fbe1f78c2f0f30a083a4a50424a000368cc4caf6` |
|
| 35 |
+
| `ca/int8/weights.bin` | 4.82 MiB | `42acffcb6751b1a3789dea2882bebd88f1bb316509e1e4df897e2b5e5de49484` |
|
| 36 |
+
| `ca-fix/fp16/weights.bin` | 8.06 MiB | `ba6625c543bf6e1a4980fe1ec5a287f47cc8a106e282d2e92f2b5b439d2a5f94` |
|
| 37 |
+
| `ca-fix/int8/weights.bin` | 4.82 MiB | `3743f046ce080f843e4eae3cbf3b41ae9eb0b2a9d6ced98f4257f524c618ea8a` |
|
| 38 |
+
|
| 39 |
+
## Parity vs the PyTorch FP32 reference
|
| 40 |
+
|
| 41 |
+
All-atom RMSD (same frame) on a 16-aa ideal helix, the 46-aa crambin (1AB1) Cα trace with three
|
| 42 |
+
SSBONDs, and a 42-aa two-chain trace with a 14.6 Å break; measured on SwiftShader WebGPU (headless
|
| 43 |
+
Chromium, ARM64) and on the float64 CPU path:
|
| 44 |
+
|
| 45 |
+
| Precision | `ca` | `ca-fix` | max single-atom deviation |
|
| 46 |
+
| --- | --- | --- | --- |
|
| 47 |
+
| fp16 | 1.2e-4 – 2.6e-4 Å | 1.5e-4 – 4.3e-4 Å | 4.6e-3 Å |
|
| 48 |
+
| int8 | 6.0e-3 – 2.1e-2 Å | 5.5e-3 – 5.8e-2 Å | 0.544 Å |
|
| 49 |
+
|
| 50 |
+
(An unquantized fp32 export reproduces PyTorch to ≤ 6e-5 Å.)
|
| 51 |
+
|
| 52 |
+
## Reproduce
|
| 53 |
+
|
| 54 |
+
```bash
|
| 55 |
+
python -I tools/cg2all/export_weights.py --ckpt CalphaBasedModel.ckpt --variant ca --out out/ca
|
| 56 |
+
python -I tools/cg2all/export_weights.py --ckpt CalphaBasedModel-FIX.ckpt --variant ca-fix --out out/ca-fix
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
The SE(3)-Transformer port follows [huhlim/SE3Transformer](https://github.com/huhlim/SE3Transformer)
|
| 60 |
+
(fork of NVIDIA's SE(3)-Transformer, MIT). Weights are redistributed under the upstream Apache-2.0 license.
|
ca-fix/fp16/manifest.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
ca-fix/fp16/weights.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ba6625c543bf6e1a4980fe1ec5a287f47cc8a106e282d2e92f2b5b439d2a5f94
|
| 3 |
+
size 8453184
|
ca-fix/int8/manifest.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
ca-fix/int8/weights.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3743f046ce080f843e4eae3cbf3b41ae9eb0b2a9d6ced98f4257f524c618ea8a
|
| 3 |
+
size 5055552
|
ca/fp16/manifest.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
ca/fp16/weights.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7c2766b55955ecab1c68a457fbe1f78c2f0f30a083a4a50424a000368cc4caf6
|
| 3 |
+
size 8453184
|
ca/int8/manifest.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
ca/int8/weights.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:42acffcb6751b1a3789dea2882bebd88f1bb316509e1e4df897e2b5e5de49484
|
| 3 |
+
size 5055552
|