Fixed a encoding bug

This commit is contained in:
Christian Risi 2025-10-03 16:08:11 +02:00
parent 9c5f42153f
commit 55e0d2ac23

View File

@ -162,7 +162,11 @@ class NanoSocratesBPE(Encoder):
# in this case there was a candidate token to substitute the couple of element
NEW_PIECE.append(CANDIDATE_TOKEN)
index += 2
index += 1
if index == PIECE_LENGTH:
NEW_PIECE.append(piece[index])
index += 1
return NEW_PIECE