This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Rel Eng] Dial In LM Eval Tests Phase 1 (#289)
WAIT UNTIL UPSTREAM SYNC LANDS TO MERGE SUMMARY: * refactored lm-eval workflows to use a single script for generating a baseline * refactored lm-eval workflows to accept a config file so we can parameterize for the different length runs * added configuration for `remote-push` -> running `llama-3-8b` on 250 GSM prompts * removed lm-eval-smoke such that we have one single pathway for running lm-eval tests
- Loading branch information
1 parent
39e484e
commit 7c46a95
Showing
15 changed files
with
233 additions
and
299 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
# We can use this script to compute baseline accuracy on GSM for transformers. | ||
# | ||
# Make sure you have lm-eval-harness installed: | ||
# pip install git+https://github.com/EleutherAI/lm-evaluation-harness.git@9516087b81a61d0e220b22cc1b75be76de23bc10 | ||
|
||
usage() { | ||
echo`` | ||
echo "Runs lm eval harness on GSM8k using huggingface transformers." | ||
echo "This pathway is intended to be used to create baselines for " | ||
echo "our automated nm-test-accuracy workflow" | ||
echo | ||
echo "usage: ${0} <options>" | ||
echo | ||
echo " -m - huggingface stub or local directory of the model" | ||
echo " -b - batch size to run the evaluation at" | ||
echo " -d - device to use (e.g. cuda, cuda:0, auto, cpu)" | ||
echo " -l - limit number of samples to run" | ||
echo " -f - number of fewshot samples to use" | ||
echo | ||
} | ||
|
||
while getopts "m:b:d:l:f:" OPT; do | ||
case ${OPT} in | ||
m ) | ||
MODEL="$OPTARG" | ||
;; | ||
b ) | ||
BATCH_SIZE="$OPTARG" | ||
;; | ||
d ) | ||
DEVICE="$OPTARG" | ||
;; | ||
l ) | ||
LIMIT="$OPTARG" | ||
;; | ||
f ) | ||
FEWSHOT="$OPTARG" | ||
;; | ||
\? ) | ||
usage | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
lm_eval --model hf \ | ||
--model_args pretrained=$MODEL \ | ||
--tasks gsm8k --num_fewshot $FEWSHOT --limit $LIMIT \ | ||
--batch_size $BATCH_SIZE --device $DEVICE |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
# We can use this script to compute baseline accuracy on GSM for transformers. | ||
# | ||
# Make sure you have lm-eval-harness installed: | ||
# pip install git+https://github.com/EleutherAI/lm-evaluation-harness.git@9516087b81a61d0e220b22cc1b75be76de23bc10 | ||
|
||
usage() { | ||
echo`` | ||
echo "Runs lm eval harness on GSM8k using vllm server and compares to " | ||
echo "precomputed baseline (measured by HF transformers." | ||
echo | ||
echo "usage: ${0} <options>" | ||
echo | ||
echo " -c - path to the test data config (e.g. neuralmagic/lm-eval/YOUR_CONFIG.yaml)" | ||
echo | ||
} | ||
|
||
while getopts "c:" OPT; do | ||
case ${OPT} in | ||
c ) | ||
CONFIG="$OPTARG" | ||
;; | ||
\? ) | ||
usage | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
LM_EVAL_TEST_DATA_FILE=$CONFIG pytest -v tests/accuracy/test_lm_eval_correctness.py |
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.