mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-18 16:55:14 +02:00
added skip bos for tokenize endpoint
This commit is contained in:
+2
-2
@@ -277,11 +277,11 @@ extern "C"
|
||||
}
|
||||
|
||||
static std::vector<int> toks; //just share a static object for token counting
|
||||
token_count_outputs token_count(const char * input)
|
||||
token_count_outputs token_count(const char * input, bool addbos)
|
||||
{
|
||||
std::string inputstr = input;
|
||||
token_count_outputs output;
|
||||
toks = gpttype_get_token_arr(inputstr);
|
||||
toks = gpttype_get_token_arr(inputstr,addbos);
|
||||
output.count = toks.size();
|
||||
output.ids = toks.data(); //this may be slightly unsafe
|
||||
return output;
|
||||
|
||||
Reference in New Issue
Block a user