(
self, input_ids: npt.NDArray[np.intc], scores: npt.NDArray[np.single]
)
| 2496 | self.prompt_tokens = None |
| 2497 | |
| 2498 | def __call__( |
| 2499 | self, input_ids: npt.NDArray[np.intc], scores: npt.NDArray[np.single] |
| 2500 | ) -> npt.NDArray[np.single]: |
| 2501 | if self.prompt_tokens is None: |
| 2502 | self.prompt_tokens = len(input_ids) |
| 2503 | if len(input_ids) - self.prompt_tokens < self.min_tokens: |
| 2504 | scores[self.token_eos] = -np.inf |
| 2505 | return scores |
nothing calls this directly
no outgoing calls
no test coverage detected