Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 16, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 16, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 16, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 16, 2025

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025

      Minecraft licensing robbed us of this controversial NFL schedule release video

      May 16, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      The power of generators

      May 16, 2025
      Recent

      The power of generators

      May 16, 2025

      Simplify Factory Associations with Laravel’s UseFactory Attribute

      May 16, 2025

      This Week in Laravel: React Native, PhpStorm Junie, and more

      May 16, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025
      Recent

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»MBRS: A Python Library for Minimum Bayes Risk (MBR) Decoding

    MBRS: A Python Library for Minimum Bayes Risk (MBR) Decoding

    August 13, 2024

    Maximum A Posteriori (MAP) decoding is a technique used to estimate the most probable value of an unknown quantity based on observed data and prior knowledge, especially in digital communications and image processing. The effectiveness of MAP decoding depends on the accuracy of the assumed probability model. 

    Researchers from the Nara Institute of Science and Technology address the limitations of conventional maximum a posteriori (MAP) decoding in text generation tasks, particularly the issues arising from the “beam search curse.” This phenomenon occurs when high-probability outputs, generated using MAP decoding, result in low-quality or pathologically flawed text, such as repetitive sequences or input copies. The researchers proposed the use of Minimum Bayes Risk (MBR) decoding, a decision rule that selects outputs based on quality or preference rather than probability, offering a more reliable alternative to MAP decoding in neural text generation.

    MAP decoding, often implemented with beam search, is the standard approach in text generation models. However, it frequently results in suboptimal outputs due to reliance on selecting high-probability sequences. Recent research has demonstrated that these high-probability sequences do not always correspond to high-quality text, necessitating alternative approaches like MBR decoding. NAIST introduced MBRS, a new library specifically designed for MBR decoding, which supports a range of metrics and algorithmic variants. MBRS aims to address the need for a comprehensive, flexible, and efficient tool that enables researchers and developers to experiment with and systematically improve MBR decoding methods.

    The MBRS library is implemented primarily in Python and PyTorch and offers several key features. It supports various evaluation metrics, including BLEU, TER, chrF, COMET, and BLEURT, which can be used as utility functions in MBR decoding or for N-best list reranking. MBRS allows users to choose between Monte Carlo estimation and model-based estimation for MBR decoding, offering flexibility in the selection of decoding methods. The library is designed with transparency, reproducibility, and extensibility in mind. It includes a code block profiler that measures the time spent on each code block and counts the number of calls, aiding in the identification of performance bottlenecks. Additionally, MBRS provides metadata analysis capabilities, allowing users to analyze the origins of output texts and visualize the decision-making process of MBR decoding. The library’s extensibility is further enhanced by abstract classes that enable the easy customization of metrics and decoders.

    In conclusion, the MBRS library addresses the significant shortcomings of traditional MAP decoding by offering a flexible and transparent tool for implementing MBR decoding. By providing various metrics, estimation methods, and algorithmic variants, MBRS enables systematic comparisons and improvements in text generation quality. The library’s design prioritizes transparency and reproducibility, making it a valuable resource for both researchers and developers aiming to enhance the performance of text generation models.

    Check out the Paper and GitHub. All credit for this research goes to the researchers of this project. Also, don’t forget to follow us on Twitter and join our Telegram Channel and LinkedIn Group. If you like our work, you will love our newsletter..

    Don’t Forget to join our 48k+ ML SubReddit

    Find Upcoming AI Webinars here

    Arcee AI Released DistillKit: An Open Source, Easy-to-Use Tool Transforming Model Distillation for Creating Efficient, High-Performance Small Language Models

    The post MBRS: A Python Library for Minimum Bayes Risk (MBR) Decoding appeared first on MarkTechPost.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleMLC LLM: Universal LLM Deployment Engine with Machine Learning ML Compilation
    Next Article OpenLogParser: A Breakthrough Unsupervised Log Parsing Approach Utilizing Open-Source LLMs for Enhanced Accuracy, Privacy, and Cost Efficiency in Large-Scale Data Processing

    Related Posts

    Machine Learning

    Salesforce AI Releases BLIP3-o: A Fully Open-Source Unified Multimodal Model Built with CLIP Embeddings and Flow Matching for Image Understanding and Generation

    May 16, 2025
    Security

    Nmap 7.96 Launches with Lightning-Fast DNS and 612 Scripts

    May 16, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Map Eloquent Attributes into an Object Using the Collection Cast in Laravel 12.10

    Development

    Notepad finally gets spellcheck and autocorrect on Windows 11

    Development

    How to Create a Horizontal Navigation Bar Using CSS

    Development

    Spotify Introduces New Features

    Development

    Highlights

    Databases

    How Habby enhanced resiliency and system robustness using Valkey GLIDE and Amazon ElastiCache

    April 28, 2025

    This is a guest post by Shuxiang Zhao, Head of Technology, and Haoyang Yu, Backend…

    How our principles helped define AlphaFold’s release

    May 13, 2025

    U.S. Sanctions Chinese Cyber Actors Behind Treasury Breach and Salt Typhoon Attacks

    January 20, 2025

    Roborock’s new AI-powered vacuums with market-leading suction are on sale now

    February 10, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.