Notifications
Clear all
多语言国际区 International
1
帖子
1
Users
0
Reactions
16
查看
Topic starter
31/10/2026 9:19 上午
[Official FAQ] Share your experience or follow-up questions below.
No. Context length is how much text (prompt, history and output) the model can consider at once. A larger window is useful, but it costs resources.
- Memory: the model stores a KV cache for every token in the context. It grows roughly linearly with context length, so long contexts can use many GB on top of the weights and cause out-of-memory errors.
- Speed: processing a long prompt takes more time, so the wait before the first token gets longer.
- Quality: a model advertised with a very long window may still lose details in the middle of a long input. Advertised length is not the same as reliable length.
Practical tips
- For normal chat, a few thousand tokens is often enough. Increase it only when you need to read long documents.
- Set it explicitly:
-c 8192in llama.cpp,PARAMETER num_ctx 8192in an Ollama Modelfile, or the context length setting when loading a model in LM Studio. - If memory is tight, consider quantizing the KV cache where your tool supports it, and verify quality afterward.
- For very long documents, use RAG or summarize in chunks instead of stuffing everything into one prompt.
- If the model seems to "forget" earlier messages, your context setting may be too small and older text is being cut off.
What context sizes do you run in practice, and for what tasks?
