Repository navigation
Conversation
…reset On Auto context, resolveLoadMaxSeqLength sent 0 for a GGUF load only when the active preset was the untouched built-in Default. Under a saved preset, or after any Run settings edit (which marks Default as modified), a reload of the same model and variant resent the resident fitted window with max_seq_length_auto_derived. The backend reads a positive max_seq_length as an explicit context and only re-fits it when MTP is forced, so switching the KV cache type, vision or GPUs kept the old window: a change that frees memory never grew it, and one that needs more memory kept the window and gave up something else (the vision projector moved to the CPU). An Auto GGUF load now always sends 0, so a reload is sized like a fresh load whatever preset is active. A typed Context Length is still sent as typed, and Manual memory with fixed layers still pins the resident context before the resolver runs. The replay flag no longer has a sender and is removed from the frontend; the backend keeps accepting it. The memory estimate follows the same rule.
… pin The config page decided whether a same-model reload keeps the resident context from the raw per-model gpuMemoryMode, but an unset per-model mode means the standing preference, which is what performLoad resolves. With 20 fixed layers, no per-model mode, Auto context and a standing Manual preference, Reload sends the resident 32768 while the estimate priced 0. Both fixed-layer checks on the page now go through fixedLayerContextPin, which resolves the mode the same way.
test_fixed_layer_gguf_pins_displayed_context and test_fixed_layer_pin_recomputed_after_committing_gpu_layers matched the inline conditions that moved into fixedLayerContextPin. They now check that the estimate pin reads the rendered loadableConfig and the Apply pin reads the committed effectiveConfig, both with the standing GPU memory preference.
…ory estimate context Every Auto GGUF load now sends 0, and the resident context is only known for a GGUF, so the estimate's resident fallback and its skip flag can no longer change the result. resolveEstimateContext takes the pin alone.
…and the config page performLoad kept its own copy of the Manual fixed-layer rule that keeps the resident context on a same-model Auto reload, so a change there was only caught by a source match. It now calls fixedLayerContextPin, which takes the resolved GPU memory mode and keeps no context of 0. The MLX estimate uses resolveEstimateContext, which now does the same thing. Tests check the rule by behavior instead of by source text.
Also clarify which loads fixedLayerContextPin answers for, describe resolveEstimateContext for both engines, and drop a comment that repeated the helper's docstring.
Owner
Author
|
Closing: staging run for unslothai#18379 at 6fa9600 is done. |
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.
Staging CI for unslothai#18379 at head 6fa9600, with base set to its merge-base with main (021b878). Not for merging.