Open pinesnow72 opened 2 months ago
Hey! WOuld you like to open a PR for a fix, adding this as a test as well? 🤗
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
System Info
transformers
version: 4.41.2Who can help?
@ArthurZucker, @Rocketknight1
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
While I was trying to make TFDebertaV2Model work with mixed precision and checking the code in modeling_tf_deberta_v2.py, I found the below code block (in function make_log_bucket_position()) which may cause type mis-match error when executing.
This code throws the following error message:
Traceback (most recent call last): File "", line 1, in
File "/home/swlee/miniconda3/envs/tf216/lib/python3.12/site-packages/transformers/models/deberta_v2/modeling_tf_deberta_v2.py", line 551, in make_log_bucket_position
tf.cast(tf.math.log(abs_pos / mid), tf.float32) / tf.math.log((max_position - 1) / mid) * (mid - 1)