okunator commited on
Commit
c31c8c7
·
verified ·
1 Parent(s): 19c63aa

Simplify model card: contents, usage, shapes and license

Browse files
Files changed (2) hide show
  1. README.md +37 -53
  2. SHA256SUMS +1 -1
README.md CHANGED
@@ -10,74 +10,58 @@ tags:
10
  - chrombpnet
11
  ---
12
 
13
- # ChromBPNet browser WebGPU weight packs
14
 
15
- **Complete: 7,560 / 7,560 folds published**, across 1,512
16
- original experiment repositories. The complete atlas is being published without
17
- numerical parity exclusions. These are prediction-only `GSCNNv1` weight containers
18
- for the matching `chrombpnet-wgsl@1` browser engine; **they are not ONNX files**.
19
 
20
- ## Inputs and outputs
 
 
 
 
21
 
22
- Full input width is 2,114 bp, fp32 ACGT `[1,4,2114]`. Raw profile logits are
23
- `[1,1,1000]` and raw log counts `[1,1]`. Outputs correspond
24
- to central input `[557,1557)` (zero-based, half-open). Count features span 1,074
25
- positions starting at input offset 520. All native learned heads are retained.
26
 
27
- These are the published bias-corrected **nobias** ChromBPNet models, with no control
28
- input. Decode the single profile with softmax and `max(expm1(log_count),0)`. The
29
- bias submodel is not included in this release.
 
 
 
30
 
31
- ## Conversion and validation status
32
 
33
- **No per-fold numerical parity tests or inference runs are performed for this
34
- publication**, as explicitly requested. Publication is not a claim of numerical
35
- or biological validation. Existing prototype/runtime comparisons remain separate.
36
 
