Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
[CVPR 2024 Highlight] OPERA: Alleviating Hallucination in Multi-Modal Large Language Models via Over-Trust Penalty and Retrospection-Allocation
| Date | Stars |
|---|---|
| 2026-07-24 | 411 |
| 2026-07-25 | 411 |
| 2026-07-28 | 412 |
| 2026-07-30 | 412 |
| 2026-08-06 | 412 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# OPERA: Alleviating Hallucination in Multi-Modal Large Language Models via Over-Trust Penalty and Retrospection-Allocation (CVPR 2024 Highlight) [](https://opensource.org/licenses/MIT) [](https://arxiv.org/pdf/2311.17911.pdf) [](https://github.com/huggingface/transformers) [](https://github.com/shikiw/OPERA/stargazers) This repository provides the official PyTorch implementation of the following paper: > [**OPERA: Alleviating Hallucination in Multi-Modal Large Language Models via Over-Trust Penalty and Retrospection-Allocation**](https://arxiv.org/pdf/2311.17911.pdf) <br> > [Qidong Huang](https://shikiw.github.io/)<sup>1,2</sup>, > [Xiaoyi Dong](https://scholar.google.com/citations?user=FscToE0AAAAJ&hl=en)<sup>2</sup>, > [Pan Zhang](https://panzhang0212.github.io/)<sup>2</sup>, > [Bin Wang](https://wangbindl.github.io/) <sup>2</sup>, > [Conghui He](https://conghui.github.io/) <sup>2</sup>, > [Jiaqi Wang](https://myownskyw7.github.io/)<sup>2</sup>, > [Dahua Lin](http://dahua.site/)<sup>2</sup>, > [Weiming Zhang](http://staff.ustc.edu.cn/~zhangwm/index.html)<sup>1</sup>, > [Nenghai Yu](https://scholar.google.com/citations?user=7620QAMAAAAJ&hl=en)<sup>1</sup> <br> > <sup>1</sup>University of Science and Technology of China, <sup>2</sup>Shanghai AI Laboratory <br> ## Overview <p align="center"><img src="./teaser.png" alt="teaser" width="500px" /></p> Hallucination, posed as a pervasive challenge of multimodal large language models (MLLMs), has significantly impeded their real-world usage that demands precise judgment. Existing methods mitigate this issue with either training with specific designed data or inferencing with external knowledge from other sources, incurring inevitable additional costs. In this paper, we present OPERA, a novel MLLM decoding method grounded in an Over-trust Penalty and a Retrospection-Allocation strategy, serving as a nearly free lunch to alleviate the hallucination issue without additional data, knowledge, or training. Our approach begins with an interesting observation that, most hallucinations are closely tied to the knowledge aggregation patterns manifested in the self-attention matrix, i.e., MLLMs tend to generate new tokens by focusing on a few summary tokens, but not all the previous tokens. Such partial overtrust inclination results in the neglecting of image tokens and describes the image content with hallucination. Based on the observation, OPERA introduces a penalty term on the model logits during the beam-search decoding to mitigate the over-trust issue, along with a rollback strategy that retrospects the presence of summary tokens in the previously generated tokens, and re-allocate the token selection if necessary. With extensive experiments, OPERA shows significant hallucination-mitigating performance on different MLLMs and metrics, proving its effectiveness and generality. ## Setup The main implementation of OPERA is in `transformers-4.29.2/src/transformers/generation/utils.py`. So it is convenient to use OPERA decoding by just installing our modified `transformers` package. ``` conda env create -f environment.yml conda activate opera python -m pip install -e transformers-4.29.2 ``` #### Note: to implement OPERA on other version of transformers, you can follow the steps as the follows: - Find the file at `transformers-4.29.2/src/transformers/generation/utils.py`. - Add the arguments in `transformers.generate` function [here](https://github.com/shikiw/OPERA/blob/aa968c7501f4d3d8362f4b3bcab855024f4da5f6/transformers-4.29.2/src/transformers/generation/utils.py#L1156-L1162). - Add the code in `transformers.generate` function [here](https://github.com/shikiw/OPERA/blob/aa968c7501f4d3d8362f4
Excerpt of 11,323 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:ad8178b9afc4401f, topic:multimodal, topic:vision-language-model, readme:multimodal
matched fp:ad8178b9afc4401f, topic:llama
matched fp:ad8178b9afc4401f, topic:chatbot, topic:chatgpt