[V1] Implement vLLM V1 [1/N] (#9289)

This commit is contained in:
Woosuk Kwon
2024-10-22 01:24:07 -07:00
committed by GitHub
parent 3ddbe25502
commit 6c5af09b39
27 changed files with 3058 additions and 180 deletions

View File

@@ -0,0 +1,22 @@
from dataclasses import dataclass
from typing import List, Optional
import torch
@dataclass
class SamplingMetadata:
temperature: torch.Tensor
all_greedy: bool
all_random: bool
top_p: torch.Tensor
top_k: torch.Tensor
no_top_p: bool
no_top_k: bool
generators: List[Optional[torch.Generator]]
no_generator: bool
max_num_logprobs: int