Update data preprocessing methods

This commit is contained in:
gongjy 2024-09-27 22:34:30 +08:00
parent 75753ea765
commit 2981d3ea86

View File

@ -107,6 +107,7 @@ if __name__ == "__main__":
print('问题:', prompt)
qa_index += 1
prompt = tokenizer.bos_token + prompt
x = tokenizer(prompt).data['input_ids']
x = (torch.tensor(x, dtype=torch.long, device=device)[None, ...])