mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
Can I set num_ctx=-1 to use max possible context window? #47
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @eliranwong on GitHub (Mar 7, 2024).
Can I set num_ctx=-1 to use max possible context window?
so I don't need to change its value for different models
@jmorganca commented on GitHub (Mar 8, 2024):
Hi there, you can set it to a large value (e.g. 16k, 1M) and Ollama will automatically use the largest context window the model was trained against. Hope this helps
@eliranwong commented on GitHub (Mar 9, 2024):
Your suggestion does not work in some models I tested. It just hangs forever without response, if I set num_ctx too high.
@yusufcanb commented on GitHub (Feb 6, 2025):
I can agree that, most of the Qwen models hang if
num_ctxtoo high.