fix llama_batch_ext_init_from_embd

This commit is contained in:
Xuan Son Nguyen
2025-03-14 11:17:22 +01:00
parent 07d84fa3c2
commit ba79369615
4 changed files with 14 additions and 10 deletions

View File

@ -938,11 +938,14 @@ extern "C" {
bool output_last);
// Same with llama_batch_init, but initializes the batch with the provided raw embeddings
// Size of embd should be n_tokens * n_embd
// n_embd is the number of embeddings per token, can be obtained from llama_model_n_embd()
// First token will be at position pos0
// The sequence ID will be fixed to seq_id
// The batch has to be freed with llama_batch_ext_free()
LLAMA_API struct llama_batch_ext * llama_batch_ext_init_from_embd(
float * embd,
size_t n_tokens,
size_t n_embd,
int32_t pos0,
int32_t seq_id);