Repository navigation
Use --load-mode when llama-server supports it - #87
Merged
Merged
Conversation
Current llama.cpp rejects --no-mmap, --mlock and --mmap with
"invalid argument"; they were replaced by --load-mode
{auto,none,mmap,mlock,mmap+mlock,dio}. LaunchRecipe.to_argv hardcoded the
old flags, so any recipe with no_mmap or mlock set could not start against
a current llama-server.
Probe --load-mode in `llama-server --help` (supports_load_mode, assumed on
a failed probe like the other capabilities) and translate no_mmap -> none,
mlock -> mmap+mlock, both -> mlock. Binaries without --load-mode keep the
legacy flags. extra_flags stay verbatim.
Checked against real builds: b11476 and b10380 get --load-mode none, b9174
gets --no-mmap.
Fixes #86
Hotfix release: launch with --load-mode on llama.cpp builds that removed --no-mmap/--mlock (#86).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #86.
Current llama.cpp rejects
--no-mmap,--mlockand--mmap(error: invalid argument) in favor of--load-mode {auto,none,mmap,mlock,mmap+mlock,dio}.LaunchRecipe.to_argvhardcoded the old flags, so any recipe withno_mmapormlockset could not start against a currentllama-server.Change
server_caps: detect--load-modein--help(supports_load_mode); assumed on a failed probe, like the other capabilities.LaunchRecipe.to_argv(load_mode_flag=...):no_mmap->--load-mode none,mlock->--load-mode mmap+mlock, both ->--load-mode mlock, neither -> no flag. Binaries without--load-modekeep the legacy flags.extra_flagsstay verbatim.launcher.build_planpasses the probed capability.Checked against real builds
--load-modein helpno_mmap--load-mode none--load-mode none--no-mmapThe generated command line for a full recipe (
-fa on --load-mode mlock ...) is accepted by the b11476llama-server.Tests
-fa), the probe-failure default, andbuild_planend to end.Not in scope:
--no-mmap/--mlocka user puts inextra_flagsare still passed through unchanged and will still fail on current builds.