All Posts
AI EngineeringMarch 19, 20268 min read

Working with MoE LLMs: What Llama 4 Scout Teaches Us About Production AI

Mixture of Experts models like Llama 4 Scout 17B activate a fraction of their total parameters per token, delivering frontier performance at a fraction of the compute cost. Here's what we've learned deploying MoE architectures in production.

The top open source language models in 2026 all share one thing in common: they're Mixture of Experts. DeepSeek R1, Kimi K2, Mistral Large 3, and now Meta's Llama 4 family, the architecture that was once a research curiosity has become the default way to build frontier LLMs.

Llama 4 Scout is the model that made this shift impossible to ignore. 109 billion total parameters. 17 billion active per token. Sixteen specialized expert networks. A 10 million token context window. Open source. And it's competitive with GPT 4o and Gemini 2.0 Flash on benchmarks that matter.

We've been deploying MoE models in production for clients across document processing, code generation, and agentic workflows. Here's what the architecture actually means for teams building with these models, beyond the benchmarks.

What MoE Actually Is

A dense model like Llama 3.1 70B activates all 70 billion parameters for every single token it processes. Every matrix multiplication, every attention head, every feed forward layer, all of it fires, every time.

A Mixture of Experts model takes a different approach. Instead of one monolithic feed forward network per layer, it has multiple specialized "expert" sub networks. A learned router examines each token and sends it to the most relevant experts, typically two out of the full set. The rest stay dormant.

Llama 4 Scout has 16 experts per MoE layer. For any given token, the router activates only the most relevant experts, resulting in roughly 17B active parameters out of 109B total. The model has the knowledge of a 109B parameter model but the inference cost of a 17B parameter model.

This is the fundamental insight: you can scale knowledge without linearly scaling compute.

Why This Changes the Production Calculus

Cost Per Token Drops Dramatically

The economics of MoE models are straightforward. If you're activating 17B parameters instead of 70B, you need roughly 75% less compute per forward pass. In practice, the savings are significant. Providers like DeepInfra have driven costs down to $0.05 per million tokens on optimized infrastructure. That's a 4x improvement over dense models of equivalent capability.

For high volume production workloads, document processing pipelines, customer support agents, code review systems, this is the difference between a viable product and an unsustainable burn rate.

Latency Improves Without Sacrificing Quality

Fewer active parameters means faster inference. Llama 4 Scout on Groq's LPU infrastructure delivers response times that compete with models a quarter of its total size. On vLLM with continuous batching, throughput scales efficiently because each request only loads the experts it needs.

This matters for real time applications. Agentic workflows where a model needs to make dozens of tool calling decisions per minute. Autocomplete systems where every additional 50ms of latency kills the user experience. Chat interfaces where perceived speed is part of the product.

The Context Window Unlocks New Use Cases

Scout's 10 million token context window is the largest of any open source model. For perspective, that's roughly 15,000 pages of text in a single inference call.

This isn't a theoretical capability. It changes what's architecturally possible:

  • Full codebase analysis without chunking or retrieval. Load the entire repository and ask questions about cross file dependencies, architectural patterns, or potential bugs.
  • Multi year financial datasets processed in a single pass. No RAG pipeline, no vector database, no retrieval latency, just the raw data in context.
  • Complete regulatory libraries analyzed holistically. Compliance checks that previously required complex document retrieval now fit in one prompt.

The long context capability doesn't eliminate RAG, but it dramatically raises the threshold at which RAG becomes necessary. For many workloads, the simpler architecture wins.

The Deployment Reality

MoE models aren't plug and play replacements for dense models. The architecture introduces specific operational considerations that teams need to plan for.

Memory Footprint

Scout's 109B total parameters all need to live in memory, even though only 17B activate per token. The full model requires significant VRAM. You're paying the memory cost of a 109B model to get the compute cost of a 17B model. On a single node, this means multi GPU setups. On cloud infrastructure, it means larger instances than a naively comparable dense model would require.

Quantization helps significantly. AWQ and GPTQ quantized versions of Scout run on substantially less VRAM with minimal accuracy degradation. For most production use cases, FP8 or even INT4 quantization is the right default.

Expert Load Balancing

Not all experts get activated equally. In practice, some experts become "hot" for certain types of inputs. The router learns to prefer specific experts for code, others for natural language, others for structured data. This creates uneven compute distribution that can impact throughput under mixed workloads.

