"tests/vscode:/vscode.git/clone" did not exist on "080438477f319149db4f09f3a8835dde23609f7a"
Unverified Commit c3649e4f authored by Lukas Geiger's avatar Lukas Geiger Committed by GitHub
Browse files

[Docs] Fix syntax highlighting of shell commands (#19870)


Signed-off-by: default avatarLukas Geiger <lukas.geiger94@gmail.com>
parent 53243e5c
...@@ -12,7 +12,7 @@ vLLM now supports [BitBLAS](https://github.com/microsoft/BitBLAS) for more effic ...@@ -12,7 +12,7 @@ vLLM now supports [BitBLAS](https://github.com/microsoft/BitBLAS) for more effic
Below are the steps to utilize BitBLAS with vLLM. Below are the steps to utilize BitBLAS with vLLM.
```console ```bash
pip install bitblas>=0.1.0 pip install bitblas>=0.1.0
``` ```
......
...@@ -9,7 +9,7 @@ Compared to other quantization methods, BitsAndBytes eliminates the need for cal ...@@ -9,7 +9,7 @@ Compared to other quantization methods, BitsAndBytes eliminates the need for cal
Below are the steps to utilize BitsAndBytes with vLLM. Below are the steps to utilize BitsAndBytes with vLLM.
```console ```bash
pip install bitsandbytes>=0.45.3 pip install bitsandbytes>=0.45.3
``` ```
...@@ -54,6 +54,6 @@ llm = LLM( ...@@ -54,6 +54,6 @@ llm = LLM(
Append the following to your model arguments for 4bit inflight quantization: Append the following to your model arguments for 4bit inflight quantization:
```console ```bash
--quantization bitsandbytes --quantization bitsandbytes
``` ```
...@@ -23,7 +23,7 @@ The FP8 types typically supported in hardware have two distinct representations, ...@@ -23,7 +23,7 @@ The FP8 types typically supported in hardware have two distinct representations,
To produce performant FP8 quantized models with vLLM, you'll need to install the [llm-compressor](https://github.com/vllm-project/llm-compressor/) library: To produce performant FP8 quantized models with vLLM, you'll need to install the [llm-compressor](https://github.com/vllm-project/llm-compressor/) library:
```console ```bash
pip install llmcompressor pip install llmcompressor
``` ```
...@@ -81,7 +81,7 @@ Since simple RTN does not require data for weight quantization and the activatio ...@@ -81,7 +81,7 @@ Since simple RTN does not require data for weight quantization and the activatio
Install `vllm` and `lm-evaluation-harness` for evaluation: Install `vllm` and `lm-evaluation-harness` for evaluation:
```console ```bash
pip install vllm lm-eval==0.4.4 pip install vllm lm-eval==0.4.4
``` ```
...@@ -99,9 +99,9 @@ Evaluate accuracy with `lm_eval` (for example on 250 samples of `gsm8k`): ...@@ -99,9 +99,9 @@ Evaluate accuracy with `lm_eval` (for example on 250 samples of `gsm8k`):
!!! note !!! note
Quantized models can be sensitive to the presence of the `bos` token. `lm_eval` does not add a `bos` token by default, so make sure to include the `add_bos_token=True` argument when running your evaluations. Quantized models can be sensitive to the presence of the `bos` token. `lm_eval` does not add a `bos` token by default, so make sure to include the `add_bos_token=True` argument when running your evaluations.
```console ```bash
$ MODEL=$PWD/Meta-Llama-3-8B-Instruct-FP8-Dynamic MODEL=$PWD/Meta-Llama-3-8B-Instruct-FP8-Dynamic
$ lm_eval \ lm_eval \
--model vllm \ --model vllm \
--model_args pretrained=$MODEL,add_bos_token=True \ --model_args pretrained=$MODEL,add_bos_token=True \
--tasks gsm8k --num_fewshot 5 --batch_size auto --limit 250 --tasks gsm8k --num_fewshot 5 --batch_size auto --limit 250
......
...@@ -11,7 +11,7 @@ title: GGUF ...@@ -11,7 +11,7 @@ title: GGUF
To run a GGUF model with vLLM, you can download and use the local GGUF model from [TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF](https://huggingface.co/TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF) with the following command: To run a GGUF model with vLLM, you can download and use the local GGUF model from [TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF](https://huggingface.co/TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF) with the following command:
```console ```bash
wget https://huggingface.co/TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF/resolve/main/tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf wget https://huggingface.co/TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF/resolve/main/tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf
# We recommend using the tokenizer from base model to avoid long-time and buggy tokenizer conversion. # We recommend using the tokenizer from base model to avoid long-time and buggy tokenizer conversion.
vllm serve ./tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf \ vllm serve ./tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf \
...@@ -20,7 +20,7 @@ vllm serve ./tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf \ ...@@ -20,7 +20,7 @@ vllm serve ./tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf \
You can also add `--tensor-parallel-size 2` to enable tensor parallelism inference with 2 GPUs: You can also add `--tensor-parallel-size 2` to enable tensor parallelism inference with 2 GPUs:
```console ```bash
# We recommend using the tokenizer from base model to avoid long-time and buggy tokenizer conversion. # We recommend using the tokenizer from base model to avoid long-time and buggy tokenizer conversion.
vllm serve ./tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf \ vllm serve ./tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf \
--tokenizer TinyLlama/TinyLlama-1.1B-Chat-v1.0 \ --tokenizer TinyLlama/TinyLlama-1.1B-Chat-v1.0 \
...@@ -32,7 +32,7 @@ vllm serve ./tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf \ ...@@ -32,7 +32,7 @@ vllm serve ./tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf \
GGUF assumes that huggingface can convert the metadata to a config file. In case huggingface doesn't support your model you can manually create a config and pass it as hf-config-path GGUF assumes that huggingface can convert the metadata to a config file. In case huggingface doesn't support your model you can manually create a config and pass it as hf-config-path
```console ```bash
# If you model is not supported by huggingface you can manually provide a huggingface compatible config path # If you model is not supported by huggingface you can manually provide a huggingface compatible config path
vllm serve ./tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf \ vllm serve ./tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf \
--tokenizer TinyLlama/TinyLlama-1.1B-Chat-v1.0 \ --tokenizer TinyLlama/TinyLlama-1.1B-Chat-v1.0 \
......
...@@ -21,7 +21,7 @@ for more details on this and other advanced features. ...@@ -21,7 +21,7 @@ for more details on this and other advanced features.
You can quantize your own models by installing [GPTQModel](https://github.com/ModelCloud/GPTQModel) or picking one of the [5000+ models on Huggingface](https://huggingface.co/models?search=gptq). You can quantize your own models by installing [GPTQModel](https://github.com/ModelCloud/GPTQModel) or picking one of the [5000+ models on Huggingface](https://huggingface.co/models?search=gptq).
```console ```bash
pip install -U gptqmodel --no-build-isolation -v pip install -U gptqmodel --no-build-isolation -v
``` ```
...@@ -60,7 +60,7 @@ Here is an example of how to quantize `meta-llama/Llama-3.2-1B-Instruct`: ...@@ -60,7 +60,7 @@ Here is an example of how to quantize `meta-llama/Llama-3.2-1B-Instruct`:
To run an GPTQModel quantized model with vLLM, you can use [DeepSeek-R1-Distill-Qwen-7B-gptqmodel-4bit-vortex-v2](https://huggingface.co/ModelCloud/DeepSeek-R1-Distill-Qwen-7B-gptqmodel-4bit-vortex-v2) with the following command: To run an GPTQModel quantized model with vLLM, you can use [DeepSeek-R1-Distill-Qwen-7B-gptqmodel-4bit-vortex-v2](https://huggingface.co/ModelCloud/DeepSeek-R1-Distill-Qwen-7B-gptqmodel-4bit-vortex-v2) with the following command:
```console ```bash
python examples/offline_inference/llm_engine_example.py \ python examples/offline_inference/llm_engine_example.py \
--model ModelCloud/DeepSeek-R1-Distill-Qwen-7B-gptqmodel-4bit-vortex-v2 --model ModelCloud/DeepSeek-R1-Distill-Qwen-7B-gptqmodel-4bit-vortex-v2
``` ```
......
...@@ -14,13 +14,13 @@ Please visit the HF collection of [quantized INT4 checkpoints of popular LLMs re ...@@ -14,13 +14,13 @@ Please visit the HF collection of [quantized INT4 checkpoints of popular LLMs re
To use INT4 quantization with vLLM, you'll need to install the [llm-compressor](https://github.com/vllm-project/llm-compressor/) library: To use INT4 quantization with vLLM, you'll need to install the [llm-compressor](https://github.com/vllm-project/llm-compressor/) library:
```console ```bash
pip install llmcompressor pip install llmcompressor
``` ```
Additionally, install `vllm` and `lm-evaluation-harness` for evaluation: Additionally, install `vllm` and `lm-evaluation-harness` for evaluation:
```console ```bash
pip install vllm lm-eval==0.4.4 pip install vllm lm-eval==0.4.4
``` ```
...@@ -116,8 +116,8 @@ model = LLM("./Meta-Llama-3-8B-Instruct-W4A16-G128") ...@@ -116,8 +116,8 @@ model = LLM("./Meta-Llama-3-8B-Instruct-W4A16-G128")
To evaluate accuracy, you can use `lm_eval`: To evaluate accuracy, you can use `lm_eval`:
```console ```bash
$ lm_eval --model vllm \ lm_eval --model vllm \
--model_args pretrained="./Meta-Llama-3-8B-Instruct-W4A16-G128",add_bos_token=true \ --model_args pretrained="./Meta-Llama-3-8B-Instruct-W4A16-G128",add_bos_token=true \
--tasks gsm8k \ --tasks gsm8k \
--num_fewshot 5 \ --num_fewshot 5 \
......
...@@ -15,13 +15,13 @@ Please visit the HF collection of [quantized INT8 checkpoints of popular LLMs re ...@@ -15,13 +15,13 @@ Please visit the HF collection of [quantized INT8 checkpoints of popular LLMs re
To use INT8 quantization with vLLM, you'll need to install the [llm-compressor](https://github.com/vllm-project/llm-compressor/) library: To use INT8 quantization with vLLM, you'll need to install the [llm-compressor](https://github.com/vllm-project/llm-compressor/) library:
```console ```bash
pip install llmcompressor pip install llmcompressor
``` ```
Additionally, install `vllm` and `lm-evaluation-harness` for evaluation: Additionally, install `vllm` and `lm-evaluation-harness` for evaluation:
```console ```bash
pip install vllm lm-eval==0.4.4 pip install vllm lm-eval==0.4.4
``` ```
...@@ -122,8 +122,8 @@ model = LLM("./Meta-Llama-3-8B-Instruct-W8A8-Dynamic-Per-Token") ...@@ -122,8 +122,8 @@ model = LLM("./Meta-Llama-3-8B-Instruct-W8A8-Dynamic-Per-Token")
To evaluate accuracy, you can use `lm_eval`: To evaluate accuracy, you can use `lm_eval`:
```console ```bash
$ lm_eval --model vllm \ lm_eval --model vllm \
--model_args pretrained="./Meta-Llama-3-8B-Instruct-W8A8-Dynamic-Per-Token",add_bos_token=true \ --model_args pretrained="./Meta-Llama-3-8B-Instruct-W8A8-Dynamic-Per-Token",add_bos_token=true \
--tasks gsm8k \ --tasks gsm8k \
--num_fewshot 5 \ --num_fewshot 5 \
......
...@@ -4,7 +4,7 @@ The [NVIDIA TensorRT Model Optimizer](https://github.com/NVIDIA/TensorRT-Model-O ...@@ -4,7 +4,7 @@ The [NVIDIA TensorRT Model Optimizer](https://github.com/NVIDIA/TensorRT-Model-O
We recommend installing the library with: We recommend installing the library with:
```console ```bash
pip install nvidia-modelopt pip install nvidia-modelopt
``` ```
......
...@@ -65,7 +65,7 @@ For optimal model quality when using FP8 KV Cache, we recommend using calibrated ...@@ -65,7 +65,7 @@ For optimal model quality when using FP8 KV Cache, we recommend using calibrated
First, install the required dependencies: First, install the required dependencies:
```console ```bash
pip install llmcompressor pip install llmcompressor
``` ```
......
...@@ -13,7 +13,7 @@ AWQ, GPTQ, Rotation and SmoothQuant. ...@@ -13,7 +13,7 @@ AWQ, GPTQ, Rotation and SmoothQuant.
Before quantizing models, you need to install Quark. The latest release of Quark can be installed with pip: Before quantizing models, you need to install Quark. The latest release of Quark can be installed with pip:
```console ```bash
pip install amd-quark pip install amd-quark
``` ```
...@@ -22,13 +22,13 @@ for more installation details. ...@@ -22,13 +22,13 @@ for more installation details.
Additionally, install `vllm` and `lm-evaluation-harness` for evaluation: Additionally, install `vllm` and `lm-evaluation-harness` for evaluation:
```console ```bash
pip install vllm lm-eval==0.4.4 pip install vllm lm-eval==0.4.4
``` ```
## Quantization Process ## Quantization Process
After installing Quark, we will use an example to illustrate how to use Quark. After installing Quark, we will use an example to illustrate how to use Quark.
The Quark quantization process can be listed for 5 steps as below: The Quark quantization process can be listed for 5 steps as below:
1. Load the model 1. Load the model
...@@ -209,8 +209,8 @@ Now, you can load and run the Quark quantized model directly through the LLM ent ...@@ -209,8 +209,8 @@ Now, you can load and run the Quark quantized model directly through the LLM ent
Or, you can use `lm_eval` to evaluate accuracy: Or, you can use `lm_eval` to evaluate accuracy:
```console ```bash
$ lm_eval --model vllm \ lm_eval --model vllm \
--model_args pretrained=Llama-2-70b-chat-hf-w-fp8-a-fp8-kvcache-fp8-pertensor-autosmoothquant,kv_cache_dtype='fp8',quantization='quark' \ --model_args pretrained=Llama-2-70b-chat-hf-w-fp8-a-fp8-kvcache-fp8-pertensor-autosmoothquant,kv_cache_dtype='fp8',quantization='quark' \
--tasks gsm8k --tasks gsm8k
``` ```
...@@ -222,7 +222,7 @@ to quantize large language models more conveniently. It supports quantizing mode ...@@ -222,7 +222,7 @@ to quantize large language models more conveniently. It supports quantizing mode
of different quantization schemes and optimization algorithms. It can export the quantized model of different quantization schemes and optimization algorithms. It can export the quantized model
and run evaluation tasks on the fly. With the script, the example above can be: and run evaluation tasks on the fly. With the script, the example above can be:
```console ```bash
python3 quantize_quark.py --model_dir meta-llama/Llama-2-70b-chat-hf \ python3 quantize_quark.py --model_dir meta-llama/Llama-2-70b-chat-hf \
--output_dir /path/to/output \ --output_dir /path/to/output \
--quant_scheme w_fp8_a_fp8 \ --quant_scheme w_fp8_a_fp8 \
......
...@@ -4,7 +4,7 @@ TorchAO is an architecture optimization library for PyTorch, it provides high pe ...@@ -4,7 +4,7 @@ TorchAO is an architecture optimization library for PyTorch, it provides high pe
We recommend installing the latest torchao nightly with We recommend installing the latest torchao nightly with
```console ```bash
# Install the latest TorchAO nightly build # Install the latest TorchAO nightly build
# Choose the CUDA version that matches your system (cu126, cu128, etc.) # Choose the CUDA version that matches your system (cu126, cu128, etc.)
pip install \ pip install \
......
...@@ -351,7 +351,7 @@ Here is a summary of a plugin file: ...@@ -351,7 +351,7 @@ Here is a summary of a plugin file:
Then you can use this plugin in the command line like this. Then you can use this plugin in the command line like this.
```console ```bash
--enable-auto-tool-choice \ --enable-auto-tool-choice \
--tool-parser-plugin <absolute path of the plugin file> --tool-parser-plugin <absolute path of the plugin file>
--tool-call-parser example \ --tool-call-parser example \
......
...@@ -26,7 +26,7 @@ The easiest way to launch a Trainium or Inferentia instance with pre-installed N ...@@ -26,7 +26,7 @@ The easiest way to launch a Trainium or Inferentia instance with pre-installed N
- After launching the instance, follow the instructions in [Connect to your instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html) to connect to the instance - After launching the instance, follow the instructions in [Connect to your instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html) to connect to the instance
- Once inside your instance, activate the pre-installed virtual environment for inference by running - Once inside your instance, activate the pre-installed virtual environment for inference by running
```console ```bash
source /opt/aws_neuronx_venv_pytorch_2_6_nxd_inference/bin/activate source /opt/aws_neuronx_venv_pytorch_2_6_nxd_inference/bin/activate
``` ```
...@@ -47,7 +47,7 @@ Currently, there are no pre-built Neuron wheels. ...@@ -47,7 +47,7 @@ Currently, there are no pre-built Neuron wheels.
To build and install vLLM from source, run: To build and install vLLM from source, run:
```console ```bash
git clone https://github.com/vllm-project/vllm.git git clone https://github.com/vllm-project/vllm.git
cd vllm cd vllm
pip install -U -r requirements/neuron.txt pip install -U -r requirements/neuron.txt
...@@ -66,7 +66,7 @@ Refer to [vLLM User Guide for NxD Inference](https://awsdocs-neuron.readthedocs- ...@@ -66,7 +66,7 @@ Refer to [vLLM User Guide for NxD Inference](https://awsdocs-neuron.readthedocs-
To install the AWS Neuron fork, run the following: To install the AWS Neuron fork, run the following:
```console ```bash
git clone -b neuron-2.23-vllm-v0.7.2 https://github.com/aws-neuron/upstreaming-to-vllm.git git clone -b neuron-2.23-vllm-v0.7.2 https://github.com/aws-neuron/upstreaming-to-vllm.git
cd upstreaming-to-vllm cd upstreaming-to-vllm
pip install -r requirements/neuron.txt pip install -r requirements/neuron.txt
...@@ -100,7 +100,7 @@ to perform most of the heavy lifting which includes PyTorch model initialization ...@@ -100,7 +100,7 @@ to perform most of the heavy lifting which includes PyTorch model initialization
To configure NxD Inference features through the vLLM entrypoint, use the `override_neuron_config` setting. Provide the configs you want to override To configure NxD Inference features through the vLLM entrypoint, use the `override_neuron_config` setting. Provide the configs you want to override
as a dictionary (or JSON object when starting vLLM from the CLI). For example, to disable auto bucketing, include as a dictionary (or JSON object when starting vLLM from the CLI). For example, to disable auto bucketing, include
```console ```python
override_neuron_config={ override_neuron_config={
"enable_bucketing":False, "enable_bucketing":False,
} }
...@@ -108,7 +108,7 @@ override_neuron_config={ ...@@ -108,7 +108,7 @@ override_neuron_config={
or when launching vLLM from the CLI, pass or when launching vLLM from the CLI, pass
```console ```bash
--override-neuron-config "{\"enable_bucketing\":false}" --override-neuron-config "{\"enable_bucketing\":false}"
``` ```
......
...@@ -78,13 +78,13 @@ Currently, there are no pre-built CPU wheels. ...@@ -78,13 +78,13 @@ Currently, there are no pre-built CPU wheels.
??? Commands ??? Commands
```console ```bash
$ docker build -f docker/Dockerfile.cpu \ docker build -f docker/Dockerfile.cpu \
--tag vllm-cpu-env \ --tag vllm-cpu-env \
--target vllm-openai . --target vllm-openai .
# Launching OpenAI server # Launching OpenAI server
$ docker run --rm \ docker run --rm \
--privileged=true \ --privileged=true \
--shm-size=4g \ --shm-size=4g \
-p 8000:8000 \ -p 8000:8000 \
...@@ -123,7 +123,7 @@ vLLM CPU backend supports the following vLLM features: ...@@ -123,7 +123,7 @@ vLLM CPU backend supports the following vLLM features:
- We highly recommend to use TCMalloc for high performance memory allocation and better cache locality. For example, on Ubuntu 22.4, you can run: - We highly recommend to use TCMalloc for high performance memory allocation and better cache locality. For example, on Ubuntu 22.4, you can run:
```console ```bash
sudo apt-get install libtcmalloc-minimal4 # install TCMalloc library sudo apt-get install libtcmalloc-minimal4 # install TCMalloc library
find / -name *libtcmalloc* # find the dynamic link library path find / -name *libtcmalloc* # find the dynamic link library path
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4:$LD_PRELOAD # prepend the library to LD_PRELOAD export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4:$LD_PRELOAD # prepend the library to LD_PRELOAD
...@@ -132,7 +132,7 @@ python examples/offline_inference/basic/basic.py # run vLLM ...@@ -132,7 +132,7 @@ python examples/offline_inference/basic/basic.py # run vLLM
- When using the online serving, it is recommended to reserve 1-2 CPU cores for the serving framework to avoid CPU oversubscription. For example, on a platform with 32 physical CPU cores, reserving CPU 30 and 31 for the framework and using CPU 0-29 for OpenMP: - When using the online serving, it is recommended to reserve 1-2 CPU cores for the serving framework to avoid CPU oversubscription. For example, on a platform with 32 physical CPU cores, reserving CPU 30 and 31 for the framework and using CPU 0-29 for OpenMP:
```console ```bash
export VLLM_CPU_KVCACHE_SPACE=40 export VLLM_CPU_KVCACHE_SPACE=40
export VLLM_CPU_OMP_THREADS_BIND=0-29 export VLLM_CPU_OMP_THREADS_BIND=0-29
vllm serve facebook/opt-125m vllm serve facebook/opt-125m
...@@ -140,7 +140,7 @@ vllm serve facebook/opt-125m ...@@ -140,7 +140,7 @@ vllm serve facebook/opt-125m
or using default auto thread binding: or using default auto thread binding:
```console ```bash
export VLLM_CPU_KVCACHE_SPACE=40 export VLLM_CPU_KVCACHE_SPACE=40
export VLLM_CPU_NUM_OF_RESERVED_CPU=2 export VLLM_CPU_NUM_OF_RESERVED_CPU=2
vllm serve facebook/opt-125m vllm serve facebook/opt-125m
...@@ -189,7 +189,7 @@ vllm serve facebook/opt-125m ...@@ -189,7 +189,7 @@ vllm serve facebook/opt-125m
- Tensor Parallel is supported for serving and offline inferencing. In general each NUMA node is treated as one GPU card. Below is the example script to enable Tensor Parallel = 2 for serving: - Tensor Parallel is supported for serving and offline inferencing. In general each NUMA node is treated as one GPU card. Below is the example script to enable Tensor Parallel = 2 for serving:
```console ```bash
VLLM_CPU_KVCACHE_SPACE=40 VLLM_CPU_OMP_THREADS_BIND="0-31|32-63" \ VLLM_CPU_KVCACHE_SPACE=40 VLLM_CPU_OMP_THREADS_BIND="0-31|32-63" \
vllm serve meta-llama/Llama-2-7b-chat-hf \ vllm serve meta-llama/Llama-2-7b-chat-hf \
-tp=2 \ -tp=2 \
...@@ -198,7 +198,7 @@ vllm serve facebook/opt-125m ...@@ -198,7 +198,7 @@ vllm serve facebook/opt-125m
or using default auto thread binding: or using default auto thread binding:
```console ```bash
VLLM_CPU_KVCACHE_SPACE=40 \ VLLM_CPU_KVCACHE_SPACE=40 \
vllm serve meta-llama/Llama-2-7b-chat-hf \ vllm serve meta-llama/Llama-2-7b-chat-hf \
-tp=2 \ -tp=2 \
......
...@@ -25,11 +25,11 @@ Currently the CPU implementation for macOS supports FP32 and FP16 datatypes. ...@@ -25,11 +25,11 @@ Currently the CPU implementation for macOS supports FP32 and FP16 datatypes.
After installation of XCode and the Command Line Tools, which include Apple Clang, execute the following commands to build and install vLLM from the source. After installation of XCode and the Command Line Tools, which include Apple Clang, execute the following commands to build and install vLLM from the source.
```console ```bash
git clone https://github.com/vllm-project/vllm.git git clone https://github.com/vllm-project/vllm.git
cd vllm cd vllm
pip install -r requirements/cpu.txt pip install -r requirements/cpu.txt
pip install -e . pip install -e .
``` ```
!!! note !!! note
......
First, install recommended compiler. We recommend to use `gcc/g++ >= 12.3.0` as the default compiler to avoid potential problems. For example, on Ubuntu 22.4, you can run: First, install recommended compiler. We recommend to use `gcc/g++ >= 12.3.0` as the default compiler to avoid potential problems. For example, on Ubuntu 22.4, you can run:
```console ```bash
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y gcc-12 g++-12 libnuma-dev python3-dev sudo apt-get install -y gcc-12 g++-12 libnuma-dev python3-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 10 --slave /usr/bin/g++ g++ /usr/bin/g++-12 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 10 --slave /usr/bin/g++ g++ /usr/bin/g++-12
...@@ -8,14 +8,14 @@ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 10 --slave / ...@@ -8,14 +8,14 @@ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 10 --slave /
Second, clone vLLM project: Second, clone vLLM project:
```console ```bash
git clone https://github.com/vllm-project/vllm.git vllm_source git clone https://github.com/vllm-project/vllm.git vllm_source
cd vllm_source cd vllm_source
``` ```
Third, install Python packages for vLLM CPU backend building: Third, install Python packages for vLLM CPU backend building:
```console ```bash
pip install --upgrade pip pip install --upgrade pip
pip install "cmake>=3.26.1" wheel packaging ninja "setuptools-scm>=8" numpy pip install "cmake>=3.26.1" wheel packaging ninja "setuptools-scm>=8" numpy
pip install -v -r requirements/cpu.txt --extra-index-url https://download.pytorch.org/whl/cpu pip install -v -r requirements/cpu.txt --extra-index-url https://download.pytorch.org/whl/cpu
...@@ -23,13 +23,13 @@ pip install -v -r requirements/cpu.txt --extra-index-url https://download.pytorc ...@@ -23,13 +23,13 @@ pip install -v -r requirements/cpu.txt --extra-index-url https://download.pytorc
Finally, build and install vLLM CPU backend: Finally, build and install vLLM CPU backend:
```console ```bash
VLLM_TARGET_DEVICE=cpu python setup.py install VLLM_TARGET_DEVICE=cpu python setup.py install
``` ```
If you want to develop vllm, install it in editable mode instead. If you want to develop vllm, install it in editable mode instead.
```console ```bash
VLLM_TARGET_DEVICE=cpu python setup.py develop VLLM_TARGET_DEVICE=cpu python setup.py develop
``` ```
......
...@@ -26,7 +26,7 @@ Currently the CPU implementation for s390x architecture supports FP32 datatype o ...@@ -26,7 +26,7 @@ Currently the CPU implementation for s390x architecture supports FP32 datatype o
Install the following packages from the package manager before building the vLLM. For example on RHEL 9.4: Install the following packages from the package manager before building the vLLM. For example on RHEL 9.4:
```console ```bash
dnf install -y \ dnf install -y \
which procps findutils tar vim git gcc g++ make patch make cython zlib-devel \ which procps findutils tar vim git gcc g++ make patch make cython zlib-devel \
libjpeg-turbo-devel libtiff-devel libpng-devel libwebp-devel freetype-devel harfbuzz-devel \ libjpeg-turbo-devel libtiff-devel libpng-devel libwebp-devel freetype-devel harfbuzz-devel \
...@@ -35,7 +35,7 @@ dnf install -y \ ...@@ -35,7 +35,7 @@ dnf install -y \
Install rust>=1.80 which is needed for `outlines-core` and `uvloop` python packages installation. Install rust>=1.80 which is needed for `outlines-core` and `uvloop` python packages installation.
```console ```bash
curl https://sh.rustup.rs -sSf | sh -s -- -y && \ curl https://sh.rustup.rs -sSf | sh -s -- -y && \
. "$HOME/.cargo/env" . "$HOME/.cargo/env"
``` ```
...@@ -45,7 +45,7 @@ Execute the following commands to build and install vLLM from the source. ...@@ -45,7 +45,7 @@ Execute the following commands to build and install vLLM from the source.
!!! tip !!! tip
Please build the following dependencies, `torchvision`, `pyarrow` from the source before building vLLM. Please build the following dependencies, `torchvision`, `pyarrow` from the source before building vLLM.
```console ```bash
sed -i '/^torch/d' requirements-build.txt # remove torch from requirements-build.txt since we use nightly builds sed -i '/^torch/d' requirements-build.txt # remove torch from requirements-build.txt since we use nightly builds
pip install -v \ pip install -v \
--extra-index-url https://download.pytorch.org/whl/nightly/cpu \ --extra-index-url https://download.pytorch.org/whl/nightly/cpu \
......
...@@ -68,7 +68,7 @@ For more information about using TPUs with GKE, see: ...@@ -68,7 +68,7 @@ For more information about using TPUs with GKE, see:
Create a TPU v5e with 4 TPU chips: Create a TPU v5e with 4 TPU chips:
```console ```bash
gcloud alpha compute tpus queued-resources create QUEUED_RESOURCE_ID \ gcloud alpha compute tpus queued-resources create QUEUED_RESOURCE_ID \
--node-id TPU_NAME \ --node-id TPU_NAME \
--project PROJECT_ID \ --project PROJECT_ID \
...@@ -156,13 +156,13 @@ See [deployment-docker-pre-built-image][deployment-docker-pre-built-image] for i ...@@ -156,13 +156,13 @@ See [deployment-docker-pre-built-image][deployment-docker-pre-built-image] for i
You can use <gh-file:docker/Dockerfile.tpu> to build a Docker image with TPU support. You can use <gh-file:docker/Dockerfile.tpu> to build a Docker image with TPU support.
```console ```bash
docker build -f docker/Dockerfile.tpu -t vllm-tpu . docker build -f docker/Dockerfile.tpu -t vllm-tpu .
``` ```
Run the Docker image with the following command: Run the Docker image with the following command:
```console ```bash
# Make sure to add `--privileged --net host --shm-size=16G`. # Make sure to add `--privileged --net host --shm-size=16G`.
docker run --privileged --net host --shm-size=16G -it vllm-tpu docker run --privileged --net host --shm-size=16G -it vllm-tpu
``` ```
...@@ -185,6 +185,6 @@ docker run --privileged --net host --shm-size=16G -it vllm-tpu ...@@ -185,6 +185,6 @@ docker run --privileged --net host --shm-size=16G -it vllm-tpu
Install OpenBLAS with the following command: Install OpenBLAS with the following command:
```console ```bash
sudo apt-get install --no-install-recommends --yes libopenblas-base libopenmpi-dev libomp-dev sudo apt-get install --no-install-recommends --yes libopenblas-base libopenmpi-dev libomp-dev
``` ```
...@@ -22,7 +22,7 @@ Therefore, it is recommended to install vLLM with a **fresh new** environment. I ...@@ -22,7 +22,7 @@ Therefore, it is recommended to install vLLM with a **fresh new** environment. I
You can install vLLM using either `pip` or `uv pip`: You can install vLLM using either `pip` or `uv pip`:
```console ```bash
# Install vLLM with CUDA 12.8. # Install vLLM with CUDA 12.8.
# If you are using pip. # If you are using pip.
pip install vllm --extra-index-url https://download.pytorch.org/whl/cu128 pip install vllm --extra-index-url https://download.pytorch.org/whl/cu128
...@@ -37,7 +37,7 @@ We recommend leveraging `uv` to [automatically select the appropriate PyTorch in ...@@ -37,7 +37,7 @@ We recommend leveraging `uv` to [automatically select the appropriate PyTorch in
As of now, vLLM's binaries are compiled with CUDA 12.8 and public PyTorch release versions by default. We also provide vLLM binaries compiled with CUDA 12.6, 11.8, and public PyTorch release versions: As of now, vLLM's binaries are compiled with CUDA 12.8 and public PyTorch release versions by default. We also provide vLLM binaries compiled with CUDA 12.6, 11.8, and public PyTorch release versions:
```console ```bash
# Install vLLM with CUDA 11.8. # Install vLLM with CUDA 11.8.
export VLLM_VERSION=0.6.1.post1 export VLLM_VERSION=0.6.1.post1
export PYTHON_VERSION=312 export PYTHON_VERSION=312
...@@ -52,7 +52,7 @@ LLM inference is a fast-evolving field, and the latest code may contain bug fixe ...@@ -52,7 +52,7 @@ LLM inference is a fast-evolving field, and the latest code may contain bug fixe
##### Install the latest code using `pip` ##### Install the latest code using `pip`
```console ```bash
pip install -U vllm \ pip install -U vllm \
--pre \ --pre \
--extra-index-url https://wheels.vllm.ai/nightly --extra-index-url https://wheels.vllm.ai/nightly
...@@ -62,7 +62,7 @@ pip install -U vllm \ ...@@ -62,7 +62,7 @@ pip install -U vllm \
Another way to install the latest code is to use `uv`: Another way to install the latest code is to use `uv`:
```console ```bash
uv pip install -U vllm \ uv pip install -U vllm \
--torch-backend=auto \ --torch-backend=auto \
--extra-index-url https://wheels.vllm.ai/nightly --extra-index-url https://wheels.vllm.ai/nightly
...@@ -72,7 +72,7 @@ uv pip install -U vllm \ ...@@ -72,7 +72,7 @@ uv pip install -U vllm \
If you want to access the wheels for previous commits (e.g. to bisect the behavior change, performance regression), due to the limitation of `pip`, you have to specify the full URL of the wheel file by embedding the commit hash in the URL: If you want to access the wheels for previous commits (e.g. to bisect the behavior change, performance regression), due to the limitation of `pip`, you have to specify the full URL of the wheel file by embedding the commit hash in the URL:
```console ```bash
export VLLM_COMMIT=33f460b17a54acb3b6cc0b03f4a17876cff5eafd # use full commit hash from the main branch export VLLM_COMMIT=33f460b17a54acb3b6cc0b03f4a17876cff5eafd # use full commit hash from the main branch
pip install https://wheels.vllm.ai/${VLLM_COMMIT}/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl pip install https://wheels.vllm.ai/${VLLM_COMMIT}/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl
``` ```
...@@ -83,7 +83,7 @@ Note that the wheels are built with Python 3.8 ABI (see [PEP 425](https://peps.p ...@@ -83,7 +83,7 @@ Note that the wheels are built with Python 3.8 ABI (see [PEP 425](https://peps.p
If you want to access the wheels for previous commits (e.g. to bisect the behavior change, performance regression), you can specify the commit hash in the URL: If you want to access the wheels for previous commits (e.g. to bisect the behavior change, performance regression), you can specify the commit hash in the URL:
```console ```bash
export VLLM_COMMIT=72d9c316d3f6ede485146fe5aabd4e61dbc59069 # use full commit hash from the main branch export VLLM_COMMIT=72d9c316d3f6ede485146fe5aabd4e61dbc59069 # use full commit hash from the main branch
uv pip install vllm \ uv pip install vllm \
--torch-backend=auto \ --torch-backend=auto \
...@@ -99,7 +99,7 @@ The `uv` approach works for vLLM `v0.6.6` and later and offers an easy-to-rememb ...@@ -99,7 +99,7 @@ The `uv` approach works for vLLM `v0.6.6` and later and offers an easy-to-rememb
If you only need to change Python code, you can build and install vLLM without compilation. Using `pip`'s [`--editable` flag](https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs), changes you make to the code will be reflected when you run vLLM: If you only need to change Python code, you can build and install vLLM without compilation. Using `pip`'s [`--editable` flag](https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs), changes you make to the code will be reflected when you run vLLM:
```console ```bash
git clone https://github.com/vllm-project/vllm.git git clone https://github.com/vllm-project/vllm.git
cd vllm cd vllm
VLLM_USE_PRECOMPILED=1 pip install --editable . VLLM_USE_PRECOMPILED=1 pip install --editable .
...@@ -118,7 +118,7 @@ This command will do the following: ...@@ -118,7 +118,7 @@ This command will do the following:
In case you see an error about wheel not found when running the above command, it might be because the commit you based on in the main branch was just merged and the wheel is being built. In this case, you can wait for around an hour to try again, or manually assign the previous commit in the installation using the `VLLM_PRECOMPILED_WHEEL_LOCATION` environment variable. In case you see an error about wheel not found when running the above command, it might be because the commit you based on in the main branch was just merged and the wheel is being built. In this case, you can wait for around an hour to try again, or manually assign the previous commit in the installation using the `VLLM_PRECOMPILED_WHEEL_LOCATION` environment variable.
```console ```bash
export VLLM_COMMIT=72d9c316d3f6ede485146fe5aabd4e61dbc59069 # use full commit hash from the main branch export VLLM_COMMIT=72d9c316d3f6ede485146fe5aabd4e61dbc59069 # use full commit hash from the main branch
export VLLM_PRECOMPILED_WHEEL_LOCATION=https://wheels.vllm.ai/${VLLM_COMMIT}/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl export VLLM_PRECOMPILED_WHEEL_LOCATION=https://wheels.vllm.ai/${VLLM_COMMIT}/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl
pip install --editable . pip install --editable .
...@@ -134,7 +134,7 @@ You can find more information about vLLM's wheels in [install-the-latest-code][i ...@@ -134,7 +134,7 @@ You can find more information about vLLM's wheels in [install-the-latest-code][i
If you want to modify C++ or CUDA code, you'll need to build vLLM from source. This can take several minutes: If you want to modify C++ or CUDA code, you'll need to build vLLM from source. This can take several minutes:
```console ```bash
git clone https://github.com/vllm-project/vllm.git git clone https://github.com/vllm-project/vllm.git
cd vllm cd vllm
pip install -e . pip install -e .
...@@ -160,7 +160,7 @@ There are scenarios where the PyTorch dependency cannot be easily installed via ...@@ -160,7 +160,7 @@ There are scenarios where the PyTorch dependency cannot be easily installed via
To build vLLM using an existing PyTorch installation: To build vLLM using an existing PyTorch installation:
```console ```bash
git clone https://github.com/vllm-project/vllm.git git clone https://github.com/vllm-project/vllm.git
cd vllm cd vllm
python use_existing_torch.py python use_existing_torch.py
...@@ -173,7 +173,7 @@ pip install --no-build-isolation -e . ...@@ -173,7 +173,7 @@ pip install --no-build-isolation -e .
Currently, before starting the build process, vLLM fetches cutlass code from GitHub. However, there may be scenarios where you want to use a local version of cutlass instead. Currently, before starting the build process, vLLM fetches cutlass code from GitHub. However, there may be scenarios where you want to use a local version of cutlass instead.
To achieve this, you can set the environment variable VLLM_CUTLASS_SRC_DIR to point to your local cutlass directory. To achieve this, you can set the environment variable VLLM_CUTLASS_SRC_DIR to point to your local cutlass directory.
```console ```bash
git clone https://github.com/vllm-project/vllm.git git clone https://github.com/vllm-project/vllm.git
cd vllm cd vllm
VLLM_CUTLASS_SRC_DIR=/path/to/cutlass pip install -e . VLLM_CUTLASS_SRC_DIR=/path/to/cutlass pip install -e .
...@@ -184,7 +184,7 @@ VLLM_CUTLASS_SRC_DIR=/path/to/cutlass pip install -e . ...@@ -184,7 +184,7 @@ VLLM_CUTLASS_SRC_DIR=/path/to/cutlass pip install -e .
To avoid your system being overloaded, you can limit the number of compilation jobs To avoid your system being overloaded, you can limit the number of compilation jobs
to be run simultaneously, via the environment variable `MAX_JOBS`. For example: to be run simultaneously, via the environment variable `MAX_JOBS`. For example:
```console ```bash
export MAX_JOBS=6 export MAX_JOBS=6
pip install -e . pip install -e .
``` ```
...@@ -194,7 +194,7 @@ A side effect is a much slower build process. ...@@ -194,7 +194,7 @@ A side effect is a much slower build process.
Additionally, if you have trouble building vLLM, we recommend using the NVIDIA PyTorch Docker image. Additionally, if you have trouble building vLLM, we recommend using the NVIDIA PyTorch Docker image.
```console ```bash
# Use `--ipc=host` to make sure the shared memory is large enough. # Use `--ipc=host` to make sure the shared memory is large enough.
docker run \ docker run \
--gpus all \ --gpus all \
...@@ -205,14 +205,14 @@ docker run \ ...@@ -205,14 +205,14 @@ docker run \
If you don't want to use docker, it is recommended to have a full installation of CUDA Toolkit. You can download and install it from [the official website](https://developer.nvidia.com/cuda-toolkit-archive). After installation, set the environment variable `CUDA_HOME` to the installation path of CUDA Toolkit, and make sure that the `nvcc` compiler is in your `PATH`, e.g.: If you don't want to use docker, it is recommended to have a full installation of CUDA Toolkit. You can download and install it from [the official website](https://developer.nvidia.com/cuda-toolkit-archive). After installation, set the environment variable `CUDA_HOME` to the installation path of CUDA Toolkit, and make sure that the `nvcc` compiler is in your `PATH`, e.g.:
```console ```bash
export CUDA_HOME=/usr/local/cuda export CUDA_HOME=/usr/local/cuda
export PATH="${CUDA_HOME}/bin:$PATH" export PATH="${CUDA_HOME}/bin:$PATH"
``` ```
Here is a sanity check to verify that the CUDA Toolkit is correctly installed: Here is a sanity check to verify that the CUDA Toolkit is correctly installed:
```console ```bash
nvcc --version # verify that nvcc is in your PATH nvcc --version # verify that nvcc is in your PATH
${CUDA_HOME}/bin/nvcc --version # verify that nvcc is in your CUDA_HOME ${CUDA_HOME}/bin/nvcc --version # verify that nvcc is in your CUDA_HOME
``` ```
...@@ -223,7 +223,7 @@ vLLM can fully run only on Linux but for development purposes, you can still bui ...@@ -223,7 +223,7 @@ vLLM can fully run only on Linux but for development purposes, you can still bui
Simply disable the `VLLM_TARGET_DEVICE` environment variable before installing: Simply disable the `VLLM_TARGET_DEVICE` environment variable before installing:
```console ```bash
export VLLM_TARGET_DEVICE=empty export VLLM_TARGET_DEVICE=empty
pip install -e . pip install -e .
``` ```
...@@ -238,7 +238,7 @@ See [deployment-docker-pre-built-image][deployment-docker-pre-built-image] for i ...@@ -238,7 +238,7 @@ See [deployment-docker-pre-built-image][deployment-docker-pre-built-image] for i
Another way to access the latest code is to use the docker images: Another way to access the latest code is to use the docker images:
```console ```bash
export VLLM_COMMIT=33f460b17a54acb3b6cc0b03f4a17876cff5eafd # use full commit hash from the main branch export VLLM_COMMIT=33f460b17a54acb3b6cc0b03f4a17876cff5eafd # use full commit hash from the main branch
docker pull public.ecr.aws/q9t5s3a7/vllm-ci-postmerge-repo:${VLLM_COMMIT} docker pull public.ecr.aws/q9t5s3a7/vllm-ci-postmerge-repo:${VLLM_COMMIT}
``` ```
......
...@@ -31,17 +31,17 @@ Currently, there are no pre-built ROCm wheels. ...@@ -31,17 +31,17 @@ Currently, there are no pre-built ROCm wheels.
Alternatively, you can install PyTorch using PyTorch wheels. You can check PyTorch installation guide in PyTorch [Getting Started](https://pytorch.org/get-started/locally/). Example: Alternatively, you can install PyTorch using PyTorch wheels. You can check PyTorch installation guide in PyTorch [Getting Started](https://pytorch.org/get-started/locally/). Example:
```console ```bash
# Install PyTorch # Install PyTorch
$ pip uninstall torch -y pip uninstall torch -y
$ pip install --no-cache-dir --pre torch --index-url https://download.pytorch.org/whl/nightly/rocm6.3 pip install --no-cache-dir --pre torch --index-url https://download.pytorch.org/whl/nightly/rocm6.3
``` ```
1. Install [Triton flash attention for ROCm](https://github.com/ROCm/triton) 1. Install [Triton flash attention for ROCm](https://github.com/ROCm/triton)
Install ROCm's Triton flash attention (the default triton-mlir branch) following the instructions from [ROCm/triton](https://github.com/ROCm/triton/blob/triton-mlir/README.md) Install ROCm's Triton flash attention (the default triton-mlir branch) following the instructions from [ROCm/triton](https://github.com/ROCm/triton/blob/triton-mlir/README.md)
```console ```bash
python3 -m pip install ninja cmake wheel pybind11 python3 -m pip install ninja cmake wheel pybind11
pip uninstall -y triton pip uninstall -y triton
git clone https://github.com/OpenAI/triton.git git clone https://github.com/OpenAI/triton.git
...@@ -62,7 +62,7 @@ Currently, there are no pre-built ROCm wheels. ...@@ -62,7 +62,7 @@ Currently, there are no pre-built ROCm wheels.
For example, for ROCm 6.3, suppose your gfx arch is `gfx90a`. To get your gfx architecture, run `rocminfo |grep gfx`. For example, for ROCm 6.3, suppose your gfx arch is `gfx90a`. To get your gfx architecture, run `rocminfo |grep gfx`.
```console ```bash
git clone https://github.com/ROCm/flash-attention.git git clone https://github.com/ROCm/flash-attention.git
cd flash-attention cd flash-attention
git checkout b7d29fb git checkout b7d29fb
...@@ -76,7 +76,7 @@ Currently, there are no pre-built ROCm wheels. ...@@ -76,7 +76,7 @@ Currently, there are no pre-built ROCm wheels.
3. If you choose to build AITER yourself to use a certain branch or commit, you can build AITER using the following steps: 3. If you choose to build AITER yourself to use a certain branch or commit, you can build AITER using the following steps:
```console ```bash
python3 -m pip uninstall -y aiter python3 -m pip uninstall -y aiter
git clone --recursive https://github.com/ROCm/aiter.git git clone --recursive https://github.com/ROCm/aiter.git
cd aiter cd aiter
...@@ -148,7 +148,7 @@ If you choose to build this rocm_base image yourself, the steps are as follows. ...@@ -148,7 +148,7 @@ If you choose to build this rocm_base image yourself, the steps are as follows.
It is important that the user kicks off the docker build using buildkit. Either the user put DOCKER_BUILDKIT=1 as environment variable when calling docker build command, or the user needs to setup buildkit in the docker daemon configuration /etc/docker/daemon.json as follows and restart the daemon: It is important that the user kicks off the docker build using buildkit. Either the user put DOCKER_BUILDKIT=1 as environment variable when calling docker build command, or the user needs to setup buildkit in the docker daemon configuration /etc/docker/daemon.json as follows and restart the daemon:
```console ```json
{ {
"features": { "features": {
"buildkit": true "buildkit": true
...@@ -158,7 +158,7 @@ It is important that the user kicks off the docker build using buildkit. Either ...@@ -158,7 +158,7 @@ It is important that the user kicks off the docker build using buildkit. Either
To build vllm on ROCm 6.3 for MI200 and MI300 series, you can use the default: To build vllm on ROCm 6.3 for MI200 and MI300 series, you can use the default:
```console ```bash
DOCKER_BUILDKIT=1 docker build \ DOCKER_BUILDKIT=1 docker build \
-f docker/Dockerfile.rocm_base \ -f docker/Dockerfile.rocm_base \
-t rocm/vllm-dev:base . -t rocm/vllm-dev:base .
...@@ -169,7 +169,7 @@ DOCKER_BUILDKIT=1 docker build \ ...@@ -169,7 +169,7 @@ DOCKER_BUILDKIT=1 docker build \
First, build a docker image from <gh-file:docker/Dockerfile.rocm> and launch a docker container from the image. First, build a docker image from <gh-file:docker/Dockerfile.rocm> and launch a docker container from the image.
It is important that the user kicks off the docker build using buildkit. Either the user put `DOCKER_BUILDKIT=1` as environment variable when calling docker build command, or the user needs to setup buildkit in the docker daemon configuration /etc/docker/daemon.json as follows and restart the daemon: It is important that the user kicks off the docker build using buildkit. Either the user put `DOCKER_BUILDKIT=1` as environment variable when calling docker build command, or the user needs to setup buildkit in the docker daemon configuration /etc/docker/daemon.json as follows and restart the daemon:
```console ```bash
{ {
"features": { "features": {
"buildkit": true "buildkit": true
...@@ -187,13 +187,13 @@ Their values can be passed in when running `docker build` with `--build-arg` opt ...@@ -187,13 +187,13 @@ Their values can be passed in when running `docker build` with `--build-arg` opt
To build vllm on ROCm 6.3 for MI200 and MI300 series, you can use the default: To build vllm on ROCm 6.3 for MI200 and MI300 series, you can use the default:
```console ```bash
DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile.rocm -t vllm-rocm . DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile.rocm -t vllm-rocm .
``` ```
To build vllm on ROCm 6.3 for Radeon RX7900 series (gfx1100), you should pick the alternative base image: To build vllm on ROCm 6.3 for Radeon RX7900 series (gfx1100), you should pick the alternative base image:
```console ```bash
DOCKER_BUILDKIT=1 docker build \ DOCKER_BUILDKIT=1 docker build \
--build-arg BASE_IMAGE="rocm/vllm-dev:navi_base" \ --build-arg BASE_IMAGE="rocm/vllm-dev:navi_base" \
-f docker/Dockerfile.rocm \ -f docker/Dockerfile.rocm \
...@@ -205,7 +205,7 @@ To run the above docker image `vllm-rocm`, use the below command: ...@@ -205,7 +205,7 @@ To run the above docker image `vllm-rocm`, use the below command:
??? Command ??? Command
```console ```bash
docker run -it \ docker run -it \
--network=host \ --network=host \
--group-add=video \ --group-add=video \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment