keras-nlp icon indicating copy to clipboard operation
keras-nlp copied to clipboard

Consider an `early_stopping=True` flag for `generate()`

Open mattdangerw opened this issue 2 years ago • 1 comments

Currently our generate function always ceases when all sequences contain a new endoftext token. We might instead want to make this configurable, so that generation can continue past end of document markers.

mattdangerw avatar Apr 06 '23 01:04 mattdangerw

I am not sure if we need this, is it a valid/common use case to generate passing the end token?

chenmoneygithub avatar Apr 07 '23 00:04 chenmoneygithub

This is now configurable via stop_token_ids, closing.

mattdangerw avatar Aug 20 '24 00:08 mattdangerw