Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Context window incorrectly capped at 8192 tokens when using Ollama (token count exceeded 8192)

Aperta
#473 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
ollama, python
Ambito
ai, backend

Direzione di ricerca

Inizia riproducendo l’errore token count exceeded 8192 attraverso il percorso di rollout LangGraph init_chat_model e il percorso di scoring RULER, quindi traccia come ciascun percorso ottiene o applica il limite di contesto di Ollama. Il lavoro è completato quando sia le chiamate dell’agente sia quelle del giudice rispettano una finestra di contesto configurata o derivata dal modello superiore a 8192 e il comportamento è documentato o configurabile.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Description

I’m using ART with a local Ollama server as the inference backend (for both the agent model and judge models). I’ve configured my Ollama model with a context window well above 8192 tokens (e.g. ctx: 16384) and adjusted num_predict accordingly.

However, in many runs I still get errors like:

token count exceeded 8192

This happens even though:

  • The Ollama model is configured with ctx > 8192 (for example 16384).

  • I’m explicitly passing the correct base URL pointing to my local Ollama server for:

    • The agent model (used by init_chat_model)
    • The judge model (RULER)
    • Any other inference calls

This suggests there is a hardcoded or implicit max token limit of 8192 somewhere in ART/RULER, or in how token counts are computed, independent of the actual model’s context window.

What I expect

  • ART should respect the context window of the underlying model or the configured ctx when running through Ollama.

  • If a hard limit exists (e.g. 8192), it should be:

    • Documented and configurable; or
    • Derived from the model’s metadata, not hard-coded.

What actually happens

  • Even with a model and server configured to support > 8k context, I regularly get token count exceeded 8192 errors.

  • This happens when:

    • Running rollouts with a LangGraph agent via init_chat_model
    • Running RULER scoring with the same Ollama backend

Environment

  • Backend: Local Ollama server
  • Model: Qwen / other Ollama-hosted model (with ctx > 8192)
  • ART: latest version (as of date of issue)
  • Using ART’s LangGraph integration (init_chat_model) and RULER scoring

Questions / Requests

  • Is there an internal default limit of 8192 tokens that’s applied regardless of the model’s context?
  • Can you expose this limit via configuration, or derive it from the model / backend rather than hardcoding?
  • Any guidance on how to set ART/RULER up so that it fully respects Ollama’s larger ctx?
Lingua principale
Python
Stelle
10.8k
Fork
989
Merge medio
11h 38m
PR unite (30g)
104

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenPipe/ART

Tutte le issue di OpenPipe/ART

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.