DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to study Mixture of Experts layers in two models with LLM Architecture From Scratch

Read the MoE implementations in the DeepSeek v3 and Llama 4 Maverick folders to see how experts are used.

Short answer: Find the rows marked with a check in the Mixture of Experts column, including DeepSeek v3 and Llama 4 Maverick; then 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. All steps.

  • Research
  • Advanced
  • 1 hour 30 minutes
  • From the README
  • Any agent

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

  1. Find the rows marked with a check in the Mixture of Experts column, including DeepSeek v3 and Llama 4 Maverick.
  2. Open the deepseekv3 and llama4_maverick folders linked from the table.
  3. Locate the expert layer and the code that picks which experts run for each token.
  4. Write down the number of experts and the routing logic as each folder implements them.
  5. 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

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer