Skip to content

blundell/Gemma3MinimalStarter

Repository files navigation

Minimal Gemma 3 example

Running the app example

This example shows "ask a question get an answer" for its demo. But Gemma3 is so much more than that, and you would typically get responses "behind the scenes" rather than use it as a chatbot. (And such the latency in this gif (of an emulator) becomes more irrelevant.)

For a full fledged example see:

As well as writing the code, you need to get a token from hugging face for downloading the Gemma 3 Model (or any model)

This app expects you to have huggingface.token = 1234abcd in your root local.properties file.

You may encounter an error like this if using an old version of MediaPipe:

// tflite com.blundell.tut.gemma3  E  Didn't find op for builtin opcode 'STABLEHLO_COMPOSITE' version '1'. 
An older version of this builtin might be supported. 
Are you using an old TFLite binary with a newer model?

It means your implementation("com.google.mediapipe:tasks-genai:0.10.22") is out of date.

About

Get started with the new Gemma 3 model for on-device inference. Giving you the simplest steps to get started with AI on Android.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages