

TITLE
Could not load model deepset/minilm-uncased-squad2

COMMENTS
2

REACTIONS
+1: 0
-1: 0
laugh: 0
hooray: 0
heart: 0
rocket: 0
eyes: 0

BODY
### System Info

```shell
I'm trying to load the model "deepset/minilm-uncased-squad2".
On my laptop (Ubuntu 20.4 LTS), there's no problem.
This happens when I run the exact same code on a server running Linux(see version below).

Here's the output of transformer-cli env command:
- `transformers` version: 4.18.0
- Platform: Linux-5.13.0-1021-aws-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.5.1
- PyTorch version (GPU?): not installed (NA)
- Tensorflow version (GPU?): 2.8.0 (False)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: No (I'm manually filling this in)
- Using distributed or parallel set-up in script?: No (I'm manually filling this in)


Here's the error message:
ValueError: Could not load model deepset/minilm-uncased-squad2 with any of the following classes: (<class 'transformers.models.auto.modeling_tf_auto.TFAutoModelForQuestionAnswering'>, <class 'transformers.models.bert.modeling_tf_bert.TFBertForQuestionAnswering'>

On this [github issue](https://github.com/huggingface/transformers/issues/353) they point to a memory failure.


However, to solve this, I had to download the pytorch version for CPU!
```


### Who can help?

@Rocketknight1, @LysandreJik,@Narsil

### Information

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

### Tasks

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

### Reproduction

model_checkpoint = "deepset/minilm-uncased-squad2"
device = -1

model_checkpoint = pipeline('question-answering', model=model_checkpoint,
                    tokenizer=model_checkpoint,
                    device=device)

### Expected behavior

```shell
No error output, and correct loading of the model.
```
