Update synthetic.py
This commit is contained in:
parent
8e17139f21
commit
9b8556a100
1 changed files with 1 additions and 1 deletions
|
|
@ -206,7 +206,7 @@ class SyntheticDataKit:
|
|||
|
||||
with open(filename, "r") as f: text = f.read()
|
||||
|
||||
max_tokens = self.max_seq_length - self.max_generation_tokens*3 # * 3 to reduce errors
|
||||
max_tokens = self.max_seq_length - self.max_generation_tokens*2 - 128 # -128 to reduce errors
|
||||
if max_tokens <= 5:
|
||||
raise RuntimeError("Generation length is way too long!")
|
||||
input_ids = self.tokenizer(text, add_special_tokens = False).input_ids
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue