MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / common_tokenize

Function common_tokenize

smallthinker/common/common.cpp:1264–1272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1262//
1263
1264std::vector<llama_token> common_tokenize(
1265 const struct llama_context * ctx,
1266 const std::string & text,
1267 bool add_special,
1268 bool parse_special) {
1269 const llama_model * model = llama_get_model(ctx);
1270 const llama_vocab * vocab = llama_model_get_vocab(model);
1271 return common_tokenize(vocab, text, add_special, parse_special);
1272}
1273
1274std::vector<llama_token> common_tokenize(
1275 const struct llama_vocab * vocab,

Callers 15

tokenized_promptMethod · 0.85
padding_seqMethod · 0.85
mtmd_cli_contextMethod · 0.85
mainFunction · 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
winogrande_scoreFunction · 0.85

Calls 7

llama_model_get_vocabFunction · 0.85
lengthMethod · 0.80
llama_get_modelFunction · 0.50
llama_tokenizeFunction · 0.50
dataMethod · 0.45
sizeMethod · 0.45
resizeMethod · 0.45

Tested by 7

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