intel / intel/llm-scaler

vllm fp8 quantization fails for Llama-3.1-8B-Instruct

Open
#287 3 comments 0 reactions 1 assignee Claimed by @hzjane View on GitHub
vllm
Dominant language
C++
Stars
529
Forks
80
Avg merge
9h 7m
Merged PRs (30d)
38

Description

docker image: `intel/llm-scaler-vllm:latest`
vllm server command:
```
vllm serve meta-llama/Llama-3.1-8B-Instruct \
--tensor-parallel-size 1 \
--max-model-len 4096 \
--max-num-seqs 1 \
--disable-log-requests \
--disable-log-stats \
--trust-remote-code \
--quantization fp8 \
--kv-cache-dtype fp8
```

Error
```bash
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] EngineCore failed to start.
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] Traceback (most recent call last):
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 833, in run_engine_core
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] engine_core = EngineCoreProc(*args, **kwargs)
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 606, in __init__
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] super().__init__(
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 109, in __init__
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] num_gpu_blocks, num_cpu_blocks, kv_cache_config = self._initialize_kv_caches(
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] ^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 231, in _initialize_kv_caches
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] available_gpu_memory = self.model_executor.determine_available_memory()
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/executor/abstract.py", line 126, in determine_available_memory
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] return self.collective_rpc("determine_available_memory")
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/executor/uniproc_executor.py", line 75, in collective_rpc
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] result = run_method(self.driver_worker, method, args, kwargs)
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/serial_utils.py", line 479, in run_method
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] return func(*args, **kwargs)
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] ^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 120, in decorate_context
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] return func(*args, **kwargs)
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] ^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/xpu_worker.py", line 107, in determine_available_memory
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] self.model_runner.profile_run()
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/gpu_model_runner.py", line 4137, in profile_run
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] hidden_states, last_hidden_states = self._dummy_run(
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] ^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 120, in decorate_context
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] return func(*args, **kwargs)
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] ^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/gpu_model_runner.py", line 3854, in _dummy_run
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] outputs = self.model(
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] ^^^^^^^^^^^
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py", line 1775, in _wrapped_call_impl
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] return self._call_impl(*args, **kwargs)
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py", line 1786, in _call_impl
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] return forward_call(*args, **kwargs)
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/llama.py", line 657, in forward
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] model_output = self.model(
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] ^^^^^^^^^^^
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/vllm/compilation/decorators.py", line 471, in __call__
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] output = TorchCompileWithNoGuardsWrapper.__call__(self, *args, **kwargs)
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/vllm/compilation/wrapper.py", line 149, in __call__
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] return self._compiled_callable(*args, **kwargs)
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/torch/_dynamo/eval_frame.py", line 841, in compile_wrapper
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] raise e.with_traceback(None) from e.__cause__ # User compiler error
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] torch._dynamo.exc.Unsupported: Operator does not support running with fake tensors
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] Explanation:
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] Hint: see https://docs.google.com/document/d/1GgvOe7C8_NVOMLOCwDaYV1mXXyHMXY7ExoewHqooxrs/edit#heading=h.64r4npvq0w0 for how to fix
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842]
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] Developer debug context: unsupported operator: torch_ipex.fp8_gemm_w8a16.xpu
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842]
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] For more details about this graph break, please visit: https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0090.html
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842]
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] from user code:
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/llama.py", line 456, in forward
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] hidden_states, residual = layer(positions, hidden_states, residual)
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/llama.py", line 364, in forward
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] hidden_states = self.self_attn(positions=positions, hidden_states=hidden_states)
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/llama.py", line 248, in forward
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] qkv, _ = self.qkv_proj(hidden_states)
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/linear.py", line 565, in forward
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] output_parallel = self.quant_method.apply(self, input_, bias)
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/quantization/ipex_quant.py", line 408, in apply
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] output = torch.ops.torch_ipex.fp8_gemm_w8a16(
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842]
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842] Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"
(EngineCore_DP0 pid=653) ERROR 02-12 18:07:09 [core.py:842]

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.