server : fix free of spec context and batch (#10651)
Some checks are pending
Python check requirements.txt / check-requirements (push) Waiting to run
flake8 Lint / Lint (push) Waiting to run
Python Type-Check / pyright type-check (push) Waiting to run

ggml-ci
This commit is contained in:
Georgi Gerganov 2024-12-07 11:52:44 +02:00 committed by GitHub
parent 3df784b305
commit c2a16c0bdb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -62,6 +62,10 @@ struct common_speculative * common_speculative_init(
} }
void common_speculative_free(struct common_speculative * spec) { void common_speculative_free(struct common_speculative * spec) {
if (spec == nullptr) {
return;
}
common_sampler_free(spec->smpl); common_sampler_free(spec->smpl);
llama_batch_free(spec->batch); llama_batch_free(spec->batch);

View File

@ -720,7 +720,7 @@ struct server_slot {
int id; int id;
int id_task = -1; int id_task = -1;
llama_batch batch_spec; llama_batch batch_spec = {};
llama_context * ctx_dft = nullptr; llama_context * ctx_dft = nullptr;