Fix opt softmax small nit (#19243)
Fix opt softmax small nit (#19243)

* fix opt softmax nit

- Use the same logic as 1eb09537550734a783c194e416029cb9bc4cb119 for consistency

* Update src/transformers/models/opt/modeling_opt.py
huggingface/transformers,huggingface/transformers,huggingface/transformers,huggingface/transformers