mirror of
https://github.com/Lizonghang/prima.cpp.git
synced 2025-09-05 22:09:03 +00:00
fix batch decoding and dynamic batching
This commit is contained in:
parent
e56be76bdf
commit
22a6ddef13
1 changed files with 2 additions and 2 deletions
|
@ -18282,8 +18282,8 @@ static int llama_decode_internal(
|
|||
if (meta.seq_id != nullptr) {
|
||||
batch_all.seq_id = (llama_seq_id **) malloc(cparams.n_ctx * sizeof(llama_seq_id *));
|
||||
for (size_t i = 0; i < cparams.n_ctx; ++i) {
|
||||
batch_all.seq_id[i] = (llama_seq_id *) malloc(meta.n_seq_id[i] * sizeof(llama_seq_id));
|
||||
std::memcpy(batch_all.seq_id[i], meta.seq_id[i], meta.n_seq_id[i] * sizeof(llama_seq_id));
|
||||
batch_all.seq_id[i] = (llama_seq_id *) malloc(sizeof(llama_seq_id));
|
||||
batch_all.seq_id[i][0] = meta.seq_id[i][0];
|
||||
}
|
||||
}
|
||||
if (meta.logits != nullptr) {
|
||||
|
|
Loading…
Add table
Reference in a new issue