Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmarks/benchmark_serving.py
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ def main(args: argparse.Namespace):
if args.result_dir:
file_name = os.path.join(args.result_dir, file_name)
with open(file_name, "w", encoding="utf-8") as outfile:
json.dump(result_json, outfile)
json.dump(result_json, outfile, ensure_ascii=False)
save_to_pytorch_benchmark_format(args, result_json, file_name)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def load_state_dict(self, state_dict):
def forward(self, hidden_states: paddle.Tensor, vl_moe_meta: VLMoEMeta):
if self.num_shared_experts > 0:
shared_experts_out = self.shared_experts(hidden_states)
hidden_states, vl_moe_meta.text_input, vl_moe_meta.image_input = text_image_gather_scatter(
hidden_states, text_input, image_input = text_image_gather_scatter(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里和xpu那个修改会冲突吗

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XPU 的 #4636 合入后,这个再合入就没问题

hidden_states,
vl_moe_meta.text_input,
vl_moe_meta.image_input,
Expand All @@ -286,8 +286,8 @@ def forward(self, hidden_states: paddle.Tensor, vl_moe_meta: VLMoEMeta):
vl_moe_meta.image_index,
True,
)
text_out = self.text_fused_moe(vl_moe_meta.text_input)
image_out = self.image_fused_moe(vl_moe_meta.image_input)
text_out = self.text_fused_moe(text_input)
image_out = self.image_fused_moe(image_input)
hidden_states, _, _ = text_image_gather_scatter(
hidden_states,
text_out,
Expand Down
Loading
Loading