[Spec Decode] Add kv_cache_dtype to speculative_config to control separately from target (#48787)
Signed-off-by: mgoin <mgoin64@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
7dc2698632
commit
8bfd683901
@@ -10,6 +10,7 @@ from pydantic import Field, SkipValidation, field_validator, model_validator
|
||||
from typing_extensions import Self
|
||||
|
||||
from vllm.config import LoadConfig
|
||||
from vllm.config.cache import CacheDType
|
||||
from vllm.config.kernel import MoEBackend
|
||||
from vllm.config.model import HfOverrides, ModelConfig
|
||||
from vllm.config.parallel import ParallelConfig
|
||||
@@ -118,6 +119,9 @@ class SpeculativeConfig:
|
||||
"""Attention backend to use for the draft model. When `None`, the backend is
|
||||
automatically selected. Useful when the drafter requires a different attention
|
||||
backend (e.g. DFlash needs a non-causal-capable backend like FLASH_ATTN)."""
|
||||
kv_cache_dtype: CacheDType | None = None
|
||||
"""KV cache dtype for the draft model. When `None`, the draft inherits the
|
||||
target model's `--kv-cache-dtype`."""
|
||||
max_model_len: int | None = Field(default=None, ge=1)
|
||||
"""The maximum model length of the draft model. Used when testing the
|
||||
ability to skip speculation for some sequences."""
|
||||
|
||||
Reference in New Issue
Block a user