Some models of HuggingFace, like 'pucpr/bioBERTpt-squad-v1.1-portuguese' uses 'None' as self.pad_token. It is a problem because return expects a vector of numbers and receives a vector with numbesr (for existing words) and None (for padding words). This if fix it.
Some models of HuggingFace, like 'pucpr/bioBERTpt-squad-v1.1-portuguese' uses 'None' as self.pad_token. It is a problem because return expects a vector of numbers and receives a vector with numbesr (for existing words) and None (for padding words). This if fix it.