Generate function 
### System Info

The model is llama and the tokenizer is also llama (decapoda-research/llama-7b-hf)
tokenizer = LlamaTokenizer.from_pretrained('decapoda-research/llama-7b-hf',add_special_tokens=False,add_bos_token = False)

I have a question about the model generation. 
```python
prompt = """Tell me some things about NBA"""
input_tokenized_info = tokenizer(prompt, return_tensors="pt")
input_ids, attention_mask = input_tokenized_info['input_ids'], input_tokenized_info['attention_mask']
input_ids = input_ids.to('cuda') 
attention_mask = attention_mask.to('cuda')
outputs = model.generate(input_ids=input_ids, attention_mask=attention_mask,num_beams = 10,no_repeat_ngram_size=1,max_length=200,\
                        return_dict_in_generate=True,output_scores=True,length_penalty=0.9)
print(len(outputs[0][0]))
18
print(len(outputs.scores))
194
print(outputs[0][0])
tensor([24948,   592,   777,  2712,  1048, 21517, 29871, 29906, 29968, 29896,
        29929,   341, 29911,  3189,  1144, 29889,     2,     1],
       device='cuda:0')
print(tokenizer.decode(outputs[0][0], skip_special_tokens=True))
'Tell me some things about NBA 2K19 MT Coins.'
```
I think the score size should be the same as the (output-input) size  

### Who can help?

@ArthurZucker 

### Information

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

### Tasks

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

### Reproduction

I think the output-input size is the same as the score size, also why the end of the token is 1 and then stop it. 

### Expected behavior

How can I generate a good output for example I set a max_length =100, it should have the stop and some "," , not print 100 tokens or stop at BOS token. 


Thanks you 
Hi @Dongximing, 

The `decapoda-research/llama-7b-hf` checkpoint shouldn't be used. The tokenizer and weights were released before the Llama PR was merged and are not compatible with the Llama implementation in transformers. There are other checkpoints (e.g. [this one](https://huggingface.co/huggyllama/llama-7b)) which are compatible. 