Improving Diversity in Language Models: When Temperature Fails, Change the Loss
Fuente:
arXiv
Saved in:
| Main Authors: | , , , , , |
|---|---|
| Format: | Preprint |
| Published: |
2025
|
| Subjects: | |
| Online Access: | |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1866916896073318400 |
|---|---|
| author | Verine, Alexandre Bronnec, Florian Le Zheng, Kunhao Allauzen, Alexandre Chevaleyre, Yann Negrevergne, Benjamin |
| author_facet | Verine, Alexandre Bronnec, Florian Le Zheng, Kunhao Allauzen, Alexandre Chevaleyre, Yann Negrevergne, Benjamin |
| contents | Increasing diversity in language models is a challenging yet essential objective. A common approach is to raise the decoding temperature. In this work, we investigate this approach through a simplistic yet common case to provide insights into why decreasing temperature can improve quality (Precision), while increasing it often fails to boost coverage (Recall). Our analysis reveals that for a model to be effectively tunable through temperature adjustments, it must be trained toward coverage. To address this, we propose rethinking loss functions in language models by leveraging the Precision-Recall framework. Our results demonstrate that this approach achieves a substantially better trade-off between Precision and Recall than merely combining negative log-likelihood training with temperature scaling. These findings offer a pathway toward more versatile and robust language modeling techniques. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2508_09654 |
| institution | arXiv |
| publishDate | 2025 |
| record_format | arxiv |
| spellingShingle | Improving Diversity in Language Models: When Temperature Fails, Change the Loss Verine, Alexandre Bronnec, Florian Le Zheng, Kunhao Allauzen, Alexandre Chevaleyre, Yann Negrevergne, Benjamin Computation and Language Machine Learning Increasing diversity in language models is a challenging yet essential objective. A common approach is to raise the decoding temperature. In this work, we investigate this approach through a simplistic yet common case to provide insights into why decreasing temperature can improve quality (Precision), while increasing it often fails to boost coverage (Recall). Our analysis reveals that for a model to be effectively tunable through temperature adjustments, it must be trained toward coverage. To address this, we propose rethinking loss functions in language models by leveraging the Precision-Recall framework. Our results demonstrate that this approach achieves a substantially better trade-off between Precision and Recall than merely combining negative log-likelihood training with temperature scaling. These findings offer a pathway toward more versatile and robust language modeling techniques. |
| title | Improving Diversity in Language Models: When Temperature Fails, Change the Loss |
| topic | Computation and Language Machine Learning |
| url | https://arxiv.org/abs/2508.09654 |