Answer Mismatch: run squad_convert_examples_to_features  with xlm-roberta
Author: shutttttdown
Pull request: no

### System Info

- `transformers` version: 4.5.1
- Platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.9
- PyTorch version (GPU?): 1.8.1+cu102 (True)
- Tensorflow version (GPU?): not installed (NA)

### Who can help?

@sgugger 
@mfuntowicz 
@aaugustin 

### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)

### Reproduction

### Overview
I am doing QA task on the xquad dataset, which is a multilingual version of squad and in squad format.

A problem occurs when I use xlm-roberta-base tokenizer to preprocess the xquad.zh.json (Chinese version) following the standard process.

Specifically, I convert a list of examples into features by a function [`squad_convert_examples_to_features`](https://github.com/huggingface/transformers/blob/main/src/transformers/data/processors/squad.py) provided by huggingface and find that the answers of some orginal examples are inconsistent with the their features.

I'll just pick an example for demonstration.

### Codes

```python
import transformers
from transformers import (
    AutoTokenizer,
    squad_convert_examples_to_features,
)
from transformers.data.processors.squad import SquadResult, SquadV1Processor, SquadV2Processor

model_name_or_path = 'xlm-roberta-base'
tokenizer = AutoTokenizer.from_pretrained(
    model_name_or_path,
    do_lower_case=False,
    cache_dir='./cache/',
    use_fast=False,
)

processor = SquadV1Processor()
examples = processor.get_train_examples(None, filename='xquad.zh.json')
...
# I pick just one tmp_example from examples
...
print(tmp_example.question_text)
# '利用计算复杂性理论对计算问题进行分类的主要依据是什么？'
print(tmp_example.context_text)
# '计算复杂性理论是理论计算机科学中计算理论的一个分支，它侧重于根据计算问题的固有难度对其进行分类，并将这些类别相互关联起来。计算问题被理解为原则上可由计算机解决的任务，这相当于说明该问题可通过机械地应用数学步骤（例如算法）来解决。'
pritn(tmp_example.answer_text) # which should be the ground truth
# '固有难度'

# Initialize the features, dataset, dataloader following the standard process
features, dataset = squad_convert_examples_to_features(
    examples=[tmp_example],
    tokenizer=tokenizer,
    max_seq_length=512,
    doc_stride=128,
    max_query_length=64,
    is_training=True,
    return_dataset="pt",
    threads=4,
)

train_sampler = RandomSampler(dataset)
train_dataloader = DataLoader(dataset, sampler=train_sampler, batch_size=8)

for n,batch in enumerate(train_dataloader):
    start_positions = batch[3]
    end_positions = batch[4]

    if type(xlm_tokenizer).__name__ in ['XLMRobertaTokenizer']:
        start_positions = start_positions + 1
        end_positions = end_positions + 1

    inputs = {
        "input_ids": batch[0],
        "attention_mask": batch[1],
        "token_type_ids": batch[2],
        "start_positions": start_positions,
        "end_positions": end_positions,
    }
   
    print(xlm_tokenizer.decode(inputs['input_ids'][0, start_positions[0]:end_positions[0]+1]))
    # '计算复杂性理论是理论计算机科学中计算理论的一个分支,它侧重于根据计算问题的固有难度对其进行分类,并将这些类别相互关联起来。计算问题被理解为原则上可由计算机解决的任务,这相当于说明该问题可通过机械地应用数学步骤(例如算法)来解决。'
    # the ground truth answer span should be '固有难度', however, the actual answer span input to the model is shown as above which is inconsistent with the ground truth.




```

### Expected behavior

The ground truth answer span should be 

  '固有难度', 

however, the actual answer span input to the model is 
   
'计算复杂性理论是理论计算机科学中计算理论的一个分支,它侧重于根据计算问题的固有难度对其进行分类,并将这些类别相互关联起来。计算问题被理解为原则上可由计算机解决的任务,这相当于说明该问题可通过机械地应用数学步骤(例如算法)来解决。'

which is inconsistent with the ground truth.

Similar problems have been found in many examples.

Comments:
Thanks for the report. However, as you have probably seen when executing it, `squad_convert_examples_to_features` is deprecated, so it's not maintained anymore.

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.