[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:
Michael Goin
2026-07-15 23:49:23 -06:00
committed by GitHub
co-authored by Claude Opus 4.8
parent 7dc2698632
commit 8bfd683901
6 changed files with 42 additions and 1 deletions
+9
View File
@@ -1300,6 +1300,15 @@ class SpecDecodeBaseProposer:
),
)
if spec_cfg.kv_cache_dtype is not None:
base = replace(
base,
cache_config=replace(
base.cache_config,
cache_dtype=spec_cfg.kv_cache_dtype,
),
)
return base
def _get_model(self) -> nn.Module: