Open rmallick6806 opened 1 year ago
How do I get it to stop generating any more text after a marker like a period? Would be super helpful since it generates lots of incomplete sentences currently.
eos = ai.tokenizer.convert_tokens_to_ids(ai.tokenizer.tokenize('.')[0]) completion = ai.generate( eos_token_id=eos, )
That will stop generation immediately upon hitting the eos (end-of-sentence) token.
How do I get it to stop generating any more text after a marker like a period? Would be super helpful since it generates lots of incomplete sentences currently.