[Minor][Models] Fix Return Types of Llama & Eagle (#17220)

Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
This commit is contained in:
Woosuk Kwon
2025-04-25 21:54:47 -07:00
committed by GitHub
parent 7bd0c7745c
commit b278911229
3 changed files with 6 additions and 5 deletions

View File

@@ -345,7 +345,8 @@ class LlamaModel(nn.Module):
positions: torch.Tensor,
intermediate_tensors: Optional[IntermediateTensors],
inputs_embeds: Optional[torch.Tensor] = None,
) -> Union[torch.Tensor, IntermediateTensors]:
) -> Union[torch.Tensor, IntermediateTensors, tuple[torch.Tensor,
list[torch.Tensor]]]:
if get_pp_group().is_first_rank:
if inputs_embeds is not None:
hidden_states = inputs_embeds