Minor improvements in GPT2 tokenizer (#3567)

* Fixing minor bugs in bpe_gpt2_preprocess

* Don't add bos token in test
This commit is contained in:
goerch 2023-10-10 18:59:52 +02:00 committed by GitHub
parent c5b49360d0
commit 233fc1c69f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 20 deletions

View file

@ -174,10 +174,8 @@ int main(int argc, char **argv) {
}
for (const auto & tok : res) {
ofs << tok << " ";
ofs << tok << " '" << llama_detokenize_spm(ctx, std::vector<int>{tok}) << "'" << std::endl;
}
ofs << "\n";
}
fprintf(stderr, "%s : tokens written to '%s'\n", __func__, (fname_text + ".tokcpp").c_str());