p-doom/crowd-code-dataset-0.2 huggingface dataset:
[tab] scripts_horeka/modelsize_scaling/dynamics/A_train_dyn_1.5M.sbatch (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=10:00:00
#SBATCH --partition=accelerated
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:1
#SBATCH --output=logs/logs_training/%x_%j.log
#SBATCH --error=logs/logs_training/%x_%j.log
#SBATCH --mail-user=mihir.mahajan2002@gmail.com
#SBATCH --job-name=train_dynamics_minecraft_overfit_sample_1.5M
#SBATCH --mem=50G
#SBATCH --mail-type=ALL

# Log the sbatch script
cat $0

module unload mpi/openmpi/5.0
module unload devel/cuda/12.4
source .venv/bin/activate

tf_records_dir=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data/knoms_tfrecords_500_shards
ws_dir='/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/'

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

CHECKPOINT_DIR=$ws_dir/checkpoints/$job_name_$slurm_job_id
mkdir -p $CHECKPOINT_DIR

env | grep SLURM

echo Running dynamics model overfit run tiny model A, ~1.5M params. Slurm id: $slurm_job_id

tokenizer_ckpt_dir=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/3290391/tokenizer_1750845012_50000/
lam_ckpt_dir=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/3290392/lam_1750845133_180000/

srun python train_dynamics.py \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=1 \
    --min_lr=5e-7 \
    --max_lr=5e-6 \
    --warmup_steps=125 \
    --log_image_interval=100 \
    --log \
    --name=dynamics-model-size-scaling-1.5M-$slurm_job_id \
    --tags dynamics model-size-scaling 1.5M tiny A \
    --log_checkpoint_interval=500 \
    --entity instant-uv \
    --project jafar \
    --tokenizer_checkpoint=$tokenizer_ckpt_dir \
    --lam_checkpoint=$lam_ckpt_dir \
    --data_dir $tf_records_dir \
    --dyna_dim=128 \
    --dyna_num_blocks=2 \
    --dyna_num_heads=4
[tab] scripts_horeka/modelsize_scaling/dynamics/model_sizes.md (markdown)
# Dynamics model: sizes 

| Config | dyna_dim | dyna_num_blocks | dyna_num_heads | Approx. Params |
|--------|----------|-----------------|---------------|----------------|
| 1 | 512 | 12 | 8 | ~36M |
| 2 | 768 | 16 | 12 | ~110M |
| 3 | 1024 | 16 | 16 | ~180M |
| 4 | 1024 | 24 | 16 | ~270M |
| 5 | 1536 | 24 | 24 | ~500M |


## tiny models
| Config | dyna_dim | dyna_num_blocks | dyna_num_heads | Approx. Params |
|--------|----------|-----------------|---------------|----------------|
| A | 128 | 2 | 4 | ~1.5M |
| B | 256 | 2 | 4 | ~3.5M |
| C | 256 | 4 | 4 | ~6M |
| D | 384 | 4 | 6 | ~12M |
| E | 512 | 4 | 8 | ~18M |
[tab] scripts_horeka/overfit_batch_tiny/train_tokenizer_overfit_batch.sbatch (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=15:00:00
#SBATCH --partition=accelerated
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:1
#SBATCH --output=logs/logs_training/%x_%j.log
#SBATCH --error=logs/logs_training/%x_%j.log
#SBATCH --mail-user=mihir.mahajan2002@gmail.com
#SBATCH --job-name=train_tokenizer_minecraft_overfit_batch
#SBATCH --mem=50G
#SBATCH --mail-type=ALL

# Log the sbatch script
cat $0

module unload mpi/openmpi/5.0
module unload devel/cuda/12.4
source .venv/bin/activate

tf_records_dir=$ws_dir/knoms_tfrecords_500_shards
ws_dir='/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/'

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

CHECKPOINT_DIR=$ws_dir/checkpoints/$job_name_$slurm_job_id
mkdir -p $CHECKPOINT_DIR

env | grep SLURM

srun python train_tokenizer.py \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=12 \
    --min_lr=1e-4 \
    --max_lr=1e-4 \
    --log_image_interval=100 \
    --log \
    --log_checkpoint_interval=500 \
    --name=tokenizer-tiny-overfit-batch-$slurm_job_id \
    --tags tokenizer overfit-batch tiny \
    --entity instant-uv \
    --project jafar \
    --data_dir $tf_records_dir \
    --model_dim 384 \
    --latent_dim 32 \
    --num_latents 1024 \
    --patch_size 4 \
    --num_blocks 8 \
    --num_heads 8 \
    --codebook_dropout 0.0 \