Skip to content

Commit

Permalink
modularization + better logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Mello committed Dec 2, 2024
1 parent fc6cfbe commit 01bc4be
Show file tree
Hide file tree
Showing 4 changed files with 233 additions and 177 deletions.
11 changes: 6 additions & 5 deletions recipes/configs/llama3_2/1B_full_single_device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@
#
# This config works only for training on single device.

output_dir: /tmp/felipe/llama_3_2_1b/full_single_device
output_dir: /tmp/llama_3_2_1b/full_single_device

# Model Arguments
model:
_component_: torchtune.models.llama3_2.llama3_2_1b

# Tokenizer
tokenizer:
_component_: torchtune.models.llama3.llama3_tokenizer
path: ${output_dir}/original/tokenizer.model
path: /tmp/Llama-3.2-1B-Instruct/original/tokenizer.model
max_seq_len: null

# Dataset
Expand All @@ -34,9 +38,6 @@ dataset:
seed: null
shuffle: True

# Model Arguments
model:
_component_: torchtune.models.llama3_2.llama3_2_1b

checkpointer:
_component_: torchtune.training.FullModelHFCheckpointer
Expand Down
6 changes: 3 additions & 3 deletions recipes/configs/llama3_2/1B_lora_single_device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
# This config works only for training on single device.

output_dir: /tmp/felipe/llama_3_2_1b/lora_single_device
output_dir: /tmp/llama_3_2_1b/lora_single_device

# Model Arguments
model:
Expand All @@ -29,14 +29,14 @@ model:
# Tokenizer
tokenizer:
_component_: torchtune.models.llama3.llama3_tokenizer
path: ${output_dir}/original/tokenizer.model
path: /tmp/Llama-3.2-1B-Instruct/original/tokenizer.model
max_seq_len: null

checkpointer:
_component_: torchtune.training.FullModelHFCheckpointer
checkpoint_dir: /tmp/Llama-3.2-1B-Instruct/
checkpoint_files: [
model.safetensors
epoch_2/ft-model-00001-of-00001.safetensors
]
recipe_checkpoint: null
output_dir: ${output_dir}
Expand Down
Loading

0 comments on commit 01bc4be

Please sign in to comment.