Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tokenizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class GPT2Tokenizer extends Tokenizer {
const encoded_bytes = this.textEncoder.encode(token);
let bytes = [];
for (let i = 0; i < encoded_bytes.length; i++) {
bytes.push(this.byte_encoder[encoded_bytes[i].toString()]);
bytes.push(this.byte_encoder[encoded_bytes[i]]);
}
token = bytes.join("");

Expand Down