Skip to content

docs(streaming): document warm_willneed as inert under prod_k8() - #120

Open
agourakis82 wants to merge 1 commit into
Edge0-AI:mainfrom
agourakis82:docs/warm-willneed-inert-under-prod-k8
Open

agourakis82 wants to merge 1 commit into
Edge0-AI:mainfrom
agourakis82:docs/warm-willneed-inert-under-prod-k8

Conversation

@agourakis82

Copy link
Copy Markdown
Contributor

While investigating #110 (edge0-8b ~7-13s first-token latency), I traced why the reporter's warm_willneed toggle had no visible effect on that tier.

Root cause

warm_willneed is only read by StreamingSwitchGLU.prefetch() and stage_experts() (src/edge0/streaming/layer.py). stage_experts() early-returns immediately when self._staged_mode is False. LayerOptions.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 edge0-8b's default configuration, not merely ineffective in one measurement.

Fix

Documents this explicitly in both options.py's class docstring and docs/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).

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>
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