Skip to content

Commit ea2ad10

Browse files
committed
Merge branch 'main' of github.com:pytorch/torchtune into pytorch-main
2 parents b1e0666 + aa8f365 commit ea2ad10

Some content is hidden

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

43 files changed

+814
-508
lines changed

docs/source/deep_dives/checkpointer.rst

Lines changed: 166 additions & 134 deletions
Large diffs are not rendered by default.

docs/source/tutorials/e2e_flow.rst

Lines changed: 332 additions & 269 deletions
Large diffs are not rendered by default.

recipes/configs/eleuther_evaluation.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# To launch, run the following command from root torchtune directory:
44
# tune run eleuther_eval --config eleuther_evaluation tasks=["truthfulqa_mc2","hellaswag"]
55

6+
output_dir: ./ # Not needed
7+
68
# Model Arguments
79
model:
810
_component_: torchtune.models.llama2.llama2_7b
@@ -14,7 +16,7 @@ checkpointer:
1416
pytorch_model-00001-of-00002.bin,
1517
pytorch_model-00002-of-00002.bin,
1618
]
17-
output_dir: /tmp/Llama-2-7b-hf
19+
output_dir: ${output_dir}
1820
model_type: LLAMA2
1921

2022
# Tokenizer

recipes/configs/gemma/evaluation.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# To launch, run the following command:
44
# tune run eleuther_eval --config gemma/evaluation
55

6+
output_dir: ./ # Not needed
7+
68
# Model Arguments
79
model:
810
_component_: torchtune.models.gemma.gemma_2b
@@ -15,7 +17,7 @@ checkpointer:
1517
model-00001-of-00002.safetensors,
1618
model-00002-of-00002.safetensors,
1719
]
18-
output_dir: ./ # Not needed
20+
output_dir: ${output_dir}
1921
model_type: GEMMA
2022

2123
# Tokenizer

recipes/configs/generation.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# To launch, run the following command from root torchtune directory:
44
# tune run generate --config generation
55

6+
output_dir: ./ # Not needed
7+
68
# Model arguments
79
model:
810
_component_: torchtune.models.llama2.llama2_7b
@@ -14,7 +16,7 @@ checkpointer:
1416
pytorch_model-00001-of-00002.bin,
1517
pytorch_model-00002-of-00002.bin,
1618
]
17-
output_dir: /tmp/Llama-2-7b-hf/
19+
output_dir: ${output_dir}
1820
model_type: LLAMA2
1921

2022
device: cuda

recipes/configs/llama2/7B_lora_dpo.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ model:
3232
tokenizer:
3333
_component_: torchtune.models.llama2.llama2_tokenizer
3434
path: /tmp/Llama-2-7b-hf/tokenizer.model
35-
max_seq_len: 1024
35+
max_seq_len: 1024 # higher increases memory
3636

3737
checkpointer:
3838
_component_: torchtune.training.FullModelHFCheckpointer

recipes/configs/llama2/7B_lora_dpo_single_device.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ model:
3131
tokenizer:
3232
_component_: torchtune.models.llama2.llama2_tokenizer
3333
path: /tmp/Llama-2-7b-hf/tokenizer.model
34-
max_seq_len: 1024
34+
max_seq_len: 1024 # higher increases memory
3535

3636
checkpointer:
3737
_component_: torchtune.training.FullModelHFCheckpointer

recipes/configs/llama2/generation_v2.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# To launch, run the following command:
77
# tune run dev/generate_v2 --config llama2/generation_v2
88

9+
output_dir: ./ # Not needed
10+
911
# Model arguments
1012
model:
1113
_component_: torchtune.models.llama2.llama2_7b
@@ -24,7 +26,7 @@ checkpointer:
2426
pytorch_model-00001-of-00002.bin,
2527
pytorch_model-00002-of-00002.bin
2628
]
27-
output_dir: ./
29+
output_dir: ${output_dir}
2830
model_type: LLAMA2
2931

3032
# Device

recipes/configs/llama3/8B_qat_lora.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ dtype: bf16
8383
enable_activation_checkpointing: False # True reduces memory
8484
enable_activation_offloading: False # True reduces memory
8585

86+
# QAT arguments
87+
quantizer:
88+
_component_: torchtune.training.quantization.Int8DynActInt4WeightQATQuantizer
89+
groupsize: 256
8690

8791
# Profiler (disabled)
8892
profiler:
@@ -108,8 +112,3 @@ profiler:
108112
warmup_steps: 3
109113
active_steps: 2
110114
num_cycles: 1
111-
112-
# QAT arguments
113-
quantizer:
114-
_component_: torchtune.training.quantization.Int8DynActInt4WeightQATQuantizer
115-
groupsize: 256

recipes/configs/llama3_1/8B_lora_dpo.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ model:
3232
tokenizer:
3333
_component_: torchtune.models.llama3.llama3_tokenizer
3434
path: /tmp/Meta-Llama-3.1-8B-Instruct/original/tokenizer.model
35-
max_seq_len: null
35+
max_seq_len: 1024 # higher increases memory
3636

3737
checkpointer:
3838
_component_: torchtune.training.FullModelHFCheckpointer

0 commit comments

Comments
 (0)