Kernelin turns a normal Kotlin function marked @Kernel into a GPU shader at build time. It runs up to 118× faster than 10 CPU cores, and the same function still runs on the CPU for unit tests. How it works, and what it can't do yet.
Things I learn while building Android apps — tooling, AOSP, performance, and the occasional debugging rabbit hole.
Kernelin turns a normal Kotlin function marked @Kernel into a GPU shader at build time. It runs up to 118× faster than 10 CPU cores, and the same function still runs on the CPU for unit tests. How it works, and what it can't do yet.
Type “Pay my bills” and most keyboards offer the emoji you used yesterday. Moji offers 💰 💸 🧾. The story of a 5 MB model that reads the message before it picks the face.
Language detectors are tested on news articles. People send “kal milte hain bhai”. I measured Beacon and Google ML Kit on chat, short text and romanised Indian languages. Tables inside.
Speech-to-text gives you a wall of lowercase words. This tutorial adds commas, full stops, question marks and capitals with one on-device call — including the । in Hindi.
Google ML Kit's smart replies are better than mine: 72.8% vs 63.6%. I'm publishing that number on purpose, and then arguing that the smaller model is still the right call for a lot of apps.
The twelve questions I would ask about a 6 MB emotion model, starting with “only 38%?”. Straight answers, benchmark tables and the cases it still gets wrong.
A toxicity model is only as good as where you put it. Six concrete places in a chat or community app, the sensitivity to use in each, and what to do when a message is flagged.
Users paste phone numbers, UPI IDs and Aadhaar numbers into chat and support forms. Then that text flows into logs, analytics and LLM prompts. A seven-point audit, and an on-device way to close each leak.
Most sketch classifiers turn your drawing into an image and run a vision model. Chalk reads the pen strokes themselves. That one decision makes it 193× smaller and better at guessing half-finished drawings.
Old family photos are the last thing you should upload to a stranger’s server. So I built a colorizer that physically cannot — a 129 MB DDColor model running on the phone, with no INTERNET permission in the manifest at all.
I once shipped a “quantized” model that was still half float32, and nothing warned me. Here is how I use Netron to check quantization, scale and zero-point, and whether the graph will actually run on an accelerator.
Our game was dropping frames on a mid-range Adreno device and no amount of CPU profiling explained it. AGI did. Here is how I set it up, what the counters actually mean, and how I read a frame trace.
A 507 MB app is an absurd thing to ship. I did it anyway, because the alternative was sending every conversation to somebody else’s server. Qwen 2.5 0.5B, llama.cpp, and a manifest with no network permission.
Every background remover wants your image on their server and your card on file. This one is a 42 MB model, runs on the phone in about a second, and costs nothing.
I knew I had screenshotted that address. I could not find it. So I indexed my whole gallery with on-device OCR and a Room FTS4 table.
Scanner apps are a notorious category — free, ad-stuffed, and quietly holding the camera permission plus your documents. It turns out you can build one that needs neither.
The moment you most need a translator is the moment you have no signal and roaming would cost a fortune. Download the models on home WiFi, then translate forever with the radio off.
RSS never died, it just stopped being a business — which makes it a very good thing to build on. Android, iOS, macOS, Windows and Linux from one Kotlin Multiplatform codebase.
I have typed the same dumpsys incantation more times than I would like to count. So I built a desktop GUI for ADB — and had to push a DEX onto the device just to draw the app icons.
More as I build things worth writing about.