Qingsong Lv commited on
Commit
8e68ce0
·
1 Parent(s): e06f497

Update modeling_chatglm.py

Browse files
Files changed (1) hide show
  1. modeling_chatglm.py +1 -1
modeling_chatglm.py CHANGED
@@ -1114,7 +1114,7 @@ class ChatGLMForConditionalGeneration(ChatGLMPreTrainedModel):
1114
  input_ids,
1115
  device=input_ids.device
1116
  )
1117
- attention_mask[:, :, -1:]
1118
  if position_ids is not None:
1119
  position_ids = position_ids[..., -1:]
1120
  else:
 
1114
  input_ids,
1115
  device=input_ids.device
1116
  )
1117
+ attention_mask = attention_mask[:, :, -1:]
1118
  if position_ids is not None:
1119
  position_ids = position_ids[..., -1:]
1120
  else: