explaingit

denizaydogan1902/anvilai

Analysis updated 2026-05-18

1KotlinAudience · developerComplexity · 4/5Setup · hard

TLDR

An Android app that runs AI chat models fully on the phone using the GPU, with no internet connection or cloud server involved.

Mindmap

mindmap
  root((repo))
    What it does
      On-device LLM chat
      Fully offline
    Tech stack
      Kotlin
      Jetpack Compose
      llama.cpp Vulkan
    Features
      Built-in model store
      Thermal management
      Encrypted chat storage
    Use cases
      Private AI chat
      Offline assistant
    Audience
      Android developers
      Privacy focused users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Chat with a local AI model on an Android phone without sending any data to a server.

USE CASE 2

Download small open models like Llama 3.2 or Gemma 2 and pick one sized to your phone's available RAM.

USE CASE 3

Study a working example of running llama.cpp with GPU acceleration inside an Android app via JNI.

What is it built with?

KotlinJetpack Composellama.cppVulkanC++RoomHilt

How does it compare?

denizaydogan1902/anvilaimfori/bit-aesnacode-studios/kdrant
Stars111
LanguageKotlinKotlinKotlin
Last pushed2020-05-11
MaintenanceDormant
Setup difficultyhardmoderatemoderate
Complexity4/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Building from source requires Android Studio, the NDK, CMake, and a separate llama.cpp clone step.

In plain English

Anvil AI is an Android app that runs large language models directly on the phone, with no cloud connection required. It uses llama.cpp for the model engine and taps the phone's GPU through Vulkan to speed up the math, so responses generate on device instead of being sent to a server. Because nothing leaves the phone, there is no data leakage and no API key to manage. The app lets you download curated GGUF model files from a built in model store, or paste a Hugging Face link to fetch a model directly, with resumable downloads if a transfer gets interrupted. It supports several small open models, including Llama 3.2 in 1B and 3B sizes, Gemma 2 2B, Qwen 2.5 1.5B, and Phi-3 Mini, each with a listed minimum RAM requirement so a user can pick a model that fits their device. Chat responses stream token by token, and the interface applies the correct prompt template for whichever model family is loaded. Chats are stored locally in an encrypted database, and the app includes a thermal manager that scales back GPU usage automatically if the phone overheats or the battery runs low, plus a performance overlay showing tokens per second, RAM use, and GPU layer counts. The interface is built with Jetpack Compose in a dark, high contrast theme, and supports multiple separate conversation histories with rename and delete options, along with markdown and syntax highlighted code blocks in responses. Building the app from source requires Android Studio, JDK 17, the Android NDK, and CMake, plus a separate step to pull in the llama.cpp source code, skipping that step still builds the app but inference returns demo responses instead of real output. A phone needs an ARM64 processor, at least 4GB of RAM, and Vulkan 1.0 support, which covers most devices from 2017 onward. The project states it is provided as is for educational and personal use.

Copy-paste prompts

Prompt 1
Walk me through building AnvilAI from source, including the llama.cpp setup step.
Prompt 2
Explain how AnvilAI uses Vulkan to accelerate model inference on an Android GPU.
Prompt 3
Help me pick which supported model, such as Llama 3.2 1B or Gemma 2 2B, fits my phone's RAM.
Prompt 4
Describe how AnvilAI keeps chat history private and encrypted on the device.

Frequently asked questions

What is anvilai?

An Android app that runs AI chat models fully on the phone using the GPU, with no internet connection or cloud server involved.

What language is anvilai written in?

Mainly Kotlin. The stack also includes Kotlin, Jetpack Compose, llama.cpp.

How hard is anvilai to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is anvilai for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.