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

Method n_tokens

subprojects/llama.cpp/tools/server/server-task.cpp:1855–1863  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1853}
1854
1855size_t server_prompt_cache::n_tokens() const {
1856 size_t res = 0;
1857
1858 for (const auto & state : states) {
1859 res += state.n_tokens();
1860 }
1861
1862 return res;
1863}
1864
1865server_prompt * server_prompt_cache::alloc(const server_prompt & prompt, size_t state_size) {
1866 // first check if the current state is contained fully in the cache

Callers 13

get_n_draft_maxMethod · 0.45
releaseMethod · 0.45
on_prompt_evalMethod · 0.45
on_decodedMethod · 0.45
try_clear_idle_slotsMethod · 0.45
process_tokenMethod · 0.45
send_errorMethod · 0.45
send_partial_responseMethod · 0.45
send_final_responseMethod · 0.45
send_embeddingMethod · 0.45
send_rerankMethod · 0.45
update_slotsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected