[PR #11175] [MERGED] avoid context overflow #75759

Closed
opened 2026-05-05 08:11:00 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/11175
Author: @dhiltgen
Created: 6/23/2025
Status: Merged
Merged: 6/23/2025
Merged by: @dhiltgen

Base: mainHead: smol_ctx


📝 Commits (1)

📊 Changes

1 file changed (+7 additions, -0 deletions)

View changed files

📝 llm/server.go (+7 -0)

📄 Description

For smaller context models, make sure we do not exceed the training size.

While testing larger context sizes, I noticed our current 4k default context causes problems on models like orca-mini which have a 2k context max.

llama_context: n_ctx_per_seq (4096) > n_ctx_train (2048) -- possible training context overflow

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/11175 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 6/23/2025 **Status:** ✅ Merged **Merged:** 6/23/2025 **Merged by:** [@dhiltgen](https://github.com/dhiltgen) **Base:** `main` ← **Head:** `smol_ctx` --- ### 📝 Commits (1) - [`ecfdc9a`](https://github.com/ollama/ollama/commit/ecfdc9a509d1abe4521d2802733999835a56cfa8) avoid context overflow ### 📊 Changes **1 file changed** (+7 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `llm/server.go` (+7 -0) </details> ### 📄 Description For smaller context models, make sure we do not exceed the training size. While testing larger context sizes, I noticed our current 4k default context causes problems on models like orca-mini which have a 2k context max. ``` llama_context: n_ctx_per_seq (4096) > n_ctx_train (2048) -- possible training context overflow ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-05 08:11:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#75759