output_templates.py 385 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
from typing import NamedTuple

import torch
from vllm.sequence import IntermediateTensors


class OmniOutput(NamedTuple):
    """Output from the merged Omni model containing both text and audio."""

    text_hidden_states: torch.Tensor
    multimodal_outputs: dict | None = None
    intermediate_tensors: IntermediateTensors | None = None
    next_token_id: torch.Tensor | None = None