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

Function common_token_to_piece

subprojects/llama.cpp/common/common.cpp:1568–1572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1566}
1567
1568std::string common_token_to_piece(const struct llama_context * ctx, llama_token token, bool special) {
1569 const llama_model * model = llama_get_model(ctx);
1570 const llama_vocab * vocab = llama_model_get_vocab(model);
1571 return common_token_to_piece(vocab, token, special);
1572}
1573
1574std::string common_token_to_piece(const struct llama_vocab * vocab, llama_token token, bool special) {
1575 std::string piece;

Callers 15

mainFunction · 0.85
tokens_to_strFunction · 0.85
generate_responseFunction · 0.85
mainFunction · 0.85
populate_token_probsMethod · 0.85
process_single_taskMethod · 0.85
update_slotsMethod · 0.85
get_metaMethod · 0.85
init_routesMethod · 0.85
tokens_to_strFunction · 0.85

Calls 5

llama_get_modelFunction · 0.85
llama_model_get_vocabFunction · 0.85
llama_token_to_pieceFunction · 0.85
sizeMethod · 0.65
resizeMethod · 0.45

Tested by 5

mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
draftMethod · 0.68