feat: Add missing ctx-shift toggle (#5765)
* feat: Add missing ctx_shift * fix typo Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * refine description --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
parent
eaf4b1b954
commit
96ba42e411
@ -71,6 +71,15 @@
|
||||
"textAlign": "right"
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "context_shift",
|
||||
"title": "Context Shift",
|
||||
"description": "Allow model to cut text in the beginning to accommodate new text in its memory",
|
||||
"controllerType": "checkbox",
|
||||
"controllerProps":{
|
||||
"value": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "n_predict",
|
||||
"title": "Max Tokens to Predict",
|
||||
|
||||
@ -57,6 +57,7 @@ type LlamacppConfig = {
|
||||
rope_freq_base: number
|
||||
rope_freq_scale: number
|
||||
reasoning_budget: number
|
||||
ctx_shift: boolean
|
||||
}
|
||||
|
||||
interface DownloadItem {
|
||||
@ -807,6 +808,8 @@ export default class llamacpp_extension extends AIEngine {
|
||||
args.push('--main-gpu', String(cfg.main_gpu))
|
||||
|
||||
// Boolean flags
|
||||
if (!cfg.ctx_shift)
|
||||
args.push('--no-context-shift')
|
||||
if (cfg.flash_attn) args.push('--flash-attn')
|
||||
if (cfg.cont_batching) args.push('--cont-batching')
|
||||
args.push('--no-mmap')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user