mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-09 11:13:26 +08:00
remove endoftext etc
This commit is contained in:
+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