Who it is forA researcher or engineer who is considering a Mixture of Experts design and needs reference code from models that the README lists as using it.
The problemMixture of Experts layers are hard to understand from papers alone, and the routing details differ between model families.
The outcomeA written note on how expert layers are structured in the two listed models, with the code locations for each part.
What you need first
- Python, as listed for the repo
- PyTorch, as stated in the repo description
- Basic familiarity with transformer attention and normalization layers
Steps
- Find the rows marked with a check in the Mixture of Experts column, including DeepSeek v3 and Llama 4 Maverick.
- Open the deepseekv3 and llama4_maverick folders linked from the table.
- Locate the expert layer and the code that picks which experts run for each token.
- Write down the number of experts and the routing logic as each folder implements them.
- Compare the two notes and list where the designs match and where they differ.
Prompt for your agent
In the repo YeonwooSung/llm-architecture-from-scratch, open the deepseekv3 and llama4_maverick folders and describe how each one implements its Mixture of Experts layer. Output a comparison table of expert structure and routing. Verify each claim against the code in the folder before reporting.
Caveat. The README marks only some models with Mixture of Experts, and the in-progress models listed at the bottom are not yet in the table.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for YeonwooSung/llm-architecture-from-scratch and "Study Mixture of Experts layers in two models"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer