MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / common_tokenize

Function common_tokenize

subprojects/llama.cpp/common/common.cpp:1536–1544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1534//
1535
1536std::vector<llama_token> common_tokenize(
1537 const struct llama_context * ctx,
1538 const std::string & text,
1539 bool add_special,
1540 bool parse_special) {
1541 const llama_model * model = llama_get_model(ctx);
1542 const llama_vocab * vocab = llama_model_get_vocab(model);
1543 return common_tokenize(vocab, text, add_special, parse_special);
1544}
1545
1546std::vector<llama_token> common_tokenize(
1547 const struct llama_vocab * vocab,

Callers 15

mainFunction · 0.85
tokenized_promptMethod · 0.85
padding_seqMethod · 0.85
mtmd_cli_contextMethod · 0.85
prompt_addFunction · 0.85
prepare_guide_tokensFunction · 0.85
mainFunction · 0.85
perplexity_v2Function · 0.85
perplexityFunction · 0.85
hellaswag_scoreFunction · 0.85

Calls 8

llama_get_modelFunction · 0.85
llama_model_get_vocabFunction · 0.85
llama_tokenizeFunction · 0.85
minFunction · 0.85
lengthMethod · 0.65
sizeMethod · 0.65
dataMethod · 0.45
resizeMethod · 0.45

Tested by 7

mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
match_stringFunction · 0.68
test_sampler_chainFunction · 0.68
draftMethod · 0.68