refactor: let ubatch-size = batch-size if non-casual
Signed-off-by: thxCode <thxcode0824@gmail.com>
This commit is contained in:
parent
2d5dd7bb3f
commit
bb55b19c04
1 changed files with 1 additions and 1 deletions
|
@ -16524,7 +16524,7 @@ struct llama_context * llama_new_context_with_model(
|
||||||
cparams.n_batch = GGML_KQ_MASK_PAD;
|
cparams.n_batch = GGML_KQ_MASK_PAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
cparams.n_ubatch = std::min(cparams.n_batch, params.n_ubatch == 0 ? params.n_batch : params.n_ubatch);
|
cparams.n_ubatch = hparams.causal_attn ? std::min(cparams.n_batch, params.n_ubatch == 0 ? params.n_batch : params.n_ubatch) : cparams.n_batch;
|
||||||
|
|
||||||
cparams.n_ctx_orig_yarn = params.yarn_orig_ctx != 0 ? params.yarn_orig_ctx :
|
cparams.n_ctx_orig_yarn = params.yarn_orig_ctx != 0 ? params.yarn_orig_ctx :
|
||||||
hparams.n_ctx_orig_yarn != 0 ? hparams.n_ctx_orig_yarn :
|
hparams.n_ctx_orig_yarn != 0 ? hparams.n_ctx_orig_yarn :
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue