* Disable KV cache shifting automatically for unsupported models
instead of exiting directly
Signed-off-by: Molly Sophia <redacted>
* Update common/common.cpp
Co-authored-by: Georgi Gerganov <redacted>
---------
Signed-off-by: Molly Sophia <redacted>
Co-authored-by: Georgi Gerganov <redacted>
}
if (params.ctx_shift && !llama_kv_cache_can_shift(lctx)) {
- LOG_ERR("%s: KV cache shifting is not supported for this model (--no-context-shift to disable)'\n", __func__);
- llama_free_model(model);
- return iparams;
+ LOG_WRN("%s: KV cache shifting is not supported for this model, disabling KV cache shifting\n", __func__);
+ params.ctx_shift = false;
}
if (!params.control_vectors.empty()) {