TypeError: forward() got an unexpected keyword argument 'past'
Author: BigSalmon2
Pull request: no

TypeError: forward() got an unexpected keyword argument 'past'

```
        text1 = request.form['rawtext']
        m = text1
        text = tokenizer.encode(text1)
        myinput, past = torch.tensor([text]), None
        logits, past = model(myinput, past = past)
        logits = logits[0,-1]
        probabilities = torch.nn.functional.softmax(logits)
        best_logits, best_indices = logits.topk(780)
        best_words = [tokenizer.decode([idx.item()]) for idx in best_indices]
        text.append(best_indices[0].item())
        best_probabilities = probabilities[best_indices].tolist()
        for i in range(780):
            f = ('Generated {}: {}'.format(i, best_words[i]))
            print(f)
```

```
/content/GLPAPP
 * Serving Flask app "__main__" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
 * Running on http://19bd405035a7.ngrok.io
 * Traffic stats available on http://127.0.0.1:4040
127.0.0.1 - - [30/Nov/2020 22:34:16] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [30/Nov/2020 22:34:19] "GET /static/js/jquery.min.js HTTP/1.1" 200 -
127.0.0.1 - - [30/Nov/2020 22:34:19] "GET /static/css/main.css HTTP/1.1" 200 -
127.0.0.1 - - [30/Nov/2020 22:34:19] "GET /static/js/breakpoints.min.js HTTP/1.1" 200 -
127.0.0.1 - - [30/Nov/2020 22:34:19] "GET /static/js/main.js HTTP/1.1" 200 -
127.0.0.1 - - [30/Nov/2020 22:34:19] "GET /static/js/util.js HTTP/1.1" 200 -
127.0.0.1 - - [30/Nov/2020 22:34:19] "GET /static/js/browser.min.js HTTP/1.1" 200 -
127.0.0.1 - - [30/Nov/2020 22:34:19] "GET /static/css/fontawesome-all.min.css HTTP/1.1" 200 -
127.0.0.1 - - [30/Nov/2020 22:34:22] "GET /favicon.ico HTTP/1.1" 404 -
[2020-11-30 22:34:23,393] ERROR in app: Exception on /predict [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "<ipython-input-8-a5d8492f7c0c>", line 36, in predict
    logits, past = model(myinput, past = past)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
TypeError: forward() got an unexpected keyword argument 'past'
127.0.0.1 - - [30/Nov/2020 22:34:23] "POST /predict HTTP/1.1" 500 -
```

Comments:
Hello, it seems you've upgraded your library from a 3.x version to 4.0.0. I invite you to consult the migration guide [here (deprecated attributes)](https://huggingface.co/transformers/migration.html#removed-some-deprecated-attributes) or to pin your `transformers` on version 3: `transformers==3`.

Thank you!