Repository navigation
|
Hey I got a quick question regarding anything LLM regarding the context length maximum If I have a model that's usually a lot bigger context window for one workflow but the global model is capped at a much smaller context window would that affect how it works on the actual main big workflow? Example. Main Global context model is set to 45k. The workflow B using a different model have context window of 128k. Would the 128k model become botched by the 45k global limit? |
Replies: 3 comments 4 replies
|
It depends on the provider of workspace B. When workspace B uses the same provider as the global model (Ollama, LM Studio, LocalAI, Generic OpenAI and other local or self-hosted providers), the answer is yes: the 45k cap applies to its 128k model too. AnythingLLM gets a workspace's context window from that workspace's provider and model ( So with 45k set globally, the 128k model in workspace B runs with 45k. The cap is not only a UI warning. For Ollama the same number is sent as To fix it:
Keep in mind that a larger context window takes more RAM or VRAM on a local runner. |
|
Answer above is correct, do you need it more dynamic like per workspace? |
|
context window per workspace is one of the things i miss most. |
It depends on the provider of workspace B. When workspace B uses the same provider as the global model (Ollama, LM Studio, LocalAI, Generic OpenAI and other local or self-hosted providers), the answer is yes: the 45k cap applies to its 128k model too.
AnythingLLM gets a workspace's context window from that workspace's provider and model (
Workspace._getContextWindow). For these providers, though, the "Model context window" / token limit field on the LLM Preference page is stored once per provider (for Ollama it isOLLAMA_MODEL_TOKEN_LIMIT), not once per model. The window a workspace ends up with is the smaller of that value and the model's own window (OllamapromptWindowLimit):