Skip to content

About

An educational routing game to learn about MoE LLMs

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📟 The Gating Crisis: Sparse MoE Router Simulator 🧠⚡

An interactive, educational system game designed to teach the mechanics of sparse Mixture of Experts (MoE) neural routing.

Architecture: Sparse MoE

Welcome, neural engineer. You have been put in charge of the Gating Network (Router) for a running Mixture of Experts (MoE) Large Language Model.

Your task is to route incoming multi-modal token streams ([T] Text, [M] Math, [V] Vision, [A] Audio, and [C] Code) to specialized Feed-Forward Network (FFN) experts in real-time. Since this is a Top-2 Routing network, you must dispatch every token to exactly two experts before it reaches the eviction threshold.

If you route tokens incorrectly, the model's output quality degrades into perplexity collapse. If you overload any individual expert beyond its queue limit, the system experiences Capacity Drops (loss of data).


🕹️ Game Mechanics (How to Play)

  • ⌨️ Hotkey Routing: Use numbers 1 to 8 (or 1 to 4 in simplified mode) to select FFN experts.
  • 🟡 Active Routing Runway: You can only route a token while it falls between the yellow dashed line (Routing Gateway Active) and the red dashed line (Gating Threshold). Keys pressed outside this zone will not register.
  • ⚙️ Adjustable Runway Size: Drag the slider to adjust the height of the active zone. Shorter runways mimic resource-constrained edge hardware, giving you less time to process inputs.
  • 🚀 Separated Pacing Controls: Configure the Token Spawn Interval and Token Movement Speed independently to test high-density throughput without causing visual overlapping.
  • 🕶️ Mask Routing Hints (Hard Mode): Toggle the hint switch to hide the recommended key badges on tokens and suppress the glowing outlines on FFN cards, forcing you to route based entirely on expert specialization knowledge.
  • 📊 Cognitive Latency Diagnostics: Measures your average cognitive dispatch speed (in milliseconds) from the moment a token crosses the active line.

🛠️ Hardware Tiers (Difficulty Presets)

Choose your gating hardware configuration before starting the run:

  1. 🏢 DataCenter (FP8 Over-provisioned) - Easy:
    • Spawn Interval: 5.0s | Movement Speed: 1.2x | Noise (Temp): 0.0 | Expert Capacity: 8
    • Clean signals, zero deflections, and wide queues. Great for training.
  2. 💻 Local 8x7B (Quantized) - Medium:
    • Spawn Interval: 6.8s | Movement Speed: 1.0x | Noise (Temp): 0.1 | Expert Capacity: 5
    • Standard development setup. Slight routing temperature noise may deflect inputs.
  3. 🍞 Edge Toaster (Low-power ASIC) - Hard:
    • Spawn Interval: 4.2s | Movement Speed: 1.4x | Noise (Temp): 0.4 | Expert Capacity: 3
    • High noise, tiny queues, and fast descent speeds. Extreme load balancing required.

📦 Local Setup & Deployment

1. Run Locally

The simulator is built with pure client-side HTML, CSS, and JS (utilizing browser-synthesized 8-bit audio). Spin up any local server in the repository root directory:

python -m http.server 8080

Then visit http://localhost:8080.

2. Deploy to Google Cloud Run

Easily host the game in the cloud using the Google Cloud CLI:

gcloud run deploy gating-crisis \
    --source . \
    --platform managed \
    --allow-unauthenticated

Remember: The gating network is the gateway to sanity.

gating-router@moe-node:~$ exit

About

An educational routing game to learn about MoE LLMs

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages