Repository navigation
feat(moe): add elastic expert fallback executor with weight redistribution and residual bypass - #2457
Open
presentyourlove wants to merge 1 commit into
Conversation
…ution and residual bypass
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.
Description
This PR implements the Elastic MoE Fallback Executor (
ElasticMoEFallbackExecutor), providing resilient dynamic expert dropout handling, weight redistribution, and residual highway bypass to prevent inference failures caused by edge node timeouts or network disconnections.Background & Motivation
In edge decentralized MoE clusters operating over volatile wireless/consumer networks, remote worker nodes hosting routed experts can experience transient latency spikes (>100ms), packet loss, thermal sleep, or abrupt disconnections. Traditional distributed MoE runtimes crash or stall indefinitely when a selected expert fails to return activations. This PR guarantees continuous generation by gracefully redistributing lost weights among successful experts, or falling back to a zero-delta residual highway bypass if all selected experts drop.
Key Changes
Elastic MoE Fallback Data Models (
src/exo/shared/types/moe_fallback.py):ElasticMoEConfig: Immutable configuration specifyingexpert_timeout_ms,enable_residual_bypass, andmin_successful_experts.ExpertExecutionResult: Tracks expert dispatch status (SUCCESS,TIMEOUT,DISCONNECTED), original gating weights, and latency.MoEFallbackDecision: Captures successful vs skipped experts, redistributed weights, and bypass state.MoEFallbackTelemetry: Computes lost weight fractions, timeout/disconnection counts, and bypass occurrences.Elastic Fallback Executor Engine (
src/exo/worker/engines/moe/elastic_fallback_executor.py):$$\hat{w}{e} = \frac{w{e}}{\sum_{k \in \text{successful}} w_{k}}$$
Module Exports (
src/exo/worker/engines/moe/__init__.py):ElasticMoEFallbackExecutor.Unit Tests (
src/exo/shared/tests/test_elastic_moe_fallback.py):Verification
.venv/Scripts/pytest.exe src/exo/shared/tests/test_elastic_moe_fallback.py # 4 passed in 0.17s.venv/Scripts/ruff.exe check src/exo/shared/types/moe_fallback.py src/exo/worker/engines/moe/elastic_fallback_executor.py src/exo/worker/engines/moe/__init__.py src/exo/shared/tests/test_elastic_moe_fallback.py # All checks passed!Related Issues
人人都能跑llm.md(Dynamic Elastic Expert Pruning & Early-Exit Fallback)