docs(streaming): document warm_willneed as inert under prod_k8() - #120
Open
agourakis82 wants to merge 1 commit into
Open
agourakis82 wants to merge 1 commit into
agourakis82 wants to merge 1 commit into
Conversation
While investigating Edge0-AI#110 (edge0-8b first-token latency), traced why toggling warm_willneed had no visible effect on that tier: it's only read by StreamingSwitchGLU.prefetch() and stage_experts(), and stage_experts() early-returns immediately when staged is False. prod_k8() (edge0-8b's production profile) sets staged=False and history_prefetch=False, so neither call site that reads warm_willneed ever executes -- the flag is dead code for that tier's default config, not merely ineffective in this instance. Documents this in both the class docstring (options.py) and the streaming.md options table, so the next person investigating slow first-token latency on edge0-8b doesn't spend time on the same dead end. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
While investigating #110 (edge0-8b ~7-13s first-token latency), I traced why the reporter's
warm_willneedtoggle had no visible effect on that tier.Root cause
warm_willneedis only read byStreamingSwitchGLU.prefetch()andstage_experts()(src/edge0/streaming/layer.py).stage_experts()early-returns immediately whenself._staged_modeis False.LayerOptions.prod_k8()— edge0-8b's production profile — setsstaged=Falseandhistory_prefetch=False, so neither call site that readswarm_willneedever executes. The flag is dead code for edge0-8b's default configuration, not merely ineffective in one measurement.Fix
Documents this explicitly in both
options.py's class docstring anddocs/streaming.md's options table, so the next person chasing slow first-token latency on edge0-8b doesn't spend time on the same dead end.Test plan
Docs-only change.
pytest -m 'not slow': 79 passed, 1 skipped (no regressions, as expected).