Upload sanitized CellWorld pretrained models
Browse filesFiles changed (11)
- LICENSEAdded+21
- README.mdAdded+72
- base/config.yamlAdded+48
- base/model.ptAdded+3
- huge/config.yamlAdded+48
- huge/model.ptAdded+3
- large/config.yamlAdded+48
- large/model.ptAdded+3
- manifest.jsonAdded+55
- small/config.yamlAdded+48
- small/model.ptAdded+3
123456789101112131415161718192021MIT License
Copyright (c) 2026 Haiping Liu
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172---license: mitlibrary_name: pytorchtags: - spatial-transcriptomics - self-supervised-learning - jepa---
# CellWorld pretrained models
This private repository contains the four canonical CellWorld pretrainedmodels used for model-scale experiments. CellWorld is a joint-embeddingpredictive architecture for spatial transcriptomics.
## Checkpoints
| Scale | Encoder | Heads | Predictor | Training steps ||---|---:|---:|---:|---:|| `small` | 192 x 6 | 6 | 96 x 3 | 10,000 || `base` | 384 x 8 | 6 | 192 x 3 | 10,000 || `large` | 512 x 12 | 8 | 256 x 3 | 10,000 || `huge` | 768 x 16 | 12 | 384 x 3 | 10,000 |
`base` is the recommended default. Each folder contains:
- `model.pt`: complete CellWorld model state and the minimal architecture configuration required by the released code.- `config.yaml`: the corresponding path-free pretraining recipe.
The release checkpoints intentionally omit optimizer state, data locations,output locations, resume paths, and experiment-service metadata. They retainthe complete pretrained model, including the context encoder, target encoder,cell tokenizer, metadata embeddings, and predictor.
## Download
Authentication is required because this model repository is private.
```pythonfrom huggingface_hub import hf_hub_download
checkpoint = hf_hub_download( repo_id="Haiping-UoM/CellWorld", filename="base/model.pt", token=True,)print(checkpoint)```
The downloaded checkpoint can be passed directly to the `--pretrained-ckpt`argument of the CellWorld probe and finetuning commands.
## Checkpoint schema
```textformat_version Release checkpoint format versionscale small, base, large, or hugemodel Complete CellWorld state_dictconfig Model and vocabulary configuration used for loadingepoch Completed training epochstep Completed optimizer step```
Checksums, byte sizes, and tensor-element counts are recorded in`manifest.json`.
## Code and license
Source code: https://github.com/UoM-HealthAI/CellWorld
Released under the MIT License.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748exp_name: bag-base-lr3e-3-mse-ema999data: patch_size: 4096 oversample: 2 val_oversample: 1 target_cells_per_subslide: 50000 target_partial_keep_ratio: 0.1vocab: gene_vocab_size: 19228 organ_vocab_size: 12 platform_vocab_size: 4 gene_pad_id: 0model: embed_dim: 384 encoder_depth: 8 encoder_heads: 6 predictor_depth: 3 predictor_heads: 3 predictor_dim: 192 mlp_ratio: 2.0 dropout: 0.1 gene_encoder: max_len: 512 spatial_encoding: normalize: center_scale alibi_scale: 1.0masking: mask_ratio: 0.6training: epochs: 100 total_steps: 10000 batch_size: 32 gradient_accumulation_steps: 1 learning_rate: 3e-3 weight_decay: 0.05 warmup_epochs: 10 warmup_steps: 1000 ema_start: 0.999 ema_end: 0.9999 num_workers: 2 grad_clip: 1.0 seed: 0 precision: bf16logging: group: bag-scaleoutput: save_every: 500 val_every: 50123version https://git-lfs.github.com/spec/v1oid sha256:567f90bed46919c857e6674e3cac1712feedc8ee976febbab0c57c26705b65ecsize 109565803123456789101112131415161718192021222324252627282930313233343536373839404142434445464748exp_name: bag-huge-lr3e-3-mse-ema999data: patch_size: 4096 oversample: 2 val_oversample: 1 target_cells_per_subslide: 50000 target_partial_keep_ratio: 0.1vocab: gene_vocab_size: 19228 organ_vocab_size: 12 platform_vocab_size: 4 gene_pad_id: 0model: embed_dim: 768 encoder_depth: 16 encoder_heads: 12 predictor_depth: 3 predictor_heads: 6 predictor_dim: 384 mlp_ratio: 2.0 dropout: 0.1 gene_encoder: max_len: 512 spatial_encoding: normalize: center_scale alibi_scale: 1.0masking: mask_ratio: 0.6training: epochs: 100 total_steps: 10000 batch_size: 8 gradient_accumulation_steps: 1 learning_rate: 3e-3 weight_decay: 0.05 warmup_epochs: 10 warmup_steps: 1000 ema_start: 0.999 ema_end: 0.9999 num_workers: 2 grad_clip: 1.0 seed: 0 precision: bf16logging: group: bag-scaleoutput: save_every: 500 val_every: 50123version https://git-lfs.github.com/spec/v1oid sha256:6001593e462a1f487494fbcfd78513216c54649e8767bb6ee1bc7825b56cf397size 680899563123456789101112131415161718192021222324252627282930313233343536373839404142434445464748exp_name: bag-large-lr3e-3-mse-ema999data: patch_size: 4096 oversample: 2 val_oversample: 1 target_cells_per_subslide: 50000 target_partial_keep_ratio: 0.1vocab: gene_vocab_size: 19228 organ_vocab_size: 12 platform_vocab_size: 4 gene_pad_id: 0model: embed_dim: 512 encoder_depth: 12 encoder_heads: 8 predictor_depth: 3 predictor_heads: 4 predictor_dim: 256 mlp_ratio: 2.0 dropout: 0.1 gene_encoder: max_len: 512 spatial_encoding: normalize: center_scale alibi_scale: 1.0masking: mask_ratio: 0.6training: epochs: 100 total_steps: 10000 batch_size: 16 gradient_accumulation_steps: 1 learning_rate: 3e-3 weight_decay: 0.05 warmup_epochs: 10 warmup_steps: 1000 ema_start: 0.999 ema_end: 0.9999 num_workers: 2 grad_clip: 1.0 seed: 0 precision: bf16logging: group: bag-scaleoutput: save_every: 500 val_every: 50123version https://git-lfs.github.com/spec/v1oid sha256:77f1eb38eb8ddaa6e1e8fa987653b187840a848220a49a748dae16b7225c6ef7size 24877111512345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455{ "checkpoint_schema": { "config": "minimal model-loading config (model and vocab)", "epoch": "completed training epoch", "format_version": "integer", "model": "complete CellWorld state_dict", "scale": "small | base | large | huge", "step": "completed optimizer step" }, "format_version": 1, "intended_visibility": "private", "models": { "base": { "checkpoint": "base/model.pt", "checkpoint_bytes": 109565803, "checkpoint_sha256": "567f90bed46919c857e6674e3cac1712feedc8ee976febbab0c57c26705b65ec", "config": "base/config.yaml", "config_sha256": "177dd96fe1cd7966572f143ef36c107372bc3a849beb7f1458960ccf7d84f514", "epoch": 110, "state_tensor_elements": 27372864, "step": 10000 }, "huge": { "checkpoint": "huge/model.pt", "checkpoint_bytes": 680899563, "checkpoint_sha256": "6001593e462a1f487494fbcfd78513216c54649e8767bb6ee1bc7825b56cf397", "config": "huge/config.yaml", "config_sha256": "90293b34a55bc84297a94eedf9ea859ebb523515bed64a700f2fc0dd529cabcd", "epoch": 110, "state_tensor_elements": 170191488, "step": 10000 }, "large": { "checkpoint": "large/model.pt", "checkpoint_bytes": 248771115, "checkpoint_sha256": "77f1eb38eb8ddaa6e1e8fa987653b187840a848220a49a748dae16b7225c6ef7", "config": "large/config.yaml", "config_sha256": "c7e3cec75ca1244fe64d19262279cda34c75d0cd18e4dcb31f61088a8066f515", "epoch": 110, "state_tensor_elements": 62166784, "step": 10000 }, "small": { "checkpoint": "small/model.pt", "checkpoint_bytes": 30146155, "checkpoint_sha256": "6fa0e149a024d3fe11ba8386a5d91af64fedc15fd2bceade5035603839ea3929", "config": "small/config.yaml", "config_sha256": "52d9389933d823a37057b569d97847600be05d4e2683faafb6753853bcf6b9d9", "epoch": 110, "state_tensor_elements": 7521696, "step": 10000 } }, "repository": "Haiping-UoM/CellWorld"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748exp_name: bag-small-lr3e-3-mse-ema999data: patch_size: 4096 oversample: 2 val_oversample: 1 target_cells_per_subslide: 50000 target_partial_keep_ratio: 0.1vocab: gene_vocab_size: 19228 organ_vocab_size: 12 platform_vocab_size: 4 gene_pad_id: 0model: embed_dim: 192 encoder_depth: 6 encoder_heads: 6 predictor_depth: 3 predictor_heads: 3 predictor_dim: 96 mlp_ratio: 2.0 dropout: 0.1 gene_encoder: max_len: 512 spatial_encoding: normalize: center_scale alibi_scale: 1.0masking: mask_ratio: 0.6training: epochs: 100 total_steps: 10000 batch_size: 32 gradient_accumulation_steps: 1 learning_rate: 3e-3 weight_decay: 0.05 warmup_epochs: 10 warmup_steps: 1000 ema_start: 0.999 ema_end: 0.9999 num_workers: 2 grad_clip: 1.0 seed: 0 precision: bf16logging: group: bag-scaleoutput: save_every: 500 val_every: 50123version https://git-lfs.github.com/spec/v1oid sha256:6fa0e149a024d3fe11ba8386a5d91af64fedc15fd2bceade5035603839ea3929size 30146155LICENSEAdded+21
README.mdAdded+72
base/config.yamlAdded+48
base/model.ptAdded+3
huge/config.yamlAdded+48
huge/model.ptAdded+3
large/config.yamlAdded+48
large/model.ptAdded+3
manifest.jsonAdded+55
small/config.yamlAdded+48
small/model.ptAdded+3