Skip to content
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

t5 conversion example error #495

Open
affereaflaw opened this issue Feb 5, 2025 · 1 comment
Open

t5 conversion example error #495

affereaflaw opened this issue Feb 5, 2025 · 1 comment

Comments

@affereaflaw
Copy link

Description of the bug:

I am quite new in this field, i want to try t5 conversion using the colab version (https://github.com/google-ai-edge/ai-edge-torch/blob/main/ai_edge_torch/generative/examples/t5/t5_conversion_colab.ipynb)

I got this error when running the last cell

converting T5 to tflite.

TypeError Traceback (most recent call last)
in <cell line: 0>()
1 print('converting T5 to tflite.')
----> 2 edge_model = convert_t5_to_tflite_multisig("/content/pytorch_model.bin")

6 frames
/usr/local/lib/python3.11/dist-packages/ai_edge_torch/generative/examples/t5/t5_attention.py in init(self, batch, dim, config, norm_config, kv_cache_max, enable_hlfb, has_relative_attention_bias)
156 has_relative_attention_bias (bool): whether we compute relative bias.
157 """
--> 158 super().init(batch, dim, dim, config, kv_cache_max, enable_hlfb)
159 self.pre_atten_norm = builder.build_norm(dim, norm_config)
160

TypeError: CrossAttention.init() missing 1 required positional argument: 'enable_hlfb'

Thank you

Actual vs expected behavior:

Any other information you'd like to share?

@gaikwadrahul8
Copy link

Hi, @affereaflaw
Thank you for bringing this issue to our attention. I have been able to reproduce the same behavior on my end and am receiving the same error message: TypeError: CrossAttention.__init__() missing 1 required positional argument: 'enable_hlfb'. For reference, I have attached gist-file demonstrating the issue. We will investigate this further and provide an update as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants