beam_indices = None 
### System Info

Hi dear officer 

I find a bug, that is, if I use the 'force_words_id'  parameter in generate() function and set output_score = True. then  I want to get beam_indices, it will return None. but if I remove force_words_id. it will work. 
`
prompt = """Tell me some about Canada"""
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')
force_words = ["Canada"]
force_words_ids = tokenizer(force_words, add_special_tokens=False).input_ids
outputs = model.generate(input_ids=input_ids, attention_mask=attention_mask,num_beams =4,max_new_tokens=10,\
                         return_dict_in_generate=True,output_scores=True)
`
`print(outputs.beam_indices) tensor([[ 0,  0,  0,  0,  1,  0,  0,  3,  1,  0, -1, -1, -1, -1, -1]],
       device='cuda:0')`
But if add 'force_words_id' `outputs = model.generate(input_ids=input_ids, attention_mask=attention_mask,num_beams =4,max_new_tokens=10,\
                         return_dict_in_generate=True,output_scores=True,force_words_ids=force_words_ids)
print(outputs.beam_indices) None`



### Who can help?

@ArthurZucker , please give me some guidance, thanks 🙏 

### Information

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

### Tasks

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

### Reproduction

it should return indices. 

### Expected behavior

it should return indices. 
cc @gante who is gonna be more familiar with this! <|||||>Hey @Dongximing 👋 

The PR linked above (#25042) should fix it :) In a nutshell, the values were not being piped all the way to the output.