Production deployments need monitoring on per expert activation rates. Imbalanced routing isn't necessarily a problem. It often reflects genuine specialization. But extreme imbalance can create bottlenecks in tensor parallel deployments where experts are sharded across GPUs.

Inference Server Selection

Not every serving framework handles MoE efficiently. Our stack for MoE deployment:

  • vLLM best general purpose option. PagedAttention handles the KV cache efficiently, and MoE support has matured significantly. Continuous batching works well with the sparse activation pattern.
  • NVIDIA Triton + TensorRT LLM highest raw throughput on NVIDIA hardware. The MoE specific kernels are highly optimized, and the expert parallel execution is well implemented. Best for maximum performance when you're committed to NVIDIA infrastructure.
  • SGLang strong option for agentic workloads that require structured generation and constrained decoding. MoE support is solid and improving rapidly.

Avoid deploying MoE models on frameworks that don't have explicit MoE support. The performance difference between optimized and naive expert routing is substantial.

Llama 4 Scout in Practice

Where It Excels

Code generation and analysis. Scout scored 38.1% on LiveCodeBench, outperforming GPT 4o (32.3%) and Gemini 2.0 Flash (34.5%). In our testing, it handles multi file refactoring tasks and code review with accuracy that punches well above its active parameter count. The long context window means you can feed it an entire service layer and get coherent cross file suggestions.

Document processing at scale. The 10M context window combined with low per token cost makes Scout ideal for high volume document workflows. Contract analysis, report generation, data extraction from unstructured text, workloads where you need to process thousands of documents per day without bankrupting your inference budget.

Multimodal tasks. Scout handles text and image inputs natively through early fusion. No separate vision encoder bolted on after the fact. The multimodal capability is baked into the architecture. For workflows that mix document text with charts, diagrams, or screenshots, this simplifies the pipeline significantly.

Where to Be Cautious

Tasks requiring maximum accuracy. On reasoning heavy benchmarks, frontier proprietary models (Claude Opus, GPT 4.5) still outperform Scout. For high stakes tasks where accuracy is non negotiable, medical diagnosis, legal analysis, financial modeling, the cost savings of MoE may not justify the accuracy gap.

Low volume, high value workloads. If you're making 100 API calls a day and each one matters, the cost advantage of MoE is irrelevant. Use the best model you can afford. MoE economics shine at scale, thousands or millions of inferences per day where the per token cost dominates your budget.

Workloads with extreme latency sensitivity. While MoE inference is faster than dense models of equivalent total parameter count, it's not faster than dense models of equivalent active parameter count. A dense 17B model may have slightly lower latency than a 17B active MoE model due to router overhead. For latency critical paths, benchmark against your specific requirements.

The Architecture Trend

MoE isn't a fad. It's the natural conclusion of a simple observation: not every parameter needs to fire for every token. Different inputs require different knowledge, and routing tokens to specialized experts is more efficient than running everything through a monolithic network.

The trend lines are clear:

  • All frontier open source models have shifted to MoE. Llama 4, DeepSeek, Mistral, Qwen. The dense era of open source LLMs is effectively over.
  • NVIDIA is optimizing hardware for MoE. The Blackwell NVL72 architecture includes specific optimizations for expert parallel execution, delivering 10x faster inference at 1/10 the token cost for MoE models.
  • Serving infrastructure has matured. A year ago, MoE deployment required significant custom engineering. Today, vLLM, TensorRT LLM, and SGLang handle it out of the box.

For teams building production AI systems, the question is no longer whether to use MoE models. It's how to deploy them efficiently.

Our Approach

We deploy MoE models as the default for high volume inference workloads. The playbook:

  1. Evaluate benchmark the MoE model against your specific task. Don't rely on public benchmarks alone. Domain specific evaluation with your actual data is the only metric that matters.
  2. Quantize FP8 or INT4 quantization is almost always the right choice for production. Measure the accuracy delta on your evaluation set. If it's within tolerance, ship the quantized version.
  3. Serve efficiently deploy on vLLM or TensorRT LLM with expert aware batching. Monitor per expert activation rates and GPU utilization to identify routing bottlenecks.
  4. Monitor drift MoE models can exhibit different drift patterns than dense models because expert specialization may interact with shifting input distributions. Track per expert utilization over time alongside output quality metrics.

Llama 4 Scout is the model that made MoE practical for production teams. But the architecture pattern is bigger than any single model. It's how every serious LLM will be built from here.

[ 02 ] — Keep Reading

More from the lab.

Ready when you are

Want to discuss this topic?

Start a Conversation