Commit 17771a6
authored
feat(llamacpp): expand server flags + wire llamacpp-only sampling params (#8099)
Extension-level (settings.json + LlamacppConfig + args.rs):
- Adds --cache-ram, --cache-reuse, --swa-full, --keep flags
- Removes dead mirostat/grammar_file/json_schema_file entries that
had no readers anywhere
Per-model (predefined.ts modelSettings):
- Adds reasoning dropdown (auto/on/off) → --reasoning, restart-on-change
- ctx_len defaults to empty (auto-fit when --fit is on, fall back to
4096 in args.rs when fit is off to avoid OOM at n_ctx_train)
- v11→v13 storage migrations backfill reasoning, strip the stale
provider-level entry, and reset the prior 8192 ctx_len default
llamacpp-only sampling (predefinedParams.ts assistant params):
- Adds mirostat, mirostat_tau, mirostat_eta, grammar, json_schema
- Gates LLAMACPP_ONLY_PARAM_KEYS in createCustomFetch / MLX /
Foundation Models so they only reach the local llama-server
Platform-aware --fit default:
- Synchronous default flips fit on for non-macOS in onLoad
- migrateFitPlatformDefault probes GPUs via getSystemInfo and only
upgrades the v1 auto-default (false → true) when a discrete GPU
is present (NVIDIA or Vulkan DiscreteGpu); explicit user values
are preserved, probe failure retries on next launch
Misc:
- guest-js types/normalizer kept in sync with the Rust struct;
asBool gains an optional default
- ModelSetting renders dropdown rows full-width so titles aren't
squeezed; reasoning is hoisted to the top of the panel
- jan-cli's LlamacppConfig literal updated for the new fields
- New args.rs unit tests covering each flag's default-omits and
custom-value paths plus ctx_size fit interactions1 parent 691af63 commit 17771a6
11 files changed
Lines changed: 451 additions & 57 deletions
File tree
- extensions/llamacpp-extension
- src
- src-tauri
- plugins/tauri-plugin-llamacpp
- guest-js
- src
- src/bin
- web-app/src
- containers
- hooks
- lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
364 | 350 | | |
365 | 351 | | |
366 | | - | |
367 | | - | |
| 352 | + | |
| 353 | + | |
368 | 354 | | |
369 | | - | |
370 | | - | |
371 | | - | |
| 355 | + | |
372 | 356 | | |
373 | 357 | | |
374 | 358 | | |
375 | | - | |
376 | | - | |
377 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
378 | 362 | | |
379 | 363 | | |
380 | | - | |
381 | | - | |
| 364 | + | |
| 365 | + | |
382 | 366 | | |
383 | 367 | | |
384 | | - | |
385 | | - | |
| 368 | + | |
386 | 369 | | |
387 | 370 | | |
388 | 371 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
393 | 376 | | |
394 | | - | |
395 | | - | |
396 | | - | |
| 377 | + | |
397 | 378 | | |
398 | 379 | | |
399 | 380 | | |
400 | | - | |
401 | | - | |
402 | | - | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
403 | 384 | | |
404 | 385 | | |
405 | | - | |
406 | | - | |
407 | | - | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
408 | 390 | | |
409 | 391 | | |
410 | 392 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
138 | 143 | | |
139 | 144 | | |
140 | 145 | | |
| |||
155 | 160 | | |
156 | 161 | | |
157 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
158 | 166 | | |
159 | 167 | | |
160 | 168 | | |
| |||
256 | 264 | | |
257 | 265 | | |
258 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
259 | 308 | | |
260 | 309 | | |
261 | 310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
95 | 101 | | |
96 | 102 | | |
97 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
69 | 74 | | |
70 | 75 | | |
71 | 76 | | |
| |||
0 commit comments