--- license: apache-2.0 --- [\[📂 GitHub\]](https://github.com/om-ai-lab/omchat) [\[📜 OmChat Paper\]](https://arxiv.org/abs/2407.04923) # OmChat: A Family of Powerful Native Multimodal Language Models We are thrilled to announce the release of OmChat Beta 2.0, a research version of our models from Om AI. This release includes the Qwen2 7B LLM-base and the InterVIT6B vision tower-based model, combining to form the OmChat Beta 13B model. These models are now available as open-source for researchers in the multimodal field, aimed at advancing meaningful research and contributing to the AI ecosystem's progress. In the near future, we plan to release OmChat Beta 2.1, which will include support for long context as detailed in the OmChat paper, as well as a lighter version of the model. We will continue to update our latest versions for research purposes. For performance evaluation, we have tested our models using the OpenCompass benchmarks. ## Updates * 08/10/2024: The OmChat open-source project has been unveiled. 🎉 * 07/06/2024: [The OmChat research paper has been published.](https://arxiv.org/abs/2407.04923) ### An Example with Huggingface transformers Download huggingface model ```bash git lfs install git clone https://huggingface.co/omlab/omchat-v2.0-13B-single-beta_hf ``` ```python from transformers import AutoModel, AutoProcessor, AutoTokenizer from PIL import Image import requests import torch from transformers import TextStreamer model = AutoModel.from_pretrained("omlab/omchat-v2.0-13B-single-beta_hf",trust_remote_code=True, torch_dtype=torch.float16).cuda().eval() processor = AutoProcessor.from_pretrained("omlab/omchat-v2.0-13B-single-beta_hf", trust_remote_code=True) url = "https://www.ilankelman.org/stopsigns/australia.jpg" image = Image.open(requests.get(url, stream=True).raw) prompt ="What's the content of the image?" inputs = processor(text=prompt, images=image, return_tensors="pt").to("cuda") with torch.inference_mode(): output_ids = model.generate(**inputs, max_new_tokens=1024, do_sample=False, eos_token_id=model.generation_config.eos_token_id, pad_token_id=processor.tokenizer.pad_token_id) outputs = processor.tokenizer.decode(output_ids[0, inputs.input_ids.shape[1] :]).strip() print (outputs) # The image features a stop sign in front of a Chinese archway, with a black car driving past. The stop sign is located on the left side of the scene, while the car is on the right side. There are also two statues of lions on either side of the archway, adding to the cultural ambiance of the scene.<|im_end|> ``` ### Available HF Models from Om AI - [omchat-v2.0-13B-single-beta_hf](https://huggingface.co/omlab/omchat-v2.0-13B-single-beta_hf) Currently, it supports only single images, but we will soon release models with multi-image and video support. ## Citation If you find our repository beneficial, please cite our paper: ```bibtex @article{zhao2024omchat, title={OmChat: A Recipe to Train Multimodal Language Models with Strong Long Context and Video Understanding}, author={Zhao, Tiancheng and Zhang, Qianqian and Lee, Kyusong and Liu, Peng and Zhang, Lu and Fang, Chunxin and Liao, Jiajia and Jiang, Kelei and Ma, Yibo and Xu, Ruochen}, journal={arXiv preprint arXiv:2407.04923}, year={2024} } ``` ## Usage Refer to the [original repository](https://github.com/om-ai-lab/omchat). ## Acknowledgement The codebase and models are built upon the following projects: - [LLaVA](https://github.com/haotian-liu/LLaVA) - [LLaVA-Next](https://github.com/LLaVA-VL/LLaVA-NeXT) - [InternVL2](https://internvl.github.io/blog/2024-07-02-InternVL-2.0/) - [MoE-LLaVA](https://github.com/PKU-YuanGroup/MoE-LLaVA) - [Qwen2](https://github.com/QwenLM/Qwen2) ## Projects from Om AI Team If you are intrigued by multimodal algorithms, large language models, and agent technologies, we invite you to delve deeper into our research endeavors: 🔆 [OmAgent: A Multi-modal Agent Framework for Complex Video Understanding with Task Divide-and-Conquer](https://arxiv.org/abs/2406.16620) 🏠 [Github Repository](https://github.com/om-ai-lab/OmAgentn) 🔆 [How to Evaluate the Generalization of Detection? A Benchmark for Comprehensive Open-Vocabulary Detection](https://arxiv.org/abs/2308.13177)(AAAI24) 🏠 [Github Repository](https://github.com/om-ai-lab/OVDEval/tree/main) 🔆 [OmDet: Large-scale vision-language multi-dataset pre-training with multimodal detection network](https://ietresearch.onlinelibrary.wiley.com/doi/full/10.1049/cvi2.12268)(IET Computer Vision) 🏠 [Github Repository](https://github.com/om-ai-lab/OmDet)