Skip to content

Commit

Permalink
Add evaluation configs under phi3 dir (pytorch#1822)
Browse files Browse the repository at this point in the history
Co-authored-by: abdullah-ibm <[email protected]>
  • Loading branch information
Harthi7 and abdullah-ibm authored Oct 14, 2024
1 parent 7bbaa89 commit 918c053
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
42 changes: 42 additions & 0 deletions recipes/configs/phi3/evaluation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Config for EleutherEvalRecipe in eleuther_eval.py
#
# To launch, run the following command:
# tune run eleuther_eval --config phi3/evaluation

# Model Arguments
model:
_component_: torchtune.models.phi3.phi3_mini

# Checkpointer
checkpointer:
_component_: torchtune.training.FullModelHFCheckpointer
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: /tmp/Phi-3-mini-4k-instruct
model_type: PHI3_MINI
resume_from_checkpoint: False

# Tokenizer
tokenizer:
_component_: torchtune.models.phi3.phi3_mini_tokenizer
path: /tmp/Phi-3-mini-4k-instruct/tokenizer.model
max_seq_len: null

# Environment
device: cuda
dtype: bf16
seed: 1234 # It is not recommended to change this seed, b/c it matches EleutherAI's default seed

# EleutherAI specific eval args
tasks: ["truthfulqa_mc2"]
limit: null
max_seq_length: 4096
batch_size: 8
enable_kv_cache: True

# Quantization specific args
quantizer: null
4 changes: 4 additions & 0 deletions torchtune/_recipe_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ class Recipe:
name="gemma/evaluation",
file_path="gemma/evaluation.yaml",
),
Config(
name="phi3/evaluation",
file_path="phi3/evaluation.yaml",
),
],
supports_distributed=False,
),
Expand Down

0 comments on commit 918c053

Please sign in to comment.