Giter Club home page Giter Club logo

honeybee's Introduction

KakaoBrain

๐Ÿ Honeybee: Locality-enhanced Projector for Multimodal LLM

This is an official PyTorch Implementation of Honeybee: Locality-enhanced Projector for Multimodal LLM, Junbum Cha*, Wooyoung Kang*, Jonghwan Mun*, Byungseok Roh. [paper]

Catalog

Coming soon:

  • Arxiv
  • Inference code
  • Checkpoints
  • Training code

Selected Examples

Environment

  • PyTorch 2.0.1
pip install -r requirements.txt

# additional requirements for demo
pip install -r requirements_demo.txt

Model Zoo

We use MMB, MME, SEED-Bench, and LLaVA-Bench (in-the-wild) for model evaluation.
MMB, SEED-I, and LLaVA-w indicate MMB dev split, SEED-Bench images, and LLaVA-Bench (in-the-wild), respectively.

  • Comparison with other SoTA methods (Table 6)
Model Checkpoint MMB MME SEED-I LLaVA-w
Honeybee-C-7B-M144 download 70.1 1891.3 64.5 67.1
Honeybee-D-7B-M144 download 70.8 1835.5 63.8 66.3
Honeybee-C-13B-M256 download 73.2 1944.0 68.2 75.7
Honeybee-D-13B-M256 download 73.5 1950.0 66.6 72.9
  • Pushing the limits of Honeybee (Table 7)
Model Checkpoint MMB MME SEED-I LLaVA-w ScienceQA
Honeybee-C-7B-M256 download 71.0 1951.3 65.5 70.6 93.2
Honeybee-C-13B-M576 download 73.6 1976.5 68.6 77.5 94.4

Evaluation

Data and Checkpoints Preparation

Please follow the official guidelines to prepare benchmark datasets: MMB, MME, SEED-Bench, ScienceQA, and OwlEval. Then, organize the data and checkpoints as follows:

data
โ”œโ”€โ”€ MMBench
โ”‚   โ”œโ”€โ”€ mmbench_dev_20230712.tsv         # MMBench dev split
โ”‚   โ””โ”€โ”€ mmbench_test_20230712.tsv        # MMBench test split
โ”‚
โ”œโ”€โ”€ MME
โ”‚   โ”œโ”€โ”€ OCR                              # Directory for OCR subtask
โ”‚   โ”œโ”€โ”€ ...
โ”‚   โ””โ”€โ”€ text_translation
โ”‚
โ”œโ”€โ”€ SEED-Bench
โ”‚   โ”œโ”€โ”€ SEED-Bench-image                 # Directory for image files
โ”‚   โ””โ”€โ”€ SEED-Bench.json                  # Annotation file
โ”‚
โ”œโ”€โ”€ ScienceQA
โ”‚   โ”œโ”€โ”€ llava_test_QCM-LEPA.json         # Test split annotation file
โ”‚   โ”œโ”€โ”€ text                             # Directory for meta data
โ”‚   โ”‚   โ”œโ”€โ”€ pid_splits.json
โ”‚   โ”‚   โ””โ”€โ”€ problems.json
โ”‚   โ””โ”€โ”€ images                           # Directory for image files
โ”‚       โ””โ”€โ”€ test
โ”‚
โ””โ”€โ”€ OwlEval
    โ”œโ”€โ”€ questions.jsonl                  # Question annotations
    โ””โ”€โ”€ images                           # Directory for image files

checkpoints
โ”œโ”€โ”€ 7B-C-Abs-M144
โ”œโ”€โ”€ 7B-C-Abs-M256
โ”œโ”€โ”€ 7B-D-Abs-M144
โ”œโ”€โ”€ 13B-C-Abs-M256
โ”œโ”€โ”€ 13B-C-Abs-M576
โ””โ”€โ”€ 13B-D-Abs-M256

Evaluation

torchrun --nproc_per_node=auto --standalone eval_tasks.py \
    --ckpt_path checkpoints/7B-C-Abs-M144/last \
    --config \
        configs/tasks/mme.yaml \
        configs/tasks/mmb.yaml \
        configs/tasks/seed.yaml \
        configs/tasks/sqa.yaml

Strict reproduction of official results

We utilized batch inference in our evaluation to accelerate experiments. The batch inference does not significantly change average scores, but individual scores may vary slightly (about ยฑ0.1~0.2). To strictly reproduce the official results, the use of 8 devices (GPUs) is required; the number of devices influences batch construction, affecting the final scores. We used the default batch size specified in each task config, except for the largest model (Honeybee-C-13B-M576) where we used B=8 due to memory constraints.

Inference and Demo

Example code for the inference is provided in inference_example.ipynb. The example images in ./examples are adopted from mPLUG-Owl.

We also provide gradio demo:

python -m serve.web_server --bf16 --port {PORT} --base-model checkpoints/7B-C-Abs-M144/last

Citation

@article{cha2023honeybee,
  title={Honeybee: Locality-enhanced Projector for Multimodal LLM},
  author={Junbum Cha and Wooyoung Kang and Jonghwan Mun and Byungseok Roh},
  journal={arXiv preprint arXiv:2312.06742},
  year={2023}
}

License

The source code is licensed under Apache 2.0 License.
The pretrained weights are licensed under CC-BY-NC 4.0 License.

Acknowledgement: this project is developed based on mPLUG-Owl, which is also under the Apache 2.0 License.

honeybee's People

Contributors

khanrc avatar eltociear avatar jonghwanmun 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.