Transformer-XL: Remove unused parameters
Fixes #6943

Since `tgt_len` and `ext_len` is removed, the method `reset_length` was renamed to `reset_memory_length` to be more meaningful.

I'm not sure whether a deprecation warning should be included in `TransfoXLConfig`. Maybe someone can make suggestions regarding this.
As far I can see only the test `tests/test_trainer.py` is failing...<|||||>Hey! We changed the name of `nlp` to `datasets` from Thursday to Friday and I am pretty sure that's what's causing the CI bug, but it was fixed just afterwards. Could you pull the latest changes from master and rebase on your branch so you get the fix?<|||||>Sure!

Is there a way to avoid that all "new" commits from master will end up in this PR even if they are already in the master branch? So that after the rebase still only my changes are listed in this PR?<|||||>I am not sure, as I haven't had this issue before (I remember your previous PR did). But using `git pull --rebase` on your local branch should do the trick.<|||||>Thanks I will try that!<|||||># [Codecov](https://codecov.io/gh/huggingface/transformers/pull/7087?src=pr&el=h1) Report
> Merging [#7087](https://codecov.io/gh/huggingface/transformers/pull/7087?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/85ffda96fcadf70d2558ba0a59c84b9f5a2d6f0f?el=desc) will **increase** coverage by `0.20%`.
> The diff coverage is `50.00%`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/7087/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/7087?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #7087      +/-   ##
==========================================
+ Coverage   78.44%   78.65%   +0.20%     
==========================================
  Files         168      168              
  Lines       32309    32306       -3     
==========================================
+ Hits        25346    25411      +65     
+ Misses       6963     6895      -68     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/7087?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/configuration\_transfo\_xl.py](https://codecov.io/gh/huggingface/transformers/pull/7087/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3RyYW5zZm9feGwucHk=) | `87.03% <0.00%> (-2.06%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_transfo\_xl.py](https://codecov.io/gh/huggingface/transformers/pull/7087/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl90cmFuc2ZvX3hsLnB5) | `88.10% <57.14%> (-0.03%)` | :arrow_down: |
| [src/transformers/modeling\_transfo\_xl.py](https://codecov.io/gh/huggingface/transformers/pull/7087/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190cmFuc2ZvX3hsLnB5) | `79.73% <57.14%> (-0.04%)` | :arrow_down: |
| [src/transformers/tokenization\_xlm.py](https://codecov.io/gh/huggingface/transformers/pull/7087/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxtLnB5) | `16.26% <0.00%> (-66.67%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_distilbert.py](https://codecov.io/gh/huggingface/transformers/pull/7087/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9kaXN0aWxiZXJ0LnB5) | `34.03% <0.00%> (-64.79%)` | :arrow_down: |
| [src/transformers/pipelines.py](https://codecov.io/gh/huggingface/transformers/pull/7087/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9waXBlbGluZXMucHk=) | `25.85% <0.00%> (-55.15%)` | :arrow_down: |
| [src/transformers/optimization.py](https://codecov.io/gh/huggingface/transformers/pull/7087/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9vcHRpbWl6YXRpb24ucHk=) | `34.28% <0.00%> (-48.00%)` | :arrow_down: |
| [src/transformers/tokenization\_mbart.py](https://codecov.io/gh/huggingface/transformers/pull/7087/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fbWJhcnQucHk=) | `57.14% <0.00%> (-39.69%)` | :arrow_down: |
| [src/transformers/optimization\_tf.py](https://codecov.io/gh/huggingface/transformers/pull/7087/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9vcHRpbWl6YXRpb25fdGYucHk=) | `33.33% <0.00%> (-24.33%)` | :arrow_down: |
| [src/transformers/modeling\_lxmert.py](https://codecov.io/gh/huggingface/transformers/pull/7087/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19seG1lcnQucHk=) | `70.01% <0.00%> (-20.75%)` | :arrow_down: |
| ... and [22 more](https://codecov.io/gh/huggingface/transformers/pull/7087/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/7087?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/7087?src=pr&el=footer). Last update [b00cafb...775bc0a](https://codecov.io/gh/huggingface/transformers/pull/7087?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
<|||||>I am unsure whether it's better, in terms of user experience, to add default values to `tgt_len` and `ext_len` in `reset_length` and a deprecation warning or to change the name of the function altogether to `reset_memory_length` as you do. @LysandreJik could you take a look at this?<|||||>@TevenLeScao Since we remove `tgt_len` and `ext_len` from the model anyway I thought that the name `reset_memory_length` gives a better description of what the function is actually doing.<|||||>Alright, LGTM!