This commit is contained in:
Eric Wang 2023-04-13 13:52:17 -07:00
parent ea0e96b017
commit 65fb8225c0

View File

@ -156,7 +156,9 @@ def train(
user_prompt = prompter.generate_prompt( user_prompt = prompter.generate_prompt(
data_point["instruction"], data_point["input"] data_point["instruction"], data_point["input"]
) )
tokenized_user_prompt = tokenize(user_prompt, add_eos_token=add_eos_token) tokenized_user_prompt = tokenize(
user_prompt, add_eos_token=add_eos_token
)
user_prompt_len = len(tokenized_user_prompt["input_ids"]) user_prompt_len = len(tokenized_user_prompt["input_ids"])
if add_eos_token: if add_eos_token: