Skip to content

Commit

Permalink
fix configs
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikayk committed Apr 26, 2024
1 parent 14c729d commit 50b8ce6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
14 changes: 5 additions & 9 deletions recipes/configs/phi3/mini_full.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Config for multi-device full finetuning in full_finetune_distributed.py
# using a Phi3 Mini 4K Instruct
#
# This config uses hyperparameters based on small set of experiments and information
# available on various forums. These are not meant to replicate the numbers
# from the paper
#
# This config assumes that you've run the following command before launching
# this run:
# tune download microsoft/Phi-3-mini-4k-instruct --output-dir ./Phi-3-mini-4k-instruct --hf-token <HF_TOKEN> --ignore-patterns ""
Expand All @@ -19,12 +15,12 @@
#
# This config works best when the model is being fine-tuned on 2+ GPUs.
# Single device full finetuning requires more memory optimizations. It's
# best to use 7B_full_single_device.yaml for those cases
# best to use mini_low_memory.yaml for those cases

# Tokenizer
tokenizer:
_component_: torchtune.models.phi3.phi3_tokenizer
path: /data/users/kartikayk/cpts/Phi-3-mini-4k-instruct/tokenizer.model
path: /tmp/cpts/Phi-3-mini-4k-instruct/tokenizer.model

# Dataset
dataset:
Expand All @@ -39,13 +35,13 @@ model:

checkpointer:
_component_: torchtune.utils.FullModelHFCheckpointer
checkpoint_dir: /data/users/kartikayk/cpts/Phi-3-mini-4k-instruct
checkpoint_dir: /tmp/Phi-3-mini-4k-instruct
checkpoint_files: [
model-00001-of-00002.safetensors,
model-00002-of-00002.safetensors
]
recipe_checkpoint: null
output_dir: /data/users/kartikayk/cpts/Phi-3-mini-4k-instruct
output_dir: /tmp/Phi-3-mini-4k-instruct
model_type: PHI3_MINI
resume_from_checkpoint: False

Expand Down Expand Up @@ -74,5 +70,5 @@ dtype: bf16
metric_logger:
_component_: torchtune.utils.metric_logging.DiskLogger
log_dir: ${output_dir}
output_dir: /tmp/Mistral-7B-v0.1/
output_dir: /tmp/Phi-3-mini-4k-instruct
log_every_n_steps: null
16 changes: 6 additions & 10 deletions recipes/configs/phi3/mini_full_low_memory.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Config for single device full finetuning in full_finetune_single_device.py
# using a Phi3 Mini 4K Instruct
#
# This config uses hyperparameters based on small set of experiments and information
# available on various forums. These are not meant to replicate the numbers
# from the paper
#
# This config assumes that you've run the following command before launching
# this run:
# tune download microsoft/Phi-3-mini-4k-instruct --output-dir ./Phi-3-mini-4k-instruct --hf-token <HF_TOKEN> --ignore-patterns ""
Expand All @@ -14,19 +10,19 @@
# pip install bitsandbytes
#
# To launch on a single device, run the following command from root:
# tune run full_finetune_single_device --config recipes/config/phi3/mini_full_low_memory.yaml
# tune run full_finetune_single_device --config recipes/configs/phi3/mini_full_low_memory.yaml
#
# You can add specific overrides through the command line. For example
# to override the checkpointer directory while launching training
# you can run:
# tune run full_finetune_single_device --config recipes/config/phi3/mini_full_low_memory.yaml checkpointer.checkpoint_dir=<YOUR_CHECKPOINT_DIR>
# tune run full_finetune_single_device --config recipes/configs/phi3/mini_full_low_memory.yaml checkpointer.checkpoint_dir=<YOUR_CHECKPOINT_DIR>
#
# This config works only for training on single device.

# Tokenizer
tokenizer:
_component_: torchtune.models.phi3.phi3_tokenizer
path: /data/users/kartikayk/cpts/Phi-3-mini-4k-instruct/tokenizer.model
path: /tmp/Phi-3-mini-4k-instruct/tokenizer.model

# Dataset
dataset:
Expand All @@ -41,13 +37,13 @@ model:

checkpointer:
_component_: torchtune.utils.FullModelHFCheckpointer
checkpoint_dir: /data/users/kartikayk/cpts/Phi-3-mini-4k-instruct
checkpoint_dir: /tmp/Phi-3-mini-4k-instruct
checkpoint_files: [
model-00001-of-00002.safetensors,
model-00002-of-00002.safetensors
]
recipe_checkpoint: null
output_dir: /data/users/kartikayk/cpts/Phi-3-mini-4k-instruct
output_dir: /tmp/Phi-3-mini-4k-instruct
model_type: PHI3_MINI
resume_from_checkpoint: False

Expand Down Expand Up @@ -79,5 +75,5 @@ compile: False
metric_logger:
_component_: torchtune.utils.metric_logging.DiskLogger
log_dir: ${output_dir}
output_dir: /tmp/Mistral-7B-v0.1/
output_dir: /tmp/Phi-3-mini-4k-instruct
log_every_n_steps: null

0 comments on commit 50b8ce6

Please sign in to comment.