Skip to content

vllm.entrypoints.serve.engine.protocol

Classes:

PromptTokenUsageInfo

Bases: OpenAIBaseModel

Attributes:

Source code in vllm/entrypoints/serve/engine/protocol.py
class PromptTokenUsageInfo(OpenAIBaseModel):
    cached_tokens: int | None = None
    created_cache_tokens: int | None = None
    multimodal_tokens: dict[str, int] | None = None
    """Prompt tokens contributed by each input modality, keyed by modality name
    (e.g. `image`, `audio`, `video`). A breakdown of the multimodal
    placeholder tokens already counted in `prompt_tokens`; `None` when the
    request has no multimodal input."""

multimodal_tokens = None class-attribute instance-attribute

Prompt tokens contributed by each input modality, keyed by modality name (e.g. image, audio, video). A breakdown of the multimodal placeholder tokens already counted in prompt_tokens; None when the request has no multimodal input.