[Spec Decode] DSpark confidence-scheduled verification (#47808)
Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com> Signed-off-by: Lucas Wilkinson <LucasWilkinson@users.noreply.github.com> Signed-off-by: Benjamin Chislett <chislett.ben@gmail.com> Signed-off-by: Lucas Wilkinson <wilkinson.lucas@gmail.com> Signed-off-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: OpenAI Codex <codex@openai.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: Benjamin Chislett <chislett.ben@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: OpenAI Codex <noreply@openai.com>
This commit is contained in:
co-authored by
OpenAI Codex
Claude Opus 5
Benjamin Chislett
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Nick Hill
OpenAI Codex
parent
fe889ac925
commit
7f7a32cfec
@@ -180,6 +180,22 @@ def init_attn_backend(
|
||||
return attn_groups, attn_cg_support_info, kernel_block_sizes
|
||||
|
||||
|
||||
def get_query_lens_mismatch_unsupported_backend(
|
||||
attn_groups: list[list[AttentionGroup]],
|
||||
) -> str | None:
|
||||
"""Name the first backend needing the CPU query lengths to be exact, if any.
|
||||
|
||||
The attention selector already excludes these when adaptive verification is
|
||||
enabled, but models that hard-wire their backend never consult it. See
|
||||
AttentionBackend.supports_device_cpu_query_lens_mismatch().
|
||||
"""
|
||||
for groups in attn_groups:
|
||||
for group in groups:
|
||||
if not group.backend.supports_device_cpu_query_lens_mismatch():
|
||||
return group.backend.__name__
|
||||
return None
|
||||
|
||||
|
||||
def _allocate_kv_cache(
|
||||
kv_cache_config: KVCacheConfig, shared_layers: dict[str, str], device: torch.device
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user