Skip to content

Commit 30b3e28

Browse files
committed
BugFix: qwen pp cannot send bool when using fuse loss
1 parent b4b93cd commit 30b3e28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

paddlenlp/transformers/qwen2/modeling.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1486,7 +1486,8 @@ def __init__(self, config: Qwen2Config, embedding_weights=None, transpose_y=Fals
14861486
def forward(self, hidden_states, tensor_parallel_output=None, batch_size=None):
14871487
# add this for fused_head_and_loss_fn
14881488
if self.config.use_fused_head_and_loss_fn:
1489-
return hidden_states, self.weight, None, self.transpose_y
1489+
# return hidden_states, self.weight, None, self.transpose_y
1490+
return hidden_states, self.weight, None, None
14901491

14911492
if self.config.sequence_parallel:
14921493
hidden_states = GatherOp.apply(hidden_states)

0 commit comments

Comments
 (0)