How to Export Gemma 2 from Keras to Tensorflow Saved Model? #20607
JeeDevUser
started this conversation in
General
Replies: 1 comment
-
OK, I succeeded with following Python script:
BUT, I got an extra large model: Tried to load model, It ate up all 16GB of my memory, and failed to load. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just downloaded Gemma2 from
https://www.kaggle.com/models/google/gemma-2/keras
-unpacked and got the following files:
-tried to load model (and convert to Saved Model format) by using following Python script:
-at the line
model = keras.models.model_from_json(json.dumps(model_config))
got following error:
ValueError: Unknown layer: GemmaBackbone. Please ensure this object is passed to the
custom_objectsargument. See https://www.tensorflow.org/guide/keras/save_and_serialize#registering_the_custom_object for details.
Questions:
https://www.tensorflow.org/guide/keras/save_and_serialize#registering_the_custom_object
but not sure what to do with GemmaBackbone...huh?
Any help?
Beta Was this translation helpful? Give feedback.
All reactions