【Proposal】Efficient Inference for Large Multimodal Models

Chaoqun Yang, Yuanda Zhang, Xiying HuangOpenReview 2024 · Submission to THU 2024 Fall AML

TL;DR

This paper proposes applying Speculative Decoding (SD) to accelerate the inference of Large Multimodal Models (LMMs), which are currently slow due to their auto-regressive nature. They aim to leverage multimodal information within LMMs to improve SD's effectiveness and achieve over 2x speedup.

What Problem Does This Paper Address?

Large Multimodal Models (LMMs) are incredibly powerful, excelling in tasks like visual understanding, question answering, and even video generation. However, their impressive capabilities come at a significant computational cost, especially during inference. This is largely due to the auto-regressive decoding process inherent in their Large Language Model (LLM) backbones. This means the model generates output one token at a time, which can be slow and resource-intensive. This slowness is a major bottleneck for real-time applications and increases energy consumption. While Speculative Decoding has shown promise in speeding up LLM inference, its application to LMMs is still an open research area, with questions about how to best leverage multimodal information and align different models for efficient acceleration.

Methods

The core idea is to adapt Speculative Decoding (SD) for LMMs. SD works by having a smaller, faster "draft" model generate a sequence of potential tokens, which are then verified in parallel by the larger, more accurate "target" model. This "draft-then-verify" approach significantly reduces the number of sequential operations.

The authors propose two key innovations for LMMs:

  • Leveraging Multimodal Information: Instead of just using text-based draft models, they plan to utilize information generated during the LMM's multimodal processing. This includes vision embeddings, hidden states, and key-value (KV) caches, which are rich with visual and cross-modal context.
  • Alignment Techniques: They aim to develop specialized methods to align the draft model with the target LMM. This is crucial for ensuring the draft tokens are relevant and that the verification process is efficient, maximizing the acceleration. They specifically mention designing "predictive heads" that are lightweight and tailored to capture pertinent multimodal information to predict tokens. They also propose a "specialized knowledge distillation technique" for alignment.

Datasets

The paper outlines plans to use the following datasets and tasks:

  • LLaVA-Bench In-the-Wild: For mixed generic tasks including conversation, detailed description, and complex reasoning.
  • COCO dataset: For image captioning.
  • Science QA dataset: For chain-of-thought (CoT) reasoning.

The models to be evaluated are LLaVA-7B and LLaVA-13B, representing common sizes of mainstream LMMs.

Key Insights and Ideas

  • Multimodal Context is Key: The paper highlights that simply applying LLM-based SD to LMMs might not be optimal. The real opportunity lies in harnessing the unique multimodal information (visual embeddings, hidden states) that LMMs process to create more effective draft predictions.
  • Alignment is Non-Trivial: Effectively aligning a draft model with a target LMM in a multimodal setting is a significant challenge. The proposed knowledge distillation and predictive head designs are crucial for bridging this gap and ensuring the acceleration is meaningful.
  • Practicality Matters: The authors are not just interested in theoretical speedups but also in the practical deployment costs and whether the acceleration is acceptable for real-world applications.

Key Results

This paper is a proposal for future research, so concrete results are not yet available. However, the authors anticipate achieving a speedup ratio of over 2x. They will be evaluating their method using metrics such as:

  • Walltime speedup ratio: Actual speedup compared to standard auto-regressive decoding.
  • Average acceptance length: How many tokens are accepted per block.
  • Average acceptance rate: The ratio of accepted to speculative tokens.
  • Token rate: Tokens generated per second.

Limitations and Future Work

  • Preliminary Nature: The paper is a proposal, and the research is in its early stages. The experiments are planned, not completed.
  • Alignment Challenges: The effectiveness of the proposed alignment techniques is yet to be demonstrated.
  • Future Work: The authors plan to release their code and models upon completion of the research, enabling further exploration and application of their methods. They also mention that research on SD for LMMs is still relatively scarce, indicating a broad scope for future work in this area.

Summary updated

BibTeX
@misc{yang2024proposalefficient,
  author = {Chaoqun Yang and Yuanda Zhang and Xiying Huang},
  title = {{【Proposal】Efficient Inference for Large Multimodal Models}},
  year = {2024},
  url = {https://openreview.net/forum?id=bobOrl5cPq},
  howpublished = {OpenReview},
  note = {Submitted to THU 2024 Fall AML},
}
Figure