You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a project where I train the Gemma 2B model. The training part went smoothly. The problem comes when I try to export the model to SavedModel format so that I can deploy it to GCP for demo purposes. I'm using the following code to load and export the model:
When the model is loaded on system RAM and I try to export the it, I'm getting the following error:
ValueErrorTraceback (mostrecentcalllast)
[<ipython-input-15-e773bda33c50>](https://localhost:8080/#) in <cell line: 1>()---->1model.export("saved_model")
27frames
[... skippinghidden10frame]
[/usr/local/lib/python3.10/dist-packages/jax/_src/numpy/lax_numpy.py](https://localhost:8080/#) in _arange_dynamic(start, stop, step, dtype)6567# Here if at least one of start, stop, step are dynamic.6568ifany(notcore.is_dim(v) forvin (start, stop, step)):
->6569raiseValueError(
6570"In arange with non-constant arguments all of start, stop, and step "6571f"must be either dimension expressions or integers: start={start}, "ValueError: ExceptionencounteredwhencallingGemmaDecoderBlock.call().
Inarangewithnon-constantargumentsallofstart, stop, andstepmustbeeitherdimensionexpressionsorintegers: start=b, stop=None, step=1ArgumentsreceivedbyGemmaDecoderBlock.call():
• x=jnp.ndarray(shape=(batch, b, 2048), dtype=float32)
• padding_mask=jnp.ndarray(shape=(batch, a), dtype=float32)
• cache=None
• cache_update_index=0
And when the model is loaded on GPU, I get this error:
Now, I'm not really sure why is this happening because everything before this step(training, inference) worked perfectly. I'm also new to keras and DL frameworks in general. Any sort of advice would be really helpful.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
I'm working on a project where I train the Gemma 2B model. The training part went smoothly. The problem comes when I try to export the model to SavedModel format so that I can deploy it to GCP for demo purposes. I'm using the following code to load and export the model:
When the model is loaded on system RAM and I try to export the it, I'm getting the following error:
And when the model is loaded on GPU, I get this error:
Now, I'm not really sure why is this happening because everything before this step(training, inference) worked perfectly. I'm also new to keras and DL frameworks in general. Any sort of advice would be really helpful.
Regards,
Bhashwar Sengupta
Beta Was this translation helpful? Give feedback.
All reactions