mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-10-29 12:40:16 +08:00
remove endoftext etc
This commit is contained in:
1 parent
d1baf4cada
commit
69d1151e86
1 file changed
+1
-1
+1
-1
@@ -202,7 +202,7 @@ class GPT2Generator:
|
||||
out = out[:, len(context_tokens) :].tolist()
|
||||
for o in out:
|
||||
generated += 1
|
||||
text = self.tokenizer.decode(o, clean_up_tokenization_spaces=True)
|
||||
text = self.tokenizer.decode(o, clean_up_tokenization_spaces=True, skip_special_tokens=True)
|
||||
if self.stop_token:
|
||||
index = text.find(self.stop_token)
|
||||
if index == -1:
|
||||
|
||||
Reference in new issue
Block a user