Update README.md
Browse files
README.md
CHANGED
|
@@ -62,13 +62,13 @@ output_ids = generated_ids[0][len(model_inputs.input_ids[0]) :].tolist()
|
|
| 62 |
output_text = tokenizer.decode(output_ids)
|
| 63 |
|
| 64 |
if "</think>" in output_text:
|
| 65 |
-
|
| 66 |
content = output_text.split("</think>")[-1].lstrip("\n").rstrip("</s>")
|
| 67 |
else:
|
| 68 |
-
|
| 69 |
content = output_text.rstrip("</s>")
|
| 70 |
|
| 71 |
-
print("
|
| 72 |
print("content:", content)
|
| 73 |
```
|
| 74 |
|
|
@@ -110,7 +110,7 @@ else:
|
|
| 110 |
reasoning_content = ""
|
| 111 |
content = output_text.rstrip("</s>")
|
| 112 |
|
| 113 |
-
print("
|
| 114 |
print("content:", content)
|
| 115 |
|
| 116 |
# For the next round, add the assistant's response and reasoning to the messages.
|
|
|
|
| 62 |
output_text = tokenizer.decode(output_ids)
|
| 63 |
|
| 64 |
if "</think>" in output_text:
|
| 65 |
+
reasoning_content = output_text.split("</think>")[0].rstrip("\n")
|
| 66 |
content = output_text.split("</think>")[-1].lstrip("\n").rstrip("</s>")
|
| 67 |
else:
|
| 68 |
+
reasoning_content = ""
|
| 69 |
content = output_text.rstrip("</s>")
|
| 70 |
|
| 71 |
+
print("reasoning content:", reasoning_content)
|
| 72 |
print("content:", content)
|
| 73 |
```
|
| 74 |
|
|
|
|
| 110 |
reasoning_content = ""
|
| 111 |
content = output_text.rstrip("</s>")
|
| 112 |
|
| 113 |
+
print("reasoning content:", reasoning_content)
|
| 114 |
print("content:", content)
|
| 115 |
|
| 116 |
# For the next round, add the assistant's response and reasoning to the messages.
|