The wrong expression in function "squad_convert_example_to_features"
https://github.com/huggingface/transformers/blob/d4bf9ee1ff0e85cb24feec4dd160af39b623d4b9/src/transformers/data/processors/squad.py#L253
The type of `span["input_ids"]` is `List`, and the `tokenizer.pad_token_id` equals 0, so `span["input_ids"] == tokenizer.pad_token_id` returns bool type result: `False`. It leads to `pad_token_indices = np.where(False)` to be empty array. This may not be the ideal outcome. Because the latter expression 
https://github.com/huggingface/transformers/blob/d4bf9ee1ff0e85cb24feec4dd160af39b623d4b9/src/transformers/data/processors/squad.py#L258
 uses the `pad_token_indices` to generate p_mask, which should be a `np.ndarray` that sets the padding item in it to 1.
I think the right expression may be as follow:
```Python
pad_token_indices = np.where(np.array(span["input_ids"]) == tokenizer.pad_token_id)
```
`np.array(span["input_ids"])` make a `np.ndarray`, which can compare with `tokenizer.pad_token_id`, and generate `np.ndarray` result. It make sence of expression `p_mask[pad_token_indices] = 1`. 
My English is poor, I hope you can understand my words. Thanks!
This is all legacy code that we are not maintaining anymore though.<|||||>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](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.