[PR #7835] [MERGED] runner.go: Add unit tests for context shifting #59228

Closed
opened 2026-04-29 14:09:19 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/7835
Author: @jessegross
Created: 11/25/2024
Status: Merged
Merged: 11/26/2024
Merged by: @jessegross

Base: mainHead: jessegross/trunc


📝 Commits (1)

  • ab0c040 runner.go: Add unit tests for context shifting

📊 Changes

3 files changed (+82 additions, -7 deletions)

View changed files

📝 llama/runner/cache.go (+15 -5)
📝 llama/runner/cache_test.go (+63 -0)
📝 llama/runner/runner.go (+4 -2)

📄 Description

This also makes it easier to truncate long inputs the same as shifting but does not actually implement it. This type of truncation has a trade off between quality and time to first token.


🔄 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/7835 **Author:** [@jessegross](https://github.com/jessegross) **Created:** 11/25/2024 **Status:** ✅ Merged **Merged:** 11/26/2024 **Merged by:** [@jessegross](https://github.com/jessegross) **Base:** `main` ← **Head:** `jessegross/trunc` --- ### 📝 Commits (1) - [`ab0c040`](https://github.com/ollama/ollama/commit/ab0c040326fb80de2ef4daf0ba6e0828a1bf011c) runner.go: Add unit tests for context shifting ### 📊 Changes **3 files changed** (+82 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `llama/runner/cache.go` (+15 -5) 📝 `llama/runner/cache_test.go` (+63 -0) 📝 `llama/runner/runner.go` (+4 -2) </details> ### 📄 Description This also makes it easier to truncate long inputs the same as shifting but does not actually implement it. This type of truncation has a trade off between quality and time to first token. --- <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-04-29 14:09:19 -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#59228