3outeille HF staff commited on
Commit
c5ada57
1 Parent(s): 85d405f

Upload llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16

Browse files
llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16/bench.slurm ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ #SBATCH --job-name=bench_cluster
4
+ #SBATCH --time=02:00:00
5
+ #SBATCH --partition=hopper-prod
6
+ #SBATCH --nodes=1
7
+ #SBATCH --gres=gpu:8
8
+ #SBATCH --qos=normal
9
+ #SBATCH --ntasks-per-node=1
10
+ #SBATCH --cpus-per-task=96
11
+ #SBATCH --exclusive
12
+ #SBATCH --output=/fsx/ferdinandmom/ferdinand-hf/bench_cluster/results/llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16/log.out
13
+ #SBATCH --error=/fsx/ferdinandmom/ferdinand-hf/bench_cluster/results/llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16/log.out
14
+
15
+ # Function to update status based on squeue output
16
+ update_status() {
17
+ job_id=$1
18
+ status_file=$2
19
+ # For unknown reasons, it doenst update status for pending. It only works for running
20
+ while true; do
21
+ job_status=$(squeue --job $job_id --noheader --format=%T)
22
+ echo "Job status: $job_status"
23
+ if [ -z "$job_status" ]; then
24
+ # Job has finished or is not found
25
+ break
26
+ elif [ "$job_status" = "RUNNING" ]; then
27
+ printf "running" > $status_file
28
+ break
29
+ fi
30
+ sleep 10
31
+ done
32
+ }
33
+
34
+ # Misc initializations.
35
+ echo "========================"
36
+ echo "START TIME: $(date)"
37
+ source /fsx/ferdinandmom/miniforge3/etc/profile.d/conda.sh
38
+ conda activate /fsx/ferdinandmom/miniforge3/envs/env-bench-cluster
39
+ echo python3 version = $(python3 --version)
40
+ echo "========================"
41
+
42
+ # Slurm stuff
43
+ export HOSTNAMES=$(scontrol show hostnames "$SLURM_JOB_NODELIST")
44
+ export MASTER_ADDR=$(scontrol show hostnames "$SLURM_JOB_NODELIST" | head -n 1)
45
+ export MASTER_PORT=$((1024 + RANDOM % 64511))
46
+
47
+ export TMPDIR=/scratch
48
+ export HF_DATASETS_CACHE="/admin/home/ferdinand_mom/.cache"
49
+ export CUBLAS_WORKSPACE_CONFIG=":4096:8"
50
+ export CUDA_DEVICE_MAX_CONNECTIONS="1"
51
+
52
+ huggingface-cli login --token $HUGGINGFACE_TOKEN
53
+
54
+
55
+ NANOTRON_REPO="/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron"
56
+ CMD="$NANOTRON_REPO/run_train.py --config-file /fsx/ferdinandmom/ferdinand-hf/bench_cluster/results/llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16/config.yaml"
57
+
58
+ LAUNCHER="torchrun \
59
+ --nproc_per_node 8 \
60
+ --nnodes 1 \
61
+ --rdzv_endpoint ${MASTER_ADDR}:${MASTER_PORT} \
62
+ --rdzv_backend c10d \
63
+ --max_restarts 0 \
64
+ --tee 3 \
65
+ --node_rank ${SLURM_PROCID}"
66
+
67
+ # Checkout the bench_cluster branch
68
+ cd $NANOTRON_REPO
69
+ git checkout bench_cluster
70
+ cd ..
71
+ # Get the current job ID
72
+ job_id=${SLURM_JOB_ID}
73
+
74
+ # Update status to "pending" or "running" in the background
75
+ update_status $job_id /fsx/ferdinandmom/ferdinand-hf/bench_cluster/results/llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16/status.txt &
76
+
77
+ # Run the main command
78
+ srun -u $LAUNCHER $CMD
79
+ exit_status=$?
80
+
81
+ # Update status based on the exit status of `srun`
82
+ if [ $exit_status -eq 0 ]; then
83
+ printf "completed" > /fsx/ferdinandmom/ferdinand-hf/bench_cluster/results/llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16/status.txt
84
+ else
85
+ if grep -q "OutOfMemoryError" /fsx/ferdinandmom/ferdinand-hf/bench_cluster/results/llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16/log.out; then
86
+ printf "oom" > /fsx/ferdinandmom/ferdinand-hf/bench_cluster/results/llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16/status.txt
87
+ elif grep -q " CUDA error: an illegal memory access" /fsx/ferdinandmom/ferdinand-hf/bench_cluster/results/llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16/log.out; then
88
+ printf "oom" > /fsx/ferdinandmom/ferdinand-hf/bench_cluster/results/llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16/status.txt
89
+ elif grep -q "Timeout at NCCL" /fsx/ferdinandmom/ferdinand-hf/bench_cluster/results/llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16/log.out; then
90
+ printf "timeout" > /fsx/ferdinandmom/ferdinand-hf/bench_cluster/results/llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16/status.txt
91
+ else
92
+ printf "fail" > /fsx/ferdinandmom/ferdinand-hf/bench_cluster/results/llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16/status.txt
93
+ fi
94
+ fi
95
+
96
+ # Run the report script if the job completed successfully
97
+ if [ $exit_status -eq 0 ]; then
98
+ python /fsx/ferdinandmom/ferdinand-hf/bench_cluster/main.py report --inp_dir /fsx/ferdinandmom/ferdinand-hf/bench_cluster/results/llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16 --is_logs
99
+ python /fsx/ferdinandmom/ferdinand-hf/bench_cluster/main.py report --inp_dir /fsx/ferdinandmom/ferdinand-hf/bench_cluster/results/llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16 --is_profiler
100
+ fi
101
+
102
+
103
+ # Push to hub the folder using huggingface_cli
104
+ huggingface-cli upload nanotron/bench_cluster /fsx/ferdinandmom/ferdinand-hf/bench_cluster/results/llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16 llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16 --commit-message "Upload llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16"
105
+
106
+ # Verify the upload
107
+ if [ $? -eq 0 ]; then
108
+ echo "Uploading to Huggingface Hub successful"
109
+ else
110
+ echo "Failed to upload to Huggingface Hub"
111
+ fi
llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16/config.yaml ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ general:
2
+ project: bench_cluster
3
+ seed: 42
4
+ model:
5
+ ddp_bucket_cap_mb: 25
6
+ dtype: bfloat16
7
+ init_method:
8
+ std: 0.025
9
+ make_vocab_size_divisible_by: 1
10
+ model_config:
11
+ bos_token_id: 1
12
+ eos_token_id: 2
13
+ hidden_act: silu
14
+ hidden_size: 2048
15
+ initializer_range: 0.02
16
+ intermediate_size: 4096
17
+ is_llama_config: true
18
+ max_position_embeddings: 4096
19
+ num_attention_heads: 32
20
+ num_hidden_layers: 24
21
+ num_key_value_heads: 32
22
+ pad_token_id: null
23
+ pretraining_tp: 1
24
+ rms_norm_eps: 1.0e-05
25
+ rope_scaling: null
26
+ rope_theta: 10000.0
27
+ tie_word_embeddings: true
28
+ use_cache: true
29
+ vocab_size: 50257
30
+ optimizer:
31
+ accumulate_grad_in_fp32: true
32
+ clip_grad: 1.0
33
+ learning_rate_scheduler:
34
+ learning_rate: 0.0001
35
+ lr_decay_style: linear
36
+ lr_warmup_style: linear
37
+ lr_warmup_steps: 1
38
+ min_decay_lr: 1.0e-05
39
+ optimizer_factory:
40
+ adam_beta1: 0.9
41
+ adam_beta2: 0.95
42
+ adam_eps: 1.0e-08
43
+ name: adamW
44
+ torch_adam_is_fused: true
45
+ weight_decay: 0.01
46
+ zero_stage: 1
47
+ parallelism:
48
+ dp: 1
49
+ expert_parallel_size: 1
50
+ pp: 4
51
+ pp_engine: 1f1b
52
+ tp: 2
53
+ tp_linear_async_communication: false
54
+ tp_mode: REDUCE_SCATTER
55
+ profiler:
56
+ profiler_export_path: /fsx/ferdinandmom/ferdinand-hf/bench_cluster/results/llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16
57
+ tokenizer:
58
+ tokenizer_max_length: null
59
+ tokenizer_name_or_path: openai-community/gpt2
60
+ tokenizer_revision: null
61
+ data_stages:
62
+ - name: Training Stage
63
+ start_training_step: 1
64
+ data:
65
+ dataset:
66
+ dataset_overwrite_cache: false
67
+ dataset_processing_num_proc_per_process: 64
68
+ hf_dataset_config_name: null
69
+ hf_dataset_or_datasets: roneneldan/TinyStories
70
+ hf_dataset_splits: train
71
+ text_column_name: text
72
+ num_loading_workers: 0
73
+ seed: 42
74
+ lighteval: null
75
+ tokens:
76
+ train_steps: 20
77
+ val_check_interval: -1
78
+ batch_accumulation_per_replica: 64
79
+ limit_test_batches: 0
80
+ limit_val_batches: 0
81
+ micro_batch_size: 16
82
+ sequence_length: 4096
83
+ logging:
84
+ iteration_step_info_interval: 1
85
+ log_level: info
86
+ log_level_replica: info
87
+ checkpoints:
88
+ checkpoint_interval: 100000
89
+ checkpoints_path: /dev/null
90
+ resume_checkpoint_path: null
llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16/log.out ADDED
@@ -0,0 +1,321 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ========================
2
+ START TIME: Wed Jul 3 23:42:21 UTC 2024
3
+ python3 version = Python 3.10.14
4
+ ========================
5
+ The token has not been saved to the git credentials helper. Pass `add_to_git_credential=True` in this function directly or `--add-to-git-credential` if using via `huggingface-cli` if you want to set the git credential as well.
6
+ Token is valid (permission: write).
7
+ Your token has been saved to /admin/home/ferdinand_mom/.cache/huggingface/token
8
+ Login successful
9
+ Already on 'bench_cluster'
10
+ M examples/config_tiny_llama.py
11
+ M examples/config_tiny_llama.yaml
12
+ M examples/train_tiny_llama.sh
13
+ M src/nanotron/models/llama.py
14
+ M src/nanotron/trainer.py
15
+ Your branch is up to date with 'origin/bench_cluster'.
16
+ Job status: RUNNING
17
+ W0703 23:42:24.409000 140246879086400 torch/distributed/run.py:757]
18
+ W0703 23:42:24.409000 140246879086400 torch/distributed/run.py:757] *****************************************
19
+ W0703 23:42:24.409000 140246879086400 torch/distributed/run.py:757] Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
20
+ W0703 23:42:24.409000 140246879086400 torch/distributed/run.py:757] *****************************************
21
+ [default0]:07/03/2024 23:42:40 [WARNING|DP=0|PP=0|TP=0|ip-26-0-169-86]: [Vocab Size Padding] Padded vocab (size: 50257) with 1 dummy tokens (new size: 50258)
22
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: Config:
23
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: Config(general=GeneralArgs(project='bench_cluster',
24
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: run='%date_%jobid',
25
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: seed=42,
26
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: step=None,
27
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: consumed_train_samples=None,
28
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: benchmark_csv_path=None,
29
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: ignore_sanity_checks=True),
30
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: parallelism=ParallelismArgs(dp=1,
31
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: pp=4,
32
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: tp=2,
33
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: pp_engine=<nanotron.parallel.pipeline_parallel.engine.OneForwardOneBackwardPipelineEngine object at 0x7efdb489c730>,
34
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: tp_mode=<TensorParallelLinearMode.REDUCE_SCATTER: 2>,
35
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: tp_linear_async_communication=False,
36
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: expert_parallel_size=1),
37
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: model=ModelArgs(model_config=LlamaConfig(bos_token_id=1,
38
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: eos_token_id=2,
39
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: hidden_act='silu',
40
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: hidden_size=2048,
41
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: initializer_range=0.02,
42
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: intermediate_size=4096,
43
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: is_llama_config=True,
44
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: max_position_embeddings=4096,
45
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: num_attention_heads=32,
46
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: num_hidden_layers=24,
47
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: num_key_value_heads=32,
48
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: pad_token_id=None,
49
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: pretraining_tp=1,
50
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: rms_norm_eps=1e-05,
51
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: rope_scaling=None,
52
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: rope_theta=10000.0,
53
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: tie_word_embeddings=True,
54
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: use_cache=True,
55
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: vocab_size=50258),
56
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: init_method=RandomInit(std=0.025),
57
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: dtype=torch.bfloat16,
58
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: make_vocab_size_divisible_by=1,
59
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: ddp_bucket_cap_mb=25),
60
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: tokenizer=TokenizerArgs(tokenizer_name_or_path='openai-community/gpt2',
61
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: tokenizer_revision=None,
62
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: tokenizer_max_length=None),
63
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: checkpoints=CheckpointsArgs(checkpoints_path=Path('/dev/null'),
64
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: checkpoint_interval=100000,
65
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: save_initial_state=False,
66
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: resume_checkpoint_path=None,
67
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: checkpoints_path_is_shared_file_system=False),
68
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: logging=LoggingArgs(log_level='info',
69
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: log_level_replica='info',
70
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: iteration_step_info_interval=1),
71
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: tokens=TokensArgs(sequence_length=4096,
72
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: train_steps=20,
73
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: micro_batch_size=16,
74
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: batch_accumulation_per_replica=64,
75
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: val_check_interval=-1,
76
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: limit_val_batches=0,
77
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: limit_test_batches=0),
78
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: optimizer=OptimizerArgs(optimizer_factory=AdamWOptimizerArgs(adam_eps=1e-08,
79
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: adam_beta1=0.9,
80
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: adam_beta2=0.95,
81
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: torch_adam_is_fused=True,
82
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: name='adamW'),
83
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: zero_stage=1,
84
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: weight_decay=0.01,
85
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: clip_grad=1.0,
86
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: accumulate_grad_in_fp32=True,
87
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: learning_rate_scheduler=LRSchedulerArgs(learning_rate=0.0001,
88
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: lr_warmup_steps=1,
89
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: lr_warmup_style='linear',
90
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: lr_decay_style='linear',
91
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: lr_decay_steps=19,
92
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: lr_decay_starting_step=None,
93
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: min_decay_lr=1e-05)),
94
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: data_stages=[DatasetStageArgs(name='Training Stage',
95
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: start_training_step=1,
96
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: data=DataArgs(dataset=PretrainDatasetsArgs(hf_dataset_or_datasets='roneneldan/TinyStories',
97
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: hf_dataset_splits='train',
98
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: hf_dataset_config_name=None,
99
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: dataset_processing_num_proc_per_process=64,
100
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: dataset_overwrite_cache=False,
101
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: text_column_name='text'),
102
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: seed=42,
103
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: num_loading_workers=0))],
104
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: profiler=ProfilerArgs(profiler_export_path=Path('/fsx/ferdinandmom/ferdinand-hf/bench_cluster/results/llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16')),
105
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: lighteval=None)
106
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: Model Config:
107
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: LlamaConfig(bos_token_id=1,
108
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: eos_token_id=2,
109
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: hidden_act='silu',
110
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: hidden_size=2048,
111
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: initializer_range=0.02,
112
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: intermediate_size=4096,
113
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: is_llama_config=True,
114
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: max_position_embeddings=4096,
115
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: num_attention_heads=32,
116
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: num_hidden_layers=24,
117
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: num_key_value_heads=32,
118
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: pad_token_id=None,
119
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: pretraining_tp=1,
120
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: rms_norm_eps=1e-05,
121
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: rope_scaling=None,
122
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: rope_theta=10000.0,
123
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: tie_word_embeddings=True,
124
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: use_cache=True,
125
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: vocab_size=50258)
126
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: Building model..
127
+ [default0]:07/03/2024 23:42:40 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: Setting PP block ranks...
128
+ [default2]:07/03/2024 23:42:55 [INFO|DP=0|PP=1|TP=0|ip-26-0-169-86]: Local number of parameters: 147M (280.05MiB)
129
+ [default2]:07/03/2024 23:42:55 [INFO|DP=0|PP=1|TP=0|ip-26-0-169-86]: [After model building] Memory usage: 287.07MiB. Peak allocated: 289.10MiB Peak reserved: 302.00MiB
130
+ [default6]:07/03/2024 23:42:55 [INFO|DP=0|PP=3|TP=0|ip-26-0-169-86]: Local number of parameters: 135M (258.20MiB)
131
+ [default6]:07/03/2024 23:42:55 [INFO|DP=0|PP=3|TP=0|ip-26-0-169-86]: [After model building] Memory usage: 262.21MiB. Peak allocated: 264.24MiB Peak reserved: 280.00MiB
132
+ [default6]:07/03/2024 23:42:55 [INFO|DP=0|PP=3|TP=0|ip-26-0-169-86]: No checkpoint path provided.
133
+ [default7]:07/03/2024 23:42:55 [INFO|DP=0|PP=3|TP=1|ip-26-0-169-86]: Local number of parameters: 135M (258.20MiB)
134
+ [default7]:07/03/2024 23:42:55 [INFO|DP=0|PP=3|TP=1|ip-26-0-169-86]: [After model building] Memory usage: 262.21MiB. Peak allocated: 264.24MiB Peak reserved: 280.00MiB
135
+ [default7]:07/03/2024 23:42:55 [INFO|DP=0|PP=3|TP=1|ip-26-0-169-86]: No checkpoint path provided.
136
+ [default5]:07/03/2024 23:42:55 [INFO|DP=0|PP=2|TP=1|ip-26-0-169-86]: Local number of parameters: 126M (240.05MiB)
137
+ [default5]:07/03/2024 23:42:55 [INFO|DP=0|PP=2|TP=1|ip-26-0-169-86]: [After model building] Memory usage: 246.06MiB. Peak allocated: 248.09MiB Peak reserved: 262.00MiB
138
+ [default5]:07/03/2024 23:42:55 [INFO|DP=0|PP=2|TP=1|ip-26-0-169-86]: No checkpoint path provided.
139
+ [default1]:07/03/2024 23:42:55 [INFO|DP=0|PP=0|TP=1|ip-26-0-169-86]: Local number of parameters: 198M (378.21MiB)
140
+ [default1]:07/03/2024 23:42:55 [INFO|DP=0|PP=0|TP=1|ip-26-0-169-86]: [After model building] Memory usage: 385.23MiB. Peak allocated: 387.26MiB Peak reserved: 402.00MiB
141
+ [default1]:07/03/2024 23:42:55 [INFO|DP=0|PP=0|TP=1|ip-26-0-169-86]: No checkpoint path provided.
142
+ [default0]:07/03/2024 23:42:55 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: Total number of parameters: 1.21G (2313.02MiB)
143
+ [default0]:07/03/2024 23:42:55 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: Local number of parameters: 198M (378.21MiB)
144
+ [default0]:07/03/2024 23:42:55 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: [After model building] Memory usage: 385.23MiB. Peak allocated: 387.26MiB Peak reserved: 402.00MiB
145
+ [default0]:07/03/2024 23:42:55 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: No checkpoint path provided.
146
+ [default0]:07/03/2024 23:42:55 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: Parametrizing model parameters using StandardParametrizator
147
+ [default3]:07/03/2024 23:42:55 [INFO|DP=0|PP=1|TP=1|ip-26-0-169-86]: Local number of parameters: 147M (280.05MiB)
148
+ [default3]:07/03/2024 23:42:55 [INFO|DP=0|PP=1|TP=1|ip-26-0-169-86]: [After model building] Memory usage: 287.07MiB. Peak allocated: 289.10MiB Peak reserved: 302.00MiB
149
+ [default3]:07/03/2024 23:42:55 [INFO|DP=0|PP=1|TP=1|ip-26-0-169-86]: No checkpoint path provided.
150
+ [default4]:07/03/2024 23:42:55 [INFO|DP=0|PP=2|TP=0|ip-26-0-169-86]: Local number of parameters: 126M (240.05MiB)
151
+ [default4]:07/03/2024 23:42:55 [INFO|DP=0|PP=2|TP=0|ip-26-0-169-86]: [After model building] Memory usage: 246.06MiB. Peak allocated: 248.09MiB Peak reserved: 262.00MiB
152
+ [default4]:07/03/2024 23:42:55 [INFO|DP=0|PP=2|TP=0|ip-26-0-169-86]: No checkpoint path provided.
153
+ [default2]:07/03/2024 23:42:55 [INFO|DP=0|PP=1|TP=0|ip-26-0-169-86]: No checkpoint path provided.
154
+ [default0]:07/03/2024 23:42:57 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: [Optimizer Building] Using LearningRateForSP as learning rate
155
+ [default0]:07/03/2024 23:42:57 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: [ZeRO sharding] Size of optimizer params per rank:
156
+ [default0]:07/03/2024 23:42:57 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: [ZeRO sharding] DP Rank 0 has 198M out of 198M (100.00%) params' optimizer states
157
+ [default0]:07/03/2024 23:42:57 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: [Training Plan] Stage Training Stage has 19 remaining training steps and has consumed 0 samples
158
+ [default0]:07/03/2024 23:42:57 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: Using `datasets` library
159
+ [default0]:07/03/2024 23:42:57 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: Loading tokenizer from openai-community/gpt2 and transformers/hf_hub versions ('4.41.2', '0.23.4')
160
+ [default0]:07/03/2024 23:43:29 [WARNING|DP=0|PP=0|TP=0|ip-26-0-169-86]: Repo card metadata block was not found. Setting CardData to empty.
161
+ [default0]:Repo card metadata block was not found. Setting CardData to empty.
162
+ [default0]:07/03/2024 23:43:30 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: [Training Plan] There are 1 training stages
163
+ [default0]:07/03/2024 23:43:30 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: [Stage Training Stage] start from step 1
164
+ [default0]:07/03/2024 23:43:30 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]:
165
+ [default0]:07/03/2024 23:43:30 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: [Start training] datetime: 2024-07-03 23:43:30.460587 | mbs: 16 | grad_accum: 64 | global_batch_size: 1024 | sequence_length: 4096 | train_steps: 20 | start_iteration_step: 0 | consumed_train_samples: 0
166
+ [default0]:07/03/2024 23:43:30 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: Resuming training from stage Training Stage, it has trained for 0 samples and has 19 remaining train steps
167
+ [default0]:07/03/2024 23:43:30 [INFO|DP=0|PP=0|TP=0|ip-26-0-169-86]: Memory usage: 1898.09MiB. Peak allocated 1898.09MiB. Peak reserved: 1918.00MiB
168
+ [default1]:07/03/2024 23:43:30 [WARNING|DP=0|PP=0|TP=1|ip-26-0-169-86]: Repo card metadata block was not found. Setting CardData to empty.
169
+ [default1]:Repo card metadata block was not found. Setting CardData to empty.
170
+ [default6]:07/03/2024 23:43:30 [WARNING|DP=0|PP=3|TP=0|ip-26-0-169-86]: Repo card metadata block was not found. Setting CardData to empty.
171
+ [default7]:Repo card metadata block was not found. Setting CardData to empty.
172
+ [default3]:07/03/2024 23:43:30 [WARNING|DP=0|PP=1|TP=1|ip-26-0-169-86]: Repo card metadata block was not found. Setting CardData to empty.
173
+ [default5]:07/03/2024 23:43:30 [WARNING|DP=0|PP=2|TP=1|ip-26-0-169-86]: Repo card metadata block was not found. Setting CardData to empty.
174
+ [default2]:07/03/2024 23:43:30 [WARNING|DP=0|PP=1|TP=0|ip-26-0-169-86]: Repo card metadata block was not found. Setting CardData to empty.
175
+ [default4]:07/03/2024 23:43:30 [WARNING|DP=0|PP=2|TP=0|ip-26-0-169-86]: Repo card metadata block was not found. Setting CardData to empty.
176
+ [default7]:07/03/2024 23:43:30 [WARNING|DP=0|PP=3|TP=1|ip-26-0-169-86]: Repo card metadata block was not found. Setting CardData to empty.
177
+ [default6]:Repo card metadata block was not found. Setting CardData to empty.
178
+ [default5]:Repo card metadata block was not found. Setting CardData to empty.
179
+ [default2]:Repo card metadata block was not found. Setting CardData to empty.
180
+ [default4]:Repo card metadata block was not found. Setting CardData to empty.
181
+ [default3]:Repo card metadata block was not found. Setting CardData to empty.
182
+ [default0]:[rank0]: Traceback (most recent call last):
183
+ [default0]:[rank0]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/run_train.py", line 237, in <module>
184
+ [default0]:[rank0]: trainer.train(dataloader)
185
+ [default0]:[rank0]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/trainer.py", line 429, in train
186
+ [default0]:[rank0]: outputs, loss_avg = self.training_step(dataloader=self.current_dataloader)
187
+ [default0]:[rank0]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/trainer.py", line 462, in training_step
188
+ [default0]:[rank0]: outputs = self.pipeline_engine.train_batch_iter(
189
+ [default0]:[rank0]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/parallel/pipeline_parallel/engine.py", line 278, in train_batch_iter
190
+ [default0]:[rank0]: output = self.forward(context=context, state=state, micro_batch=micro_batch, model=model)
191
+ [default0]:[rank0]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/parallel/pipeline_parallel/engine.py", line 44, in forward
192
+ [default0]:[rank0]: output = model(**micro_batch)
193
+ [default0]:[rank0]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
194
+ [default0]:[rank0]: return self._call_impl(*args, **kwargs)
195
+ [default0]:[rank0]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
196
+ [default0]:[rank0]: return forward_call(*args, **kwargs)
197
+ [default0]:[rank0]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/models/llama.py", line 891, in forward
198
+ [default0]:[rank0]: sharded_logits = self.model(
199
+ [default0]:[rank0]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
200
+ [default0]:[rank0]: return self._call_impl(*args, **kwargs)
201
+ [default0]:[rank0]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
202
+ [default0]:[rank0]: return forward_call(*args, **kwargs)
203
+ [default0]:[rank0]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/models/llama.py", line 764, in forward
204
+ [default0]:[rank0]: return self.forward_with_hidden_states(input_ids=input_ids, input_mask=input_mask)[0]
205
+ [default0]:[rank0]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/models/llama.py", line 780, in forward_with_hidden_states
206
+ [default0]:[rank0]: hidden_encoder_states = encoder_block(**hidden_encoder_states)
207
+ [default0]:[rank0]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
208
+ [default0]:[rank0]: return self._call_impl(*args, **kwargs)
209
+ [default0]:[rank0]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
210
+ [default0]:[rank0]: return forward_call(*args, **kwargs)
211
+ [default0]:[rank0]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/parallel/pipeline_parallel/block.py", line 151, in forward
212
+ [default0]:[rank0]: output = self.pp_block(**new_kwargs)
213
+ [default0]:[rank0]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
214
+ [default0]:[rank0]: return self._call_impl(*args, **kwargs)
215
+ [default0]:[rank0]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
216
+ [default0]:[rank0]: return forward_call(*args, **kwargs)
217
+ [default0]:[rank0]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/models/llama.py", line 631, in forward
218
+ [default0]:[rank0]: output = self.attn(hidden_states=hidden_states, sequence_mask=sequence_mask)
219
+ [default0]:[rank0]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
220
+ [default0]:[rank0]: return self._call_impl(*args, **kwargs)
221
+ [default0]:[rank0]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
222
+ [default0]:[rank0]: return forward_call(*args, **kwargs)
223
+ [default0]:[rank0]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/models/llama.py", line 389, in forward
224
+ [default0]:[rank0]: .contiguous()
225
+ [default0]:[rank0]: torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 384.00 MiB. GPU
226
+ [default1]:[rank1]: Traceback (most recent call last):
227
+ [default1]:[rank1]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/run_train.py", line 237, in <module>
228
+ [default1]:[rank1]: trainer.train(dataloader)
229
+ [default1]:[rank1]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/trainer.py", line 429, in train
230
+ [default1]:[rank1]: outputs, loss_avg = self.training_step(dataloader=self.current_dataloader)
231
+ [default1]:[rank1]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/trainer.py", line 462, in training_step
232
+ [default1]:[rank1]: outputs = self.pipeline_engine.train_batch_iter(
233
+ [default1]:[rank1]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/parallel/pipeline_parallel/engine.py", line 278, in train_batch_iter
234
+ [default1]:[rank1]: output = self.forward(context=context, state=state, micro_batch=micro_batch, model=model)
235
+ [default1]:[rank1]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/parallel/pipeline_parallel/engine.py", line 44, in forward
236
+ [default1]:[rank1]: output = model(**micro_batch)
237
+ [default1]:[rank1]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
238
+ [default1]:[rank1]: return self._call_impl(*args, **kwargs)
239
+ [default1]:[rank1]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
240
+ [default1]:[rank1]: return forward_call(*args, **kwargs)
241
+ [default1]:[rank1]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/models/llama.py", line 891, in forward
242
+ [default1]:[rank1]: sharded_logits = self.model(
243
+ [default1]:[rank1]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
244
+ [default1]:[rank1]: return self._call_impl(*args, **kwargs)
245
+ [default1]:[rank1]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
246
+ [default1]:[rank1]: return forward_call(*args, **kwargs)
247
+ [default1]:[rank1]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/models/llama.py", line 764, in forward
248
+ [default1]:[rank1]: return self.forward_with_hidden_states(input_ids=input_ids, input_mask=input_mask)[0]
249
+ [default1]:[rank1]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/models/llama.py", line 780, in forward_with_hidden_states
250
+ [default1]:[rank1]: hidden_encoder_states = encoder_block(**hidden_encoder_states)
251
+ [default1]:[rank1]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
252
+ [default1]:[rank1]: return self._call_impl(*args, **kwargs)
253
+ [default1]:[rank1]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
254
+ [default1]:[rank1]: return forward_call(*args, **kwargs)
255
+ [default1]:[rank1]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/parallel/pipeline_parallel/block.py", line 151, in forward
256
+ [default1]:[rank1]: output = self.pp_block(**new_kwargs)
257
+ [default1]:[rank1]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
258
+ [default1]:[rank1]: return self._call_impl(*args, **kwargs)
259
+ [default1]:[rank1]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
260
+ [default1]:[rank1]: return forward_call(*args, **kwargs)
261
+ [default1]:[rank1]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/models/llama.py", line 631, in forward
262
+ [default1]:[rank1]: output = self.attn(hidden_states=hidden_states, sequence_mask=sequence_mask)
263
+ [default1]:[rank1]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
264
+ [default1]:[rank1]: return self._call_impl(*args, **kwargs)
265
+ [default1]:[rank1]: File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
266
+ [default1]:[rank1]: return forward_call(*args, **kwargs)
267
+ [default1]:[rank1]: File "/fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/src/nanotron/models/llama.py", line 389, in forward
268
+ [default1]:[rank1]: .contiguous()
269
+ [default1]:[rank1]: torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 384.00 MiB. GPU  has a total capacity of 79.33 GiB of which 191.94 MiB is free. Including non-PyTorch memory, this process has 79.13 GiB memory in use. Of the allocated memory 65.87 GiB is allocated by PyTorch, and 305.38 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
270
+ [default7]:/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/autograd/graph.py:744: UserWarning: c10d::allreduce_: an autograd kernel was not registered to the Autograd key(s) but we are trying to backprop through it. This may lead to silently incorrect behavior. This behavior is deprecated and will be removed in a future version of PyTorch. If your operator is differentiable, please ensure you have registered an autograd kernel to the correct Autograd key (e.g. DispatchKey::Autograd, DispatchKey::CompositeImplicitAutograd). If your operator is not differentiable, or to squash this warning and use the previous behavior, please register torch::CppFunction::makeFallthrough() to DispatchKey::Autograd. (Triggered internally at ../torch/csrc/autograd/autograd_not_implemented_fallback.cpp:63.)
271
+ [default7]: return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
272
+ [default6]:/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/autograd/graph.py:744: UserWarning: c10d::allreduce_: an autograd kernel was not registered to the Autograd key(s) but we are trying to backprop through it. This may lead to silently incorrect behavior. This behavior is deprecated and will be removed in a future version of PyTorch. If your operator is differentiable, please ensure you have registered an autograd kernel to the correct Autograd key (e.g. DispatchKey::Autograd, DispatchKey::CompositeImplicitAutograd). If your operator is not differentiable, or to squash this warning and use the previous behavior, please register torch::CppFunction::makeFallthrough() to DispatchKey::Autograd. (Triggered internally at ../torch/csrc/autograd/autograd_not_implemented_fallback.cpp:63.)
273
+ [default6]: return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
274
+ [default5]:/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/autograd/graph.py:744: UserWarning: c10d::allreduce_: an autograd kernel was not registered to the Autograd key(s) but we are trying to backprop through it. This may lead to silently incorrect behavior. This behavior is deprecated and will be removed in a future version of PyTorch. If your operator is differentiable, please ensure you have registered an autograd kernel to the correct Autograd key (e.g. DispatchKey::Autograd, DispatchKey::CompositeImplicitAutograd). If your operator is not differentiable, or to squash this warning and use the previous behavior, please register torch::CppFunction::makeFallthrough() to DispatchKey::Autograd. (Triggered internally at ../torch/csrc/autograd/autograd_not_implemented_fallback.cpp:63.)
275
+ [default5]: return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
276
+ [default4]:/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/autograd/graph.py:744: UserWarning: c10d::allreduce_: an autograd kernel was not registered to the Autograd key(s) but we are trying to backprop through it. This may lead to silently incorrect behavior. This behavior is deprecated and will be removed in a future version of PyTorch. If your operator is differentiable, please ensure you have registered an autograd kernel to the correct Autograd key (e.g. DispatchKey::Autograd, DispatchKey::CompositeImplicitAutograd). If your operator is not differentiable, or to squash this warning and use the previous behavior, please register torch::CppFunction::makeFallthrough() to DispatchKey::Autograd. (Triggered internally at ../torch/csrc/autograd/autograd_not_implemented_fallback.cpp:63.)
277
+ [default4]: return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
278
+ W0703 23:43:44.803000 140246879086400 torch/distributed/elastic/multiprocessing/api.py:851] Sending process 2277591 closing signal SIGTERM
279
+ W0703 23:43:44.803000 140246879086400 torch/distributed/elastic/multiprocessing/api.py:851] Sending process 2277592 closing signal SIGTERM
280
+ W0703 23:43:44.804000 140246879086400 torch/distributed/elastic/multiprocessing/api.py:851] Sending process 2277593 closing signal SIGTERM
281
+ W0703 23:43:44.805000 140246879086400 torch/distributed/elastic/multiprocessing/api.py:851] Sending process 2277594 closing signal SIGTERM
282
+ W0703 23:43:44.806000 140246879086400 torch/distributed/elastic/multiprocessing/api.py:851] Sending process 2277595 closing signal SIGTERM
283
+ W0703 23:43:44.807000 140246879086400 torch/distributed/elastic/multiprocessing/api.py:851] Sending process 2277596 closing signal SIGTERM
284
+ E0703 23:43:47.042000 140246879086400 torch/distributed/elastic/multiprocessing/api.py:826] failed (exitcode: 1) local_rank: 0 (pid: 2277589) of binary: /fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/bin/python3.10
285
+ Traceback (most recent call last):
286
+ File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/bin/torchrun", line 8, in <module>
287
+ sys.exit(main())
288
+ File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/distributed/elastic/multiprocessing/errors/__init__.py", line 347, in wrapper
289
+ return f(*args, **kwargs)
290
+ File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/distributed/run.py", line 879, in main
291
+ run(args)
292
+ File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/distributed/run.py", line 870, in run
293
+ elastic_launch(
294
+ File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/distributed/launcher/api.py", line 132, in __call__
295
+ return launch_agent(self._config, self._entrypoint, list(args))
296
+ File "/fsx/ferdinandmom/miniforge3/envs/env-bench-cluster/lib/python3.10/site-packages/torch/distributed/launcher/api.py", line 263, in launch_agent
297
+ raise ChildFailedError(
298
+ torch.distributed.elastic.multiprocessing.errors.ChildFailedError:
299
+ ============================================================
300
+ /fsx/ferdinandmom/ferdinand-hf/bench_cluster/nanotron/run_train.py FAILED
301
+ ------------------------------------------------------------
302
+ Failures:
303
+ [1]:
304
+ time : 2024-07-03_23:43:44
305
+ host : ip-26-0-169-86.ec2.internal
306
+ rank : 1 (local_rank: 1)
307
+ exitcode : 1 (pid: 2277590)
308
+ error_file: <N/A>
309
+ traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
310
+ ------------------------------------------------------------
311
+ Root Cause (first observed failure):
312
+ [0]:
313
+ time : 2024-07-03_23:43:44
314
+ host : ip-26-0-169-86.ec2.internal
315
+ rank : 0 (local_rank: 0)
316
+ exitcode : 1 (pid: 2277589)
317
+ error_file: <N/A>
318
+ traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
319
+ ============================================================
320
+ srun: error: ip-26-0-169-86: task 0: Exited with exit code 1
321
+ Consider using `hf_transfer` for faster uploads. This solution comes with some limitations. See https://huggingface.co/docs/huggingface_hub/hf_transfer for more details.
llama-1B/8_GPUS/dp-1_tp-2_pp-4_mbz-16/status.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ oom