Module llmsearch.scripts.stopping_criteria
Stopping criteria utilities for generation.
Classes
class MultiTokenStoppingCriteria (sequence_ids)
-
Criteria to stop on the specified multi-token sequence. A modified verion of Stopping Criteria forked and modified from lm-evaluation-harness That maintains a state for each batch of inputs which helps in knowing where to look.
Ancestors
- transformers.generation.stopping_criteria.StoppingCriteria
- abc.ABC
Methods
def reset(self)
-
Reset state before starting generation for a new batch
def set_state(self, batch_size, prompt_length)
-
Set state before starting generation for a new batch