Skip to content

Commit

Permalink
Add eval config for QWEN2_5 model using 0.5B variant (#2230)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankur-singh authored Jan 5, 2025
1 parent 9fd1ead commit 213f386
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
41 changes: 41 additions & 0 deletions recipes/configs/qwen2_5/evaluation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Config for EleutherEvalRecipe in eleuther_eval.py
#
# To launch, run the following command from root torchtune directory:
# tune run eleuther_eval --config eleuther_evaluation tasks=["truthfulqa_mc2","hellaswag"]

output_dir: ./ # Not needed

# Model Arguments
model:
_component_: torchtune.models.qwen2_5.qwen2_5_0_5b

checkpointer:
_component_: torchtune.training.FullModelHFCheckpointer
checkpoint_dir: /tmp/Qwen2_5-0_5B-Instruct
checkpoint_files: [
model.safetensors,
]
output_dir: ${output_dir}
model_type: QWEN2

# Tokenizer
tokenizer:
_component_: torchtune.models.qwen2_5.qwen2_5_tokenizer
path: /tmp/Qwen2_5-0_5B-Instruct/vocab.json
merges_file: /tmp/Qwen2_5-0_5B-Instruct/merges.txt
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 @@ -457,6 +457,10 @@ class Recipe:
name="qwen2/evaluation",
file_path="qwen2/evaluation.yaml",
),
Config(
name="qwen2_5/evaluation",
file_path="qwen2_5/evaluation.yaml",
),
Config(
name="gemma/evaluation",
file_path="gemma/evaluation.yaml",
Expand Down

0 comments on commit 213f386

Please sign in to comment.