Manages KV cache dtype registration and lookup for vLLM.
# Source: https://github.com/vllm-project/vllm | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from collections.abc import Callable
from dataclasses import field
from functools import cache
from typing import Any, ClassVar, Literal, Protocol, get_args, runtime_checkable
import torch
from pydantic import Field, field_validator, model_validator
from vllm.config.utils import config
from vllm.logger import init_logger
from vllm.utils.torch_utils import (
STR_DTYPE_TO_TORCH_DTYPE,
)
from vllm.v1.kv_cache_interface import (
KVQuantMode,
is_quantized_kv_cache,
kv_c
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key