Skip to content

Commit 8342fe8

Browse files
committed
revert the wstring tokenization. coherency was affected
1 parent 6da38b0 commit 8342fe8

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

koboldcpp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def utfprint(str):
225225
maxhordelen = 256
226226
modelbusy = False
227227
defaultport = 5001
228-
KcppVersion = "1.32.2"
228+
KcppVersion = "1.32.3"
229229
showdebug = True
230230

231231
class ServerRequestHandler(http.server.SimpleHTTPRequestHandler):

otherarch/mpt_v3.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ bool mpt_model_load(const std::string & fname, mpt_model & model, gpt_vocab & vo
8787
word.assign(buf.data(), len);
8888

8989
// Convert token from utf-8
90-
std::wstring word_multibytes = convert_to_wstring(word);
91-
if(word_multibytes!=L"")
92-
{
93-
word.resize(word_multibytes.size());
94-
for (int w = 0; w < word_multibytes.size(); w++) {
95-
word[w] = uint8_t(word_multibytes[w]);
96-
}
97-
}
90+
// std::wstring word_multibytes = convert_to_wstring(word);
91+
// if(word_multibytes!=L"")
92+
// {
93+
// word.resize(word_multibytes.size());
94+
// for (int w = 0; w < word_multibytes.size(); w++) {
95+
// word[w] = uint8_t(word_multibytes[w]);
96+
// }
97+
// }
9898

9999
vocab.token_to_id[word] = i;
100100
vocab.id_to_token[i] = word;

0 commit comments

Comments
 (0)