Skip to content

Commit

Permalink
move config folder to root and adjust options
Browse files Browse the repository at this point in the history
as titled, move the config files to the root folder, where it decouples
with the torchtrain package build, and allow easier navigations
  • Loading branch information
wanchaol committed Feb 24, 2024
1 parent 6e17001 commit 9efd1a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
13 changes: 2 additions & 11 deletions run_llama_train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,15 @@ TRAINER_DIR=${1:-/home/$USER/local/torchtrain}

# use envs as local overrides for convenience
# e.g.
# LOG_RANK=0,1 NGPU=4 SP=2 ./run_llama_train.sh
# LOG_RANK=0,1 NGPU=4 ./run_llama_train.sh

MODEL=${MODEL:-"llama"}
MODEL_CONF=${MODEL_CONF:-"debugmodel"}
NGPU=${NGPU:-"8"}
PP=${PP:-"1"}
SP=${SP:-"1"}
DP=${DP:-"-1"}

# by default log just rank 0 output,
LOG_RANK=${LOG_RANK:-0}

# Change this string to a meaningful one to enable checkpoint
CHECKPOINT_FOLDER=${CHECKPOINT_FOLDER:-""}
# Please adjust this to a longer interval period. The unit of measurement is in steps.
CHECKPOINT_INTERVAL=${CHECKPOINT_INTERVAL:-5}

CONFIG_FILE=${CONFIG_FILE:-"./torchtrain/train_configs/train_config.toml"}
CONFIG_FILE=${CONFIG_FILE:-"./train_configs/debug_model.toml"}

torchrun --nproc_per_node=${NGPU} --rdzv_endpoint="localhost:5972" \
--local-ranks-filter ${LOG_RANK} --role rank --tee 3 \
Expand Down
1 change: 0 additions & 1 deletion torchtrain/train_configs/__init_.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TorchTrain Config.toml
[job]
dump_folder = "./torchtrain/outputs"
dump_folder = "./outputs"

[profiling]
run_profiler = true
Expand All @@ -26,8 +26,8 @@ lr = 8e-4
[training]
batch_size = 8
seq_len = 2048
warmup_pct = 0.20
max_norm = 1.0
warmup_pct = 0.20 # lr scheduler warm up
max_norm = 1.0 # grad norm clipping
steps = 10
data_parallel_degree = -1
sequence_parallel_degree = 1
Expand Down

0 comments on commit 9efd1a0

Please sign in to comment.