Skip to content

Commit f49a5ea

Browse files
committed
Replace Optional[T] with T | None
Signed-off-by: Tomas Ruiz <[email protected]>
1 parent c9ff19a commit f49a5ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vllm/v1/spec_decode/draft_model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: Apache-2.0
22
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
33
from dataclasses import dataclass, replace
4-
from typing import Any, Optional
4+
from typing import Any
55

66
import torch
77

@@ -45,10 +45,10 @@ def propose(
4545
target_hidden_states: torch.Tensor,
4646
# [batch_size]
4747
next_token_ids: torch.Tensor,
48-
last_token_indices: Optional[torch.Tensor],
48+
last_token_indices: torch.Tensor | None,
4949
common_attn_metadata: CommonAttentionMetadata,
5050
sampling_metadata: SamplingMetadata,
51-
mm_embed_inputs: Optional[tuple[list[torch.Tensor], torch.Tensor]] = None,
51+
mm_embed_inputs: tuple[list[torch.Tensor], torch.Tensor] | None = None,
5252
) -> torch.Tensor:
5353
"""
5454
This function processes the inputs first before calling the .propose()

0 commit comments

Comments
 (0)