Update README.md
Browse files
README.md
CHANGED
@@ -22,7 +22,7 @@ model = PeftModel.from_pretrained(model, "hiyouga/baichuan-7b-sft")
|
|
22 |
query = "晚上睡不着怎么办"
|
23 |
|
24 |
inputs = tokenizer(["<human>:{}\n<bot>:".format(query)], return_tensors="pt")
|
25 |
-
inputs =
|
26 |
generate_ids = model.generate(**inputs)
|
27 |
output = tokenizer.batch_decode(generate_ids)[0]
|
28 |
print(output)
|
|
|
22 |
query = "晚上睡不着怎么办"
|
23 |
|
24 |
inputs = tokenizer(["<human>:{}\n<bot>:".format(query)], return_tensors="pt")
|
25 |
+
inputs = inputs.to("cuda")
|
26 |
generate_ids = model.generate(**inputs)
|
27 |
output = tokenizer.batch_decode(generate_ids)[0]
|
28 |
print(output)
|