Gemma 2b converted to tflite seems to produce random results #5590
Labels
platform:android
Issues with Android as Platform
stat:awaiting googler
Waiting for Google Engineer's Response
task:text classification
Issues related to Text Classification: Classify text into relevant tags
type:performance
Execution Time and memory heap, stackoverflow and garbage collection related
type:support
General questions
Have I written custom code (as opposed to using a stock example script provided in MediaPipe)
None
OS Platform and Distribution
Android 14
MediaPipe Tasks SDK version
0.10.14
Task name (e.g. Image classification, Gesture recognition etc.)
Text generation
Programming Language and version (e.g. C++, Python, Java)
Java
Describe the actual behavior
Random output from .bin generated
Describe the expected behaviour
safetensors and .bin should give similar outputs
Standalone code/steps you may have used to try to get what you need
I trained a model to parse ingredients in recipes via this dataset: https://huggingface.co/datasets/AmarOk1412/ingredients
Model gives:
https://huggingface.co/AmarOk1412/fine_tuned_science_gemma2b-it
Prompt I use:
e.g.
Using https://github.com/NSTiwari/Gemma-on-Android (that loads the .bin generated by mediapipe), I can't get useful output, however, using the safetensors with https://huggingface.co/spaces/Aashi/NSTiwari-fine_tuned_science_gemma2b-it or in Colab seems ok.
Playbook I use to do the conversion: https://gist.github.com/AmarOk1412/edf86f72966768177b685099b76499a7#file-fine_tune_gemma_model-ipynb
I'd expect to have similar outputs for both .safetensors and .bin
Is there a way to dig more?
Other info / Complete Logs
No response
The text was updated successfully, but these errors were encountered: