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
TypeError: numpy_mask_tokens() got an unexpected keyword argument 'special_tokens_mask'
This is at least partly due to not implementing DataCollatorMixin.numpy_call in DataCollatorForWholeWordMask (np_call is implemented instead). There are also some issues with using TensorFlow tensors in the np_call function.
Environment info
transformers
version: 4.11.2Who can help
@Rocketknight1
Information
The problem arises when using:
The tasks I am working on is:
I'd like to use
DataCollatorForWholeWordMask
for masked language modeling in TensorFlow.To reproduce
return_tensors = "np"
TypeError: numpy_mask_tokens() got an unexpected keyword argument 'special_tokens_mask'
This is at least partly due to not implementing
DataCollatorMixin.numpy_call
inDataCollatorForWholeWordMask
(np_call
is implemented instead). There are also some issues with using TensorFlow tensors in thenp_call
function.return_tensors = "tf"
AttributeError: 'tensorflow.python.framework.ops.EagerTensor' object has no attribute 'clone'
inputs.clone()
appears to have been copied fromtorch_call
which is not valid in TensorFlow.The text was updated successfully, but these errors were encountered: