Closed Yufang-Liu closed 3 months ago
I'm seeing this error as well. Changing max_seq_len
didn't seem to help either.
Hi, 76 is the largest possible value because clip tokeniser used to have 77 tokens max and coca uses one to pass it to the contrastive side, that is done by the model internally and it needs to have one less in the tokens.
For the case when setting 76 does not help, you could try updating transformers.
The following code would get error
RuntimeError: The size of tensor a (77) must match the size of tensor b (78) at non-singleton dimension 2
. When change77
to76
, the error is gone. Any suggestions?