search
HomeTechnology peripheralsAIThe first Mamba-based MLLM is here! Model weights, training code, etc. have all been open source

The first Mamba-based MLLM is here! Model weights, training code, etc. have all been open source

The AIxiv column is a column where academic and technical content is published on this site. In the past few years, the AIxiv column of this site has received more than 2,000 reports, covering top laboratories from major universities and companies around the world, effectively promoting academic exchanges and dissemination. If you have excellent work that you want to share, please feel free to contribute or contact us for reporting. Submission email: liyazhou@jiqizhixin.com; zhaoyunfeng@jiqizhixin.com.

Introduction

In recent years, the application of multimodal large language models (MLLM) in various fields has achieved remarkable success. However, as the underlying model for many downstream tasks, current MLLMs consist of the well-known Transformer network, which has less efficient quadratic computational complexity. In order to improve the efficiency of such basic models, a large number of experiments show that: (1) Cobra has extremely competitive performance with the current state-of-the-art methods with high computational efficiency (e.g., LLaVA-Phi, TinyLLaVA and MobileVLM v2), and due to Cobra linear sequence modeling, which is faster. (2) Interestingly, the results of the closed-set challenging prediction benchmark show that Cobra performs well in overcoming visual illusions and spatial relationship judgments. (3) It is worth noting that Cobra achieves comparable performance to LLaVA even when the number of parameters is only about 43% of LLaVA.

Large language models (LLMs) are limited to interacting only through language, limiting their adaptability to handle more diverse tasks. Multimodal understanding is critical to enhance a model’s ability to effectively address real-world challenges. Therefore, researchers are actively working to extend large language models to incorporate multimodal information processing capabilities. Visual-Language Models (VLMs) such as GPT-4, LLaMA-Adapter, and LLaVA have been developed to enhance the visual understanding capabilities of LLMs.

However, previous research mainly tried to obtain efficient VLMs in a similar way, that is, reducing the parameters of the basic language model or the number of visual tokens while keeping the attention-based Transformer structure unchanged. This paper proposes a different perspective: directly using the state space model (SSM) as the backbone network, an MLLM with linear computational complexity is obtained. Additionally, this paper explores and studies various modal fusion schemes to create an effective multi-modal Mamba. Specifically, this paper adopts the Mamba language model as the base model of VLM, which has shown performance that can compete with the Transformer language model, but with higher inference efficiency. Tests show that Cobra's inference performance is 3x to 4x faster than MobileVLM v2 3B and TinyLLaVA 3B of the same parameter magnitude. Even when compared to the LLaVA v1.5 model (7B parameters), which has a much higher number of parameters, Cobra still achieves matching performance on several benchmarks with about 43% the number of parameters.和 The main contributions of DEMO

The first Mamba-based MLLM is here! Model weights, training code, etc. have all been open source

this article of Cobra and LLAVA V1.5 7B are as follows:


  1. investigated the existing multimodilica large -scale Language models (MLLMs) often rely on Transformer networks, which exhibit quadratic computational complexity. To address this inefficiency, this paper introduces Cobra, a novel MLLM with linear computational complexity.
  2. Dives into various modal fusion schemes to optimize the integration of visual and linguistic information in the Mamba language model. Through experiments, this paper explores the effectiveness of different fusion strategies and determines the method that produces the most effective multimodal representation.
  3. Extensive experiments were conducted to evaluate the performance of Cobra with parallel studies aimed at improving the computational efficiency of underlying MLLM. Notably, Cobra achieves comparable performance to LLaVA even with fewer parameters, highlighting its efficiency.

The first Mamba-based MLLM is here! Model weights, training code, etc. have all been open source

  • Original link: https://arxiv.org/pdf/2403.14520v2.pdf
  • Project link: https://sites.google.com/view/cobravlm/
  • Paper title: Cobra: Extending Mamba to Multi-Modal Large Language Model for Efficient Inference

Method introduction

Model architecture

Cobra uses a classic visual encoder to connect two models The VLM structure consists of a stateful projector and the LLM language backbone. The backbone part of LLM uses the 2.8B parameter pre-trained Mamba language model, which was pre-trained on the SlimPajama data set with 600B tokens and fine-tuned with the instructions of the conversation data.网络 Cobra network structure diagram

