{"id":14964690,"url":"https://github.com/mbzuai-oryx/llava-pp","last_synced_at":"2025-04-12T22:28:25.332Z","repository":{"id":236302844,"uuid":"792122619","full_name":"mbzuai-oryx/LLaVA-pp","owner":"mbzuai-oryx","description":"🔥🔥 LLaVA++: Extending LLaVA with Phi-3 and LLaMA-3 (LLaVA LLaMA-3, LLaVA Phi-3)","archived":false,"fork":false,"pushed_at":"2024-07-10T06:23:08.000Z","size":6632,"stargazers_count":804,"open_issues_count":18,"forks_count":58,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-10-29T17:12:23.784Z","etag":null,"topics":["conversation","llama-3-llava","llama-3-vision","llama3","llama3-llava","llama3-vision","llava","llava-llama3","llava-phi3","llm","lmms","phi-3-llava","phi-3-vision","phi3","phi3-llava","phi3-vision","vision-language"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbzuai-oryx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-26T02:52:07.000Z","updated_at":"2024-10-25T22:37:13.000Z","dependencies_parsed_at":"2024-05-07T00:07:48.409Z","dependency_job_id":"6039029d-082a-4c0d-bba9-9134a6640b38","html_url":"https://github.com/mbzuai-oryx/LLaVA-pp","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":0.2727272727272727,"last_synced_commit":"b93d9c8d8539e794fc79a867aae08c4d7b3b6de7"},"previous_names":["mbzuai-oryx/llava-pp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbzuai-oryx%2FLLaVA-pp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbzuai-oryx%2FLLaVA-pp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbzuai-oryx%2FLLaVA-pp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbzuai-oryx%2FLLaVA-pp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbzuai-oryx","download_url":"https://codeload.github.com/mbzuai-oryx/LLaVA-pp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248639256,"owners_count":21137811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["conversation","llama-3-llava","llama-3-vision","llama3","llama3-llava","llama3-vision","llava","llava-llama3","llava-phi3","llm","lmms","phi-3-llava","phi-3-vision","phi3","phi3-llava","phi3-vision","vision-language"],"created_at":"2024-09-24T13:33:38.549Z","updated_at":"2025-04-12T22:28:25.313Z","avatar_url":"https://github.com/mbzuai-oryx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LLaVA++: Extending Visual Capabilities with LLaMA-3 and Phi-3\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://i.imgur.com/waxVImv.png\" alt=\"Oryx Models\"\u003e\n\u003c/p\u003e\n\n#### [Hanoona Rasheed](https://www.hanoonarasheed.com/)\\*, [Muhammad Maaz](https://www.muhammadmaaz.com)\\*, [Salman Khan](https://salman-h-khan.github.io/), and [Fahad Khan](https://sites.google.com/view/fahadkhans/home)\n\\* Equal contributions\n\n#### **Mohamed bin Zayed University of AI (MBZUAI)**\n\n[![Google](https://img.shields.io/badge/Google-Colab-red)](https://colab.research.google.com/drive/10Z2HaY5zvy2GZZ4v245PtiDPukm0NbF6?usp=sharing)\n[![Demo](https://img.shields.io/badge/Online-Demo-F9D371)](https://bengal-eminent-wasp.ngrok-free.app)\n[![Demo](https://img.shields.io/badge/HF_Demo-LLaMA_3-0FFFFF.svg)](https://huggingface.co/spaces/MBZUAI/LLaMA-3-V)\n[![Demo](https://img.shields.io/badge/HF_Demo-Phi_3-0FFFFF.svg)](https://huggingface.co/spaces/MBZUAI/Phi-3-V)\n\n---\n\n## 📢 Latest Updates\n- **Apr-30-24**- LLaMA-3-V and Phi-3-V demos are now available via Hugging Face Spaces. Check them out at [LLaMA-3-V](https://huggingface.co/spaces/MBZUAI/LLaMA-3-V) \u0026  [Phi-3-V](https://huggingface.co/spaces/MBZUAI/Phi-3-V) 🔥🔥🔥\n- **Apr-28-24**- Online demo of Phi-3-V and LLaMA-3-V are released, check them out at [Online Demo](https://bengal-eminent-wasp.ngrok-free.app) 🔥🔥🔥\n- **Apr-28-24**- LoRA, fully fine-tuned and [S\u003csup\u003e2\u003c/sup\u003e](https://github.com/bfshi/scaling_on_scales.git) fine-tuned models and results are added! 🔥🔥🔥\n- **Apr-27-24**- Google Colab is released to chat with Phi-3-V-3.8B model, check it out at [Google Colab](https://colab.research.google.com/drive/10Z2HaY5zvy2GZZ4v245PtiDPukm0NbF6?usp=sharing) 🔥🔥🔥\n- **Apr-26-24**- Phi-3-V and LLaVA-3-V released: Excited to release the new integration of LLaVA with Phi-3 Mini Instruct and LLaMA-3 Instruct models! [Hugging Face](https://huggingface.co/collections/MBZUAI/llava-662b38b972e3e3e4d8f821bb) 🔥🔥🔥\n\n---\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/logos/face.png\" width=\"300\"\u003e\n\u003c/p\u003e\n\n## 💬 Introduction\nThis repository enhances the capabilities of the LLaVA 1.5 model, incorporating latest LLMs released this weak🔥, [Phi-3 Mini Instruct 3.8B](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct), and [LLaMA-3 Instruct 8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B).\n\n\n## 🏆 Results: Phi-3-V and LLaVA-3-V\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/lava++_radar_plot.png\" width=\"500\"\u003e\n\u003c/p\u003e\n\n### Comparison on Benchmarks for Instruction-following LMMS \u0026 academic-task-oriented datasets:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/LLaVA-pp-results.png\"\u003e\n\u003c/p\u003e\n\n- Average computed excluding MME, and second-best are underlined.\n\n\n\n## 🤖 Model-Zoo\n\nThe following table provides an overview of the available models in our zoo. For each model, you can find links to its Hugging Face page. \n\n| Model Name                            |                             Hugging Face Link                              | Summary                                                                                                           |\n|---------------------------------------|:--------------------------------------------------------------------------:|-------------------------------------------------------------------------------------------------------------------|\n| LLaVA-Phi-3-mini-4k-instruct-pretrain | [Hugging Face](https://huggingface.co/MBZUAI/LLaVA-Phi-3-mini-4k-instruct-pretrain)  | Pretrained on [LCS-558K](https://huggingface.co/datasets/liuhaotian/LLaVA-Pretrain).                              |\n| LLaVA-Phi-3-mini-4k-instruct-lora     |   [Hugging Face](https://huggingface.co/MBZUAI/LLaVA-Phi-3-mini-4k-instruct-lora)    | LoRA weights fine-tuned on [LLaVA-Instruct-665K](https://huggingface.co/datasets/liuhaotian/LLaVA-Instruct-150K). |\n| LLaVA-Phi-3-mini-4k-instruct          |      [Hugging Face](https://huggingface.co/MBZUAI/LLaVA-Phi-3-mini-4k-instruct)      | Merged LoRA weights in HuggingFace format.                                                                        |\n| LLaVA-Phi-3-mini-4k-instruct-FT       |      [Hugging Face](https://huggingface.co/MBZUAI/LLaVA-Phi-3-mini-4k-instruct-FT)      | Fully fine-tuned model weights in HuggingFace format.                                                             |\n\n| Model Name                              |                                   Hugging Face Link                                   | Summary                                                                                                           |\n|-----------------------------------------|:-------------------------------------------------------------------------------------:|-------------------------------------------------------------------------------------------------------------------|\n| LLaVA-Meta-Llama-3-8B-Instruct-pretrain | [Hugging Face](https://huggingface.co/MBZUAI/LLaVA-Meta-Llama-3-8B-Instruct-pretrain) | Pretrained on [LCS-558K](https://huggingface.co/datasets/liuhaotian/LLaVA-Pretrain).                              |\n| LLaVA-Meta-Llama-3-8B-Instruct-lora     |        [Hugging Face](https://huggingface.co/MBZUAI/LLaVA-Meta-Llama-3-8B-Instruct-lora)        | LoRA weights fine-tuned on [LLaVA-Instruct-665K](https://huggingface.co/datasets/liuhaotian/LLaVA-Instruct-150K). |\n| LLaVA-Meta-Llama-3-8B-Instruct          |          [Hugging Face](https://huggingface.co/MBZUAI/LLaVA-Meta-Llama-3-8B-Instruct)           | Merged weights in HuggingFace format.                                                                             |\n| LLaVA-Meta-Llama-3-8B-Instruct-FT       |          [Hugging Face](https://huggingface.co/MBZUAI/LLaVA-Meta-Llama-3-8B-Instruct-FT)           | Fully fine-tuned model weights in HuggingFace format.                                                             |\n| LLaVA-Meta-Llama-3-8B-Instruct-FT-S2    |          [Hugging Face](https://huggingface.co/MBZUAI/LLaVA-Meta-Llama-3-8B-Instruct-FT-S2)           | Fully fine-tuned S2 model weights in HuggingFace format.                                                          |\n\n\n# Installation\n\n```bash\ngit clone https://github.com/mbzuai-oryx/LLaVA-pp.git\ncd LLaVA-pp\ngit submodule update --init --recursive\n```\nPackages you need to update from LLAVA:\n```bash\npip install git+https://github.com/huggingface/transformers@a98c41798cf6ed99e1ff17e3792d6e06a2ff2ff3\n```\n\n## 🚀 Phi-3-V\nTo integrate Phi-3-V with LLaVA, follow these steps to update the codebase:\n\n```bash\n# Copy necessary files\ncp Phi-3-V/train.py LLaVA/llava/train/train.py\ncp Phi-3-V/llava_phi3.py LLaVA/llava/model/language_model/llava_phi3.py\ncp Phi-3-V/builder.py LLaVA/llava/model/builder.py\ncp Phi-3-V/model__init__.py LLaVA/llava/model/__init__.py\ncp Phi-3-V/main__init__.py LLaVA/llava/__init__.py\ncp Phi-3-V/conversation.py LLaVA/llava/conversation.py\n\n# Training commands\ncp scripts/Phi3-V_pretrain.sh LLaVA/Vi-phi3_pretrain.sh\ncp scripts/Phi3-V_finetune_lora.sh LLaVA/Vi-phi3_finetune_lora.sh\n```\n\n### Train Phi-3-V\n1. Pre-train\n```bash\ncd LLaVA\nbash Phi3-V_pretrain.sh\n```\n2. Finetune\n```bash\ncd LLaVA\nbash Phi3-V_finetune_lora.sh\n```\n\n## 🚀 LLaMA-3-V\nTo integrate LLaMA-3-V with LLaVA, follow these steps to update the codebase:\n\n```bash\n# Copy necessary files\ncp LLaMA-3-V/train.py LLaVA/llava/train/train.py\ncp LLaMA-3-V/conversation.py LLaVA/llava/conversation.py\ncp LLaMA-3-V/builder.py LLaVA/llava/model/builder.py\ncp LLaMA-3-V/llava_llama.py LLaVA/llava/model/language_model/llava_llama.py\n\n# Training commands\ncp scripts/LLaMA3-V_pretrain.sh LLaVA/LLaMA3-V_pretrain.sh\ncp scripts/LLaMA3-V_finetune_lora.sh LLaVA/LLaMA3-V_finetune_lora.sh\n```\n\n### Train LLaMA-3-V\n1. Pre-train\n```bash\ncd LLaVA\nbash LLaMA3-V_pretrain.sh\n```\n2. Finetune\n```bash\ncd LLaVA\nbash LLaMA3-V_finetune_lora.sh\n```\n\n---\n## 🙏 Acknowledgement\nWe are thankful to [LLaVA](https://github.com/haotian-liu/LLaVA.git), [lmms-eval](https://github.com/EvolvingLMMs-Lab/lmms-eval.git) and [S\u003csup\u003e2\u003c/sup\u003e-Wrapper](https://github.com/bfshi/scaling_on_scales.git) for releasing their models and code as open-source contributions.\n\nIn case if you face any issues or have any questions, please feel free to create an issue or reach out at [hanoona.bangalath@mbzuai.ac.ae](hanoona.bangalath@mbzuai.ac.ae) \u0026 [muhammad.maaz@mbzuai.ac.ae](muhammad.maaz@mbzuai.ac.ae).\n\n## 📜 Citation\n```bibtex\n  @misc{hanoona2024LLaVA++,\n          title={LLaVA++: Extending Visual Capabilities with LLaMA-3 and Phi-3},\n          author={Rasheed, Hanoona and Maaz, Muhammad and Khan, Salman and Khan, Fahad S.},\n          url={https://github.com/mbzuai-oryx/LLaVA-pp},\n          year={2024}\n  }\n```\n\n---\n[\u003cimg src=\"images/logos/IVAL_logo.png\" width=\"200\" height=\"100\"\u003e](https://www.ival-mbzuai.com)\n[\u003cimg src=\"images/logos/Oryx_logo.png\" width=\"100\" height=\"100\"\u003e](https://github.com/mbzuai-oryx)\n[\u003cimg src=\"images/logos/MBZUAI_logo.png\" width=\"360\" height=\"85\"\u003e](https://mbzuai.ac.ae)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbzuai-oryx%2Fllava-pp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbzuai-oryx%2Fllava-pp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbzuai-oryx%2Fllava-pp/lists"}