[PR #13248] conf: support human-readable context length format #60830

Open
opened 2026-04-29 15:56:59 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13248
Author: @pppy2012
Created: 11/26/2025
Status: 🔄 Open

Base: mainHead: readable-ctx-len


📝 Commits (1)

  • eb7039c conf: support human-readable context length format

📊 Changes

3 files changed (+68 additions, -3 deletions)

View changed files

📝 docs/context-length.mdx (+5 -0)
📝 envconfig/config.go (+50 -1)
📝 envconfig/config_test.go (+13 -2)

📄 Description

before:

(base) ➜  ollama git:(main) OLLAMA_CONTEXT_LENGTH=8k ./ollama serve
2025/11/26 14:48:39 config.go:232: WARN invalid environment variable, using default key=OLLAMA_CONTEXT_LENGTH value=8k default=4096

(base) ➜  ollama git:(main) ./ollama ps
NAME                  ID              SIZE      PROCESSOR    CONTEXT    UNTIL
qwen2.5-coder:1.5b    6d3abb8d2d53    1.1 GB    100% CPU     4096       4 minutes from now

after:

(base) ➜  ollama git:(readable-ctx-len) OLLAMA_CONTEXT_LENGTH=8k ./ollama serve

NAME                  ID              SIZE      PROCESSOR    CONTEXT    UNTIL
qwen2.5-coder:1.5b    6d3abb8d2d53    1.2 GB    100% CPU     8000       4 minutes from now

🔄 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/13248 **Author:** [@pppy2012](https://github.com/pppy2012) **Created:** 11/26/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `readable-ctx-len` --- ### 📝 Commits (1) - [`eb7039c`](https://github.com/ollama/ollama/commit/eb7039ccd15c7acdca5e4ebab89604eed50a5780) conf: support human-readable context length format ### 📊 Changes **3 files changed** (+68 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/context-length.mdx` (+5 -0) 📝 `envconfig/config.go` (+50 -1) 📝 `envconfig/config_test.go` (+13 -2) </details> ### 📄 Description before: ```shell (base) ➜ ollama git:(main) OLLAMA_CONTEXT_LENGTH=8k ./ollama serve 2025/11/26 14:48:39 config.go:232: WARN invalid environment variable, using default key=OLLAMA_CONTEXT_LENGTH value=8k default=4096 (base) ➜ ollama git:(main) ./ollama ps NAME ID SIZE PROCESSOR CONTEXT UNTIL qwen2.5-coder:1.5b 6d3abb8d2d53 1.1 GB 100% CPU 4096 4 minutes from now ``` after: ```shell (base) ➜ ollama git:(readable-ctx-len) OLLAMA_CONTEXT_LENGTH=8k ./ollama serve NAME ID SIZE PROCESSOR CONTEXT UNTIL qwen2.5-coder:1.5b 6d3abb8d2d53 1.2 GB 100% CPU 8000 4 minutes from now ``` --- <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 15:56:59 -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#60830