EventStream.transformer.generation.generation_stopping_criteria module¶
- class EventStream.transformer.generation.generation_stopping_criteria.MaxLengthCriteria(max_length: int)[source]¶
Bases:
StoppingCriteriaThis class can be used to stop generation whenever the full generated number of events exceeds
max_length.Keep in mind for decoder-only type of transformers, this will include the initial prompted events. :param max_length: The maximum length that the output sequence can have in number of events. :type max_length:
int