mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-07-21 00:23:30 -05:00
Run quartodoc build against the refactored package (engine/ extracted from core/, infra->infrastructure): regenerate the API reference so every stub points at the new paths. Adds engine.*/infrastructure.* stubs, removes the 41 stale core.solver.* / core.engine.* / core.scenarios.* / core.config.* / core.evaluation.* / infra*.qmd orphans, and refreshes the package pages (core now primitives-only) + index. Verified: all 47 documented symbols resolve in the new package; every index link resolves; zero stale mlsysim.core.<engine-mod> / mlsysim.infra references anywhere in docs/. (objects.json inventory is gitignored -- regenerated at build.)
35 lines
984 B
Plaintext
35 lines
984 B
Plaintext
# engine.solver.MoERoutingModel { #mlsysim.engine.solver.MoERoutingModel }
|
|
|
|
```python
|
|
engine.solver.MoERoutingModel()
|
|
```
|
|
|
|
Models first-order MoE routing imbalance and expert-parallel all-to-all cost.
|
|
|
|
Sparse models decouple memory from compute, but routing is rarely perfectly
|
|
balanced. This model keeps the abstraction small: a single imbalance factor
|
|
inflates the effective active experts and the routed-token communication
|
|
volume. It does not simulate a router or token dispatcher.
|
|
|
|
## Methods
|
|
|
|
| Name | Description |
|
|
| --- | --- |
|
|
| [solve](#mlsysim.engine.solver.MoERoutingModel.solve) | Estimate effective active parameters and optional EP all-to-all latency. |
|
|
|
|
### solve { #mlsysim.engine.solver.MoERoutingModel.solve }
|
|
|
|
```python
|
|
engine.solver.MoERoutingModel.solve(
|
|
model,
|
|
batch_size,
|
|
seq_len,
|
|
precision='fp16',
|
|
ep_size=1,
|
|
routing_imbalance_factor=1.0,
|
|
fleet=None,
|
|
)
|
|
```
|
|
|
|
Estimate effective active parameters and optional EP all-to-all latency.
|