[V0 Deprecation] Remove V0 Sequence class & Sampler (#25332)
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu> Signed-off-by: Woosuk Kwon <woosuk@thinkingmachines.ai>
This commit is contained in:
@@ -697,16 +697,12 @@ class Phi4FlashForCausalLM(nn.Module, HasInnerState, IsHybrid, SupportsV0Only):
|
||||
hidden_states: torch.Tensor,
|
||||
sampling_metadata: SamplingMetadata,
|
||||
) -> Optional[torch.Tensor]:
|
||||
# If the shape is the same, it means that we have already
|
||||
# prune hidden states manually.
|
||||
prune_hidden_states = hidden_states.size(
|
||||
0) != sampling_metadata.selected_token_indices.size(0)
|
||||
processed_logits = self.logits_processor(
|
||||
self.lm_head,
|
||||
hidden_states,
|
||||
sampling_metadata,
|
||||
self.embedding_bias,
|
||||
prune_hidden_states=prune_hidden_states)
|
||||
)
|
||||
return processed_logits
|
||||
|
||||
def load_weights(
|
||||
|
||||
Reference in New Issue
Block a user