Skip to content

Commit 5ba2396

Browse files
wxsIceyMengqingCao
authored andcommitted
fix bert model
Signed-off-by: Icey <1790571317@qq.com>
1 parent 9281baf commit 5ba2396

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

.github/workflows/_e2e_test.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
run: |
7777
pytest -sv tests/e2e/singlecard/test_aclgraph.py
7878
pytest -sv tests/e2e/singlecard/test_quantization.py
79-
# pytest -sv tests/e2e/singlecard/test_vlm.py::test_multimodal_vl
79+
pytest -sv tests/e2e/singlecard/test_vlm.py::test_multimodal_vl
8080
8181
- name: Run e2e test
8282
env:
@@ -100,7 +100,7 @@ jobs:
100100
pytest -sv tests/e2e/singlecard/test_profile_execute_duration.py
101101
pytest -sv tests/e2e/singlecard/test_quantization.py
102102
pytest -sv tests/e2e/singlecard/test_sampler.py
103-
# pytest -sv tests/e2e/singlecard/test_vlm.py
103+
pytest -sv tests/e2e/singlecard/test_vlm.py
104104
105105
# ------------------------------------ v1 spec decode test ------------------------------------ #
106106
pytest -sv tests/e2e/singlecard/spec_decode_v1/test_v1_mtp_correctness.py
@@ -175,17 +175,17 @@ jobs:
175175
if: ${{ inputs.type == 'full' }}
176176
run: |
177177
pytest -sv tests/e2e/multicard/test_data_parallel.py
178-
pytest -sv tests/e2e/multicard/test_expert_parallel.py
178+
# pytest -sv tests/e2e/multicard/test_expert_parallel.py
179179
pytest -sv tests/e2e/multicard/test_external_launcher.py
180180
pytest -sv tests/e2e/multicard/test_fused_moe_allgather_ep.py
181181
pytest -sv tests/e2e/multicard/test_ilama_lora_tp2.py
182182
183183
# To avoid oom, we need to run the test in a single process.
184184
pytest -sv tests/e2e/multicard/test_offline_inference_distributed.py::test_models_distributed_QwQ
185-
pytest -sv tests/e2e/multicard/test_offline_inference_distributed.py::test_models_distributed_DeepSeek_multistream_moe
185+
# pytest -sv tests/e2e/multicard/test_offline_inference_distributed.py::test_models_distributed_DeepSeek_multistream_moe
186186
pytest -sv tests/e2e/multicard/test_offline_inference_distributed.py::test_models_distributed_Qwen3_W8A8
187187
pytest -sv tests/e2e/multicard/test_offline_inference_distributed.py::test_models_distributed_Qwen3_W4A8DYNAMIC
188-
pytest -sv tests/e2e/multicard/test_offline_inference_distributed.py::test_models_distributed_DeepSeek_W4A8DYNAMIC
188+
# pytest -sv tests/e2e/multicard/test_offline_inference_distributed.py::test_models_distributed_DeepSeek_W4A8DYNAMIC
189189
pytest -sv tests/e2e/multicard/test_offline_inference_distributed.py::test_sp_for_qwen3_moe
190190
pytest -sv tests/e2e/multicard/test_offline_inference_distributed.py::test_models_distributed_Qwen_Dense_with_flashcomm_v1
191191
pytest -sv tests/e2e/multicard/test_offline_inference_distributed.py::test_models_distributed_Qwen_Dense_with_prefetch_mlp_weight

vllm_ascend/patch/worker/patch_common/patch_roberta.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# limitations under the License.
1616
#
1717

18-
from typing import Optional
18+
from typing import Optional, Union
1919

2020
import torch
2121
from vllm.model_executor.models.roberta import (
@@ -71,11 +71,14 @@ def roberta_embedding_forward(
7171
self,
7272
input_ids: torch.Tensor,
7373
position_ids: torch.Tensor,
74+
inputs_embeds: Union[torch.Tensor, None] = None,
7475
) -> torch.Tensor:
7576

7677
token_type_ids = _decode_token_type_ids(input_ids)
7778

78-
inputs_embeds = self.word_embeddings(input_ids)
79+
if inputs_embeds is None:
80+
inputs_embeds = self.word_embeddings(input_ids)
81+
7982
position_embeddings = self.position_embeddings(position_ids)
8083

8184
token_type_embeddings = self.token_type_embeddings(token_type_ids)

vllm_ascend/worker/model_runner_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ def _init_mrope_positions(self, req_state: CachedRequestState):
773773
use_audio_in_video = True
774774

775775
req_state.mrope_positions, req_state.mrope_position_delta = \
776-
MRotaryEmbedding.get_input_positions_tensor(
776+
self.model.get_mrope_input_positions(
777777
req_state.prompt_token_ids,
778778
hf_config=self.model_config.hf_config,
779779
image_grid_thw=image_grid_thw,

0 commit comments

Comments
 (0)