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
An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
My own task or dataset (give details below)
Reproduction
Changes introduced in #23760 and released in transformers v4.30.0 are breaking the ability to serialize a keras model that contains a Whisper decoder layer.
Here is a minimal reproducible example:
With transformers>=4.30.0, this minimal reproducible example will raise the error:
OperatorNotAllowedInGraphError: Exception encountered when calling layer 'decoder' (type TFWhisperDecoder).
Using a symbolic `tf.Tensor` as a Python `bool` is not allowed: AutoGraph did convert this function. This might indicate you are trying to use an unsupported feature.
Call arguments received by layer 'decoder' (type TFWhisperDecoder):
• self=tf.Tensor(shape=(1, 1), dtype=int32)
• input_ids=None
• attention_mask=None
• position_ids=None
• encoder_hidden_states=tf.Tensor(shape=(None, 1500, 384), dtype=float32)
• head_mask=None
• cross_attn_head_mask=None
• past_key_values=None
• inputs_embeds=None
• use_cache=None
• output_attentions=None
• output_hidden_states=None
• return_dict=None
• training=True
Expected behavior
Keras model serialization should succeed.
The text was updated successfully, but these errors were encountered:
Hi @perretv, the fix has now been merged. You can pip install git+https://github.com/huggingface/transformers.git to install from main and use it immediately. It'll be included in the next 4.31 release of transformers, after which you can go back to normal pip installs.
System Info
transformers
version: 4.30.2Who can help?
@Rocketknight1
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Changes introduced in #23760 and released in transformers v4.30.0 are breaking the ability to serialize a keras model that contains a Whisper decoder layer.
Here is a minimal reproducible example:
With
transformers>=4.30.0
, this minimal reproducible example will raise the error:Expected behavior
Keras model serialization should succeed.
The text was updated successfully, but these errors were encountered: