Repository navigation
Offline AI: performance settings, thinking mode, speed display and real cancel (for plugin 1.1.0) - #994
Open
4di-hello wants to merge 2 commits into
Open
Offline AI: performance settings, thinking mode, speed display and real cancel (for plugin 1.1.0)#9944di-hello wants to merge 2 commits into
4di-hello wants to merge 2 commits into
Conversation
…ing mode, speed display), cancel a running generation - The chat messages are passed to the plugin as well (chat_system, chat_user): plugin 1.1.0 puts them into the chat format stored in the model, which works for every model family. Older plugins keep using the prompt as before. - Thinking mode is its own switch, "Show thinking" only shows the thoughts. - Performance: threads (automatic = the fast cores, at most 4), context size 4096/2048/1024, speed display after each answer (read from the numbers plugin 1.1.0 logs). A changed setting loads the model again with the next request. - Cancelling a request (X, keyboard hidden) stops the generation in plugin 1.1.0 instead of letting it finish in the background. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g, answer limit by the prompt length 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.
Goes with the plugin PR LeanBitLab/LeanType-Offline-AI-Plugin#3 (current llama.cpp, about twice as fast).
What changes
chat_systemandchat_user. Plugin 1.1.0 puts them into the chat format stored in the model, which works for every model family (Gemma, Qwen, Llama, …). Older plugins ignore them and use the prompt as before.lastStats()(plugin 1.1.0, only numbers, called by name likecancelGeneration()); with an older plugin only the total time is shown.max_tokensis limited so that prompt and answer fit into the context.cancelGeneration()in the plugin if it has it. Before, the plugin kept computing in the background and the next request waited for it.How we tested
Same phone and test text as in the plugin PR (German paragraph, 11 built-in mistakes, Dimensity 9400+). The speed display was built first because hand-stopped times were up to a third too low; with it every change could be measured.
cancelGeneration()the next request starts at once, and cancelled requests show no display.It was a lot of testing, many builds and measurement series on the phone, but I think the effort was worth it: from the key to the corrected text it's now about half the time it was.
All work and measurements were done with Claude Code; I tested every version on the phone.
🤖 Generated with Claude Code