You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Llama/Llama3.3-70B.md
+32-41Lines changed: 32 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,6 @@ This quick start recipe provides step-by-step instructions for running the Llama
6
6
7
7
The recipe is intended for developers and practitioners seeking high-throughput or low-latency inference using NVIDIA’s accelerated stack—building a docker image with vLLM for model serving, FlashInfer for optimized CUDA kernels, and ModelOpt to enable FP8 and NVFP4 quantized execution.
8
8
9
-
10
9
## Access & Licensing
11
10
12
11
### License
@@ -34,32 +33,16 @@ For Hopper, FP8 offers the best performance for most workloads. For Blackwell, N
34
33
35
34
## Deployment Steps
36
35
37
-
### Build Docker Image
36
+
### Pull Docker Image
38
37
39
-
Build a docker image with vLLM using the official vLLM Dockerfile at a specific commit (`dc5e4a653c859573dfcca99f1b0141c2db9f94cc`) on the main branch. This commit contains more performance optimizations compared to the latest official vLLM docker image (`vllm/vllm-openai:latest`).
38
+
Pull the vLLM post-merge docker image for a specific commit (`a5203d04dffcbdb095651ca4bf06589409370301`) on the main branch and tag it as `vllm/vllm-openai:deploy`. This commit contains more performance optimizations compared to the latest official vLLM docker image (`vllm/vllm-openai:latest`).
40
39
41
-
`build_image.sh`
40
+
`pull_image.sh`
42
41
```
43
-
# Clone the vLLM GitHub repo and checkout the spcific commit.
44
-
git clone -b main --single-branch https://github.com/vllm-project/vllm.git
docker tag public.ecr.aws/q9t5s3a7/vllm-ci-postmerge-repo:a5203d04dffcbdb095651ca4bf06589409370301 vllm/vllm-openai:deploy
59
44
```
60
45
61
-
Note: building the docker image may use lots of CPU threads and CPU memory. If you build the docker image on machines with fewer CPU cores or less CPU memory, please reduce the value of `max_jobs`.
62
-
63
46
### Run Docker Container
64
47
65
48
Run the docker container using the docker image `vllm/vllm-openai:deploy`.
@@ -73,6 +56,16 @@ Note: You can mount additional directories and paths using the `-v <local_path>:
73
56
74
57
The `-e HF_TOKEN="$HF_TOKEN" -e HF_HOME="$HF_HOME"` flags are added so that the models are downloaded using your HuggingFace token and the downloaded models can be cached in $HF_HOME. Refer to [HuggingFace documentation](https://huggingface.co/docs/huggingface_hub/en/package_reference/environment_variables#hfhome) for more information about these environment variables and refer to [HuggingFace Quickstart guide](https://huggingface.co/docs/huggingface_hub/en/quick-start#authentication) about steps to generate your HuggingFace access token.
75
58
59
+
### Install Latest NCCL
60
+
61
+
The default NCCL version in the docker container may lead to long NCCL initialization time on Blackwell architecture. Therefore, install `nvidia-nccl-cu12==2.26.2.post1` to fix it. Refer to [this GitHub issue](https://github.com/vllm-project/vllm/issues/20862) for more information.
62
+
63
+
`install_nccl.sh`
64
+
```
65
+
pip uninstall -y nvidia-nccl-cu12
66
+
pip install nvidia-nccl-cu12==2.26.2.post1
67
+
```
68
+
76
69
### Launch the vLLM Server
77
70
78
71
Below is an example command to launch the vLLM server with Llama-3.3-70B-Instruct-FP4/FP8 model. The explanation of each flag is shown in the "Configs and Parameters" section.
@@ -83,15 +76,12 @@ Below is an example command to launch the vLLM server with Llama-3.3-70B-Instruc
83
76
# They will be removed when the performance optimizations have been verified and enabled by default.
@@ -128,7 +120,7 @@ After the server is set up, the client can now send prompt requests to the serve
128
120
129
121
You can specify the IP address and the port that you would like to run the server with using these flags:
130
122
131
-
-`--host`: IP address of the server.
123
+
-`--host`: IP address of the server.
132
124
-`--port`: The port to listen to by the server.
133
125
134
126
Below are the config flags that we do not recommend changing or tuning with:
@@ -138,10 +130,9 @@ Below are the config flags that we do not recommend changing or tuning with:
138
130
-`--kv-cache-dtype`: Kv-cache data type. We recommend setting it to `fp8` for best performance.
139
131
-`--trust-remote-code`: Trust the model code.
140
132
-`--gpu-memory-utilization`: The fraction of GPU memory to be used for the model executor. We recommend setting it to `0.9` to use up to 90% of the GPU memory.
141
-
-`--compilation-config`: Configuration for vLLM compilation stage. We recommend setting it to `'{"pass_config":{"enable_fi_allreduce_fusion":true,"enable_noop":true},"custom_ops":["+quant_fp8","+rms_norm"],"full_cuda_graph":true}'` to enable all the necessary fusions for the best performance on Blackwell architecture. However, this feature is not supported on Hopper architecture yet.
142
-
- We are trying to enable these fusions by default so that this flag is no longer needed in the future.
143
-
-`--enable-chunked-prefill`: Enable chunked prefill stage. We recommend always adding this flag for best performance.
133
+
-`--compilation-config`: Configuration for vLLM compilation stage. We recommend setting it to `'{"pass_config":{"enable_fi_allreduce_fusion":true,"enable_attn_fusion":true,"enable_noop":true},"custom_ops":["+quant_fp8","+rms_norm"],"cudagraph_mode":"FULL_DECODE_ONLY","splitting_ops":[]}'` to enable all the necessary fusions for the best performance on Blackwell architecture. However, this feature is not supported on Hopper architecture yet.
144
134
-`--async-scheduling`: Enable asynchronous scheduling to reduce the host overheads between decoding steps. We recommend always adding this flag for best performance on Blackwell architecture. However, this feature is not supported on Hopper architecture yet.
135
+
-`--enable-chunked-prefill`: Enable chunked prefill stage. We recommend always adding this flag for best performance.
145
136
-`--no-enable-prefix-caching` Disable prefix caching. We recommend always adding this flag if running with synthetic dataset for consistent performance measurement.
146
137
-`--pipeline-parallel-size`: Pipeline parallelism size. We recommend setting it to `1` for best performance.
147
138
@@ -163,7 +154,7 @@ Refer to the "Balancing between Throughput and Latencies" about how to adjust th
163
154
164
155
### Basic Test
165
156
166
-
After the vLLM server is set up and shows `Application startup complete`, you can send requests to the server
157
+
After the vLLM server is set up and shows `Application startup complete`, you can send requests to the server
167
158
168
159
`run_basic_test.sh`
169
160
```
@@ -237,9 +228,9 @@ Explanations for the flags:
237
228
-`--num-prompts`: Total number of prompts used for performance benchmarking. We recommend setting it to at least five times of the `--max-concurrency` to measure the steady state performance.
238
229
-`--save-result --result-filename`: Output location for the performance benchmarking result.
239
230
240
-
### Interpreting `benchmark_serving.py` Output
231
+
### Interpreting Performance Benchmarking Output
241
232
242
-
Sample output by the `benchmark_serving.py` script:
233
+
Sample output by the `vllm bench serve` command:
243
234
244
235
```
245
236
============ Serving Benchmark Result ============
@@ -272,11 +263,11 @@ P99 E2EL (ms): xxx.xx
272
263
Explanations for key metrics:
273
264
274
265
-`Median Time to First Token (TTFT)`: The typical time elapsed from when a request is sent until the first output token is generated.
275
-
-`Median Time Per Output Token (TPOT)`: The typical time required to generate each token after the first one.
266
+
-`Median Time Per Output Token (TPOT)`: The typical time required to generate each token after the first one.
276
267
-`Median Inter-Token Latency (ITL)`: The typical time delay between the completion of one token and the completion of the next.
277
268
-`Median End-to-End Latency (E2EL)`: The typical total time from when a request is submitted until the final token of the response is received.
278
269
-`Output token throughput`: The rate at which the system generates the output (generated) tokens.
279
-
-`Total Token Throughput`: The combined rate at which the system processes both input (prompt) tokens and output (generated) tokens.
270
+
-`Total Token Throughput`: The combined rate at which the system processes both input (prompt) tokens and output (generated) tokens.
0 commit comments