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

Function batch_add_seq

smallthinker/examples/embedding/embedding.cpp:29–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29static void batch_add_seq(llama_batch & batch, const std::vector<int32_t> & tokens, llama_seq_id seq_id) {
30 size_t n_tokens = tokens.size();
31 for (size_t i = 0; i < n_tokens; i++) {
32 common_batch_add(batch, tokens[i], i, { seq_id }, true);
33 }
34}
35
36static void batch_decode(llama_context * ctx, llama_batch & batch, float * output, int n_seq, int n_embd, int embd_norm) {
37 const enum llama_pooling_type pooling_type = llama_pooling_type(ctx);

Callers 1

mainFunction · 0.70

Calls 2

common_batch_addFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected