I-BERT model support
Author: kssteven418
Pull request: yes

# What does this PR do?

This PR implements [I-BERT](https://arxiv.org/abs/2101.01321), an integer-only quantization scheme for Transformer architectures. I-BERT is based on the model architecture and the pre-trained parameters of RoBERTa (this can be extended to other architectures as a future task), except that it calls custom integer-only operations instead of the normal ones. (The custom kernels are implemented in `ibert/quant_modules.py`.) Therefore, under the current implementation, I-BERT inherits its tokenizer and configuration from the RoBERTa’s, and pulls the model parameter from the `roberta-base/large` repo.

The model can be finetuned on a specific task in 2-pass,
1) Finetune the model on a given task with the normal mode (`config.quant_mode = False`) before quantizing it. The model will then take the normal non-quantized pass. 
2) Once the model achieves the best accuracy, do another finetuning with the quantization mode (`config.quant_mode = True`). The model will then take the integer-only quantized pass to recover the accuracy degradation through quantization-aware training. 

You can skip the first pass and do task-specific finetuning and quantization-aware training at the same time, but it normally results in lower accuracy.

Here are some missing features and TODOs:
- [x] Static quantization: activation ranges (min/max) must be fixed in evaluation time. 
- [x] `ibert-roberta-large` support
- [ ] Test on different types of tasks
- [ ] More intuitive APIs?


## Results on the GLUE tasks
* RTE, MRPC, SST2, and QNLI with `ibert-roberta-base`
* Without extensive hyperparameter tuning (the results, both the baseline and I-BERT, could be improved)

Task | RTE | MRPC | SST2 | QNLI
--- | --- | --- | --- |--- 
Baseline(FP32) | 74.37 | 90.75 | 92.15 | 92.89
I-BERT(INT8) | 79.78 | 91.18 | 93.81 | 91.83




<!--
Congratulations! You've made it this far! You're not quite done yet though.

Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution.

Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change.

Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost.
-->


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/master/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/master/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?

<!--
## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors which may be interested in your PR.

 Your PR will be replied to more quickly if you can figure out the right person to tag with @

 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.

Models:

- albert, bert, xlm: @LysandreJik
- blenderbot, bart, marian, pegasus, encoderdecoder,  t5: @patrickvonplaten, @patil-suraj
- longformer, reformer, transfoxl, xlnet: @patrickvonplaten
- fsmt: @stas00
- funnel: @sgugger
- gpt2: @patrickvonplaten, @LysandreJik
- rag: @patrickvonplaten, @lhoestq
- tensorflow: @jplu

Library:

- benchmarks: @patrickvonplaten
- deepspeed: @stas00
- ray/raytune: @richardliaw, @amogkam
- text generation: @patrickvonplaten
- tokenizers: @n1t0, @LysandreJik
- trainer: @sgugger
- pipelines: @LysandreJik

Documentation: @sgugger

HF projects:

- nlp datasets: [different repo](https://github.com/huggingface/nlp)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)

Examples:

- maintained examples (not research project or legacy): @sgugger, @patil-suraj
- research_projects/bert-loses-patience: @JetRunner
- research_projects/distillation: @VictorSanh

 -->


Comments:
Actually as @patrickvonplaten correctly mentioned, we really need some test files before we can merge this.

@kssteven418, 

Thanks a mille for your PR - that's an amazing contribution!

I think before merging we still do need to do a couple of things:

1) **Tests** - it seems that currently no tests were added to the PR. It would be nice to add tests here. Besides the standard model tests, that are usually directly generated by the cookie-cutter, we should definitely also add some tests for the new quantization functionality

2) **Remove the Encoder-Decoder logic** I don't think that this model is ready to be used in an Encoder-Decoder setting yet -> so it would be better to remove all things related to Encoder-Decoder I think. This corresponds to *fully* removing the logic of `encoder_hidden_states`, `encoder_attention_mask`, `past_key_values`, `cross_attention`, ...

3) **CPU - compatible** - To me it seems that the model is only compatible on GPU at the moment - there are some `cuda()` call hardcoded in the utils functions. I think it would be nice to remove those

It seems that some failures appear in the automatic tests. Could you help me out resolving them?

@LysandreJik I let you merge when you think it's ready