-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GemmaCausalLM
fails to load if TensorFlow NumPy behavior isenabled
#2136
Comments
Hi @t-kalinowski, I was able to reproduce the issue, and it looks like the problem is with the model weights for Instead of troubleshooting Thank you. |
I would certainly hope that this alternate approach doesn't mean the KerasHub team will ignore the apparent bug in |
I am not sure about Keras's support for tf.experimental.numpy.experimental_enable_numpy_behavior(dtype_conversion_mode="safe") with TF backend. |
The issue happens regardless of backend. AFAIK Were you able to identify why it breaks? |
Describe the bug
Calling
GemmaCausalLM.from_preset()
errors if TF NumPy type promotion behavior is enabled. This happens regardless of which Keras backend is used.To Reproduce
Given script
bug.py
Calling
uv run --python 3.11 bug2.py
produces:A similar error happens if
KERAS_BACKEND='jax'
is configured.The text was updated successfully, but these errors were encountered: