mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-07-19 10:37:11 +08:00
signature
Signed-off-by: NickLucche <nlucches@redhat.com>
This commit is contained in:
parent
ad85bded6c
commit
762ca9e38a
@ -534,9 +534,7 @@ class WhisperEncoder(nn.Module):
|
|||||||
sinusoids(*self.embed_positions.weight.shape)
|
sinusoids(*self.embed_positions.weight.shape)
|
||||||
)
|
)
|
||||||
|
|
||||||
def forward_conv(
|
def forward_conv(self, input_features: torch.Tensor) -> torch.Tensor:
|
||||||
self, input_features: torch.Tensor | list[torch.Tensor]
|
|
||||||
) -> torch.Tensor:
|
|
||||||
embeds = nn.functional.gelu(self.conv1(input_features))
|
embeds = nn.functional.gelu(self.conv1(input_features))
|
||||||
embeds = nn.functional.gelu(self.conv2(embeds))
|
embeds = nn.functional.gelu(self.conv2(embeds))
|
||||||
embeds = embeds.transpose(-1, -2)
|
embeds = embeds.transpose(-1, -2)
|
||||||
@ -557,7 +555,7 @@ class WhisperEncoder(nn.Module):
|
|||||||
hidden_states = self.layer_norm(hidden_states)
|
hidden_states = self.layer_norm(hidden_states)
|
||||||
return hidden_states
|
return hidden_states
|
||||||
|
|
||||||
def forward(self, input_features: torch.Tensor | list[torch.Tensor]):
|
def forward(self, input_features: torch.Tensor):
|
||||||
hidden_states = self.forward_conv(input_features)
|
hidden_states = self.forward_conv(input_features)
|
||||||
return self.forward_layers(hidden_states)
|
return self.forward_layers(hidden_states)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user