mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-06-28 20:25:20 +00:00
rename to init_from_text
This commit is contained in:
@ -36,8 +36,8 @@ typedef std::unique_ptr<llama_adapter_lora, llama_adapter_lora_deleter> llama_ad
|
||||
struct llama_batch_ext_ptr : std::unique_ptr<llama_batch_ext, llama_batch_ext_deleter> {
|
||||
llama_batch_ext_ptr(llama_batch_ext * batch) : std::unique_ptr<llama_batch_ext, llama_batch_ext_deleter>(batch) {}
|
||||
|
||||
// convience function to create a batch from text tokens, without worrying about manually freeing it
|
||||
static llama_batch_ext_ptr from_text(llama_token * tokens,
|
||||
// convenience function to create a batch from text tokens, without worrying about manually freeing it
|
||||
static llama_batch_ext_ptr init_from_text(llama_token * tokens,
|
||||
int32_t n_tokens,
|
||||
int32_t pos0,
|
||||
int32_t seq_id,
|
||||
@ -45,7 +45,8 @@ struct llama_batch_ext_ptr : std::unique_ptr<llama_batch_ext, llama_batch_ext_de
|
||||
return llama_batch_ext_ptr(llama_batch_ext_init_from_text(tokens, n_tokens, pos0, seq_id, output_last));
|
||||
}
|
||||
|
||||
static llama_batch_ext_ptr from_embd(float * embd,
|
||||
// convenience function to create a batch from text embeddings, without worrying about manually freeing it
|
||||
static llama_batch_ext_ptr init_from_embd(float * embd,
|
||||
size_t n_tokens,
|
||||
size_t n_embd,
|
||||
int32_t pos0,
|
||||
|
Reference in New Issue
Block a user