細かいミス修正
Browse files- package/ai.py +2 -2
package/ai.py
CHANGED
|
@@ -200,8 +200,8 @@ class AI:
|
|
| 200 |
|
| 201 |
for idx, prob in zip(top_indices, top_probs):
|
| 202 |
token_id = idx.item()
|
| 203 |
-
#
|
| 204 |
-
token = tokenizer.decode([token_id], skip_special_tokens=
|
| 205 |
token = _clean_text(token)
|
| 206 |
# 空文字列のトークンは除外
|
| 207 |
if not token:
|
|
|
|
| 200 |
|
| 201 |
for idx, prob in zip(top_indices, top_probs):
|
| 202 |
token_id = idx.item()
|
| 203 |
+
# 正規タグ(<|eot_id|>など)を保持するため、skip_special_tokens=False
|
| 204 |
+
token = tokenizer.decode([token_id], skip_special_tokens=False, clean_up_tokenization_spaces=False)
|
| 205 |
token = _clean_text(token)
|
| 206 |
# 空文字列のトークンは除外
|
| 207 |
if not token:
|