mbrs: A library for minimum Bayes risk decoding

Nara Institute of Science and Technology (NAIST)
mbrs

Abstract

Minimum Bayes risk (MBR) decoding is a decision rule of generation tasks that outperforms conventional maximum a posterior (MAP) decoding using beam search by selecting high-quality outputs rather than high-probability. Typically, it finds the most probable hypothesis from the set of hypotheses under the sampled pseudo-references. mbrs is a library of MBR decoding, which can flexibly combine various metrics, expectation estimations, and algorithmic variants. It is designed with a focus on scope-based speed measurement and calling count, transparency, reproducibility, and extensibility, which are essential for researchers and developers. We published our mbrs as an MIT-licensed open-source project, and the code is available on GitHub.

BibTeX

@misc{deguchi-2024-mbrs,
   title={mbrs: A Library for Minimum Bayes Risk Decoding},
   author={Hiroyuki Deguchi and Yusuke Sakai and Hidetaka Kamigaito and Taro Watanabe},
   year={2024},
   eprint={2408.04167},
   archivePrefix={arXiv},
   primaryClass={cs.CL},
   url={https://arxiv.org/abs/2408.04167},
}