Commit 61b57292 authored by Tian Yun's avatar Tian Yun
Browse files

Modified stopping criteria for gpt2

parent 0b8cb8b9
......@@ -139,7 +139,7 @@ class HFLM(BaseLM):
return transformers.StoppingCriteriaList([
MultitokenEOSCriteria(stopping_criteria_ids, self.tokenizer),
EOSCriteria(stopping_criteria_ids)
EOSCriteria(self.tokenizer.eos_token)
])
def _model_generate(self, context, max_length, stopping_criteria_ids):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment