RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Eruo Fredoline
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
  • Suggest a feature
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
Glossary / Transformer & LLM components / Context Window
Transformer & LLM components

Context Window

The context window is the maximum number of tokens a model can attend to at once — both prompt and previously generated tokens. Llama 3.1 8B has 131,072 (128K). Llama 4 Scout has 10 million. Older models like the original GPT-3 had 2,048.

Bigger context windows aren't free. Memory grows linearly with context (KV cache scales with length), and attention compute grows quadratically without optimizations like Flash Attention or sparse attention. A model that "supports 128K" may run out of VRAM well before reaching that ceiling on consumer hardware.

For local inference, the practical question is rarely "does this model support long context" but "does my hardware have enough VRAM to actually use it." Use /will-it-run to compute the max context that fits on your specific hardware.

Practical example

Say you're building a codebase-QA tool with Llama 3.1 8B and want to feed it a 200K-token repo dump. The model's 128K context window hard-caps you well before that — you'd need to chunk the repo, summarize sections, or switch to Llama 4 Scout's 10M window instead. But before celebrating a huge context number, check the hardware side: a 128K KV cache on an 8B model at FP16 can eat several extra GB of VRAM on top of the weights themselves. An operator running an RTX 3060 (12GB) often finds the card OOMs at 40-60K tokens of actual context long before hitting the model's advertised ceiling, forcing a smaller quant or a shorter working context just to keep the session stable.

Related terms

TokenTokenizationKV Cache

Reviewed by Eruo Fredoline. See our editorial policy.

Buyer guides
  • Best GPU for local AI →
  • Best laptop for local AI →
  • Best Mac for local AI →
When it doesn't work
  • CUDA out of memory →
  • Ollama running slowly →
  • ROCm not detected →