(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
| 435 | self.eos_token_id = eos_token_id |
| 436 | |
| 437 | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor) -> torch.FloatTensor: |
| 438 | cur_len = input_ids.shape[-1] |
| 439 | if cur_len < self.min_length: |
| 440 | scores[:, self.eos_token_id] = -float("inf") |
| 441 | return scores |
| 442 | |
| 443 | |
| 444 | class NoRepeatNGramLogitsProcessor(LogitsProcessor): |
nothing calls this directly
no outgoing calls
no test coverage detected