main
md 40 lines 1.24 KB
Rendered Raw
1 # GSM8K Accuracy Evaluation
2
3 This directory contains a replacement for the lm-eval-harness GSM8K evaluation, using an isolated GSM8K script and vLLM server for better performance and control.
4
5 ## Usage
6
7 ### Run tests with pytest (like buildkite)
8
9 ```bash
10 pytest -s -v tests/evals/gsm8k/test_gsm8k_correctness.py \
11 --config-list-file=configs/models-small.txt
12 ```
13
14 ### Run standalone evaluation script
15
16 ```bash
17 # Start vLLM server first
18 vllm serve Qwen/Qwen2.5-1.5B-Instruct --port 8000
19
20 # Run evaluation
21 python tests/evals/gsm8k/gsm8k_eval.py --port 8000
22 ```
23
24 ## Configuration Format
25
26 Model configs in `configs/` directory use this YAML format:
27
28 ```yaml
29 model_name: "Qwen/Qwen2.5-1.5B-Instruct"
30 accuracy_threshold: 0.54 # Minimum expected accuracy
31 num_questions: 1319 # Number of questions (default: full test set)
32 num_fewshot: 5 # Few-shot examples from train set
33 server_args: "--max-model-len 4096 --tensor-parallel-size 2 --moe-backend flashinfer_cutlass" # Server arguments
34 env: # Environment variables (optional)
35 VLLM_LOGGING_LEVEL: "DEBUG"
36 ```
37
38 The `server_args` field accepts any arguments that can be passed to `vllm serve`.
39
40 The `env` field accepts a dictionary of environment variables to set for the server process.