Code Monkey home page Code Monkey logo

brote's Introduction

๐Ÿ‘€ Browse and Concentrate: Comprehending Multimodal Content via prior-LLM Context Fusion

๐ŸŒ Homepage | ๐Ÿ“– arXiv | ๐Ÿค— Models

This repo includes codes and examples for paper Browse and Concentrate: Comprehending Multimodal Content via prior-LLM Context Fusion.

Activities

  1. [2024-05-16] This paper is accepted by ACL 2024 (main conference). Information for our training data is updated.
  2. [2024-04-18] Code and cases for data generation released. The generated data are used for pretraining.
  3. [2024-03-18] Brote-IM-XXL model released, please download from this link.
  4. [2024-02-26] Project released.

Framework

We propose a paradigm Browse and Concentrate (Brote) for incorporating multimodal context before feeding features into the LLM, together with two approaches to implement our paradigm, Brote-EX and Brote-IM. The model structures are shown in the following figure.

Image

Instructions For Training and Inference

Data

Please refer to the data format described in MIC.

  1. Data for pretraining.

We create a dataset of 56k fewshot data samples, resulting in 191k training instances (one image per instance). These instances are supposed to contain question-aware and cross-image information. The data construction pipeline is illustrated in the following figure.

Image

If you want plan to try our constructed pretraining data, please create an issue here. We will contact you ASAP.

  1. Data for finetuning.

We sampled about 500k data from MIC for model finetuning.

Environment

pip install -r requirements.txt

Training

coming soon

Inference

Please refer to the test.py file; files under the model dir are for test only, and will be updated soon for training.

To run the test script (ensure the required libraries are properly installed):

export CUDAID='please set you cuda id here'
export TASKID='please set the case id (from 1 to 5), or use the string 'all'(lowercase)'
CUDA_VISIBLE_DEVICES=$CUDAID python test.py $TASKID 

Example

Image

(๐Ÿฑ in this figure is a 6-year-old cat, his name is Alan.)

Models

Please download our model from ๐Ÿค— Models.

Reference

๐Ÿ“‘ If you find our project helpful to your research, please consider citing:

@inproceedings{
anonymous2024browse,
title={Browse and Concentrate: Comprehending Multimodal Content via Prior-{LLM} Context Fusion},
author={Anonymous},
booktitle={The 62nd Annual Meeting of the Association for Computational Linguistics},
year={2024},
url={https://openreview.net/forum?id=K1Wf0vKps3}
}

Acknowledgement

Our models are build upon MMICL and InstructBLIP.

brote's People

Contributors

stephenzhuyiqi avatar wangphoebe avatar

Stargazers

Xinyu Huang avatar Jeff Carpenter avatar  avatar

Watchers

Jiacheng Zhang avatar  avatar CarbonCoo avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.