docs(streaming): correct load_hot_layer's "page cache" backing claim - #118
Open
agourakis82 wants to merge 2 commits into
Open
agourakis82 wants to merge 2 commits into
agourakis82 wants to merge 2 commits into
Conversation
load_hot_layer()'s docstring described the hot-expert backing store as "page cache" that "survives across requests, counts ZERO toward MLX active" -- true of the zero-MLX-cost and survives-across-requests parts, but the backing is built with np.concatenate(rows), which copies. That makes it resident anonymous process memory, not mmap'd/file-backed page cache: it is not reclaimable by the OS the way page cache is, and does not shrink under memory pressure the way the docstring's "page cache" framing implies. Fixes the misleading description and the matching inline comment further down the same method. No behavior change. Addresses point 2 of Edge0-AI#106 (the README wording in points 1 and 3 was already addressed in the issue thread by the maintainer). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
agourakis82
force-pushed
the
fix/hot-layer-anonymous-memory-doc
branch
from
October 4, 2026 14:41
f772bf9 to
538b669
Compare
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.
Addresses point 2 of #106.
load_hot_layer()keeps copied NumPy buffers, not file-backed page cache. Clarify that these buffers survive across requests and are outside MLX active memory. They can be paged out by the OS, but cannot be discarded and reloaded from the checkpoint like clean mapped file pages.Documentation only: the docstring and inline comment change; execution is unchanged. Rebased onto the current
python/layout.Validation: default local suite, 79 passed, 1 skipped, 4 slow tests deselected (MLX 0.30.4, mlx-lm 0.31.0). No model-checkpoint benchmark was run.