mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-04-28 16:27:04 +08:00
20 lines
424 B
Python
20 lines
424 B
Python
# SPDX-License-Identifier: Apache-2.0
|
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
|
|
|
from dataclasses import dataclass
|
|
from typing import Optional
|
|
|
|
import torch
|
|
|
|
|
|
@dataclass
|
|
class SamplingMetadata:
|
|
|
|
temperature: torch.Tensor
|
|
|
|
top_p: Optional[torch.Tensor]
|
|
top_k: Optional[torch.Tensor]
|
|
|
|
# None means no logprobs, 0 means sampled token logprobs only
|
|
max_num_logprobs: Optional[int]
|