Skip to content

Commit 0a88e23

Browse files
authored
Merge pull request #299 from NYU-RTS/Amanda-dong-patch-2
Revise vLLM performance comparison and test setup
2 parents 702c74e + a30266f commit 0a88e23

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

docs/hpc/08_ml_ai_hpc/08_LLM inference/03_vLLM.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,25 @@
44
[`vLLM`](https://docs.vllm.ai/en/latest/) is an easy-to-use library for LLM inference and serving which support a wide variety of models with optimized kernels ensuring optimal utilization of GPUs.
55

66
## Why `vLLM`?
7-
We tested `vLLM` and `llama-cpp` (the inference framework behind `ollama`) on Torch, and found `vLLM` performs better on Torch for `Qwen2.5-7B-Instruct` with `512` input and `256` output tokens.
7+
We tested `vLLM` and `llama-cpp` on Torch, and found `vLLM` performs better on Torch for `Qwen2.5-0.5B-Instruct` and `Qwen2.5-7B-Instruct` with `256` input and `256` output tokens. Based on our results, vLLM retains a performance advantage over llama-cpp across both model sizes, although the relative gap decreases as the model size increases. In addition, vLLM integrates more naturally with the Hugging Face/Torch ecosystem in HPC environment, whereas llama-cpp requires more manual setup and compatibility adjustment.
88

9-
|Inference Server|Peak Throughput|Median Latency(ms)|Recommendation
9+
|Model|Inference Server|Generated Throughput (tok/s)|Median Latency (ms)|
1010
|-----|-----|-----|-----|
11-
|`vLLM`|~4689.6|~48.0|Best for Batch/Research|
12-
|`llama-cpp`|~115.0|~280.0|Best for Single User|
11+
|0.5B|`vLLM`|~2273|~890|
12+
|0.5B|`llama-cpp`|~1312|~1440 |
13+
|7B|`vLLM`|~354|~5780 |
14+
|7B|`llama-cpp`|~277|~7200 |
1315

1416
### Test Environment
1517
GPU: NVIDIA L40S
1618

17-
`vLLM`: 0.13.0
19+
Precision: FP16
1820

19-
`Ollama` (llama-cpp backend): 0.14.2
21+
Workload: 256 input / 256 output tokens
22+
23+
Concurrency: 8
24+
25+
Max requests: 64
2026

2127
## vLLM Installation Instructions
2228
Create a `vLLM` directory in your /scratch directory, then install the vLLM image:

0 commit comments

Comments
 (0)