leejunhyeok commited on
Commit
4ea8a04
·
verified ·
1 Parent(s): 5b8a431

Update logit_processors/logit_.py

Browse files
Files changed (1) hide show
  1. logit_processors/logit_.py +1 -1
logit_processors/logit_.py CHANGED
@@ -44,7 +44,7 @@ class ThinkLogitsProcessor:
44
  # If repetation detected, force </think>
45
  if self.find_repeated_ngrams(past_token_ids, n=CHUNK_SIZE):
46
  # Set all other logits to -inf except for </think>
47
- logits = torch.full_like(logits, torch.finfo(torch.bfloat16).min)
48
  logits[self.think_end_token] = 1.0
49
  else:
50
  # ratio
 
44
  # If repetation detected, force </think>
45
  if self.find_repeated_ngrams(past_token_ids, n=CHUNK_SIZE):
46
  # Set all other logits to -inf except for </think>
47
+ logits = torch.full_like(logits, torch.finfo(logits.dtype).min)
48
  logits[self.think_end_token] = 1.0
49
  else:
50
  # ratio