Update data preprocessing methods
This commit is contained in:
parent
75753ea765
commit
2981d3ea86
@ -107,6 +107,7 @@ if __name__ == "__main__":
|
|||||||
print('问题:', prompt)
|
print('问题:', prompt)
|
||||||
qa_index += 1
|
qa_index += 1
|
||||||
|
|
||||||
|
prompt = tokenizer.bos_token + prompt
|
||||||
x = tokenizer(prompt).data['input_ids']
|
x = tokenizer(prompt).data['input_ids']
|
||||||
x = (torch.tensor(x, dtype=torch.long, device=device)[None, ...])
|
x = (torch.tensor(x, dtype=torch.long, device=device)[None, ...])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user