Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
yma11 committed Feb 25, 2025
1 parent c6147a3 commit e11d833
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions vllm/model_executor/models/mllama.py
Original file line number Diff line number Diff line change
Expand Up @@ -1029,10 +1029,12 @@ def forward(
# to 2D tensor to align with public vllm input_tokens shape. But this
# will face the graph building failure issue, still need to investigate.
assert len(residual.shape) == 3
if len(hidden_states.shape)==2:
hidden_states = hidden_states.view(residual.size(0), residual.size(1), residual.size(2))
if len(hidden_states.shape) == 2:
hidden_states = hidden_states.view(residual.size(0),
residual.size(1),
residual.size(2))
full_text_row_masked_out_mask = full_text_row_masked_out_mask.view(
hidden_states.size(0), -1, 1)
hidden_states.size(0), -1, 1)
hidden_states = full_text_row_masked_out_mask * hidden_states
hidden_states = residual + self.cross_attn_attn_gate.tanh(
) * hidden_states
Expand Down
3 changes: 2 additions & 1 deletion vllm/worker/hpu_enc_dec_model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import habana_frameworks.torch as htorch
import torch
from PIL import Image
from vllm_hpu_extension.ops import batch2block, block2batch

from vllm.attention import AttentionMetadata
Expand All @@ -21,7 +22,7 @@
from vllm.sequence import (CompletionSequenceGroupOutput, IntermediateTensors,
Logprob, SequenceData, SequenceGroupMetadata,
SequenceOutput)
from vllm.utils import is_fake_hpu
from vllm.utils import is_fake_hpu, is_list_of
from vllm.worker.hpu_model_runner import (HpuModelAdapter, HPUModelRunnerBase,
ModelInputForHPUWithSamplingMetadata,
setup_profiler, subtuple)
Expand Down

0 comments on commit e11d833

Please sign in to comment.