Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
haohongxiang committed Feb 20, 2024
1 parent 7e643ad commit 48a03af
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ def _post_process_(outputs, input_ids, cur_len, origin_len, scores, unfinished_f

attn_mask = model_kwargs["attention_mask"]
# make the shape of attention_mask = (-1, -1, -1, -1) in dy2static.
paddle.jit.dy2static.utils_helper.set_dynamic_shape(model_kwargs["attention_mask"], [-1, -1, -1, -1])
paddle.jit.api.set_dynamic_shape(model_kwargs["attention_mask"], [-1, -1, -1, -1])
model_kwargs["cache"] = outputs[1] if isinstance(outputs, tuple) else None
if hasattr(paddle.framework, "_no_check_dy2st_diff"):
# TODO(wanghuancoder): _no_check_dy2st_diff is used to turn off the checking of behavior
Expand Down

0 comments on commit 48a03af

Please sign in to comment.