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

Function eval_string

examples/llava/llava-cli.cpp:35–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35static bool eval_string(struct llama_context * ctx_llama, const char* str, int n_batch, int * n_past, bool add_bos){
36 std::string str2 = str;
37 std::vector<llama_token> embd_inp = ::llama_tokenize(ctx_llama, str2, add_bos);
38 eval_tokens(ctx_llama, embd_inp, n_batch, n_past);
39 return true;
40}
41
42// TODO: use common/sampling.h
43static llama_token sample_id(llama_context * ctx_llama, gpt_params & params) {

Callers 1

process_promptFunction · 0.85

Calls 2

eval_tokensFunction · 0.85
llama_tokenizeFunction · 0.50

Tested by

no test coverage detected