Skip to content

Commit 49bd8e3

Browse files
committed
update files after clean up to ensure successfully running
1 parent a6a3572 commit 49bd8e3

5 files changed

Lines changed: 11 additions & 17 deletions

File tree

small_llm_pretraining/nemo/config_H100_1x8x4_8b.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ export FROM_HF=1
7171
# Model: Whether we want to save a checkpoint. Must be 1 if NPAR > 1. If 1, then we save a checkpoint at the end.
7272
export SAVE_CKPT=0
7373

74-
# export SRC_PATH="/data/training/Llama-3.1-8B/original/"
75-
# export DST_PATH="/data/training/Llama-3.1-8B/nemo/"
76-
export CONT_IMAGE_URL="rocm/mlperf:llama31_8b_training_5.1_gfx942 "
7774

7875

7976
# Training Configs:

small_llm_pretraining/nemo/config_H200_1x8x1_8b.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ export FROM_HF=1
7171
# Model: Whether we want to save a checkpoint. Must be 1 if NPAR > 1. If 1, then we save a checkpoint at the end.
7272
export SAVE_CKPT=0
7373

74-
# export SRC_PATH="/data/training/Llama-3.1-8B/original/"
75-
# export DST_PATH="/data/training/Llama-3.1-8B/nemo/"
76-
export CONT_IMAGE_URL="rocm/mlperf:llama31_8b_training_5.1_gfx942 "
7774

7875

7976
# Training Configs:

small_llm_pretraining/nemo/config_MI325X_1x8x1_8b.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,21 @@ export IMAGE="DUMMY"
3838
# export ORIGINAL_C4_PATH="/data/data/C4"
3939

4040
# This corresponds to the PREPROCESSED_PATH in README section 3's dataset download part
41-
export PREPROCESSED_PATH="/data/llama3_8b/data/C4_processed"
42-
export MERGED_C4_PATH="/data/llama3_8b/data/C4_merged"
41+
export PREPROCESSED_PATH="/data/llama31_8b/data/C4_processed/"
42+
export MERGED_C4_PATH="/data/llama31_8b/data/C4_merged"
4343
# Dataset: Numpy index working directory, contains shuffled dataset
4444
# This path must be able to hold >400GB data
4545
export TMP_NPY_INDEX="/data/npy_indices"
4646
# Dataset: Tokenizer path
4747
# This corresponds to the TOKENIZER_PATH in README section 3's tokenizer download part
48-
export TOKENIZER_PATH="/data/llama3_8b/model/Llama-3.1-8B"
48+
export TOKENIZER_PATH="/data/llama31_8b/model/Llama-3.1-8B-ref/"
4949
# export TOKENIZER_PATH="/data/llama3_405b_ref/tokenizer"
5050

5151
# Model: checkpoint and tokenizer path
5252
# This is the checkpoint that we want to start with.
5353
# Each checkpoint should be a folder containing two sub-folders: context and weights.
5454
# And we need to pass this folder's path (the folder containing context and weights) here.
55-
export MODEL_CKPT="/data/llama3_8b/model/Llama-3.1-8B_nemo"
55+
export MODEL_CKPT="/data/llama31_8b/model/Llama-3.1-8B-ref/"
5656
# export MODEL_CKPT="None"
5757
# Model: Continual checkpoint directory to write and resume
5858
# This is the directory to hold all intermediate checkpoints.
@@ -71,9 +71,6 @@ export FROM_HF=1
7171
# Model: Whether we want to save a checkpoint. Must be 1 if NPAR > 1. If 1, then we save a checkpoint at the end.
7272
export SAVE_CKPT=0
7373

74-
# export SRC_PATH="/data/training/Llama-3.1-8B/original/"
75-
# export DST_PATH="/data/training/Llama-3.1-8B/nemo/"
76-
export CONT_IMAGE_URL="rocm/mlperf:llama31_8b_training_5.1_gfx942 "
7774

7875

7976
# Training Configs:
@@ -88,8 +85,11 @@ export MAX_LR="5e-4"
8885
# If an empty string is provided (""), then the training will continue until time limit
8986
# If we want to save a checkpoint, then this value must be set
9087
# export MAX_STEPS=1200000 # Fixed max_steps=1200000 in pretrain_llama31.py
88+
export WARMUP_STEPS=512 # 16384 // GBS
9189
export EVAL_EVERY=12288
9290
export START_EVAL_AT=0
91+
92+
export TENSOR_PARALLEL_SIZE=1
9393
# Experiment: starting steps
9494
# This is the starting "offset" step from the checkpoint.
9595
# For instance, if you are resuming from a checkpoint folder `checkpoint-par-0-20-steps/checkpoint`,

small_llm_pretraining/nemo/dev/run_llama31.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ python3 pretrain_llama31.py \
144144
--num_pars $NPAR \
145145
--initial_ckpt_path $MODEL_CKPT \
146146
--continual_ckpt_path $CONTINUAL_CKPT \
147-
--tokenizer_path "/tokenizer" \
147+
--tokenizer_path $TOKENIZER_PATH \
148148
--target_log_ppl $TARGET \
149149
--step_time_atol $STEP_TIME_ATOL \
150150
--ckpt_start_step $START_STEPS \

small_llm_pretraining/nemo/pretrain_llama31.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
14+
import os
1515
import math
1616
import argparse
1717
from typing import Optional
@@ -207,7 +207,7 @@ def get_pretrain(
207207
pretrain.trainer.max_steps = 1200000 # Hardcoded to fix max_steps for this benchmark
208208

209209
pretrain.data = data_module
210-
pretrain.trainer.val_check_interval = start_eval_at
210+
pretrain.trainer.val_check_interval = eval_every / int (os.getenv ("GBS"))
211211
pretrain.trainer.limit_val_batches = eval_batches
212212
pretrain.trainer.limit_test_batches = eval_batches
213213

@@ -239,7 +239,7 @@ def get_data(
239239

240240
train_datasets = None
241241

242-
dataset_path = "/preproc_data"
242+
dataset_path = dataset_path = os.getenv("PREPROCESSED_PATH")
243243

244244
if use_full_dataset:
245245
train_datasets = sum([["12.5", f"{dataset_path}/c4-train.en_{idx}_text_document"] for idx in range(8)], [])

0 commit comments

Comments
 (0)