랭킹으로 돌아가기

DeepSeek-VL: Towards Real-World Vision-Language Understanding

vision-language-modelvision-language-pretrainingfoundation-models
스타 성장
스타
4.1k
포크
593
주간 성장
이슈
44
2k3k4k
2024년 3월2024년 12월2025년 10월2026년 7월
아티팩트PyPIpip install deepseek-vl
README
DeepSeek LLM

📥 Model Download | ⚡ Quick Start | 📜 License | 📖 Citation
📄 Paper Link | 🤗 Huggingface Paper Link | 👁️ Demo

1. Introduction

Introducing DeepSeek-VL, an open-source Vision-Language (VL) Model designed for real-world vision and language understanding applications. DeepSeek-VL possesses general multimodal understanding capabilities, capable of processing logical diagrams, web pages, formula recognition, scientific literature, natural images, and embodied intelligence in complex scenarios.

DeepSeek-VL: Towards Real-World Vision-Language Understanding

Haoyu Lu*, Wen Liu*, Bo Zhang**, Bingxuan Wang, Kai Dong, Bo Liu, Jingxiang Sun, Tongzheng Ren, Zhuoshu Li, Hao Yang, Yaofeng Sun, Chengqi Deng, Hanwei Xu, Zhenda Xie, Chong Ruan (*Equal Contribution, **Project Lead)

2. Release

2024-03-14: Demo for DeepSeek-VL-7B available on Hugging Face.
Check out the gradio demo of DeepSeek-VL-7B at https://huggingface.co/spaces/deepseek-ai/DeepSeek-VL-7B. Experience its capabilities firsthand!
2024-03-13: Support DeepSeek-VL gradio demo.
2024-03-11: DeepSeek-VL family released, including DeepSeek-VL-7B-base, DeepSeek-VL-7B-chat, DeepSeek-VL-1.3B-base, and DeepSeek-VL-1.3B-chat.
The release includes a diverse set of models tailored for various applications within the DeepSeek-VL family. The models come in two sizes: 7B and 1.3B parameters, each offering base and chat variants to cater to different needs and integration scenarios.

3. Model Downloads

We release the DeepSeek-VL family, including 1.3B-base, 1.3B-chat, 7b-base and 7b-chat models, to the public. To support a broader and more diverse range of research within both academic and commercial communities. Please note that the use of this model is subject to the terms outlined in License section. Commercial usage is permitted under these terms.

Huggingface

Model Sequence Length Download
DeepSeek-VL-1.3B-base 4096 🤗 Hugging Face
DeepSeek-VL-1.3B-chat 4096 🤗 Hugging Face
DeepSeek-VL-7B-base 4096 🤗 Hugging Face
DeepSeek-VL-7B-chat 4096 🤗 Hugging Face

4. Quick Start

Installation

On the basis of Python >= 3.8 environment, install the necessary dependencies by running the following command:

pip install -e .

Simple Inference Example

import torch
from transformers import AutoModelForCausalLM

from deepseek_vl.models import VLChatProcessor, MultiModalityCausalLM
from deepseek_vl.utils.io import load_pil_images


# specify the path to the model
model_path = "deepseek-ai/deepseek-vl-7b-chat"
vl_chat_processor: VLChatProcessor = VLChatProcessor.from_pretrained(model_path)
tokenizer = vl_chat_processor.tokenizer

vl_gpt: MultiModalityCausalLM = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True)
vl_gpt = vl_gpt.to(torch.bfloat16).cuda().eval()

## single image conversation example
conversation = [
    {
        "role": "User",
        "content": "<image_placeholder>Describe each stage of this image.",
        "images": ["./images/training_pipelines.jpg"],
    },
    {"role": "Assistant", "content": ""},
]

## multiple images (or in-context learning) conversation example
# conversation = [
#     {
#         "role": "User",
#         "content": "<image_placeholder>A dog wearing nothing in the foreground, "
#                    "<image_placeholder>a dog wearing a santa hat, "
#                    "<image_placeholder>a dog wearing a wizard outfit, and "
#                    "<image_placeholder>what's the dog wearing?",
#         "images": [
#             "images/dog_a.png",
#             "images/dog_b.png",
#             "images/dog_c.png",
#             "images/dog_d.png",
#         ],
#     },
#     {"role": "Assistant", "content": ""}
# ]

# load images and prepare for inputs
pil_images = load_pil_images(conversation)
prepare_inputs = vl_chat_processor(
    conversations=conversation,
    images=pil_images,
    force_batchify=True
).to(vl_gpt.device)

# run image encoder to get the image embeddings
inputs_embeds = vl_gpt.prepare_inputs_embeds(**prepare_inputs)

