File size: 1,075 Bytes
bb13925
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash

SCRIPT_DIR=.
MODEL_DIR=/mnt/disks/data-1/models/training_v4_unfreeze

IMAGE_ENCODER="openai/clip-vit-base-patch32"
TEXT_ENCODER="flax-community/indonesian-roberta-base"

python ${SCRIPT_DIR}/run_hybrid_clip.py \
    --output_dir ${MODEL_DIR} \
    --overwrite_output_dir \
    --tokenizer_name=${TEXT_ENCODER} \
    --train_file="../data/train_dataset_v6.json" \
    --validation_file="../data/val_dataset_v6.json" \
    --do_train --do_eval \
    --num_train_epochs="20" --max_seq_length 96 \
    --per_device_train_batch_size="64" \
    --per_device_eval_batch_size="64" \
    --learning_rate="0.00001" --warmup_ratio 0.1 --weight_decay 0.0 \
    --preprocessing_num_workers 16 \
    --exp_name training_v4_unfreeze \
    --text_model_name_or_path=${TEXT_ENCODER} \
    --vision_model_name_or_path=${IMAGE_ENCODER} \
    --eval_steps 500 \
    --logging_steps 100 \
    --save_steps 500 \
    --save_total_limit 5 \
    --log_wandb \
    --run_from_checkpoint="/mnt/disks/data-1/models/training_v4/ckpt-70999" # edit
    #--freeze_backbones
    #--push_to_hub