vLLM is an open-source LLM framework built on PyTorch.
$ git clone https://github.com/vllm-project/vllm.git
$ cd vllm
$ python3 -m venv vllm_venv
$ source vllm_venv/bin/activate
$ python3 -m pip install -r requirements/common.txt
$ python3 -m pip install -r requirements/cuda.txt
$ python3 -m pip install -e .
$ python3 -m vllm.entrypoints.openai.api_server \
--model HuggingFaceTB/SmolLM2-135M-Instruct \
--dtype float16 \
--gpu-memory-utilization 0.5 \
--max-model-len 128 \
--enforce-eager \
--disable-log-stats \
--kv-cache-dtype fp8
The server is now running and listening on port 8000.
$ vllm chat --model HuggingFaceTB/SmolLM2-135M-Instruct \
--quick "How many letters are in the English alphabet?"
Using model: HuggingFaceTB/SmolLM2-135M-Instruct
The English alphabet has 26 letters.