-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update evals pipeline to accommodate official multilingual eval set (#12
) * Specify python3 in Makefile * Copy over the rewardbench CLI to repo * Fix how custom preference dataset is loaded * Update rewardbench script to include subsets * Update experiment script * Run isort on scripts * Fix run_generative to use new dataset * Update experiment script * Fix API for loading the dataset * Fix import name * Fix incorrect args name * Keep ID in the columns * Fix minor changes from previous preferences * Add Aya models for the API * Update README * Comprehensive saving of results * Use dashes as separators
- Loading branch information
1 parent
8555da7
commit a6638f4
Showing
8 changed files
with
699 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,76 @@ | ||
python3 -m scripts/run_generative.py \ | ||
--dataset_name ljvmiranda921/ultrafeedback-multilingual-dpo-test \ | ||
--model gpt-4-turbo-2024-04-09 \ | ||
--split test | ||
python3 -m scripts/run_generative.py \ | ||
--dataset_name ljvmiranda921/ultrafeedback-english-dpo-test \ | ||
--model gpt-4-turbo-2024-04-09 \ | ||
--split test | ||
#!/bin/bash | ||
|
||
# Function to display usage information | ||
usage() { | ||
echo "Usage: $0 [MODEL] [DATASET] [OUTDIR]" | ||
echo " MODEL - The model to evaluate (required)" | ||
echo " DATASET - The dataset to use (optional, default is 'aya-rm-multilingual/multilingual-reward-bench')" | ||
echo " OUTDIR - The output directory (optional, default is 'output/')" | ||
exit 1 | ||
} | ||
|
||
# Default values for arguments | ||
MODEL="" | ||
DATASET="aya-rm-multilingual/multilingual-reward-bench" | ||
OUTDIR="output/" | ||
|
||
# Check and assign arguments if provided | ||
if [ $# -gt 3 ]; then | ||
echo "Error: Too many arguments." | ||
usage | ||
elif [ $# -ge 1 ]; then | ||
MODEL=$1 | ||
fi | ||
|
||
if [ $# -ge 2 ]; then | ||
DATASET=$2 | ||
fi | ||
|
||
if [ $# -ge 3 ]; then | ||
OUTDIR=$3 | ||
fi | ||
|
||
# Ensure the model is provided | ||
if [ -z "$MODEL" ]; then | ||
echo "Error: MODEL is required." | ||
usage | ||
fi | ||
|
||
# Define the languages and their FLORES-200 codes | ||
declare -A languages=( | ||
["arb_Arab"]="Arabic" | ||
["zho_Hans"]="Chinese_Simplified" | ||
["zho_Hant"]="Chinese_Traditional" | ||
["ces_Latn"]="Czech" | ||
["nld_Latn"]="Dutch" | ||
["fra_Latn"]="French" | ||
["deu_Latn"]="German" | ||
["ell_Grek"]="Greek" | ||
["heb_Hebr"]="Hebrew" | ||
["hin_Deva"]="Hindi" | ||
["ind_Latn"]="Indonesian" | ||
["ita_Latn"]="Italian" | ||
["jpn_Jpan"]="Japanese" | ||
["kor_Hang"]="Korean" | ||
["pes_Arab"]="Persian" | ||
["pol_Latn"]="Polish" | ||
["por_Latn"]="Portuguese" | ||
["ron_Latn"]="Romanian" | ||
["rus_Cyrl"]="Russian" | ||
["spa_Latn"]="Spanish" | ||
["tur_Latn"]="Turkish" | ||
["ukr_Cyrl"]="Ukrainian" | ||
["vie_Latn"]="Vietnamese" | ||
) | ||
|
||
for lang_code in "${!languages[@]}"; do | ||
python3 scripts/run_generative.py \ | ||
--model "$MODEL" \ | ||
--dataset "$DATASET" \ | ||
--lang_code "$lang_code" \ | ||
--split "filtered" \ | ||
--output_dir "$OUTDIR" \ | ||
--include_languages "${languages[$lang_code]}" "English" \ | ||
--trust_remote_code \ | ||
--save_all | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.