How to finetune this and make it work using mediapipe on kotlin with GPU delegate support like litert-community/Gemma3-1B-IT ?

#32
by andromedazt - opened
This comment has been hidden
andromedazt changed discussion status to closed
andromedazt changed discussion status to open
Google org

Hi @andromedazt Apologies for late response
I believe the workflow to fine-tune google/gemma-3-1b-it and deploy it on Android with GPU support can be divided into 2 stages .
First is to finetune the model using a memory-efficient method like LoRA for your specific task. Next, you can convert the fine-tuned model into the TensorFlow Lite (TFLite) format and make sure to specify the GPU backend during this process.
Then, add these TFLite model files to your Kotlin project's assets. Use MediaPipe's LLM Inference API to load the model, and in the configuration options explicitly set the delegate to Delegate.GPU to enable hardware acceleration.

Sign up or log in to comment