Update README.md
Browse files
README.md
CHANGED
@@ -21,8 +21,9 @@ input_ids = input_ids.cuda()
|
|
21 |
outputs = model.generate(input_ids, do_sample=True, max_new_tokens=1024, top_p=0.85,
|
22 |
temperature=0.3, repetition_penalty=1.2, eos_token_id=tokenizer.eos_token_id)
|
23 |
|
24 |
-
|
25 |
-
|
|
|
26 |
print(response)
|
27 |
```
|
28 |
|
|
|
21 |
outputs = model.generate(input_ids, do_sample=True, max_new_tokens=1024, top_p=0.85,
|
22 |
temperature=0.3, repetition_penalty=1.2, eos_token_id=tokenizer.eos_token_id)
|
23 |
|
24 |
+
input_ids_len = input_ids.size(1)
|
25 |
+
response_ids = outputs[0][input_ids_len:]
|
26 |
+
response = tokenizer.decode(response_ids)
|
27 |
print(response)
|
28 |
```
|
29 |
|