server : fix free of spec context and batch

ggml-ci
This commit is contained in:
Georgi Gerganov 2024-12-04 11:33:09 +02:00
parent 2759916d86
commit 92e54fb8d8
No known key found for this signature in database
GPG key ID: 449E073F9DC10735
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) {
if (spec == nullptr) {
return;
}
common_sampler_free(spec->smpl);
llama_batch_free(spec->batch);

View file

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