---
title: 'DeepSeek-VL2: Mixture-of-Experts Vision-Language Models for Advanced Multimodal Understanding'
authors: ['Zhiyu Wu', 'Xiaokang Chen', 'Zizheng Pan', 'Xingchao Liu', 'Wen Liu', 'Damai Dai', 'Huazuo Gao', 'Yiyang Ma', 'Chengyue Wu', 'Bingxuan Wang', 'Zhenda Xie', 'Yu Wu', 'Kai Hu', 'Jiawei Wang', 'Yaofeng Sun', 'Yukun Li', 'Yishi Piao', 'Kang Guan', 'Aixin Liu', 'Xin Xie', 'Yuxiang You', 'Kai Dong', 'Xingkai Yu', 'Haowei Zhang', 'Liang Zhao', 'Yisong Wang', 'Chong Ruan']
date: 2024-12-13
categories: ['cs.CV', 'cs.AI', 'cs.CL']
source_id: '2412.10302v1'
source_url: 'https://arxiv.org/abs/2412.10302v1'
description: 'We present DeepSeek-VL2, an advanced series of large Mixture-of-Experts (MoE) Vision-Language Models that significantly improves upon its predecessor, DeepSeek-VL, through two key major upgrades. For...'
keywords: ['cs.CV', 'cs.AI', 'cs.CL', 'DeepSeek-VL', 'Mixture-of-Experts', 'Vision-Language']
canonical: 'https://dailyreading.cc/records/arxiv_2412.10302v1'
---

# DeepSeek-VL2: Mixture-of-Experts Vision-Language Models for Advanced Multimodal Understanding
Zhiyu Wu\*, Xiaokang Chen\*, Zizheng Pan\*, Xingchao Liu\*, Wen Liu\*,†, Damai Dai, Huazuo Gao, Yiyang Ma, Chengyue Wu, Bingxuan Wang, Zhenda Xie, Yu Wu, Kai Hu, Jiawei Wang, Yaofeng Sun, Yukun Li, Yishi Piao, Kang Guan, Aixin Liu, Xin Xie, Yuxiang You, Kai Dong, Xingkai Yu, Haowei Zhang, Liang Zhao, Yisong Wang, Chong Ruan‡
#### DeepSeek-AI
## **Abstract**
We present DeepSeek-VL2, an advanced series of large Mixture-of-Experts (MoE) Vision-Language Models that significantly improves upon its predecessor, DeepSeek-VL, through two key major upgrades. For the vision component, we incorporate a dynamic tiling vision encoding strategy designed for processing high-resolution images with different aspect ratios. For the language component, we leverage DeepSeekMoE models with the Multi-head Latent Attention mechanism, which compresses Key-Value cache into latent vectors, to enable efficient inference and high throughput. Trained on an improved vision-language dataset, DeepSeek-VL2 demonstrates superior capabilities across various tasks, including but not limited to visual question answering, optical character recognition, document/table/chart understanding, and visual grounding. Our model series is composed of three variants: DeepSeek-VL2-Tiny, DeepSeek-VL2-Small and DeepSeek-VL2, with 1.0B, 2.8B and 4.5B activated parameters respectively. DeepSeek-VL2 achieves competitive or state-of-the-art performance with similar or fewer activated parameters compared to existing open-source dense and MoE-based models. Codes and pre-trained models are publicly accessible at https://github.com/deepseek-ai/DeepSeek-VL2.

