Thwiply
An Android v1 scaffold for downloading a device-held model and trying streamed, on-device LLM inference from a debug screen.
Kotlin · Jetpack Compose · LiteRT-LM · Gemma 3 · Hilt
Loading…
An Android v1 scaffold for downloading a device-held model and trying streamed, on-device LLM inference from a debug screen.
Kotlin · Jetpack Compose · LiteRT-LM · Gemma 3 · Hilt
Start with a private, device-held model workflow that can be downloaded, initialized, and exercised before building the planned capture-and-task experience.
A Jetpack Compose Android scaffold with onboarding and debug routes.
A model manager that streams a model download into app-local storage and exposes download progress through Flow.
A LiteRT-LM engine manager that initializes a local model and returns streamed inference output to the debug screen.
Onboarding collects a model URL and optional token, stores the downloaded model locally, then hands it to the on-device inference path.
Starts the download and navigates to the debug screen after success.
Fetches the model and writes model.litertlm under the app’s files directory while emitting progress.
Initializes from that local file and exposes streamed generated text.
Collects streamed output for a prompt; this is the current inference surface.
The implementation routes a downloaded file into LiteRT-LM rather than introducing a backend or cloud inference path.
Download state is represented explicitly as idle, downloading, success, or error and is collected by the onboarding view model.
The README separates current v1 scaffolding from the planned v2 capture, OCR, extraction, persistence, and Today-screen work.
The repository includes a ModelManager unit test for the no-model initial state.
The repository documents Android Studio build/run steps and declares JUnit plus Android instrumentation test dependencies.
Current public status: the README labels v1 scaffolding as current. Its checked items are architecture, model management/download, LiteRT-LM integration with streaming inference, and a debug inference UI; the v2 capture pipeline remains unchecked.
Documents the current scaffolding milestones, device/model prerequisites, and the explicitly deferred capture pipeline.
Shows app-local model storage, download-state Flow, optional bearer token, and OkHttp download handling.
Shows the onboarding-to-debug navigation route used by the current app surface.
Provides the public unit-test evidence for the model-availability starting state.