Repository navigation
Local AI: cap Ollama output tokens and type its timeouts - #94
Merged
Merged
Conversation
Ollama requests carried no num_predict, so a repetition loop generated until the 15-second transport timeout. Every provider now shares one output budget; reaching it is outputLimitReached, and a transport timeout is timedOut. The evaluation runs six corpus rounds (114 warm samples) and 20 cold samples. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…unmeasured cap Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
num_predict. Ollama's default is to generate with no limit, shifting its context as it goes, so a repetition loop ran until the 15 s transport timeout. The Apple refiner already capped its output.LocalAIOutputTokenBudget(min(2048, max(128, chars/2 + 128))). Ollama sends it asnum_predict.done_reason: "length"→ new typedoutputLimitReached.URLError.timedOut→ typedtimedOut. The two refinement-timeout messages no longer say "three-second".local_ai_refinement_latencyto an Ideas row, at Ser's direction. The game-plan row stays Open: nothing is re-measured, because no model downloads were approved andqwen3.5:4bisn't installed.Recommendation: land unmeasured, per Ser.
Verification
scripts/check.shandscripts/check_ios.shpass (host load ~6).num_predictends asoutputLimitReached;timedOut;qwen2.5-coder:num_predict: 136returneddone_reason: "length"andeval_count: 136in 1.98 s, with truncated JSON (which becomesoutputLimitReached).🤖 Generated with Claude Code