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

Function common_detokenize

smallthinker/common/common.cpp:1315–1319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1313}
1314
1315std::string common_detokenize(const struct llama_context * ctx, const std::vector<llama_token> & tokens, bool special) {
1316 const llama_model * model = llama_get_model(ctx);
1317 const llama_vocab * vocab = llama_model_get_vocab(model);
1318 return common_detokenize(vocab, tokens, special);
1319}
1320
1321std::string common_detokenize(const struct llama_vocab * vocab, const std::vector<llama_token> & tokens, bool special) {
1322 std::string text;

Callers 5

mainFunction · 0.85
detokenizeMethod · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 8

llama_model_get_vocabFunction · 0.85
maxFunction · 0.85
llama_detokenizeFunction · 0.85
llama_get_modelFunction · 0.50
resizeMethod · 0.45
capacityMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by 3

mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68