conda create -n wmw python=3.10
upon completion, activate the env and install uv with
conda activate wmw
pip3 install uv
clone the latest stable-pretraining and install with all dependencies (will take a few minutes)
git@github.com:galilai-group/stable-pretraining.git
cd stable-pretraining
uv pip install -e .
uv pip install datasets==3.6
finally, if you plan to use SLURM, make sure to update the provided utility example_config.yaml with your cluster setup.
The commands below assume using SLURM to queue your job. If you are in an interactive session, you can remove --config-dir ./ --config-name example_config as well as ++gpus_per_node=8, we recommend using an effective batch size of 128.
HYDRA_FULL_ERROR=1 python mila_wmw_reconstruction.py --config-dir ./ --config-name example_config \
++gpus_per_node=8 \
++batch_size=32 \
++da_level=0 \
++max_epochs=600 \
++embedding_dim=384 \
++lr=2e-4 \
++weight_decay=1e-6 \
++resolution=224 \
++patch_size=16 \
++mask_ratio=0.8 \
++wandb_project=wmw_reconstruction
HYDRA_FULL_ERROR=1 python mila_wmw_vicreg.py --config-dir ./ --config-name example_config \
++inv_loss=0.1 \
++cov_loss=10 \
++var_loss=0.1 \
++gpus_per_node=8 \
++batch_size=32 \
++max_epochs=600 \
++embedding_dim=384 \
++lr=2e-4 \
++weight_decay=1e-6 \
++resolution=224 \
++patch_size=16 \
++mask_ratio=0.8 \
++wandb_project=wmw_vicreg
HYDRA_FULL_ERROR=1 python mila_wmw_sigreg.py --config-dir ./ --config-name example_config \
++inv_loss=0.1 \
++gpus_per_node=8 \
++batch_size=32 \
++max_epochs=600 \
++embedding_dim=384 \
++lr=2e-4 \
++weight_decay=1e-6 \
++resolution=224 \
++patch_size=16 \
++mask_ratio=0.8 \
++wandb_project=wmw_sigreg