README.md 1.01 KB
Newer Older
Lianmin Zheng's avatar
Lianmin Zheng committed
1
2
## Run benchmark

3
### Benchmark sglang
Lianmin Zheng's avatar
Lianmin Zheng committed
4
5
6
7
8
9
10
11
12
```
python -m sglang.launch_server --model-path meta-llama/Llama-2-7b-chat-hf --port 30000
```

```
python3 bench_sglang.py --num-questions 200
```


13
### Benchmark vllm
Lianmin Zheng's avatar
Lianmin Zheng committed
14
15
16
17
18
19
20
21
22
```
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 200 --backend vllm
```


23
### Benchmark lightllm
Lianmin Zheng's avatar
Lianmin Zheng committed
24
25
26
27
28
29
30
31
32
33
```
# 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 200 --backend lightllm
```


34
### Benchmark guidance
Lianmin Zheng's avatar
Lianmin Zheng committed
35
```
Liangsheng Yin's avatar
Liangsheng Yin committed
36
CUDA_VISIBLE_DEVICES=0,1 python3 bench_other.py --num-questions 200 --backend guidance --parallel 1 --n-ctx 4096 --model-path path/to/gguf
Lianmin Zheng's avatar
Lianmin Zheng committed
37
38
39
```


40
### Benchmark lmql
Lianmin Zheng's avatar
Lianmin Zheng committed
41
42
43
44
45
46
47
```
lmql serve-model meta-llama/Llama-2-7b-chat-hf --cuda --port 23000
```

```
python3 bench_other.py --num-questions 200 --backend lmql --port 23000 --parallel 1
```