The first Mamba-based MLLM is here! Model weights, training code, etc. have all been open source

Different from LLAVA, etc., COBRA uses visual representation of Dinov2 and SIGLIP fusion. By stitching the output of the two visual coders together Feeding into the projector, the model can better capture the high-level semantic features brought by SigLIP and the low-level fine-grained image features extracted by DINOv2.

Training scheme

Recent research shows that for existing training paradigms based on LLaVA (i.e., only training the pre-alignment stage of the projection layer and the fine-tuning stage of the LLM backbone once each), pre-alignment stages may be unnecessary and the fine-tuned model may still be underfitted. Therefore, Cobra abandons the pre-alignment stage and directly fine-tunes the entire LLM language backbone and projectors. This fine-tuning process was performed for two epochs with random sampling on a combined dataset consisting of:

Hybrid dataset used in LLaVA v1.5, which contains a total of 655K visual multi-turn conversations, including Academic VQA samples, as well as visual instruction tuning data in LLaVA-Instruct and plain text instruction tuning data in ShareGPT.

LVIS-Instruct-4V, which contains 220K images with visual alignment and context-aware instructions generated by GPT-4V.
  1. LRV-Instruct, a dataset containing 400K visual instructions covering 16 visual language tasks, aimed at mitigating hallucination phenomena.
  2. The entire data set contains approximately 1.2 million images and corresponding multiple rounds of conversation data, as well as plain text conversation data.

Experiment

Quantitative experiment

In the experimental part, this paper compares the proposed Cobra model and the open source SOTA VLM model on the basic benchmark, and compares it with the same The magnitude is based on the answering speed of the VLM model based on the Transformer architecture. At the same time, the generating speed and performance comparison of the graph at the same time, the COBRA is also the four open VQA tasks of VQA-V2, GQA, Vizwiz, TextVQA, and VSR, POPE two For a closed set prediction task, scores were compared on a total of 6 benchmarks. The comparison of the map on the Benchmark and other open source models

Qualitative test

The first Mamba-based MLLM is here! Model weights, training code, etc. have all been open source

In addition, Cobra also gives two VQA examples to qualitatively illustrate the Cobra in the object of the object. Superiority in the ability to recognize spatial relationships and reduce model illusion.和 Figure COBRA and other baseline models in the judgment of object spatial relations

和 Figure Cobra and other baseline models in the example of visual illusion
In examples, Llava V1.5 and Mobilevlm are given an error answer, while COBRA does An accurate description was given, especially in the second instance, Cobra accurately identified that the picture came from the robot's simulation environment.

Ablation experiment
This article conducts ablation research on the solution adopted by Cobra from the two dimensions of performance and generation speed. The experimental plan conducts ablation experiments on the projector, visual encoder, and LLM language backbone respectively. The performance comparison of the performance of the diagram ablation experiment shows that the ablation experiments of the project part of the projector show that the effect of the MLP projector adopted in this article is significantly better than dedicated to reducing the number of visual Token to The LDP module improves the computing speed. At the same time, because Cobra's sequence processing speed and computational complexity are better than Transformer, the LDP module has no obvious advantage in generation speed. Therefore, the Mamba class model is used to reduce the number of visual tokens by sacrificing accuracy. The sampler may not be necessary.和 Figure COBRA and other models in the range of generating speed comparison

The first Mamba-based MLLM is here! Model weights, training code, etc. have all been open source

The ablation results of the visual encoder part show that the fusion of Dinov2 features effectively improves the performance of COBRA. In the language backbone experiment, the Mamba language model without instruction fine-tuning was completely unable to give reasonable answers in the open question and answer test, while the fine-tuned Mamba language model can achieve considerable performance on various tasks.
Conclusion

This paper proposes Cobra, which solves the efficiency bottleneck of existing multi-modal large-scale language models that rely on Transformer networks with quadratic computational complexity. This paper explores the combination of language models with linear computational complexity and multimodal input. In terms of fusing visual and language information, this paper successfully optimizes the internal information integration of the Mamba language model and achieves more effective multi-modal representation through in-depth research on different modal fusion schemes. Experiments show that Cobra not only significantly improves computational efficiency, but is also comparable in performance to advanced models such as LLaVA, especially in overcoming visual illusions and spatial relationship judgments. It even significantly reduces the number of parameters. This opens up new possibilities for future deployment of high-performance AI models in environments that require high-frequency processing of visual information, such as vision-based robot feedback control. The first Mamba-based MLLM is here! Model weights, training code, etc. have all been open source

