Update README.md
Browse files
README.md
CHANGED
@@ -67,9 +67,7 @@ inputs = processor.apply_chat_template(
|
|
67 |
# autoregressively complete prompt
|
68 |
output = model.generate(**inputs, max_new_tokens=100)
|
69 |
# print(processor.decode(output[0], skip_special_tokens=True))
|
70 |
-
|
71 |
-
response = processor.decode(output[0], skip_special_tokens=True)
|
72 |
-
cleaned_response = response.split("<|assistant|>")[1].split("<")[0].strip()
|
73 |
|
74 |
print(cleaned_response)
|
75 |
```
|
|
|
67 |
# autoregressively complete prompt
|
68 |
output = model.generate(**inputs, max_new_tokens=100)
|
69 |
# print(processor.decode(output[0], skip_special_tokens=True))
|
70 |
+
cleaned_response = processor.tokenizer.decode(output[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
|
|
|
|
|
71 |
|
72 |
print(cleaned_response)
|
73 |
```
|