Skip to content

Commit

Permalink
stress test
Browse files Browse the repository at this point in the history
  • Loading branch information
NouamaneTazi committed Dec 13, 2024
1 parent a756526 commit 6ac7d73
Show file tree
Hide file tree
Showing 8 changed files with 470 additions and 86 deletions.
94 changes: 94 additions & 0 deletions examples/config_tiny_llama_bench.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# /fsx/nouamane/miniconda/envs/2-1-cu121/bin/torchrun --nproc_per_node=8 run_train.py --config-file examples/config_tiny_llama.yaml
# NANOTRON_BENCHMARK=1 CUDA_DEVICE_MAX_CONNECTIONS=1 /fsx/nouamane/miniconda/envs/2-1-cu121/bin/torchrun --nproc_per_node=8 run_train.py --config-file examples/config_tiny_llama.yaml
checkpoints:
checkpoint_interval: 10000
checkpoints_path: checkpoints
checkpoints_path_is_shared_file_system: false
resume_checkpoint_path: null
save_initial_state: false
data_stages:
- data:
dataset: null # Custom dataloader will be used
num_loading_workers: 1
seed: 42
name: Stable Training Stage
start_training_step: 1
general:
benchmark_csv_path: bench.csv
consumed_train_samples: null
ignore_sanity_checks: true
project: debug
run: dp2_tp8_seq64k
seed: 42
step: null
lighteval: null
logging:
iteration_step_info_interval: 1
log_level: info
log_level_replica: info
model:
ddp_bucket_cap_mb: 25
dtype: bfloat16
init_method:
std: 0.02
make_vocab_size_divisible_by: 1
model_config:
bos_token_id: 0
eos_token_id: 0
hidden_act: silu
hidden_size: 3072
initializer_range: 0.02
intermediate_size: 8192
is_llama_config: true
max_position_embeddings: 2048
num_attention_heads: 24
num_hidden_layers: 28
num_key_value_heads: 8
pad_token_id: null
pretraining_tp: 1
rms_norm_eps: 1.0e-05
rope_scaling: null
tie_word_embeddings: true
use_cache: true
vocab_size: 128256
optimizer:
accumulate_grad_in_fp32: true
clip_grad: 1.0
learning_rate_scheduler:
learning_rate: 0.0003
lr_decay_starting_step: null
lr_decay_steps: 13
lr_decay_style: cosine
lr_warmup_steps: 2
lr_warmup_style: linear
min_decay_lr: 1.0e-05
optimizer_factory:
adam_beta1: 0.9
adam_beta2: 0.95
adam_eps: 1.0e-08
name: adamW
torch_adam_is_fused: true
weight_decay: 0.01
zero_stage: 0
parallelism:
dp: 1
expert_parallel_size: 1
pp: 1
pp_engine: 1f1b
tp: 8
tp_linear_async_communication: true
tp_mode: REDUCE_SCATTER
profiler: null
# profiler_export_path: ./tb_logs
tokenizer:
tokenizer_max_length: null
tokenizer_name_or_path: robot-test/dummy-tokenizer-wordlevel
tokenizer_revision: null
tokens:
batch_accumulation_per_replica: 1
limit_test_batches: 0
limit_val_batches: 0
micro_batch_size: 1
sequence_length: 2048
train_steps: 100
val_check_interval: 100
9 changes: 6 additions & 3 deletions run_multinode.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash

#SBATCH --job-name=smolm2-bench # Job name
#SBATCH --time=00:15:00
#SBATCH --time=00:02:00
#SBATCH --partition=hopper-prod
#SBATCH --qos=high
#SBATCH --reservation=huggingface_37

#SBATCH -o /fsx/nouamane/projects/nanotron/logs/%j-%x.out

Expand Down Expand Up @@ -41,6 +42,7 @@ export CUDA_DEVICE_MAX_CONNECTIONS=1
# Nanotron specific
export NANOTRON_BENCHMARK=1


# Print some debugging information
echo "Master node: $MASTER_NODE"
echo "All nodes: $NODELIST"
Expand All @@ -53,5 +55,6 @@ srun torchrun \
--rdzv_id=$SLURM_JOB_ID \
--rdzv_backend=c10d \
--rdzv_endpoint=$MASTER_NODE:$MASTER_PORT \
run_train.py \
--config-file examples/config_tiny_llama.yaml
stress_test.py \
# run_train.py \
# --config-file examples/config_tiny_llama.yaml
Loading

0 comments on commit 6ac7d73

Please sign in to comment.