Skip to content

Commit

Permalink
Update running instructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohjingyu committed Jul 7, 2023
1 parent 4dd1c22 commit 7653cf5
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
"""Training example.
Example usage:
python -u main.py \
--dataset=cc3m --val-dataset=cc3m \
--opt-version='facebook/opt-6.7b' --visual-model='openai/clip-vit-large-patch14' \
--exp_name='fromage_exp' --log-base-dir='runs/' \
--batch-size=64 --val-batch-size=64 --precision='bf16'
Example run on 2 A6000 GPUs to reproduce the model in the paper:
python -u main.py \
--dataset=cc3m --val-dataset=cc3m \
--opt-version='facebook/opt-6.7b' --visual-model='openai/clip-vit-large-patch14' \
--exp_name='gill_exp' --log-base-dir='runs/' \
--batch-size=64 --val-batch-size=64 --precision='bf16'
Example run on 2 A6000 GPUs to reproduce the paper results:
randport=$(shuf -i8000-9999 -n1) # Generate a random port number
python -u main.py \
--dist-url "tcp://127.0.0.1:${randport}" --dist-backend 'nccl' \
--multiprocessing-distributed --world-size 1 --rank 0 \
--dataset=cc3m --val-dataset=cc3m \
--exp-name='gill_exp' --image-dir='data/' --log-base-dir='runs/' \
--precision='bf16' --print-freq=100
"""
import argparse
from collections import OrderedDict
Expand Down

0 comments on commit 7653cf5

Please sign in to comment.