• Stars
    star
    370
  • Rank 112,005 (Top 3 %)
  • Language
    Python
  • License
    Other
  • Created 6 months ago
  • Updated 20 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Official implementation of project Honeybee (CVPR 2024)

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.

Disclaimer

Kakao Brain "Honeybee" is the name of the Multimodal Large Language Model (MLLM) open source project, not the customer service brand.

More Repositories

1

fast-autoaugment

Official Implementation of 'Fast AutoAugment' in PyTorch.
Python
1,581
star
2

nerf-factory

An awesome PyTorch NeRF library
Python
1,252
star
3

pororo

PORORO: Platform Of neuRal mOdels for natuRal language prOcessing
Python
1,252
star
4

coyo-dataset

COYO-700M: Large-scale Image-Text Pair Dataset
Python
1,062
star
5

kogpt

KakaoBrain KoGPT (Korean Generative Pre-trained Transformer)
Python
994
star
6

torchgpipe

A GPipe implementation in PyTorch
Python
776
star
7

karlo

Python
679
star
8

rq-vae-transformer

The official implementation of Autoregressive Image Generation using Residual Quantization (CVPR '22)
Jupyter Notebook
669
star
9

mindall-e

PyTorch implementation of a 1.3B text-to-image generation model trained on 14 million image-text pairs
Python
630
star
10

word2word

Easy-to-use word-to-word translations for 3,564 language pairs.
Python
350
star
11

torchlars

A LARS implementation in PyTorch
Python
326
star
12

g2pm

A Neural Grapheme-to-Phoneme Conversion Package for Mandarin Chinese Based on a New Open Benchmark Dataset
Python
326
star
13

kor-nlu-datasets

KorNLI and KorSTS: New Benchmark Datasets for Korean Natural Language Understanding
283
star
14

trident

A performance library for machine learning applications.
Python
176
star
15

autoclint

A specially designed light version of Fast AutoAugment
Python
170
star
16

sparse-detr

PyTorch Implementation of Sparse DETR
Python
150
star
17

hotr

Official repository for HOTR: End-to-End Human-Object Interaction Detection with Transformers (CVPR'21, Oral Presentation)
Python
132
star
18

kortok

The code and models for "An Empirical Study of Tokenization Strategies for Various Korean NLP Tasks" (AACL-IJCNLP 2020)
Python
114
star
19

scrl

PyTorch Implementation of Spatially Consistent Representation Learning(SCRL)
Python
108
star
20

bassl

Python
108
star
21

flame

Official implementation of the paper "FLAME: Free-form Language-based Motion Synthesis & Editing"
Python
103
star
22

tcl

Official implementation of TCL (CVPR 2023)
Python
98
star
23

brain-agent

Brain Agent for Large-Scale and Multi-Task Agent Learning
Python
92
star
24

helo-word

Team Kakao&Brain's Grammatical Error Correction System for the ACL 2019 BEA Shared Task
Python
88
star
25

miro

Official PyTorch implementation of MIRO (ECCV 2022)
Python
82
star
26

jejueo

Jejueo Datasets for Machine Translation and Speech Synthesis
Python
74
star
27

solvent

Python
66
star
28

noc

Jupyter Notebook
44
star
29

cxr-clip

Python
43
star
30

expgan

Python
41
star
31

autowu

Official repository for Automated Learning Rate Scheduler for Large-Batch Training (8th ICML Workshop on AutoML)
Python
39
star
32

nvs-adapter

Python
33
star
33

ginr-ipc

The official implementation of Generalizable Implicit Neural Representations with Instance Pattern Composers(CVPR’23 highlight).
Python
30
star
34

coyo-vit

ViT trained on COYO-Labeled-300M dataset
Python
28
star
35

irm-empirical-study

An Empirical Study of Invariant Risk Minimization
Python
28
star
36

coyo-align

ALIGN trained on COYO-dataset
Python
25
star
37

magvlt

The official implementation of MAGVLT: Masked Generative Vision-and-Language Transformer (CVPR'23)
Python
23
star
38

hqtransformer

Locally Hierarchical Auto-Regressive Modeling for Image Generation (HQ-Transformer)
Jupyter Notebook
21
star
39

CheXGPT

Python
17
star
40

learning-loss-for-tta

"Learning Loss for Test-Time Augmentation (NeurIPS 2020)"
Python
8
star
41

stg

Official implementation of Selective Token Generation (COLING'22)
Jupyter Notebook
8
star
42

leco

Official implementation of LECO (NeurIPS'22)
Python
6
star
43

bc-hyperopt-example

brain cloud hyperopt example (mnist)
Python
3
star