[Model][Core] Add DeepSeek-V3 and Mixtral-8x7B MoE configs + disaggregated P/D scheduler#80
Open
buddywhitman wants to merge 1 commit into
Conversation
…gated P/D scheduler Adds two capabilities to VIDUR: 1. MoE model support (Issue microsoft#75): - BaseMoEModelConfig extending BaseModelConfig with num_experts, num_active_experts, expert_intermediate_dim, kv_lora_rank, etc. - DeepSeekV3ModelConfig (deepseek-ai/DeepSeek-V3): 256 experts, top-8 routing, MLA attention (kv_lora_rank=512, q_lora_rank=1536) - MixtralModelConfig (mistralai/Mixtral-8x7B-v0.1): 8 experts, top-2 - MoELayerExecutionTimePredictor: RF predictor extended with load- imbalance correction (lambda^0.72, closed-form multinomial approx) - Both configs auto-discovered via existing get_all_subclasses mechanism 2. Disaggregated P/D scheduler: - DisaggregatedScheduler: discrete-event simulation of separate prefill and decode worker fleets (Dynamo/Mooncake-style disaggregation) - KV transfer latency: 2 x layers x kv_heads x head_dim x seq_len x 2B - Configurable interconnect bandwidth (NVLink 600, IB 400, PCIe 64 GB/s) - Sweep prefill:decode ratio to find optimal fleet split - Returns p50/p90/p99 E2E latency, TTFT, KV transfer stats, utilization Also updates README.md (new model table entries) and adds docs/disaggregated_scheduling.md with usage examples and P/D ratio sweep. Runs make format (black + isort) on full vidur/ directory.
Author
|
@microsoft-github-policy-service agree |
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.
Adds two new capabilities:
MoE model support (related to Issue Support simulation of MoE model and Expert Parallelism #75):
Disaggregated prefill/decode scheduler:
FIX #75
Summary
1. MoE model configs
BaseMoEModelConfigextendingBaseModelConfigwithnum_experts,num_active_experts,expert_intermediate_dim,kv_lora_rank,q_lora_rank,expert_parallel_degree.Two concrete configs auto-discovered via the existing
get_all_subclassesmechanism:DeepSeekV3ModelConfig(deepseek-ai/DeepSeek-V3): 256 experts, top-8, MLA attentionMixtralModelConfig(mistralai/Mixtral-8x7B-v0.1): 8 experts, top-2MoELayerExecutionTimePredictorextends the RF predictor with load-imbalance features (closed-form multinomial approximation, λ^0.72 latency correction).2. Disaggregated prefill/decode scheduler
DisaggregatedSchedulersimulates separate prefill and decode worker fleets.2 × layers × kv_heads × head_dim × seq_len × 2B (fp16).Tests
Documentation
docs/disaggregated_scheduling.md: motivation, architecture diagram, KV transfer latency derivation with a worked DeepSeek-V3 example (NVLink ~0.13ms, IB ~0.20ms, PCIe ~1.25ms at seq_len=1024), usage example, and a P/D ratio sweep example.README.md"Supported Models" table updated with the two new MoE entries.Testing / Code quality
make format(isort --profile black+blackon the fullvidur/tree).python -m vidur.main -hlisting the new model names.python -m vidur.main --replica_config_model_name deepseek-ai/DeepSeek-V3 --replica_config_device a100 --cluster_config_num_replicas 1 --replica_config_tensor_parallel_size 8runs end-to-end.No breaking changes to existing models or configs — both new model configs and the disaggregated scheduler are additive and opt-in.
PR Checklist (Click to Expand)
Thank you for your contribution to Vidur! Before submitting the pull request, please ensure the PR meets the following criteria. This helps Vidur maintain the code quality and improve the efficiency of the review process.
PR Title and Classification
Only specific types of PRs will be reviewed. The PR title is prefixed appropriately to indicate the type of change. Please use one of the following:
[Bugfix]for bug fixes.[CI/Build]for build or continuous integration improvements.[Doc]for documentation fixes and improvements.[Model]for adding a new model or improving an existing model. Model name should appear in the title.[Profiling]For changes on the profiling module.[Core]for changes in the core simulator logic[Misc]for PRs that do not fit the above categories. Please use this sparingly.Note: If the PR spans more than one category, please include all relevant prefixes.
Code Quality
The PR need to meet the following code quality standards:
make formatto format your code.docs/source/if the PR modifies the user-facing behaviors of Vidur. It helps user understand and utilize the new features or changes.Notes for Large Changes
Please keep the changes as concise as possible. For major architectural changes (>500 LOC), we would expect a GitHub issue (RFC) discussing the technical design and justification. Otherwise, we will tag it with
rfc-requiredand might not go through the PR.Thank You
Finally, thank you for taking the time to read these guidelines and for your interest in contributing to Vidur. Your contributions make Vidur a great tool for everyone!