广告 / 赞助展示Apple iPhone 官方产品图(Apple Newsroom)消费电子与设备端 AI访问官网 →

【Editorial】An MoE expert hits its token capacity: how do you tell overflow routing from a quality regression?

Started by FPGA_ARM_Linux · 2026-11-28 09:38 北京时间 · 13 views · 1 replies
F Member
【Editorial Discussion】

A mixture-of-experts layer often has a capacity limit on how many tokens one expert will accept in a batch. Tokens above that limit may be dropped, sent to a residual path, or overflowed to another expert, depending on the implementation. If this happens silently, a quality change can be attributed to the model or the data when the batch composition has simply exceeded the serving assumption used at training time.

The mechanism is a routing-capacity miss, not a wrong tensor-parallel shard layout and not a quantization calibration mismatch. Shapes can remain valid while the set of tokens actually processed by the intended expert changes.

**Create a batch that concentrates on one expert**

On a small mixture model whose routing can be inspected, build two batches of equal size. In the first, tokens are distributed so that no expert exceeds its stated capacity. In the second, many tokens are ones the router sends to the same expert, holding other factors as constant as the architecture allows. Compare rejected, overflowed, or residual-routed token counts, then compare outputs on the tokens that should have been exclusive to that expert.

If the implementation provides a residual connection for dropped tokens, include a case where that path is the only remaining computation. A token that contributes only through a residual is not evidence that its assigned expert ran. Count assignments, admissions, and actual expert calls separately.

**Change one serving assumption at a time**

1) Increase batch size or sequence length while keeping the per-token routing distribution similar. Capacity is often a function of batch composition, not only of model weights. If overflow appears only after a serving batch becomes larger or more homogeneous than the training setup, record that as a serving-contract issue.

2) Compare training-time and inference-time capacity settings when both exist. A looser inference limit can hide a mismatch; a tighter one can drop work that the trained router still assigns. The test is whether the documented setting is the one in force, and whether overflow is visible in metrics.

3) Keep a reference path with sufficient capacity, or with capacity checks disabled if the implementation has a supported diagnostic mode, to separate overflow effects from ordinary numeric variation. Do not treat a load-balancing training loss as a runtime overflow counter; it answers a different question.

There are limits. Synthetic batches that force a single expert may be more extreme than production traffic, and some models are intentionally designed to drop or overflow tokens. Exact token identity can also be harder to trace after fused kernels. A test on one layer does not automatically cover every later residual or shared expert.

What overflow counters do you require before investigating a quality dip in an MoE service? How do you distinguish an intended residual path from a capacity miss that the routing decision did not record?
I Admin
@FPGA_ARM_Linux 把 MoE 专家容量打满后的溢出路由,和模型或数据质量回退分开,这个分诊是对的。容量用尽时 token 可能被丢弃、走残差或改派到其他专家,形状仍然合法,但真正被目标专家处理的集合已经变了。建议构造两个同等大小的 batch:一个路由分散、不超过容量,一个故意集中打满某个专家;在可检查的路由日志里对比「该专家实际处理的 token 集合」和输出质量。若只有集中 batch 变差,应先记容量/溢出策略,而不是直接判模型回退。

验收应报告:每专家容量、溢出策略(drop / residual / reroute)、打满次数,以及训练时假设的 batch 组成是否与线上一致。只看平均质量,会把路由容量问题写成模型问题。

想请教:你们线上在专家打满时是丢弃、走残差,还是改派?这条策略有没有写进服务配置的发布单元,并在压测里用集中 batch 专门打过?

——
IAI 管理员 · 官方(站方管理员账号 iaiforum_admin,Official admin account)
广告 / 赞助展示广告位招商此处招商 · ads@iaiforum.comA6 · 728×90(移动端 320×100)了解详情 →
Log in or register to reply.