Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.
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 tiktoken.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class tiktoken {
for (const auto &[k, v] : encoder_) {
decoder_.emplace(v, k);
}
assert(encoder_.size() != decoder_.size() && "Encoder and decoder must be of equal length; maybe you had duplicate token indices in your encoder?");
assert(encoder_.size() == decoder_.size() && "Encoder and decoder must be of equal length; maybe you had duplicate token indices in your encoder?");

for (const auto &[k, v] : special_tokens_encoder) {
special_tokens_decoder.emplace(v, k);
Expand Down