Repository navigation
feat(offline-ai): proofread long texts in parts - #1077
Merged
Merged
Conversation
- proofread line by line, long lines split after sentences; list markers, blank lines and indentation are not sent to the model - translate in larger parts, only succeeding as a whole - keep a line's original text when the model can't correct it - raise the limit from 12000 to 30000 characters; bigger parts on phones with more than 7 GB of memory
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.
On-device models have little room for input and answer, and small ones stop early on multi-line text.
Tests
New TextPiecesTest; it and AiResultChecksTest pass, the offline debug build succeeds.
On Waydroid (plugin 1.0.1, Gemma 3 1B): a four line list that was rejected before is corrected with its list markers kept, and cancel leaves the text unchanged. It is slow with that plugin, which keeps generating after each answer.
Not checked on a device: translation, texts over 12000 characters, the bigger part size.