This model is a converted version of
TheDrummer/Gemmasutra-Mini-2B-v1 optimized for on-device inference using
LiteRT (formerly TensorFlow Lite). It has been quantized to
8-bit to reduce size and memory usage while maintaining performance suitable for mobile and edge devices.
This model is intended for
local, on-device text generation on Android, iOS, or Web environments that support the LiteRT (TensorFlow Lite) LLM inference runtime.
For example Edge Gallery from the Google Play Store or download it directly from its GH Repo here:
https://github.com/google-ai-edge/gallery
The compiled APK can be found in the Releases section here:
https://github.com/google-ai-edge/gallery/releases
1from mediapipe.tasks import python
2from mediapipe.tasks.python import text
3
4base_options = python.BaseOptions(model_asset_path='model.tflite')
5options = text.LlmInferenceOptions(base_options=base_options)
6llm_inference = text.LlmInference.create_from_options(options)
7
8response = llm_inference.generate_response("Write a story about...")
9print(response)