37
- Source tensors come from the existing pinned [ChromBPNet ONNX release](https://huggingface.co/genome-spy/ChromBPNet-ONNX).
38
- Every intermediate file is checked against its exact recorded size and SHA-256.
39
- Its fp32 initializers are copied without quantization or arithmetic; split
40
- ChromBPNet convolution weights are reassembled by exact channel concatenation.
41
- The native repository/revision/path/hash, intermediate artifact identity and tensor
42
- hashes remain recorded. All source identities are preserved, including distinct
43
- repositories that happen to contain identical learned weights.
44
 
45
- Packing verifies fixed tensor shapes, finite weights, container bounds and hashes.
46
- All uploaded weight files are downloaded and size/SHA-256 checked at their pinned
47
- publication commits before local staging files are evicted. During upload this
48
- verification may still be in progress. `manifest.json` distinguishes upload status.
49
 
50
- ## Runtime and use
51
 
52
- This repository contains weights and metadata, **not a public standalone JavaScript
53
- library or shader source**. Execution requires the matching `chrombpnet-wgsl@1` engine in
54
- GenomeSpy Sequence Designer. This does not qualify ensembles, backward graphs,
55
- Ledidi, attribution or PISA. The existing ONNX repositories remain unchanged.
56
- No new app backend or visible preview is deployed by this publication.
57
 
58
  ```python
59
- import hashlib, json
60
  from pathlib import Path
61
  from huggingface_hub import HfApi, hf_hub_download
 
62
  repo = "genome-spy/ChromBPNet-WebGPU"
63
- revision = HfApi().model_info(repo).sha # Pin the exact revision.
64
- manifest = json.loads(Path(hf_hub_download(repo, "manifest.json", revision=revision)).read_text())
65
- model = manifest["models"][0]
66
- a = model["artifact"]
67
- p = Path(hf_hub_download(repo, a["path"], revision=revision))
68
- assert p.stat().st_size == a["bytes"]
69
- assert hashlib.sha256(p.read_bytes()).hexdigest() == a["sha256"]
70
  ```
71
 
72
- ## License, original metadata and integrity
73
-
74
- Native weights and this repack are MIT; see `LICENSE` and `NOTICE`. The original
75
- per-repository configs, model-info, cards and scientific metrics are archived
76
- unchanged in `original-metadata.tar.gz`, with per-file hashes in its index.
77
- Software license notices are retained separately. The original ONNX model card
78
- in that archive is historical, not validation evidence for these WGSL packs.
79
 
80
- Each container embeds its complete native identity and individual tensor shapes,
81
- layouts, byte ranges and SHA-256 values. `SHA256SUMS` covers all published weight
82
- files and declared release metadata except itself. Downloads and browser memory
83
- costs vary: approximately 25.54 MB per fold.
 
10
  - chrombpnet
11
  ---
12
 
13
+ # ChromBPNet WebGPU
14
 
15
+ 7,560 model weight files for predicting chromatin accessibility from DNA (ATAC-seq and DNase-seq).
16
+ There are five models (folds) for each of 1,512 experiments.
 
 
17
 
18
+ Original models: [Kundaje Lab](https://huggingface.co/kundajelab), using ENCODE data.
19
+ These are the bias-corrected models, named `nobias` in the original release.
20
+
21
+ These `.bin` files need GenomeSpy's **`chrombpnet-wgsl@1` WebGPU runner**.
22
+ The runner code is not included here. For ONNX Runtime, use [ChromBPNet-ONNX](https://huggingface.co/genome-spy/ChromBPNet-ONNX).
23
 
24
+ ## Main files
 
 
 
25
 
26
+ ```text
27
+ models/<experiment>/fold_<n>/*.bin
28
+ manifest.json # available models and file names
29
+ original-metadata.tar.gz # original model descriptions
30
+ LICENSE
31
+ ```
32
 
33
+ ## Inputs and outputs
34
 
35
+ DNA uses four float32 channels in **A, C, G, T** order: 1 for the matching base,
36
+ 0 otherwise. Unknown bases use four zeros. The runner processes one sequence at a time.
 
37
 
38
+ | Name | Shape | Meaning |
39
+ | --- | --- | --- |
40
+ | `sequence` | `[1, 4, 2114]` | DNA input |
41
+ | `profile_logits` | `[1, 1, 1000]` | Scores for each output position |
42
+ | `log_counts` | `[1, 1]` | log(1 + predicted total count) |
 
 
43
 
44
+ The 1,000 predicted bases start 557 bases into the input sequence (human hg38).
 
 
 
45
 
46
+ ## Download a model
47
 
48
+ Install `huggingface_hub`. Choose a model from `manifest.json`; this example
49
+ downloads the first one for use with the runner above.
 
 
 
50
 
51
  ```python
52
+ import json
53
  from pathlib import Path
54
  from huggingface_hub import HfApi, hf_hub_download
55
+
56
  repo = "genome-spy/ChromBPNet-WebGPU"
57
+ revision = HfApi().model_info(repo).sha
58
+ listing = hf_hub_download(repo, "manifest.json", revision=revision)
59
+ model = json.loads(Path(listing).read_text())["models"][0]
60
+ weights = hf_hub_download(repo, model["artifact"]["path"], revision=revision)
61
+ print(weights)
 
 
62
  ```
63
 
64
+ ## License
 
 
 
 
 
 
65
 
66
+ Model weights: **MIT**. See [LICENSE](LICENSE). Original model details
67
+ and citations are kept in `original-metadata.tar.gz`.
 
 
SHA256SUMS CHANGED
@@ -3,7 +3,7 @@ ec83645e2f2e35186e21e71a838470ae29e109098ff8fea9016a0ae943b18b55 BPNET-LITE-SOF
3
  eee7b4d55be619630ce91024410485d25226c387e72315b83712a8dbf89188ef CHROMBPNET-SOFTWARE-LICENSE
4
  eee7b4d55be619630ce91024410485d25226c387e72315b83712a8dbf89188ef LICENSE
5
  07022a969f2232e9156f16268fa05a7d06955ef5379fb1282931b5b22dc17e11 NOTICE
6
- a1334e7a82de9b4be05459f4f6ca649862898bf8036943332423a339301de9ec README.md
7
  a701a35523d22faf78cbb54e011163f45dd48f69af44b3428f7c8c0eedef18b4 conversion-summary.json
8
  f7dbee5f298abcc6f312c87cabaa7d726e6350a7188c8c7cc06bc5e215f1256e intermediate-inventory.json
9
  22d9da353914bb771bfb69691f04244709de095de8e833d28bb141b510927bb7 manifest.json
 
3
  eee7b4d55be619630ce91024410485d25226c387e72315b83712a8dbf89188ef CHROMBPNET-SOFTWARE-LICENSE
4
  eee7b4d55be619630ce91024410485d25226c387e72315b83712a8dbf89188ef LICENSE
5
  07022a969f2232e9156f16268fa05a7d06955ef5379fb1282931b5b22dc17e11 NOTICE
6
+ 1c3a2a6ac51336a0d8c3b7300c6a15878e036fcfc9ecf8632d6304f6197bec71 README.md
7
  a701a35523d22faf78cbb54e011163f45dd48f69af44b3428f7c8c0eedef18b4 conversion-summary.json
8
  f7dbee5f298abcc6f312c87cabaa7d726e6350a7188c8c7cc06bc5e215f1256e intermediate-inventory.json
9
  22d9da353914bb771bfb69691f04244709de095de8e833d28bb141b510927bb7 manifest.json