The above is the detailed content of The first Mamba-based MLLM is here! Model weights, training code, etc. have all been open source. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Does Hugging Face's 7B Model OlympicCoder Beat Claude 3.7?Does Hugging Face's 7B Model OlympicCoder Beat Claude 3.7?Apr 23, 2025 am 11:49 AM

Hugging Face's OlympicCoder-7B: A Powerful Open-Source Code Reasoning Model The race to develop superior code-focused language models is intensifying, and Hugging Face has joined the competition with a formidable contender: OlympicCoder-7B, a product

4 New Gemini Features You Can't Afford to Miss4 New Gemini Features You Can't Afford to MissApr 23, 2025 am 11:48 AM

How many of you have wished AI could do more than just answer questions? I know I have, and as of late, I’m amazed by how it’s transforming. AI chatbots aren’t just about chatting anymore, they’re about creating, researchin

Camunda Writes New Score For Agentic AI OrchestrationCamunda Writes New Score For Agentic AI OrchestrationApr 23, 2025 am 11:46 AM

As smart AI begins to be integrated into all levels of enterprise software platforms and applications (we must emphasize that there are both powerful core tools and some less reliable simulation tools), we need a new set of infrastructure capabilities to manage these agents. Camunda, a process orchestration company based in Berlin, Germany, believes it can help smart AI play its due role and align with accurate business goals and rules in the new digital workplace. The company currently offers intelligent orchestration capabilities designed to help organizations model, deploy and manage AI agents. From a practical software engineering perspective, what does this mean? The integration of certainty and non-deterministic processes The company said the key is to allow users (usually data scientists, software)

Is There Value In A Curated Enterprise AI Experience?Is There Value In A Curated Enterprise AI Experience?Apr 23, 2025 am 11:45 AM

Attending Google Cloud Next '25, I was keen to see how Google would distinguish its AI offerings. Recent announcements regarding Agentspace (discussed here) and the Customer Experience Suite (discussed here) were promising, emphasizing business valu

How to Find the Best Multilingual Embedding Model for Your RAG?How to Find the Best Multilingual Embedding Model for Your RAG?Apr 23, 2025 am 11:44 AM

Selecting the Optimal Multilingual Embedding Model for Your Retrieval Augmented Generation (RAG) System In today's interconnected world, building effective multilingual AI systems is paramount. Robust multilingual embedding models are crucial for Re

Musk: Robotaxis In Austin Need Intervention Every 10,000 MilesMusk: Robotaxis In Austin Need Intervention Every 10,000 MilesApr 23, 2025 am 11:42 AM

Tesla's Austin Robotaxi Launch: A Closer Look at Musk's Claims Elon Musk recently announced Tesla's upcoming robotaxi launch in Austin, Texas, initially deploying a small fleet of 10-20 vehicles for safety reasons, with plans for rapid expansion. H

AI's Shocking Pivot: From Work Tool To Digital Therapist And Life CoachAI's Shocking Pivot: From Work Tool To Digital Therapist And Life CoachApr 23, 2025 am 11:41 AM

The way artificial intelligence is applied may be unexpected. Initially, many of us might think it was mainly used for creative and technical tasks, such as writing code and creating content. However, a recent survey reported by Harvard Business Review shows that this is not the case. Most users seek artificial intelligence not just for work, but for support, organization, and even friendship! The report said that the first of AI application cases is treatment and companionship. This shows that its 24/7 availability and the ability to provide anonymous, honest advice and feedback are of great value. On the other hand, marketing tasks (such as writing a blog, creating social media posts, or advertising copy) rank much lower on the popular use list. Why is this? Let's see the results of the research and how it continues to be

Companies Race Toward AI Agent AdoptionCompanies Race Toward AI Agent AdoptionApr 23, 2025 am 11:40 AM

The rise of AI agents is transforming the business landscape. Compared to the cloud revolution, the impact of AI agents is predicted to be exponentially greater, promising to revolutionize knowledge work. The ability to simulate human decision-maki

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),