]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
args: refactor mlock/mmap/directio into load-mode (#20834)
authorAaron Teo <redacted>
Thu, 23 Jul 2026 12:32:56 +0000 (20:32 +0800)
committerGitHub <redacted>
Thu, 23 Jul 2026 12:32:56 +0000 (20:32 +0800)
commite6dd0e29a6751d4859abaa8899959f5ddf756f4e
tree827cd3dcc30624c09864ed6c19692d2c1c6de249
parentda296d6e726654949bce10d7cae9a2195d292bfc
args: refactor mlock/mmap/directio into load-mode (#20834)

* args: overhaul mmap/mlock/dio into single arg

Signed-off-by: Aaron Teo <redacted>
* docs: update docs with llama-gen-docs

Signed-off-by: Aaron Teo <redacted>
* chore: satisfy code quality

Signed-off-by: Aaron Teo <redacted>
* args: make the `+` sign an actual modifier now

Signed-off-by: Aaron Teo <redacted>
* chore: general code clean up + comments

Signed-off-by: Aaron Teo <redacted>
* arg: fix deprecated flags support

Signed-off-by: Aaron Teo <redacted>
* arg: quick sanity check

Signed-off-by: Aaron Teo <redacted>
* bench: sync llama-bench argument parsing

Signed-off-by: Aaron Teo <redacted>
* fix: bugfix variable behaviour + llama-bench lm column size

Signed-off-by: Aaron Teo <redacted>
* arg: inverse commands should do the opposite instead of doing nothing

Signed-off-by: Aaron Teo <redacted>
* bench: fix incorrect dash

Signed-off-by: Aaron Teo <redacted>
* bench: fix missing modifiers for deprecated flags

Signed-off-by: Aaron Teo <redacted>
* llama: switch back to thread_local

Signed-off-by: Aaron Teo <redacted>
* arg: switch back to single enum

Signed-off-by: Aaron Teo <redacted>
* docs: update arg docs

Signed-off-by: Aaron Teo <redacted>
* chore: fix missing `mlock` from llama_load_mode_from_str + cleanup llama-bench

Signed-off-by: Aaron Teo <redacted>
* llama: fix mlock not activating

Signed-off-by: Aaron Teo <redacted>
* arg: add deprecation warning when old and new flags are combined

Signed-off-by: Aaron Teo <redacted>
* arg: cont add comment for todo in the future

Signed-off-by: Aaron Teo <redacted>
* docs: sync with upstream

Signed-off-by: Aaron Teo <redacted>
* docs: re-sync with upstream again

Signed-off-by: Aaron Teo <redacted>
---------

Signed-off-by: Aaron Teo <redacted>
20 files changed:
common/arg.cpp
common/common.cpp
common/common.h
common/fit.cpp
examples/diffusion/diffusion-cli.cpp
examples/training/finetune.cpp
include/llama.h
scripts/compare-llama-bench.py
src/llama-model-loader.cpp
src/llama-model-loader.h
src/llama-model.cpp
src/llama-quant.cpp
src/llama.cpp
tests/test-arg-parser.cpp
tests/test-model-load-cancel.cpp
tests/test-quantize-stats.cpp
tools/cli/README.md
tools/completion/README.md
tools/llama-bench/llama-bench.cpp
tools/server/README.md