From d8a5d96b981bf6e1c5a61fde18acaeed0fb89f7c Mon Sep 17 00:00:00 2001 From: frob Date: Mon, 10 Mar 2025 19:02:54 +0100 Subject: [PATCH] docs: Add OLLAMA_CONTEXT_LENGTH to FAQ. (#9545) --- docs/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/faq.md b/docs/faq.md index 04e8433de..4aaccc2e4 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -20,7 +20,7 @@ Please refer to the [GPU docs](./gpu.md). ## How can I specify the context window size? -By default, Ollama uses a context window size of 2048 tokens. +By default, Ollama uses a context window size of 2048 tokens. This can be overridden with the `OLLAMA_CONTEXT_LENGTH` environment variable. For example, to set the default context length to 8K, use: `OLLAMA_CONTEXT_LENGTH=8192 ollama serve`. To change this when using `ollama run`, use `/set parameter`: