File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
intel_extension_for_pytorch/transformers/models/reference
tests/cpu/hf_configs/deepseekv3 Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -829,7 +829,7 @@ def LlavaForConditionalGeneration_forward(
829829 )
830830
831831 # Get the target length
832- target_length = input_ids .shape [1 ]
832+ target_length = inputs_embeds .shape [1 ]
833833 past_length = first_layer_past_key_value .shape [- 1 ]
834834
835835 extended_attention_mask = torch .ones (
Original file line number Diff line number Diff line change @@ -531,8 +531,8 @@ def forward(self, hidden_states):
531531 topk_idx , topk_weight = self .gate (hidden_states )
532532 hidden_states = hidden_states .view (- 1 , hidden_states .shape [- 1 ])
533533 flat_topk_idx = topk_idx .view (- 1 )
534- if not self .training :
535- y = self .moe_infer (hidden_states , topk_idx , topk_weight ).view (* orig_shape )
534+ assert not self .training
535+ y = self .moe_infer (hidden_states , topk_idx , topk_weight ).view (* orig_shape )
536536 if self .config .n_shared_experts is not None :
537537 y = y + self .shared_experts (identity )
538538 return y
You can’t perform that action at this time.
0 commit comments