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

Function llama_batch_free

smallthinker/src/llama-batch.cpp:369–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367}
368
369void llama_batch_free(struct llama_batch batch) {
370 if (batch.token) free(batch.token);
371 if (batch.embd) free(batch.embd);
372 if (batch.pos) free(batch.pos);
373 if (batch.n_seq_id) free(batch.n_seq_id);
374 if (batch.seq_id) {
375 for (int i = 0; batch.seq_id[i] != nullptr; ++i) {
376 free(batch.seq_id[i]);
377 }
378 free(batch.seq_id);
379 }
380 if (batch.logits) free(batch.logits);
381}

Callers 15

opt_epochMethod · 0.70
mainFunction · 0.50
~mtmd_cli_contextMethod · 0.50
mainFunction · 0.50
perplexity_v2Function · 0.50
perplexityFunction · 0.50
hellaswag_scoreFunction · 0.50
multiple_choice_scoreFunction · 0.50
kl_divergenceFunction · 0.50
~server_contextMethod · 0.50
launch_slot_with_taskMethod · 0.50

Calls

no outgoing calls

Tested by 2

common_speculative_freeFunction · 0.40
mainFunction · 0.40