Repository navigation
fix(archivist): cap the length of every AI answer - #177
Merged
Merged
Conversation
The archivist sent its classify, capture, reformat and recall requests without `max_tokens`. A model that repeats itself then generates until the client timeout and holds the AI server for that time. A server that sizes its memory for the requested output uses its own default instead, which on oMLX is the whole context window: oMLX releases before 0.7.0 refused such requests with page images attached, and the document was filed unclassified with a message to set up AI. Every call now carries a cap that fits the largest correct answer: - classify and capture: 4096 tokens, room for a receipt with more than 150 line items or a 400-word article summary - reformat: follows the length of the OCR text, with room for Markdown - recall answer: 2048 tokens - the vision probe: 16 tokens, for its one-word answer An answer cut off at the cap is logged as such by the AI client.
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
max_tokens. A model that repeats itself then runs until the client timeout, and a server that sizes its memory for the requested output plans for its own default. oMLX before 0.7.0 refused such requests when page images were attached, and the document was filed unclassified.