llama : for clarity set is_encoding to true before building worst-case graph only if the model contains encoder
This commit is contained in:
parent
788b4d199e
commit
f356e27769
1 changed files with 2 additions and 1 deletions
|
@ -16706,7 +16706,8 @@ struct llama_context * llama_new_context_with_model(
|
||||||
|
|
||||||
ctx->sampling.rng = std::mt19937(params.seed);
|
ctx->sampling.rng = std::mt19937(params.seed);
|
||||||
ctx->logits_all = params.logits_all;
|
ctx->logits_all = params.logits_all;
|
||||||
ctx->is_encoding = true;
|
// build worst-case graph for encoder if a model contains encoder
|
||||||
|
ctx->is_encoding = llama_model_has_encoder(model);
|
||||||
|
|
||||||
uint32_t kv_size = cparams.n_ctx;
|
uint32_t kv_size = cparams.n_ctx;
|
||||||
ggml_type type_k = params.type_k;
|
ggml_type type_k = params.type_k;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue