"vscode:/vscode.git/clone" did not exist on "e33ef391cd937f1e46e7f257e7722e3014c79981"
README.md 1.22 KB
Newer Older
1
## Download data
Lianmin Zheng's avatar
Lianmin Zheng committed
2
3
4
5
```
wget https://raw.githubusercontent.com/openai/grade-school-math/master/grade_school_math/data/test.jsonl
```

6
## Run benchmark
Lianmin Zheng's avatar
Lianmin Zheng committed
7

Lianmin Zheng's avatar
Lianmin Zheng committed
8
9
NOTE: This is an implementation for throughput/latency benchmark purposes. The prompts are not tuned to achieve good accuracy on the GSM-8K tasks.

10
### Benchmark sglang
Lianmin Zheng's avatar
Lianmin Zheng committed
11
12
13
14
15
```
python -m sglang.launch_server --model-path meta-llama/Llama-2-7b-chat-hf --port 30000
```

```
Lianmin Zheng's avatar
Lianmin Zheng committed
16
python3 bench_sglang.py --num-questions 32
Lianmin Zheng's avatar
Lianmin Zheng committed
17
18
19
20
python3 bench_sglang.py --num-questions 16 --parallel 1
```


21
### Benchmark vllm
Lianmin Zheng's avatar
Lianmin Zheng committed
22
23
24
25
26
27
28
29
30
```
python3 -m vllm.entrypoints.api_server --tokenizer-mode auto --model meta-llama/Llama-2-7b-chat-hf --disable-log-requests --port 21000
```

```
python3 bench_other.py --num-questions 32 --backend vllm
```


31
### Benchmark lightllm
Lianmin Zheng's avatar
Lianmin Zheng committed
32
33
34
35
36
37
38
39
40
41
```
# A10G
python -m lightllm.server.api_server --tokenizer_mode auto --model_dir ~/model_weights/llama-2-7b-chat-hf --max_total_token_num 16000 --port 22000
```

```
python3 bench_other.py --num-questions 32 --backend lightllm
```


42
### Benchmark guidance
Lianmin Zheng's avatar
Lianmin Zheng committed
43
```
Liangsheng Yin's avatar
Liangsheng Yin committed
44
45
46
python3 bench_other.py --num-questions 8 --backend guidance --parallel 1 --n-ctx 4096 --model-path path/to/gguf
```

47
### Benchmark lmql
Liangsheng Yin's avatar
Liangsheng Yin committed
48
49
50

```
python3 bench_other.py --num-questions 8 --backend lmql --parallel 1
Lianmin Zheng's avatar
Lianmin Zheng committed
51
```