Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions vllm/models/deepseek_v4/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,15 @@ def _resolve_dsv4_kv_cache_dtype(
"""
if use_fp8_ds_mla_layout:
# fp8_ds_mla block format: UE8M0 block-scaled fp8 packed as uint8.
assert kv_cache_dtype.startswith("fp8"), (
f"DeepseekV4 fp8_ds_mla layout only supports fp8 kv-cache, "
f"got {kv_cache_dtype}"
)
if kv_cache_dtype == "auto":
kv_cache_dtype = "fp8"
if not kv_cache_dtype.startswith("fp8"):
raise ValueError(
"DeepseekV4 fp8_ds_mla layout only supports fp8 "
f"kv-cache, got {kv_cache_dtype}. Please set "
"`--kv-cache-dtype fp8` or select a backend that supports "
"bfloat16 KV cache."
)
if kv_cache_dtype != "fp8_ds_mla":
if cache_config is not None:
cache_config.cache_dtype = "fp8_ds_mla"
Expand Down
Loading