JustinLin610
commited on
Commit
•
da187eb
1
Parent(s):
4e41480
fix overflow
Browse files- qwen_generation_utils.py +1 -1
qwen_generation_utils.py
CHANGED
@@ -346,7 +346,7 @@ class StopWordsLogitsProcessor(LogitsProcessor):
|
|
346 |
stopped_samples = self._calc_stopped_samples(input_ids)
|
347 |
for i, should_stop in enumerate(stopped_samples):
|
348 |
if should_stop:
|
349 |
-
scores[i, self.eos_token_id] = float(2**
|
350 |
return scores
|
351 |
|
352 |
def _tokens_match(self, prev_tokens: torch.LongTensor, tokens: List[int]) -> bool:
|
|
|
346 |
stopped_samples = self._calc_stopped_samples(input_ids)
|
347 |
for i, should_stop in enumerate(stopped_samples):
|
348 |
if should_stop:
|
349 |
+
scores[i, self.eos_token_id] = float(2**15)
|
350 |
return scores
|
351 |
|
352 |
def _tokens_match(self, prev_tokens: torch.LongTensor, tokens: List[int]) -> bool:
|