Parameter max_new_tokens is always overshadow by max_length in model.generate()
Author: dunalduck0
Pull request: no

## Environment info
<!-- You can run the command `transformers-cli env` and copy-and-paste its output below.
     Don't forget to fill out the missing fields in that output! -->

- `transformers` version: 4.11.0.dev0
- Platform: Linux-5.4.0-84-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyTorch version (GPU?): 1.9.0+cu111 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>

### Who can help
<!-- Your issue 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, DeBERTa, DeBERTa-v2, ELECTRA, MobileBert, SqueezeBert: @LysandreJik
- encoder-decoder models (For example, BlenderBot, BART, Marian, Pegasus, T5, ByT5): @patrickvonplaten, @patil-suraj
- Longformer, Reformer, TransfoXL, XLNet, FNet: @patrickvonplaten
- FSMT: @stas00
- Funnel: @sgugger
- GPT-2, GPT: @patrickvonplaten, @LysandreJik
- RAG, DPR: @patrickvonplaten, @lhoestq
- TensorFlow: @Rocketknight1
- JAX/Flax: @patil-suraj @patrickvonplaten 
- TAPAS, LayoutLM, LayoutLMv2, LUKE, ViT, BEiT, DEiT, DETR, CANINE: @NielsRogge
- GPT-Neo, GPT-J, CLIP: @patil-suraj
- Wav2Vec2, HuBERT, SpeechEncoderDecoder: @patrickvonplaten, @anton-l

If the model isn't in the list, ping @LysandreJik who will redirect you to the correct contributor.

Library:

- Benchmarks: @patrickvonplaten
- Deepspeed: @stas00
- Ray/raytune: @richardliaw, @amogkam
- Text generation: @patrickvonplaten
- Tokenizers: @LysandreJik
- Trainer: @sgugger
- Pipelines: @Narsil
- Speech: @patrickvonplaten, @anton-l
- Vision: @NielsRogge, @sgugger

Documentation: @sgugger

Model hub:

- for issues with a model, report at https://discuss.huggingface.co/ and tag the model's creator.

HF projects:

- datasets: [different repo](https://github.com/huggingface/datasets)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)

Examples:

- maintained examples (not research project or legacy): @sgugger, @patil-suraj

For research projetcs, please ping the contributor directly. For example, on the following projects:

- research_projects/bert-loses-patience: @JetRunner
- research_projects/distillation: @VictorSanh

 -->
@patrickvonplaten

## Information

Model I am using: EleutherAI/gpt-j-6B, but any generation model would apply. 

The problem arises when using my code described below. The prompt to the model is fairly long (over 50 tokens). I wanted the model to generate up to 10 tokens, ADDITIONAL to the prompt. To this end, I tried the parameter max_new_token, but it's always overshadow by the other parameter max_length. There is no way to undefine max_length because it's default to model.config.max_length. These two parameters are described in https://huggingface.co/transformers/main_classes/model.html

max_length (int, optional, defaults to model.config.max_length) – The maximum length of the sequence to be generated.

max_new_tokens (int, optional, defaults to None) – The maximum numbers of tokens to generate, ignore the current number of tokens. Use either max_new_tokens or max_length but not both, they serve the same purpose.

## To reproduce

Steps to reproduce the behavior:

1. Run the script below to generate text after the prompt. 
```python
from transformers import pipeline

prompt = 'As with previous Valkyira Chronicles games , Valkyria Chronicles III is a tactical role @-@ playing game where' +  \
'players take control of a military unit and take part in missions against enemy forces . Stories are told through comic book' + \
'@-@ like panels with animated character portraits , with characters speaking partially through voiced speech bubbles and partially' + \
'through unvoiced text . The player progresses through a series of linear missions , gradually unlocked as maps that can be freely '

generator = pipeline('text-generation', model='EleutherAI/gpt-j-6B', device=-1)
string1 = generator(prompt, do_sample=True, max_length = 10, temperature=0.9, top_k=10, top_p=0.92, num_return_sequences=1)
print(string1)
string2 = generator(prompt, do_sample=True, max_new_tokens = 10, temperature=0.9, top_k=10, top_p=0.92, num_return_sequences=1)
print(string2)
```

2. The 1st call of generator recognized max_length = 10 and triggered warning "_Input length of input_ids is 91, but ``max_length`` is set to 10.This can lead to unexpected behavior. You should consider increasing ``config.max_length`` or ``max_length``._"

3. The 2nd call of generator used the default max_length of 50, completely ignoring max_new_tokens = 10, and triggered warning "_Input length of input_ids is 91, but ``max_length`` is set to 50.This can lead to unexpected behavior. You should consider increasing ``config.max_length`` or ``max_length``._" 

<!-- If you have code snippets, error messages, stack traces please provide them here as well.
     Important! Use code tags to correctly format your code. See https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting
     Do not use screenshots, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.-->

## Expected behavior

<!-- A clear and concise description of what you would expect to happen. -->

I wanted the 2nd call of generator not to trigger any warning, and the model produce up to 10 more tokens, in additional to the input prompt. 


Comments:
Hey @dunalduck0, 

This issue was fixed very recently - see: https://github.com/pulls?q=is%3Apr+author%3Apatrickvonplaten+archived%3Afalse+is%3Aclosed

Could you try to pull from master and see if it works?

Thank you @patrickvonplaten. I've verified and it works well.