Skip to content

Commit 2c948c6

Browse files
krammnickrammnic
andauthored
Expose packed: False, set log_peak_memory_stats: True, set compile: False (#1872)
Co-authored-by: krammnic <krammnic@krammnic.krammnic.com>
1 parent 33b8143 commit 2c948c6

File tree

93 files changed

+275
-117
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+275
-117
lines changed

recipes/configs/code_llama2/7B_full_low_memory.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ resume_from_checkpoint: False
4545

4646
# Dataset
4747
dataset:
48+
packed: False # Set to true for great speed ups
4849
_component_: torchtune.datasets.alpaca_dataset
50+
4951
seed: null
5052
shuffle: True
5153

@@ -75,4 +77,4 @@ metric_logger:
7577
_component_: torchtune.training.metric_logging.DiskLogger
7678
log_dir: /tmp/CodeLlama-7b-hf/logs
7779
log_every_n_steps: 1
78-
log_peak_memory_stats: False
80+
log_peak_memory_stats: True

recipes/configs/code_llama2/7B_lora_single_device.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ save_adapter_weights_only: False
4949

5050
# Dataset
5151
dataset:
52+
packed: False # Set to true for great speed ups
5253
_component_: torchtune.datasets.alpaca_cleaned_dataset
54+
5355
seed: null
5456
shuffle: True
5557

@@ -84,7 +86,7 @@ metric_logger:
8486
_component_: torchtune.training.metric_logging.DiskLogger
8587
log_dir: /tmp/CodeLlama-7b-hf/logs
8688
log_every_n_steps: 1
87-
log_peak_memory_stats: False
89+
log_peak_memory_stats: True
8890

8991
# Showcase the usage of PyTorch profiler
9092
# Set enabled to False as it's only needed for debugging training

recipes/configs/code_llama2/7B_qlora_single_device.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ save_adapter_weights_only: False
4949

5050
# Dataset
5151
dataset:
52+
packed: False # Set to true for great speed ups
5253
_component_: torchtune.datasets.alpaca_cleaned_dataset
5354
seed: null
5455
shuffle: True
@@ -84,7 +85,7 @@ metric_logger:
8485
_component_: torchtune.training.metric_logging.DiskLogger
8586
log_dir: /tmp/CodeLlama-7b-hf/logs
8687
log_every_n_steps: 1
87-
log_peak_memory_stats: False
88+
log_peak_memory_stats: True
8889

8990
# Show case the usage of pytorch profiler
9091
# Set enabled to False as it's only needed for debugging training

recipes/configs/dev/8B_full_experimental.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ tokenizer:
2626

2727
# Dataset
2828
dataset:
29+
packed: False # Set to true for great speed ups
2930
_component_: torchtune.datasets.alpaca_dataset
3031
seed: null
3132
shuffle: True
@@ -57,7 +58,7 @@ loss:
5758
_component_: torchtune.modules.loss.CEWithChunkedOutputLoss
5859
max_steps_per_epoch: null
5960
gradient_accumulation_steps: 1
60-
61+
compile: False
6162

6263
# Training env
6364
device: cuda
@@ -78,3 +79,4 @@ metric_logger:
7879
log_dir: ${output_dir}
7980
output_dir: /tmp/alpaca-llama3-finetune
8081
log_every_n_steps: null
82+
log_peak_memory_stats: True

recipes/configs/gemma/2B_full.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ tokenizer:
2323

2424
# Dataset
2525
dataset:
26+
packed: False # Set to true for great speed ups
2627
_component_: torchtune.datasets.alpaca_dataset
2728
seed: null
2829
shuffle: True
@@ -54,6 +55,7 @@ loss:
5455
_component_: torchtune.modules.loss.CEWithChunkedOutputLoss
5556
max_steps_per_epoch: null
5657
gradient_accumulation_steps: 1
58+
compile: False
5759

5860
# Training env
5961
device: cuda
@@ -70,4 +72,4 @@ metric_logger:
7072
log_dir: ${output_dir}
7173
output_dir: /tmp/alpaca-gemma-finetune
7274
log_every_n_steps: 1
73-
log_peak_memory_stats: False
75+
log_peak_memory_stats: True

recipes/configs/gemma/2B_lora.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ tokenizer:
2222

2323
# Dataset
2424
dataset:
25+
packed: False # Set to true for great speed ups
2526
_component_: torchtune.datasets.alpaca_dataset
2627
seed: null
2728
shuffle: True
@@ -66,6 +67,7 @@ batch_size: 4
6667
epochs: 3
6768
max_steps_per_epoch: null
6869
gradient_accumulation_steps: 1
70+
compile: False
6971

7072
# Training env
7173
device: cuda
@@ -82,4 +84,4 @@ metric_logger:
8284
log_dir: ${output_dir}
8385
output_dir: /tmp/alpaca-gemma-lora
8486
log_every_n_steps: 1
85-
log_peak_memory_stats: False
87+
log_peak_memory_stats: True

recipes/configs/gemma/2B_lora_single_device.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ tokenizer:
2222

2323
# Dataset
2424
dataset:
25+
packed: False # Set to true for great speed ups
2526
_component_: torchtune.datasets.alpaca_dataset
2627
seed: null
2728
shuffle: True
@@ -83,7 +84,7 @@ metric_logger:
8384
log_dir: ${output_dir}
8485
output_dir: /tmp/alpaca-gemma-lora
8586
log_every_n_steps: 1
86-
log_peak_memory_stats: False
87+
log_peak_memory_stats: True
8788

8889
# Show case the usage of pytorch profiler
8990
# Set enabled to False as it's only needed for debugging training

recipes/configs/gemma/2B_qlora_single_device.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ tokenizer:
2222

2323
# Dataset
2424
dataset:
25+
packed: False # Set to true for great speed ups
2526
_component_: torchtune.datasets.alpaca_dataset
2627
seed: null
2728
shuffle: True
@@ -83,7 +84,7 @@ metric_logger:
8384
log_dir: ${output_dir}
8485
output_dir: /tmp/alpaca-gemma-lora
8586
log_every_n_steps: 1
86-
log_peak_memory_stats: False
87+
log_peak_memory_stats: True
8788

8889
# Show case the usage of pytorch profiler
8990
# Set enabled to False as it's only needed for debugging training

recipes/configs/gemma/7B_full.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ tokenizer:
2323

2424
# Dataset
2525
dataset:
26+
packed: False # Set to true for great speed ups
2627
_component_: torchtune.datasets.alpaca_dataset
2728
seed: null
2829
shuffle: True
@@ -56,6 +57,7 @@ loss:
5657
_component_: torchtune.modules.loss.CEWithChunkedOutputLoss
5758
max_steps_per_epoch: null
5859
gradient_accumulation_steps: 1
60+
compile: False
5961

6062
# Training env
6163
device: cuda
@@ -72,4 +74,4 @@ metric_logger:
7274
log_dir: ${output_dir}
7375
output_dir: /tmp/alpaca-gemma-finetune
7476
log_every_n_steps: 1
75-
log_peak_memory_stats: False
77+
log_peak_memory_stats: True

recipes/configs/gemma/7B_lora.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ tokenizer:
2323

2424
# Dataset
2525
dataset:
26+
packed: False # Set to true for great speed ups
2627
_component_: torchtune.datasets.alpaca_dataset
2728
seed: null
2829
shuffle: True
@@ -68,6 +69,7 @@ batch_size: 4
6869
epochs: 3
6970
max_steps_per_epoch: null
7071
gradient_accumulation_steps: 1
72+
compile: False
7173

7274
# Training env
7375
device: cuda
@@ -84,4 +86,4 @@ metric_logger:
8486
log_dir: ${output_dir}
8587
output_dir: /tmp/alpaca-gemma-lora
8688
log_every_n_steps: 1
87-
log_peak_memory_stats: False
89+
log_peak_memory_stats: True

0 commit comments

Comments
 (0)