---
title: Qwen3.5-397B-A17B activates 10 of 512 routed experts plus one shared expert per token. Compared with Mixtral-style…
url: https://gurkanozkan.ai/learn/questions/recent-b-transformers-03/
markdown: https://gurkanozkan.ai/learn/questions/recent-b-transformers-03.md
kind: question
role: ML engineering
stage: Technical
difficulty: Hard
json: https://gurkanozkan.ai/api/learn/questions/recent-b-transformers-03.json
robots: noindex
---

# Qwen3.5-397B-A17B activates 10 of 512 routed experts plus one shared expert per token. Compared with Mixtral-style 2-of-8 routing, what do fine-grained and shared experts buy you, what do they cost in training and serving, and how does DeepSeek-V3's auxiliary-loss-free load balancing work?

ML engineering · Technical · Hard

## Answer

*Model answer, written in a candidate's voice*

### In short

- Fine-grained routing: 10-of-512 gives C(512,10) routed combinations vs 28 for 2-of-8, encouraging specialisation at similar active compute.
- Shared expert carries common knowledge so routed experts can specialise instead of duplicating it.
- Memory scales with total parameters (~397B resident) while per-token compute tracks ~17B active.
- Costs: many small expert matmuls need grouped-GEMM kernels, expert parallelism adds all-to-all traffic, and balancing 512 experts is harder.
- DeepSeek-V3-style balancing: per-expert bias shifts top-k selection only; overloaded experts get lower bias, underloaded get higher, gating weights use unbiased scores.
- At moderate decode batch nearly all experts are touched, so decode is memory-bandwidth-bound and the MoE speed edge shrinks.

### In full

The main win is combinatorial specialisation: Mixtral-style 2-of-8 has only 28 routed pairs, while 10-of-512 gives C(512,10) possible routed sets at roughly the same active compute, so experts can specialise much more finely. The shared expert is the other key idea: it holds common knowledge once, so the routed experts do not all need to relearn the same generic features. The trade-off is that memory still scales with total parameters, so the ~397B model must be resident, while compute per token tracks the ~17B active path. In practice this is expensive: many small expert matmuls need grouped-GEMM kernels, expert parallelism adds all-to-all communication, and balancing 512 experts is much harder than balancing 8. DeepSeek-V3-style auxiliary-loss-free balancing adds a per-expert bias to the routing scores used only for top-k selection, lowering the bias for overloaded experts and raising it for underloaded ones after each step, while the gating weights are computed from the unbiased scores so the balance signal does not distort the learned mixture. The caveat is serving: at moderate decode batch nearly every expert is touched each step, so decode becomes memory-bandwidth-bound and the MoE speed advantage shrinks.

*Checked against sources by an independent AI reviewer.*

## What a strong answer covers

- Many small experts give far more expert combinations at the same active compute, which encourages specialisation; a shared expert holds common knowledge so routed experts need not duplicate it.
- Memory still scales with total parameters (397B must be resident), while compute per token tracks the roughly 17B active.
- Costs: many small expert matmuls need grouped-GEMM kernels, expert parallelism adds all-to-all communication, and balancing 512 experts is harder.
- Auxiliary-loss-free balancing adds a per-expert bias to the routing scores used only for top-k selection, lowering it for overloaded experts and raising it for underloaded ones after each step; the gating weights use the unbiased scores.
- At moderate decode batch nearly every expert is touched each step, so decode becomes memory-bandwidth-bound and the MoE speed advantage shrinks.

## Common mistakes

- Saying fine-grained MoE reduces memory because each token uses few experts.
- Describing the bias term as changing the expert output weights.

## Follow-ups

- How would you shard 512 experts across GPUs, and what limits that?

## Topic guides

- [Distributed training and parallelism](https://gurkanozkan.ai/learn/topics/distributed-training.md)
- [LLM serving: latency, throughput and operations](https://gurkanozkan.ai/learn/topics/serving.md)
- [Transformers, attention and scaling](https://gurkanozkan.ai/learn/topics/transformers.md)
---

*Study material compiled with AI: drafted by a local model (Inkling 2 Mini) from public sources, then checked against those sources by independent AI reviewers (Claude) in November 2026. Not reviewed line by line by a person.*
