zxdu20 commited on
Commit
6650ae3
2 Parent(s): 7e69b85 61eee50

Merge branch 'main' of https://huggingface.co/THUDM/chatglm-6b

Browse files
Files changed (1) hide show
  1. modeling_chatglm.py +1 -1
modeling_chatglm.py CHANGED
@@ -55,7 +55,7 @@ class InvalidScoreLogitsProcessor(LogitsProcessor):
55
  def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor) -> torch.FloatTensor:
56
  if torch.isnan(scores).any() or torch.isinf(scores).any():
57
  scores.zero_()
58
- scores[..., 20005] = 5e4
59
  return scores
60
 
61
 
 
55
  def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor) -> torch.FloatTensor:
56
  if torch.isnan(scores).any() or torch.isinf(scores).any():
57
  scores.zero_()
58
+ scores[..., 5] = 5e4
59
  return scores
60
 
61