# run the model to get the response
outputs = vl_gpt.language_model.generate(
    inputs_embeds=inputs_embeds,
    attention_mask=prepare_inputs.attention_mask,
    pad_token_id=tokenizer.eos_token_id,
    bos_token_id=tokenizer.bos_token_id,
    eos_token_id=tokenizer.eos_token_id,
    max_new_tokens=512,
    do_sample=False,
    use_cache=True
)

answer = tokenizer.decode(outputs[0].cpu().tolist(), skip_special_tokens=True)
print(f"{prepare_inputs['sft_format'][0]}", answer)

CLI Chat

python cli_chat.py --model_path "deepseek-ai/deepseek-vl-7b-chat"

# or local path
python cli_chat.py --model_path "local model path"

Gradio Demo

pip install -e .[gradio]

python deepseek_vl/serve/app_deepseek.py

Have Fun!

5. License

This code repository is licensed under the MIT License. The use of DeepSeek-VL Base/Chat models is subject to DeepSeek Model License. DeepSeek-VL series (including Base and Chat) supports commercial use.

6. Citation

@misc{lu2024deepseekvl,
      title={DeepSeek-VL: Towards Real-World Vision-Language Understanding},
      author={Haoyu Lu and Wen Liu and Bo Zhang and Bingxuan Wang and Kai Dong and Bo Liu and Jingxiang Sun and Tongzheng Ren and Zhuoshu Li and Hao Yang and Yaofeng Sun and Chengqi Deng and Hanwei Xu and Zhenda Xie and Chong Ruan},
      year={2024},
      eprint={2403.05525},
      archivePrefix={arXiv},
      primaryClass={cs.AI}
}

7. Contact

If you have any questions, please raise an issue or contact us at service@deepseek.com.

관련 저장소
haotian-liu/LLaVA

[NeurIPS'23 Oral] Visual Instruction Tuning (LLaVA) built towards GPT-4V level capabilities and beyond.

PythonPyPIApache License 2.0gpt-4chatbot
llava.hliu.cc
24.9k2.8k
OpenGVLab/InternVL

[CVPR 2024 Oral] InternVL Family: A Pioneering Open-Source Alternative to GPT-4o. 接近GPT-4o表现的开源多模态对话模型

PythonPyPIMIT Licenseimage-classificationimage-text-retrieval
internvl.readthedocs.io/en/latest/
10.1k788
CVHub520/X-AnyLabeling

Effortless data labeling with AI support from Segment Anything and other awesome models.

PythonPyPIGNU General Public License v3.0samyolo
github.com/CVHub520/X-AnyLabeling-Server
9.8k1.1k
jingyaogong/minimind-v

👀「大模型」2小时从0训练65M参数的视觉多模态VLM!Train a 65M-parameter VLM from scratch in just 2h!

PythonPyPIApache License 2.0artificial-intelligencechatgpt
jingyaogong.github.io/minimind-v
8.3k917
QwenLM/Qwen-VL

The official repo of Qwen-VL (通义千问-VL) chat & pretrained large vision language model proposed by Alibaba Cloud.

PythonPyPIOtherlarge-language-modelsvision-language-model
6.7k495
volcengine/MineContext

MineContext is your proactive context-aware AI partner(Context-Engineering+ChatGPT Pulse)

PythonPyPIApache License 2.0agentcontext-engineering
5.4k408
Blaizzy/mlx-vlm

MLX-VLM is a package for inference and fine-tuning of Vision Language Models (VLMs) on your Mac using MLX.

PythonPyPIMIT Licensellavallm
5.2k675
PKU-Alignment/align-anything

Align Anything: Training All-modality Model with Feedback

PythonPyPIApache License 2.0large-language-modelsmultimodal
4.7k505
EvolvingLMMs-Lab/lmms-eval

One-for-All Multimodal Evaluation Toolkit Across Text, Image, Video, and Audio Tasks

PythonPyPIOtheragievaluation
lmms-lab.com
4.3k623
MiniMax-AI/MiniMax-01

The official repo of MiniMax-Text-01 and MiniMax-VL-01, large-language-model & vision-language-model based on Linear Attention

PythonPyPIMIT Licenselarge-language-modelsllm
minimax.io
3.4k329
JIA-Lab-research/MGM

Official repo for "Mini-Gemini: Mining the Potential of Multi-modality Vision Language Models"

PythonPyPIApache License 2.0generationlarge-language-models
3.3k276
dvlab-research/MGM

Official repo for "Mini-Gemini: Mining the Potential of Multi-modality Vision Language Models"

PythonPyPIApache License 2.0generationlarge-language-models
3.2k281