# Llama 4 Scout 17B 16E Instruct

A natively multimodal open model with a context window of 131.1K tokens, the first Llama model to unlock single-pass reasoning over entire codebases, book-length documents, and large-scale multi-document collections.

- **Model ID:** `meta/llama-4-scout`
- **Type:** chat
- **Providers:** deepinfra, bedrock
- **Context window:** 131,072
- **Maximum output tokens:** 8,192
- **Pricing:** $0.17/1M input tokens, $0.66/1M output tokens
- **Canonical page:** https://vercel.com/ai-gateway/models/llama-4-scout

## Supported parameters

Detailed capability metadata has not been reported for this model.

## Example

```ts
import { streamText } from 'ai'

const result = streamText({
  model: 'meta/llama-4-scout',
  prompt: 'Why is the sky blue?'
})
```

## About

Meta released Llama 4 Scout 17B 16E Instruct on April 5, 2025 alongside Llama 4 Maverick as one of the founding models of the Llama 4 generation. Llama 4 Scout 17B 16E Instruct is a 17-billion-active-parameter Mixture of Experts model with 16 experts and 109 billion total parameters. It's substantially leaner in total parameter count than Maverick's 400B. Like Maverick, Llama 4 Scout 17B 16E Instruct was built with native multimodality across text, image, and video frame data.

Llama 4 Scout 17B 16E Instruct's defining characteristic is its context length. Meta extended context from 128K tokens in Llama 3 to 131.1K tokens in Llama 4 Scout 17B 16E Instruct, about a 78x increase. The architecture enabling this is iRoPE (interleaved Rotary Position Embeddings): most layers use standard RoPE, but the model also interleaves attention layers without positional embeddings. Inference-time temperature scaling of attention further enhances length generalization. Llama 4 Scout 17B 16E Instruct was validated with needle-in-a-haystack retrieval tests and cumulative negative log-likelihood evaluations over 131.1K tokens of code.

A context of 131.1K tokens can hold roughly 7.5 million words of plain text, the equivalent of approximately 25 full-length novels, or a large enterprise codebase with all source files, documentation, and test suites loaded together. Use cases include multi-document summarization across a large corpus, parsing extensive user activity logs, and reasoning over entire codebases in a single prompt without chunking or retrieval-augmented generation (RAG). This last capability is particularly notable for software development tooling, where RAG-based approaches introduce retrieval errors and context fragmentation.

Llama 4 Scout 17B 16E Instruct delivers better results across a broad range of benchmarks in its class. It also supports image grounding (aligning user prompts with specific visual regions) and exceeds prior Llama models on coding, reasoning, long context, and image benchmarks.

## What to consider

Scout's long-context capabilities introduce pricing considerations: longer prompts raise per-request costs substantially. Compare $0.17 and $0.66 against your expected context length.

## When to use

### Best For

- Processing entire codebases in a single inference call, architecture review, cross-file refactoring suggestions, comprehensive code search
- Multi-document analysis where chunking-based approaches lose cross-document coherence, legal discovery across large contract sets, literature review across a research corpus
- Long-session personalization tasks that require parsing extensive user history or activity logs without summarization loss
- Image grounding applications requiring precise visual localization across multi-image inputs

### Consider Alternatives When

- Context length is not a primary constraint and maximum multimodal capability within a standard context window is more important: Maverick's 128-expert architecture offers greater image and text depth
- The workload is a general assistant or chat use case where Maverick is Meta's designated product workhorse
- Tasks require only modest context and a smaller, cheaper model such as Llama 3.3 70B would satisfy quality requirements
- The extended context creates cost concerns: 131.1K tokens inputs result in substantially higher per-request costs than typical short-context usage

## Best for

- **Entire codebase processing:** Architecture review, cross-file refactoring suggestions, and comprehensive code search in a single inference call
- **Multi-document analysis:** Legal discovery across large contract sets or literature review across a research corpus where chunking loses coherence
- **Long-session personalization:** Parsing extensive user history or activity logs without summarization loss
- **Image grounding applications:** Precise visual localization across multi-image inputs

## Consider alternatives

- **Standard context sufficient:** Maximum multimodal capability within a standard context window is more important, so Maverick's 128-expert architecture offers greater image and text depth
- **General assistant workload:** Maverick is Meta's designated product workhorse
- **Modest context tasks:** A smaller, cheaper model such as Llama 3.3 70B would satisfy quality requirements
- **Cost concerns at scale:** 131.1K tokens inputs result in substantially higher per-request costs than typical short-context usage

## Frequently asked questions

### How large is the context window of 131.1K tokens in practical terms?

Approximately 7.5 million words. That's roughly 25 full-length novels, a multi-year document archive, or a large enterprise codebase with source files, tests, and documentation all loaded simultaneously.

### What is the iRoPE architecture and why does it matter for long context?

iRoPE stands for interleaved Rotary Position Embeddings. Most attention layers use standard RoPE, but some layers use no positional embeddings. Inference-time temperature scaling of attention further enhances length generalization. This combination lets the model generalize beyond its training context length.

### How does Llama 4 Scout 17B 16E Instruct handle multi-image inputs?

Llama 4 Scout 17B 16E Instruct supports up to eight images per request. It also supports image grounding, aligning natural language prompts with specific regions or objects in images.

### Is Llama 4 Scout 17B 16E Instruct suited for RAG, or does the context of 131.1K tokens replace it?

For applications where the full corpus fits within 131.1K tokens, loading everything into context can be more accurate than retrieval augmentation because it avoids retrieval errors and fragmentation. For larger corpora, RAG remains appropriate, but Llama 4 Scout 17B 16E Instruct can handle much larger retrieval chunks or multiple retrieved documents simultaneously.

### How does Llama 4 Scout 17B 16E Instruct differ from Maverick? They have the same active parameter count.

Both have 17B active parameters but differ in expert count and total parameters. Llama 4 Scout 17B 16E Instruct has 16 experts and 109B total; Maverick has 128 experts and 400B total. Maverick stores more knowledge in its larger parameter budget. Llama 4 Scout 17B 16E Instruct is leaner but specialized for extreme context length. Meta designates Maverick as the general-purpose product model and Llama 4 Scout 17B 16E Instruct as the long-context specialist.

### What languages does Llama 4 Scout 17B 16E Instruct support?

Like all Llama 4 models, Llama 4 Scout 17B 16E Instruct supports 200 languages with over 100 having more than 1 billion tokens each, 10x more multilingual coverage than Llama 3.

## Links

- [Model page](https://vercel.com/ai-gateway/models/llama-4-scout)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://deepinfra.com/meta-llama/Llama-4-Scout-17B-16E-Instruct)
- [Provider pricing](https://aws.amazon.com/bedrock/pricing/)
