Skip to content

--load-mode none/mlock silently ignored for large lazy tensors (undocumented --lazy-mode override) - #169

Open
dan64 wants to merge 1 commit into
unslothai:masterfrom
dan64:report/lazy-mode-overrides-load-mode
Open

--load-mode none/mlock silently ignored for large lazy tensors (undocumented --lazy-mode override)#169
dan64 wants to merge 1 commit into
unslothai:masterfrom
dan64:report/lazy-mode-overrides-load-mode

Conversation

@dan64

@dan64 dan64 commented Sep 2, 2026

Copy link
Copy Markdown

Not a code PR — this repo has no Issues tab, so per convention I'm using a PR to report a bug (see BUG-lazy-mode-overrides-load-mode.md in this branch for the full writeup).

TL;DR

--lazy-mode (default auto) forces mmap + on-demand disk reads for large
architecture-marked tensors (e.g. per_layer_token_embd.weight in PLE-style archs like
qwen4exp), regardless of --load-mode. --load-mode none — documented as "no
special loading mode" — does not actually stop this. On a model whose file lives on
rotating storage, this causes ongoing disk I/O throughout generation (not just at load),
and a severe throughput regression (~22 t/s -> ~5 t/s observed, same hardware/model,
only difference being this lazy path engaging). Not mentioned in the release notes
either.

Reproduction is against the release asset (immutable), not the b10715-mix-86bd2d3 git
tag — that tag currently resolves to a commit that predates this code, since the mix
branch appears to be rebased/re-tagged over time:

https://github.com/unslothai/llama.cpp/releases/download/b10715-mix-86bd2d3/llama.cpp-source-commit-92cedc8679d145902ead3f006258e8672eac11e6.tar.gz

Full details, exact repro steps, and an illustrative fix in BUG-lazy-mode-overrides-load-mode.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant