Skip to content

LiteRT-LM On-Device LLM for Android

Build an Android app that runs a text LLM like Gemma or Qwen on the phone's CPU or GPU

Repository
android/skills
Stars
10,278
Licence
Apache-2.0
Files
3 files

What it does

When installed, the agent knows how to build an Android app that runs an open text language model entirely on the device using Google's LiteRT-LM Kotlin library. It walks through the Gradle dependency, GPU manifest entries, getting a .litertlm model file onto the phone, safe background loading, and a streamed multi-turn chat screen. It does not cover image, audio, tool calling, NPU chips, or converting models.

Great for

  • Android developers adding a private, offline chat, summarization, or extraction feature to an app
  • Teams that want to avoid sending user data to a cloud LLM API
  • Developers who already have an Android Studio project and want a working starting point

Skip it if

  • Vision, audio, or embedding models in .tflite format, which the skill says belong to a different skill (litert-runtime) and the CompiledModel API
  • Projects needing image input, tool calling, or NPU-specific builds, which the skill explicitly excludes
  • Low-storage devices or apps that cannot handle a model file of hundreds of MB to a few GB

Try asking

  • “Add an on-device Gemma chat screen to my Android app using LiteRT-LM”
  • “Set up the Gradle dependency and GPU manifest entries for LiteRT-LM in my project”
  • “Download a Qwen3-0.6B litertlm model in my app with progress display and load it off the main thread”
  • “Build a streamed multi-turn conversation with sendMessageAsync and a Compose screen”
Step-by-step guide: how to use LiteRT-LM On-Device LLM for AndroidInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 3 original files, the Apache-2.0 licence and an attribution note.

    litert-lm.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip litert-lm.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip litert-lm.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Give the agent your project's existing build files so it checks libs.versions.toml and app/build.gradle.kts before editing, as the skill instructs.
  • If your project uses Hilt, check the Dagger version first; the skill documents a Kotlin metadata version conflict and asks before upgrading.
  • Pick a small model like Qwen3-0.6B for testing, since the 2.6 GB Gemma file is large to push and load on a device.

What's inside

  • references/android/google/play/on-device-ai.md
  • references/get-a-model.md
  • SKILL.md

Redistributed unmodified from android/skills under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.