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
vLLM supports FP8 (8-bit floating point) weight and activation quantization using Intel® Neural Compressor (INC) on Intel® Gaudi® 2 and Intel® Gaudi® 3 AI accelerators.
7
+
Currently, quantization is validated only in Llama models.
8
+
9
+
Intel Gaudi supports quantization of various modules and functions, including, but not limited to `Linear`, `KVCache`, `Matmul` and `Softmax`. For more information, please refer to:
Measurement files are required to run quantized models with vLLM on Gaudi accelerators. The FP8 model calibration procedure is described in the [vllm-hpu-extention](https://github.com/HabanaAI/vllm-hpu-extension/tree/main/calibration/README.md) package.
14
+
15
+
!!! note
16
+
`QUANT_CONFIG` is an environment variable that points to the measurement or quantization [JSON config file](https://docs.habana.ai/en/latest/PyTorch/Inference_on_PyTorch/Quantization/Inference_Using_FP8.html#supported-json-config-file-options).
17
+
The measurement configuration file is used during the calibration procedure to collect measurements for a given model. The quantization configuration is used during inference.
18
+
19
+
## Run Online Inference Using FP8
20
+
21
+
Once you've completed the model calibration process and collected the measurements, you can run FP8 inference with vLLM using the following command:
If you are just prototyping or testing your model with FP8, you can use the `VLLM_SKIP_WARMUP=true` environment variable to disable the warmup stage, which can take a long time. However, we do not recommend disabling this feature in production environments as it causes a significant performance drop.
30
+
31
+
!!! tip
32
+
When using FP8 models, you may experience timeouts caused by the long compilation time of FP8 operations. To mitigate this problem, you can use the below environment variables:
33
+
`VLLM_ENGINE_ITERATION_TIMEOUT_S` - to adjust the vLLM server timeout. You can set the value in seconds, e.g., 600 equals 10 minutes.
34
+
`VLLM_RPC_TIMEOUT` - to adjust the RPC protocol timeout used by the OpenAI-compatible API. This value is in microseconds, e.g., 600000 equals 10 minutes.
35
+
36
+
## Run Offline Inference Using FP8
37
+
38
+
To run offline inference (after completing the model calibration process):
39
+
40
+
* Set the "QUANT_CONFIG" environment variable to point to a JSON configuration file with QUANTIZE mode.
41
+
* Pass `quantization=inc` and `kv_cache_dtype=fp8_inc` as parameters to the `LLM` object.
42
+
* Call shutdown method of the model_executor at the end of the run.
Copy file name to clipboardExpand all lines: docs/getting_started/installation/intel_gaudi.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ To verify that the Intel Gaudi software was correctly installed, run:
28
28
hl-smi # verify that hl-smi is in your PATH and each Gaudi accelerator is visible
29
29
apt list --installed | grep habana # verify that habanalabs-firmware-tools, habanalabs-graph, habanalabs-rdma-core, habanalabs-thunk and habanalabs-container-runtime are installed
30
30
pip list | grep habana # verify that habana-torch-plugin, habana-torch-dataloader, habana-pyhlml and habana-media-loader are installed
31
-
pip list | grep neural # verify that neural_compressor is installed
31
+
pip list | grep neural # verify that neural_compressor_pt is installed
32
32
```
33
33
34
34
Refer to [Intel Gaudi Software Stack Verification](https://docs.habana.ai/en/latest/Installation_Guide/SW_Verification.html#platform-upgrade)
@@ -120,12 +120,13 @@ docker run \
120
120
- Inference with [HPU Graphs](https://docs.habana.ai/en/latest/PyTorch/Inference_on_PyTorch/Inference_Using_HPU_Graphs.html)
0 commit comments