Make prefill step size configurable via EXO_PREFILL_STEP_SIZE (#2141)#2155
Open
lollinng wants to merge 1 commit into
Open
Make prefill step size configurable via EXO_PREFILL_STEP_SIZE (#2141)#2155lollinng wants to merge 1 commit into
lollinng wants to merge 1 commit into
Conversation
The prefill step size was hardcoded to 4096. On some interconnects (e.g. RDMA over Thunderbolt across Macs) a smaller step keeps all devices busy and is dramatically faster, while 4096 can stall (exo-explore#2141). Read it from EXO_PREFILL_STEP_SIZE, defaulting to 4096 so behavior is unchanged unless set. Co-authored-by: Claude Opus 4.8 (1M context) <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.
Problem (#2141)
The prefill step size in the MLX generator is hardcoded:
As reported in #2141, on some setups (RDMA over Thunderbolt across Macs) a step size of 4096 stalls — activity collapses to a single GPU and a query can hang for hours — while 1024 keeps all devices busy and responds in under a minute. The reporter asked for this to be a "hardcoded default, env, or commandline option."
Fix
Read the step size from
EXO_PREFILL_STEP_SIZE, defaulting to4096, matching exo's existingos.getenv("EXO_*", default)convention (e.g.EXO_OFFLINE,EXO_BOOTSTRAP_PEERS). Behavior is unchanged unless the env var is set, so users on affected interconnects can drop it to 1024 without a code change.Verification
ruff check(incl. import sort) clean on the file.