2024-05-05 16:14:17 +08:00
|
|
|
## Download Dataset
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
wget -O question.jsonl https://raw.githubusercontent.com/lm-sys/FastChat/main/fastchat/llm_judge/data/mt_bench/question.jsonl
|
|
|
|
|
```
|
|
|
|
|
|
2025-05-12 12:53:26 -07:00
|
|
|
## Run benchmark
|
2024-01-08 04:37:50 +00:00
|
|
|
|
2025-05-12 12:53:26 -07:00
|
|
|
### Benchmark sglang
|
2024-01-08 04:37:50 +00:00
|
|
|
```
|
|
|
|
|
python -m sglang.launch_server --model-path meta-llama/Llama-2-7b-chat-hf --port 30000
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
python3 bench_sglang.py --num-questions 80
|
|
|
|
|
```
|
|
|
|
|
|
2025-05-12 12:53:26 -07:00
|
|
|
### Benchmark sglang EAGLE
|
2025-03-23 04:34:01 +08:00
|
|
|
```
|
|
|
|
|
python3 -m sglang.launch_server --model meta-llama/Meta-Llama-3-8B-Instruct --speculative-algo EAGLE \
|
|
|
|
|
--speculative-draft lmsys/sglang-EAGLE-LLaMA3-Instruct-8B --speculative-num-steps 5 \
|
|
|
|
|
--speculative-eagle-topk 8 --speculative-num-draft-tokens 64 --dtype float16 --port 30000
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
python3 bench_sglang_eagle.py --num-questions 80 --parallel 1
|
|
|
|
|
```
|
|
|
|
|
|
2024-01-08 04:37:50 +00:00
|
|
|
|
2025-05-12 12:53:26 -07:00
|
|
|
### Benchmark vllm
|
2024-01-08 04:37:50 +00:00
|
|
|
```
|
|
|
|
|
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 80 --backend vllm
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
2025-05-12 12:53:26 -07:00
|
|
|
### Benchmark lightllm
|
2024-01-08 04:37:50 +00:00
|
|
|
```
|
|
|
|
|
# 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 80 --backend lightllm
|
|
|
|
|
```
|