batch : fix sequence id ownership (#17915)

* batch : fix sequence id ownage

* cont : reduce allocations
This commit is contained in:
Georgi Gerganov
2025-12-11 14:29:47 +02:00
committed by GitHub
parent e4ae383317
commit d9f8f60618
2 changed files with 16 additions and 4 deletions
+4 -2
View File
@@ -56,13 +56,15 @@ struct llama_ubatch {
std::vector<float> embd;
std::vector<llama_pos> pos;
std::vector<int32_t> n_seq_id;
std::vector<llama_seq_id *> seq_id;
std::vector<llama_seq_id *> seq_id; // these point into the seq_id_data below
std::vector<llama_seq_id> seq_id_unq;
std::vector<int32_t> seq_idx;
std::vector<int8_t> output;
std::vector<llama_seq_id> seq_id_data;
};
// the llama_ubatch pointers above point to this data if set. otherwise - points to non-owning data
// the llama_ubatch pointers above point to this data if set. otherwise - point to external non-owning data
std::shared_ptr<data_t> data;
};