From 14206fd48832ab600d9db75f15acb5062ae2c296 Mon Sep 17 00:00:00 2001 From: stduhpf Date: Mon, 2 Sep 2024 16:31:46 +0200 Subject: [PATCH] fix: fix clip tokenizer (#383) --- clip.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clip.hpp b/clip.hpp index 62b8658..f9ac631 100644 --- a/clip.hpp +++ b/clip.hpp @@ -388,7 +388,7 @@ public: std::string token_str = token.str(); std::u32string utf32_token; for (int i = 0; i < token_str.length(); i++) { - char b = token_str[i]; + unsigned char b = token_str[i]; utf32_token += byte_encoder[b]; } auto bpe_strs = bpe(utf32_token);