Add Simulusion 1.1.0 demo checkpoint
Browse files- .gitattributes +1 -0
- README.md +76 -0
- config.yaml +65 -0
- jepa-latest.pth.tar +3 -0
- jepa_neighbours.png +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
jepa_neighbours.png filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: simulusion
|
| 3 |
+
license: mit
|
| 4 |
+
pipeline_tag: image-feature-extraction
|
| 5 |
+
datasets:
|
| 6 |
+
- uoft-cs/cifar10
|
| 7 |
+
tags:
|
| 8 |
+
- simulusion
|
| 9 |
+
- pytorch
|
| 10 |
+
- ijepa
|
| 11 |
+
- jepa
|
| 12 |
+
- self-supervised-learning
|
| 13 |
+
- vision-transformer
|
| 14 |
+
- cifar10
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# I-JEPA ViT-Tiny on CIFAR-10
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
|
| 21 |
+
A demo checkpoint from [Simulusion](https://github.com/ParamThakkar123/simulusion), an open-source PyTorch library that puts world models behind one API. It implements the paper **[Self-Supervised Learning from Images with a Joint-Embedding Predictive Architecture (Assran et al., CVPR 2023)](https://arxiv.org/abs/2301.08243)**.
|
| 22 |
+
|
| 23 |
+
I-JEPA learns image features without labels and without reconstructing pixels: it predicts the representations of masked image blocks from a visible context block. In Simulusion it is a representation-learning component for world models.
|
| 24 |
+
|
| 25 |
+
## Results
|
| 26 |
+
|
| 27 |
+
A ViT-Tiny (patch size 4) trained for 30 epochs on CIFAR-10, about an hour on a 4 GB RTX 3050 laptop GPU. Classifying test images by their 20 nearest training images in feature space scores **41.1%**, against 29.6% for the same network at random initialisation (chance is 10%).
|
| 28 |
+
|
| 29 |
+
This is a short demo run sized for a laptop GPU, meant to show what the model does. It is **not** a reproduction of the paper's results. More clips and learning curves are in the [gallery](https://paramthakkar123.github.io/simulusion/gallery.html).
|
| 30 |
+
|
| 31 |
+
## Usage
|
| 32 |
+
|
| 33 |
+
```bash
|
| 34 |
+
pip install simulusion huggingface_hub
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
```python
|
| 38 |
+
from simulusion.models.jepa_agent import JEPAAgent
|
| 39 |
+
|
| 40 |
+
agent = JEPAAgent.from_pretrained("simillusion/ijepa-vit-tiny-cifar10")
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
Checkpoints are plain state dicts and load with `torch.load(..., weights_only=True)`. They include optimizer state, so you can continue training from them.
|
| 44 |
+
|
| 45 |
+
## Training
|
| 46 |
+
|
| 47 |
+
Reproduce this checkpoint from a clone of the repository:
|
| 48 |
+
|
| 49 |
+
```bash
|
| 50 |
+
python demos/jepa_demo.py train --epochs 30
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
## Citation
|
| 54 |
+
|
| 55 |
+
If you use this model, please cite the original paper:
|
| 56 |
+
|
| 57 |
+
```bibtex
|
| 58 |
+
@inproceedings{assran2023ijepa,
|
| 59 |
+
title = {Self-Supervised Learning from Images with a Joint-Embedding Predictive Architecture},
|
| 60 |
+
author = {Assran, Mahmoud and Duval, Quentin and Misra, Ishan and Bojanowski, Piotr and Vincent, Pascal and Rabbat, Michael and LeCun, Yann and Ballas, Nicolas},
|
| 61 |
+
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
|
| 62 |
+
year = {2023},
|
| 63 |
+
url = {https://arxiv.org/abs/2301.08243},
|
| 64 |
+
}
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
and Simulusion:
|
| 68 |
+
|
| 69 |
+
```bibtex
|
| 70 |
+
@software{simulusion,
|
| 71 |
+
title = {Simulusion: a PyTorch library for world models},
|
| 72 |
+
author = {Thakkar, Param},
|
| 73 |
+
year = {2026},
|
| 74 |
+
url = {https://github.com/ParamThakkar123/simulusion},
|
| 75 |
+
}
|
| 76 |
+
```
|
config.yaml
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
data:
|
| 2 |
+
batch_size: 128
|
| 3 |
+
color_jitter_strength: 0.0
|
| 4 |
+
crop_scale:
|
| 5 |
+
- 0.3
|
| 6 |
+
- 1.0
|
| 7 |
+
crop_size: 32
|
| 8 |
+
dataset: cifar10
|
| 9 |
+
download: false
|
| 10 |
+
image_folder: train
|
| 11 |
+
num_workers: 0
|
| 12 |
+
pin_mem: true
|
| 13 |
+
root_path: data
|
| 14 |
+
use_color_distortion: false
|
| 15 |
+
use_gaussian_blur: false
|
| 16 |
+
use_horizontal_flip: false
|
| 17 |
+
val_split: null
|
| 18 |
+
logging:
|
| 19 |
+
enable_sweep: false
|
| 20 |
+
enable_wandb: false
|
| 21 |
+
folder: runs/jepa
|
| 22 |
+
sweep_config: {}
|
| 23 |
+
wandb_entity: ''
|
| 24 |
+
wandb_project: simulusion
|
| 25 |
+
write_tag: jepa
|
| 26 |
+
mask:
|
| 27 |
+
allow_overlap: false
|
| 28 |
+
aspect_ratio:
|
| 29 |
+
- 0.75
|
| 30 |
+
- 1.5
|
| 31 |
+
enc_mask_scale:
|
| 32 |
+
- 0.85
|
| 33 |
+
- 1.0
|
| 34 |
+
min_keep: 4
|
| 35 |
+
num_enc_masks: 1
|
| 36 |
+
num_pred_masks: 4
|
| 37 |
+
patch_size: 4
|
| 38 |
+
pred_mask_scale:
|
| 39 |
+
- 0.15
|
| 40 |
+
- 0.2
|
| 41 |
+
meta:
|
| 42 |
+
copy_data: false
|
| 43 |
+
load_checkpoint: false
|
| 44 |
+
loss_type: l2
|
| 45 |
+
model_name: vit_tiny
|
| 46 |
+
pred_depth: null
|
| 47 |
+
pred_emb_dim: 384
|
| 48 |
+
read_checkpoint: null
|
| 49 |
+
use_bfloat16: true
|
| 50 |
+
optimization:
|
| 51 |
+
early_stopping: false
|
| 52 |
+
ema:
|
| 53 |
+
- 0.996
|
| 54 |
+
- 1.0
|
| 55 |
+
epochs: 30
|
| 56 |
+
final_lr: 1.0e-06
|
| 57 |
+
final_weight_decay: 0.4
|
| 58 |
+
ipe_scale: 1.0
|
| 59 |
+
lr: 0.001
|
| 60 |
+
lr_reference_batch_size: null
|
| 61 |
+
min_delta: 0.0001
|
| 62 |
+
patience: 10
|
| 63 |
+
start_lr: 0.0002
|
| 64 |
+
warmup: 2
|
| 65 |
+
weight_decay: 0.04
|
jepa-latest.pth.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8cfb7e81011ada5cd7cae813f0ce985786b8e1d21a09309e471eefb2bc78868e
|
| 3 |
+
size 215643004
|
jepa_neighbours.png
ADDED
|
Git LFS Details
|