Fix LlamaDemo temperature, lifecycle, and LLM memory support#239
Open
psiddh wants to merge 2 commits into
Open
Fix LlamaDemo temperature, lifecycle, and LLM memory support#239psiddh wants to merge 2 commits into
psiddh wants to merge 2 commits into
Conversation
…support - Change DEFAULT_TEMPERATURE from 0.0 to 0.6 to prevent greedy decoding from hitting EOS token immediately on first generated token - Add onCleared() lifecycle handler to ChatViewModel for proper Module resource cleanup when ViewModel is destroyed - Update fbjni to 0.7.0 for main_exp AAR compatibility - Enable largeHeap in AndroidManifest for large LLM model support Authored with Claude.
…mperature - Remove onCleared() override — LlmModule.close() was added in the Kotlin conversion (#19211) but the published Maven AAR still ships the old Java version without it - Revert DEFAULT_TEMPERATURE to 0.0 — users can set temperature via the UI settings; no need to change the default Authored with Claude.
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
Context
These fixes were discovered while validating multi-turn conversation support with Qwen3 4B (INT8-INT4) on Samsung Galaxy S23 with
max_context_length=4096. Note that the temperature needed to be set to say 0.5, o/w it made all models appear broken by generating 0-1 tokens.Test plan
./gradlew assembleDebugAuthored with Claude.