shibing624
commited on
Commit
·
0643042
1
Parent(s):
159258a
Update README.md
Browse files
README.md
CHANGED
@@ -79,7 +79,7 @@ for s in sents:
|
|
79 |
q = get_prompt(s)
|
80 |
input_ids = tokenizer(q).input_ids
|
81 |
generation_kwargs = dict(max_new_tokens=128, do_sample=True, temperature=0.8)
|
82 |
-
outputs = model.generate(input_ids=torch.as_tensor([input_ids]).to('cuda'), **generation_kwargs)
|
83 |
output_tensor = outputs[0][len(input_ids):]
|
84 |
response = tokenizer.decode(output_tensor, skip_special_tokens=True)
|
85 |
print(response)
|
|
|
79 |
q = get_prompt(s)
|
80 |
input_ids = tokenizer(q).input_ids
|
81 |
generation_kwargs = dict(max_new_tokens=128, do_sample=True, temperature=0.8)
|
82 |
+
outputs = model.generate(input_ids=torch.as_tensor([input_ids]).to('cuda:0'), **generation_kwargs)
|
83 |
output_tensor = outputs[0][len(input_ids):]
|
84 |
response = tokenizer.decode(output_tensor, skip_special_tokens=True)
|
85 |
print(response)
|