Multimodal LLM supporting 8 languages including English, Chinese, French, Spanish, Russian, Japanese, Arabic, Hindi
The following steps worked on a CUDA Version: 12.4.
git clone https://github.com/nahidalam/maya
cd maya
conda create -n maya python=3.10 -y
conda activate maya
pip install --upgrade pip # enable PEP 660 support
pip install -e .
pip install -e ".[train]"
pip install flash-attn==2.6.3 --no-build-isolation --no-cache-dir
To pretrain the projection layer,
/dev/data/LLaVA_Pretrainwget https://huggingface.co/datasets/liuhaotian/LLaVA-Pretrain/resolve/main/images.zip and keep them in /dev/data/imagesbash scripts/maya/pretrain_aya_siglip.sh
Please download the annotations from MBZUAI/palo_multilingual_dataset and all images following the below links.
After downloading all of them, organize the data as follows in /dev/data/instruction_tune_dataset/,
instruction_tune_dataset
├── coco
│ └── train2017
├── gqa
│ └── images
├── ocr_vqa
│ └── images
├── textvqa
│ └── train_images
└── vg
├── VG_100K
└── VG_100K_2
Put the palo_multilingual_dataset.json in /dev/data/annotations/palo_multilingual_dataset.json
Make sure to keep the pretrained model you have in a path that you specify in the scripts/maya/finetune_aya_siglip.sh script throught the --pretrain_mm_mlp_adapter flag
Then run
bash scripts/maya/finetune_aya_siglip.sh
For multilingual evaluation using PALO multilingual test dataset
LLaVA/playground/data/eval
git clone https://huggingface.co/datasets/MBZUAI/multilingual-llava-bench-in-the-wild
bash scripts/v1_5/eval/eval_all_languages.sh \
"model_base" \
"model_path" \
"model_name" \
"your-openai-api-key"
If you find Maya useful for your research and applications, please cite using this BibTeX:
@misc{alam2024mayainstructionfinetunedmultilingual,
title={Maya: An Instruction Finetuned Multilingual Multimodal Model},
author={Nahid Alam and Karthik Reddy Kanjula and Surya Guthikonda and Timothy Chung and Bala Krishna S Vegesna and Abhipsha Das and Anthony Susevski and Ryan Sze-Yin Chan and S M Iftekhar Uddin and Shayekh Bin Islam and Roshan Santhosh and Snegha A and Drishti Sharma and Chen Liu and Isha Chaturvedi and Genta Indra Winata and Ashvanth. S and Snehanshu Mukherjee and Alham Fikri Aji},
year={2024},
eprint={2412.07112},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2412.07112},
}
In no particular order
Python
65.9%
Jupyter Notebook
18.2%
Shell
12.2%
JavaScript
1.9%
HTML
1.5%
Multimodal LLM supporting 8 languages including English, Chinese, French, Spanish, Russian, Japanese, Arabic, Hindi
The following steps worked on a CUDA Version: 12.4.
git clone https://github.com/nahidalam/maya
cd maya
conda create -n maya python=3.10 -y
conda activate maya
pip install --upgrade pip # enable PEP 660 support
pip install -e .
pip install -e ".[train]"
pip install flash-attn==2.6.3 --no-build-isolation --no-cache-dir
To pretrain the projection layer,
/dev/data/LLaVA_Pretrainwget https://huggingface.co/datasets/liuhaotian/LLaVA-Pretrain/resolve/main/images.zip and keep them in /dev/data/imagesbash scripts/maya/pretrain_aya_siglip.sh
Please download the annotations from MBZUAI/palo_multilingual_dataset and all images following the below links.
After downloading all of them, organize the data as follows in /dev/data/instruction_tune_dataset/,
instruction_tune_dataset
├── coco
│ └── train2017
├── gqa
│ └── images
├── ocr_vqa
│ └── images
├── textvqa
│ └── train_images
└── vg
├── VG_100K
└── VG_100K_2
Put the palo_multilingual_dataset.json in /dev/data/annotations/palo_multilingual_dataset.json
Make sure to keep the pretrained model you have in a path that you specify in the scripts/maya/finetune_aya_siglip.sh script throught the --pretrain_mm_mlp_adapter flag
Then run
bash scripts/maya/finetune_aya_siglip.sh
For multilingual evaluation using PALO multilingual test dataset
LLaVA/playground/data/eval
git clone https://huggingface.co/datasets/MBZUAI/multilingual-llava-bench-in-the-wild
bash scripts/v1_5/eval/eval_all_languages.sh \
"model_base" \
"model_path" \
"model_name" \
"your-openai-api-key"
If you find Maya useful for your research and applications, please cite using this BibTeX:
@misc{alam2024mayainstructionfinetunedmultilingual,
title={Maya: An Instruction Finetuned Multilingual Multimodal Model},
author={Nahid Alam and Karthik Reddy Kanjula and Surya Guthikonda and Timothy Chung and Bala Krishna S Vegesna and Abhipsha Das and Anthony Susevski and Ryan Sze-Yin Chan and S M Iftekhar Uddin and Shayekh Bin Islam and Roshan Santhosh and Snegha A and Drishti Sharma and Chen Liu and Isha Chaturvedi and Genta Indra Winata and Ashvanth. S and Snehanshu Mukherjee and Alham Fikri Aji},
year={2024},
eprint={2412.07112},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2412.07112},
}
In no particular order
Python
65.9%
Jupyter Notebook
18.2%
Shell
12.2%
JavaScript
1.9%
HTML
1.5%