feat(android-llmservice): sampling settings (fix repeat loop), in-app log viewer, draggable model name#314
Merged
Conversation
…pp log viewer, draggable model name Addresses on-device feedback (SmolVLM-500M produced a degenerate '…spezifischen spezifischen…' repetition loop): - Generation settings sheet (⚙️ in the top bar): live sliders for temperature, Top-K, Top-P, Min-P, repeat penalty, repeat range and max tokens, plus 'Reset defaults'. The send() path now forwards these to InferenceParameters — the repeat-penalty default (1.1) + non-zero repeat range is what breaks the repetition loop a bare no-penalty decode falls into on small models. Previously send() set no sampling params at all. - In-app log: an always-visible one-line strip at the bottom (🧾, wraps to 2 display lines) that opens a full-screen viewer with copy-all, save-as-.txt via SAF, and clear; ✕ closes it. ChatViewModel keeps a capped rolling log (model load/ready, generation start/finish, errors, session save/load, settings reset). - Model-name title in the top bar is now horizontally scrollable (draggable) so a long name can be read in full — no auto-marquee wobble. - New UI strings added to the default resources and translated across all 13 shipped languages. - TODO.md / README.md updated to reflect what shipped; remaining items (dedicated Tools destination, RAM/switch top-bar chips, CPU-threads / context-length settings) stay tracked. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HTS5FpMtBLJENTGoRUrp5m
|
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
On-device feedback: SmolVLM-500M returned a degenerate
…spezifischen spezifischen…repetition loop, and the model name was cut off in the top bar. Root cause of the loop:ChatViewModel.send()set no sampling parameters at all (no repeat penalty, no temperature) — a bare decode on a small model collapses into repetition.send()now forwards these toInferenceParameters(withTemperature/withTopK/withTopP/withMinP/withRepeatPenalty/withRepeatLastN/withNPredict). The default repeat penalty 1.1 + repeat range 64 is what breaks the repetition loop.CreateDocument) and clear; ✕ closes it.ChatViewModelkeeps a capped rolling log (model load/ready, generation start/finish, errors, session save/load, settings reset).android-llmservice/TODO.md+README.mdupdated to reflect what shipped; remaining items (dedicated Tools destination, RAM/switch top-bar chips, CPU-threads / context-length settings) stay tracked.No new files, no new dependencies (SAF + clipboard +
java.timeonly). The instrumented UI test's tags (promptInput/sendButton) anduiStatecontract are unchanged.Test plan
build-android-llmservicejob compiles the app + runs the on-device Compose test on the emulator (validates the new settings/log UI compiles and inference still streams)TODO.md+README.mdRelated issues / PRs
Follow-up to the
android-llmserviceapp (PRs #310–#313). No related issue number.Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01HTS5FpMtBLJENTGoRUrp5m
Generated by Claude Code