Figure 1 | Average performance vs. activated parameters among different open-source models. We average the accuracy of MMBench v1.1, MMStar, MMMU (Val), MathVista (TestMini), AI2D (Test), and OCRBench. The scores of OCRBench are divided by 10 to scale them to [0,100].
\*: Core contributors. †: Project lead. ‡: Corresponding author.
## **Contents**
| 1 | | Introduction | 3 |
|---|-----|-----------------------------------------|----|
| 2 | | Model Architecture | 4 |
| 3 | | Data Construction | 6 |
| | 3.1 | Vision-Language Alignment Data | 6 |
| | 3.2 | Vision-Language Pretraining Data | 6 |
| | 3.3 | Supervised Fine-tuning Data | 8 |
| 4 | | Training Methodology | 9 |
| | 4.1 | Training Pipelines | 9 |
| | 4.2 | Hyperparameters and Infrastructures | 10 |
| 5 | | Evaluation | 11 |
| | 5.1 | Multimodal Performance | 11 |
| | 5.2 | Qualitative Study | 12 |
| 6 | | Conclusion | 20 |
## **1. Introduction**
Large Vision-Language Models (VLMs) have emerged as a transformative force in artificial intelligence [15,](#page-20-0) [54,](#page-23-0) [59,](#page-23-1) [63,](#page-24-0) [83,](#page-25-0) [88,](#page-26-0) [94](#page-26-1), extending the remarkable capabilities of Large Language Models (LLMs) to seamlessly process both visual and textual information. This advancement has dramatically expanded the potential for AI systems to tackle complex real-world applications that require multimodal understanding.
In this technical report, we present DeepSeek-VL2, a new series of open-source Vision-Language Models that leverages the Mixture-of-Experts (MoE) architecture to achieve substantial improvements in both performance and efficiency compared to its predecessor, DeepSeek-VL [59](#page-23-1). Our advancements center around three key aspects: (1) a dynamic, high-resolution vision encoding strategy that enhances visual understanding, (2) an optimized language model architecture that significantly improves both training and inference efficiency, and (3) a refined vision-language data construction pipeline that not only boosts overall performance but also extends model capabilities to new areas such as precise visual grounding.
For the vision component, we introduce a dynamic tiling vision encoding strategy that efficiently processes high-resolution images of varying aspect ratios. This approach improves over DeepSeek-VL's hybrid vision encoder, which extracted features from images at two fixed resolutions (384 × 384 and 1024 × 1024). Our approach avoids the limitations of the old fixedsize encoder and excels in tasks requiring ultra-high resolution, including visual grounding, document/table/chart analysis, and detailed feature extraction, while maintaining a manageable number of visual tokens. Drawing inspiration from established slicing-tile methods, our system dynamically segments high-resolution inputs into local tiles, processes each tile through a shared vision transformer, and seamlessly integrates the extracted features within the language model. This design preserves the advantages of vision transformers with local attention, enabling rich feature extraction without the quadratic computational scaling typically associated with increasing image resolutions.
For the language component, we leverage DeepSeek language models [20,](#page-21-0) [53](#page-23-2), featuring the Multi-head Latent Attention (MLA) mechanism. MLA significantly reduces computational cost by compressing the Key-Value (KV) cache into a latent vector, resulting in faster inference and increased throughput capacity. We further enhance efficiency through the DeepSeekMoE framework [20,](#page-21-0) [86](#page-25-1), which employs sparse computation techniques. Our model series adopt three MoE variants, 3B, 16B, and 27B. These LLMs have 0.57B, 2.4B, and 4.1B activated parameters respectively.
We also greatly enhance our vision-language training data in terms of quality, quantity, and diversity. This comprehensive dataset enables better generalization and performance across a broad spectrum of tasks, including Visual Question Answering (VQA), Optical Character Recognition (OCR), document/table/chart understanding, visual reasoning, and general chatbot applications. The improved training data has also enabled new abilities such as visual grounding and Graphical User Interface (GUI) perception.
In summary, DeepSeek-VL2 marks a substantial leap forward in large-scale Mixture-of-Experts Vision-Language modeling. Through a new visual processing strategy and an optimized language model, we develop a series of models that balances performance with efficiency. By open-sourcing the pre-trained models, we aim to accelerate progress in the field and promote collaborative research advancement.

Figure 2 | **Overview of DeepSeek-VL2**. The overall structure is a llava-style architecture, which includes a vision encoder, a VL adaptor, and a MoE-based LLM.
## **2. Model Architecture**
DeepSeek-VL2 consists of three core modules: (1) a vision encoder, (2) a vision-language adaptor, and (3) a Mixture-of-Experts language model. Building upon the decoder-only LLaVAstyle [54](#page-23-0) architecture of its predecessor, DeepSeek-VL2 introduces two major advancements: a dynamic tiling strategy and a DeepSeekMOE [20,](#page-21-0) [86](#page-25-1) language model featuring Multi-head Latent Attention [53](#page-23-2). These innovations enable more efficient processing of both high-resolution visual inputs and text data.
**Dynamic Tiling Strategy.** The original DeepSeek-VL employed a hybrid vision encoder combining SigLIP [106](#page-27-0) for coarse-grained feature extraction at 384 × 384 resolution and SAM-B [35](#page-22-0) for fine-grained feature extraction at 1024 × 1024 resolution. While this fusion approach generated rich visual representations suitable for various vision-language tasks, it was limited by the fixed 1024 × 1024 resolution constraint. This limitation is particularly challenging for processing images with larger resolutions and extreme aspect ratios, such as those found in InfographicVQA [67](#page-24-1), dense OCR, and detailed visual grounding tasks.
Inspired by recent advances in VLMs [16,](#page-21-1) [21,](#page-21-2) [55](#page-23-3), we implement a dynamic tiling strategy by splitting a high-resolution image into tiles. This approach enables the efficient processing of different high-resolution images with varying aspect ratios using a single SigLIP-SO400M-384 vision encoder [106](#page-27-0). The pre-trained SigLIP operates at a base resolution of 384 × 384. To accommodate different aspect ratios, we define a set of candidate resolutions: = {( · 384, · 384) | ∈ **N**, ∈ **N**, 1 ≤ , , ≤ 9}, where : represents the aspect ratio. For an input image of size (,), we calculate the padding area required for resizing[1](#page-0-0) it to each candidate resolution in . We select the resolution ( · 384, · 384) that minimizes the padding area. The resized image is then divided into × local tiles of 384 × 384 pixels, plus one global thumbnail tile. The SigLIP-SO400M-384 vision encoder processes all (1 + × ) tiles, yielding 27 × 27 = 729 visual embeddings of 1152 dimensions per tile. For computational efficiency and context length management, we disable the dynamic tiling strategy when processing multiple (> 2) images.
1We first resize the original image until its long side matches the target resolution, then pad the other dimension while maintaining the original aspect ratio.

Figure 3 | **Illustration of dynamic tiling strategy in DeepSeek-VL2**. By dividing images into multiple tiles, DeepSeek-VL2 achieves stronger fine-grained understanding capabilities compared to DeepSeek-VL.
Table 1 | **Architectural configuration for DeepSeek-VL2**. We list the hyperparameters of the architecture along with the details related to the mixture-of-expert training.
| | DeepSeek-VL2-Tiny | DeepSeek-VL2-Small | DeepSeek-VL2 | |
|----------------------------|----------------------|--------------------|----------------|--|
| Vocabulary size | 129,280 | 102,400 | 129,280 | |
| Embedding size | 1,280 | 2,048 | 2,560 | |
| #Attention heads | 10 | 16 | 32 | |
| #Layers | 12 | 27 | 30 | |
| Attention | Multi-Head Attention | MLA (rank=512) | MLA (rank=512) | |
| #Routed experts | 64 | 64 | 72 | |
| #Shared experts | 2 | 2 | 2 | |
| Top-K for expert selection | 6 | 6 | 6 | |
| Routing function | Softmax | Softmax | Sigmoid | |
| Expert correction bias | × | × | ✓ | |
**Vision-Language Adaptor.** Following visual tile processing, we implement a 2 × 2 pixel shuffle operation to compress each tile's visual tokens from 27 × 27 to 14 × 14 = 196 tokens. We then introduce three special tokens when processing the (1 + × ) tiles. For the global thumbnail tile (14 × 14), we add 14 tokens to the end of each row, resulting in a total number of 14 × 15 = 210 tokens. For the × local tiles, which are arranged in a 2D grid of shape ( · 14, · 14), we append · 14 tokens at the end of the final column to indicate the end of a row of all the local tiles. Additionally, a token is inserted between the global thumbnail tile and the local tiles. The complete visual sequence contains 210 + 1 + · 14 × ( · 14 + 1) visual tokens, which are subsequently projected into the language model's embedding space using a two-layer multilayer perceptron (MLP). A visual illustration of our dynamic tiling strategy is shown in Figure [3.](#page-4-1)
**DeepSeekMoE LLM.** Our language model is based on DeepSeekMoE [20,](#page-21-0) [86](#page-25-1), which incorporates the Multi-head Latent Attention mechanism [53](#page-23-2). MLA enhances inference efficiency by compressing the Key-Value cache into a latent vector, enabling increased throughput capacity. The model also incorporates a MoE architecture [20](#page-21-0) allowing for efficient inference through sparse computation. During MoE training, we introduce a global bias term [86](#page-25-1) for each expert to cost-effectively improve load balancing between experts. DeepSeek-VL2 comes in three variants with the following model sizes: 1.0B, 2.8B and 4.5B. Complete architectural specifications can be found in Table [1.](#page-4-2)
## **3. Data Construction**
We build a comprehensive Vision-Language dataset from diverse sources for DeepSeek-VL2. The training process is structured into three distinct stages: (1) VL alignment, (2) VL pretraining, and (3) supervised fine-tuning (SFT). In the following parts, we provide descriptions of the data used in each stage.
## **3.1. Vision-Language Alignment Data**
The alignment stage focuses on training the MLP connector to bridge the pretrained visual encoder and the LLM. For this initial warmup phase, we utilize ShareGPT4V [12](#page-20-1), a dataset containing approximately 1.2M caption and conversation samples.
## **3.2. Vision-Language Pretraining Data**
Following DeepSeek-VL [59](#page-23-1), our pretraining data combines vision-language (VL) and text-only data to maintain a balance between VL capabilities and text-only performance. For DeepSeek-VL2, we maintain a ratio of around 70% VL data to 30% text-only data, with the latter sourced directly from our base LLM pretraining corpus. In the following, we categorize the VL data into several groups and describe their details.
**Interleaved image-text data.** Our data collection begins with several open-sourced datasets, including WIT [79](#page-25-2), WikiHow [38](#page-22-1), and 30% random samples from OBELICS [41](#page-22-2). This specific mixing ratio was determined through preliminary experiments with DeepSeek-VL2-Tiny. To enhance multilingual capabilities, we supplemented the predominantly English datasets with Chinese content extracted from Wanjuan [29](#page-21-3). Additionally, we developed an in-house collection to expand coverage of general real-world knowledge.
**Image captioning data.** Image captions represent fundamental data in VLM training, providing direct alignment between visual and textual information. We initially leveraged diverse open-source datasets [8,](#page-20-2) [25,](#page-21-4) [28,](#page-21-5) [36,](#page-22-3) [37,](#page-22-4) [39,](#page-22-5) [40,](#page-22-6) [48,](#page-23-4) [50,](#page-23-5) [51,](#page-23-6) [73,](#page-24-2) [78,](#page-25-3) [80,](#page-25-4) [82](#page-25-5). However, our preliminary analysis revealed severe quality variations across these datasets, ranging from dense, accurate captions generated by advanced VLMs to problematic cases with brief descriptions, mismatched text pairs, or obvious hallucinations. To address these quality inconsistencies, we developed a comprehensive image captioning pipeline that considers: (1) OCR hints, (2) meta information (e.g., location, camera settings), and (3) relevant original captions as prompts. Using an in-house captioner, we recaption the images following prompting strategies similar to PixelProse [78](#page-25-3), employing varied instructions to guide the VLM's caption generation.
Despite the overall improvement in caption quality, we observed repetition issues in the large-scale annotation pipelines. To mitigate this, we implemented a quality control pipeline using DeepSeek Chat [53](#page-23-2) to score all captions simply based on their writing quality. In practice, this approach is both efficient and effective in filtering out low-quality captions.
**Optical character recognition data.** To develop OCR capabilities, we used open-source datasets including LaTeX OCR [7](#page-20-3) and 12M RenderedText [93](#page-26-2). We combined these datasets with an extensive in-house OCR dataset covering diverse document types. Currently, our in-house dataset mainly focuses on English and Chinese character recognition. We plan to expand to other languages in our future work.
**Visual question-answering (QA) data.** In our early exploration, we found general QA data clearly benefits model pretraining. Consequently, we developed a comprehensive visual QA dataset consisting of the following categories:
- **General VQA.** We inherit the general VQA data from DeepSeek-VL. For more details, please refer to [59](#page-23-1).
- **Table, chart and document understanding.** We adopt PubTabNet [112](#page-27-1), FinTabNet [111](#page-27-2) and Docmatix [42](#page-22-7) to enhance document comprehension capabilities.
- **Web-to-code and plot-to-Python generation.** We leverage Websight [44](#page-22-8) for webpageto-code abilities and Python plots obtained from public Jupyter notebooks, following DeepSeek-VL. We enhance this dataset by replicating a portion of Websight using DeepSeek V2.5. We also exploit Python plot codes generated by DeepSeek V2.5 to mitigate the noises in the plot-to-code data.
- **QA with visual prompt.** We follow [9](#page-20-4) to construct visual prompt understanding data by overlaying various visual indicators (arrows, boxes, circles, and scribbles) onto images from [9,](#page-20-4) [89,](#page-26-3) [90](#page-26-4). We then created QA pairs focusing on objects highlighted by these visual prompts.
**Visual grounding data.** We construct our visual grounding dataset from [71,](#page-24-3) [75](#page-25-6). For each image's object detection annotations, we structure the data as follows:
- Prompt: Locate <|ref|><|/ref|> in the given image.
- Response: <|ref|><|/ref|><|det|>[[x1, y1, x2, y2],...]<|/det|>
during training, the question prompts are randomly sampled from a candidate pool during training. <|ref|>, <|/ref|>, <|det|>, <|/det|> are special tokens. is a placeholder for either the category name (e.g., "car") or description of the object (e.g., "the leftmost person"). [[x1, y1, x2, y2], ...] is a list of bounding boxes, where each bounding box corresponds to an object's position. The coordinates x1, y1 and x2, y2 specify the top-left and bottom-right corners respectively, normalized to values between 0 and 999 according to the resolution of the image. We also construct negative samples where queried objects are intentionally absent from the images to enhance the robustness of the model.
**Grounded conversation data.** We derived our grounded conversation dataset from [71](#page-24-3), structured in the following format:
- Prompt: <|grounding|>Can you describe the content of the image?
- Response: Two <|ref|>dogs<|/ref|><|det|>[[x1, y1, x2, y2],...]<|/det|> are running on the grass.
As in other visual grounding data, <|grounding|>, <|ref|>, <|/ref|>, <|det|>, <|/det|> are special tokens and x1, y1, x2, y2 is subject to the same normalization scheme.
## **3.3. Supervised Fine-tuning Data**
Our SFT data combines a diverse collection of open-sourced datasets with high-quality in-house QA pairs. Below, we detail our efforts to enhance the quality of our SFT dataset.
**General visual question-answering.** While public visual QA datasets are diverse [9,](#page-20-4) [10,](#page-20-5) [27,](#page-21-6) [31,](#page-22-9) [43,](#page-22-10) [47,](#page-23-7) [74](#page-24-4), they often suffer from three main limitations: (1) short responses, (2) poor OCR quality, and (3) hallucinated content. To address these issues, we regenerate responses by jointly considering the original questions, images, and OCR information. Our experiments demonstrate that this approach produces more comprehensive and accurate results. During development, we observed that an early version of DeepSeek-VL2, particularly the Tiny variant, occasionally inserted English words inappropriately in Chinese responses. This issue was not present in our larger models, suggesting it stemmed from limited model capacity and an imbalance between English and Chinese data in the visual-language pretraining stage. To address this limitation in our smaller model, we developed an in-house Chinese QA dataset with diverse image descriptions and single/multi-round conversations. This dataset helps to mitigate the language mixing issue. Furthermore, we created an extra in-house dataset to complement real-world and cultural visual knowledge, including anime, memes, cuisine and art.
**OCR and document understanding.** Thanks to our advanced image captioning pipeline, DeepSeek-VL2 already demonstrates superior OCR capabilities compared to other state-of-theart VLMs. Therefore, rather than further enhancing OCR performance during the SFT stage, we focused on cleaning existing open-source datasets [24,](#page-21-7) [31,](#page-22-9) [43,](#page-22-10) [66,](#page-24-5) [67,](#page-24-1) [77,](#page-25-7) [92,](#page-26-5) [104](#page-27-3) by removing samples with poor OCR quality. For document understanding, we curated a diverse subset of document pages from our in-house data. We then generate multi-round conversational QA pairs specific to document comprehension. Early results indicate that this approach improves document-based interactions.
**Table and chart understanding.** We enhanced table-based QA data by regenerating responses for all public datasets [14,](#page-20-6) [49](#page-23-8) based on their original questions except Cauldron [43](#page-22-10), which already exhibits high quality. Similar to our OCR capabilities developed during VL pretraining, our model demonstrated strong performance in chart understanding without requiring additional efforts.
**Reasoning, logic, and mathematics.** We enhance public reasoning-focused datasets [17,](#page-21-8) [43,](#page-22-10) [61,](#page-24-6) [76,](#page-25-8) [102,](#page-27-4) [109](#page-27-5) with more detailed reasoning processes and standardize response formats which puts the final answer at the end of the response. We observe that detailed responses are less effective when training smaller VLMs. In our exploration, DeepSeek-VL2-Tiny shows better performance with more concise responses.
**Textbook and academic questions.** We build an internal dataset focused on textbooks from our document collection. This dataset primarily emphasizes college-level contents across multiple academic disciplines.
**Web-to-code and plot-to-Python generation.** We expand our in-house dataset for web code and Python plot code beyond what was used during pretraining. For open-source datasets, we improve their quality by regenerating their answers.
**Visual grounding.** We develop our visual grounding dataset using data from [2,](#page-20-7) [23,](#page-21-9) [64,](#page-24-7) [85,](#page-25-9) [101,](#page-26-6) [110](#page-27-6). To boost model capabilities, we translate query phrases into Chinese and create additional negative samples. We also add in-context visual grounding data, where the task involves locating objects of the same category across multiple images, given a reference object highlighted by a rectangle or ellipse in a reference image. The data format follows this structure:
- Prompt: <|grounding|>The first image shows