WatNeru commited on
Commit
c7f69f6
·
1 Parent(s): 58dfa5f

細かいミス修正

Browse files
Files changed (1) hide show
  1. 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
- # Llama 3.2対応: skip_special_tokens=Trueで特殊トークンを除外
204
- token = tokenizer.decode([token_id], skip_special_tokens=True, clean_up_tokenization_spaces=False)
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: