/ Модель

Характеристики

Контекст
16 384 токена
Размер весов
14,7 ГБ
Лицензия
Своя лицензия
Архитектура
deepseek_vl_hybrid · dense
Библиотека
transformers
Опубликована
12 июн 2025

deepseek-vl-7b-chat

Изображение и текст → текст11 профессий

DeepSeek-VL-Hybrid 7B — чат-модель DeepSeek для ответов на вопросы по изображениям и тексту.

16 853скачиваний за 30 дней2лайкавеса обновлены26 июл 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Изображение → текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

DeepSeek-VL-Hybrid — мультимодальная модель для понимания изображений и текста, разработанная командой DeepSeek AI. Она принимает изображения и текстовые запросы и формирует текстовые ответы в диалоговом режиме.

В архитектуре используется языковая модель на основе LLaMA, SigLIP для обработки изображений низкого разрешения и SAM для изображений высокого разрешения. Модель рассчитана на практические визуально-языковые сценарии, включая анализ скриншотов, PDF, OCR, диаграмм и содержимого, требующего визуальных деталей; заявлена обработка изображений размером до 1024 × 1024 пикселей. В карточке указана версия 7B, однако конкретное число параметров этой копии не приведено.

Модель подходит для вопросов об изображениях, извлечения и объяснения визуальной информации, а также работы с документами и графиками. Она требует вычислительных ресурсов для мультимодальной модели и может ошибаться в распознавании мелких деталей или содержимого изображения. Указана лицензия DeepSeek; метаданные Hugging Face классифицируют её как other, поэтому точные условия следует сверить с текстом лицензии репозитория.

Сценарии применения

  • ответы на вопросы по изображениям
  • анализ скриншотов интерфейсов
  • извлечение текста и сведений из PDF
  • объяснение диаграмм и графиков
  • описание содержимого фотографий

Ограничения

Модель может ошибаться при распознавании мелких визуальных деталей; для запуска требуются вычислительные ресурсы мультимодальной модели. Точные условия лицензии следует проверять в репозитории, поскольку метаданные указывают лицензию как other.

Для каких профессий подходит11

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

DeepSeek-VL: Towards Real-World Vision-LanguageUnderstanding

image/png

This is the transformers version of Deepseek-VL-Hybrid, a foundation model for Visual Language Modeling.

Table of Contents

Model Details

Deepseek-VL-Hybrid was introduced by the DeepSeek AI team. It is a vision-language model (VLM) designed to process both text and images for generating contextually relevant responses. The model leverages LLaMA as its text encoder, while SigLip is used for encoding low-resolution images and SAM (Segment Anything Model) is incorporated to handle high-resolution image encoding, enhancing the model’s ability to process fine-grained visual details. Deepseek-VL-Hybrid is a variant of Deepseek-VL that uses SAM (Segment Anything Model) to handle high-resolution image encoding.

The abstract from the paper is the following:

We present DeepSeek-VL, an open-source Vision-Language (VL) Model designed for real-world vision and language understanding applications. Our approach is structured around three key dimensions: We strive to ensure our data is diverse, scalable, and extensively covers real-world scenarios including web screenshots, PDFs, OCR, charts, and knowledge-based content, aiming for a comprehensive representation of practical contexts. Further, we create a use case taxonomy from real user scenarios and construct an instruction tuning dataset accordingly. The fine-tuning with this dataset substantially improves the model's user experience in practical applications. Considering efficiency and the demands of most real-world scenarios, DeepSeek-VL incorporates a hybrid vision encoder that efficiently processes high-resolution images (1024 x 1024), while maintaining a relatively low computational overhead. This design choice ensures the model's ability to capture critical semantic and detailed information across various visual tasks. We posit that a proficient Vision-Language Model should, foremost, possess strong language abilities. To ensure the preservation of LLM capabilities during pretraining, we investigate an effective VL pretraining strategy by integrating LLM training from the beginning and carefully managing the competitive dynamics observed between vision and language modalities. The DeepSeek-VL family (both 1.3B and 7B models) showcases superior user experiences as a vision-language chatbot in real-world applications, achieving state-of-the-art or competitive performance across a wide range of visual-language benchmarks at the same model size while maintaining robust performance on language-centric benchmarks. We have made both 1.3B and 7B models publicly accessible to foster innovations based on this foundation model.

This is the model card of a 🤗 transformers model that has been pushed on the Hub.

  • Developed by: 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.
  • Model type: Deepseek-VL-Hybrid
  • License: deepseek

Model Sources

How to Get Started with the Model

Note: Ensure you have transformers version 4.54.0 or later installed:

pip install -U "transformers>=4.54.0"

The example below demonstrates how to generate text based on an image with Pipeline.

import torch
from transformers import pipeline

pipe = pipeline(
    task="image-text-to-text",
    model="deepseek-community/deepseek-vl-7b-chat",
    device=0,
    torch_dtype=torch.float16
)

messages = [
    {
        "role": "user",
        "content": [
            {
                "type": "image",
                "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/pipeline-cat-chonk.jpeg",
            },
            { "type": "text", "text": "Describe this image."},
        ]
    }
]

pipe(text=messages, max_new_tokens=20, return_full_text=False)

Generate text based on an image with AutoModel.

import torch
from transformers import DeepseekVLHybridForConditionalGeneration, AutoProcessor

model = DeepseekVLHybridForConditionalGeneration.from_pretrained(
    "deepseek-community/deepseek-vl-7b-chat",
    torch_dtype=torch.float16,
    device_map="auto",
    attn_implementation="sdpa"
)

processor = AutoProcessor.from_pretrained("deepseek-community/deepseek-vl-7b-chat")

messages = [
    {
        "role":"user",
        "content":[
            {
                "type":"image",
                "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/pipeline-cat-chonk.jpeg"
            },
            {
                "type":"text",
                "text":"Describe this image."
            }
        ]
    }

]

inputs = processor.apply_chat_template(
    messages,
    add_generation_prompt=True,
    tokenize=True,
    return_dict=True,
    return_tensors="pt"
).to(model.device, dtype=model.dtype)

generated_ids = model.generate(**inputs, max_new_tokens=128)
generated_ids_trimmed = [
    out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]
output_text = processor.batch_decode(
    generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
)

print(output_text)

Quantization reduces the memory burden of large models by representing the weights in a lower precision. Refer to the Quantization overview for more available quantization backends.

The example below uses TorchAo to only quantize the weights to int4.

import torch
from transformers import TorchAoConfig, DeepseekVLHybridForConditionalGeneration, AutoProcessor

quantization_config = TorchAoConfig(
    "int4_weight_only",
    group_size=128
)

model = DeepseekVLHybridForConditionalGeneration.from_pretrained(
    "deepseek-community/deepseek-vl-7b-chat",
    torch_dtype=torch.bfloat16,
    device_map="auto",
    quantization_config=quantization_config
)

Do inference with multiple images in a single conversation.

import torch
from transformers import DeepseekVLHybridForConditionalGeneration, AutoProcessor

model = DeepseekVLHybridForConditionalGeneration.from_pretrained(
    "deepseek-community/deepseek-vl-7b-chat",
    torch_dtype=torch.float16,
    device_map="auto",
    attn_implementation="sdpa"
)

processor = AutoProcessor.from_pretrained("deepseek-community/deepseek-vl-7b-chat")

messages = [
    [
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "What’s the difference between"},
                {"type": "image", "url": "http://images.cocodataset.org/val2017/000000039769.jpg"},
                {"type": "text", "text": " and "},
                {"type": "image", "url": "https://www.ilankelman.org/stopsigns/australia.jpg"}
            ]
        }
    ],
    [
        {
            "role": "user",
            "content": [
                {"type": "image", "url": "https://huggingface.co/microsoft/kosmos-2-patch14-224/resolve/main/snowman.jpg"},
                {"type": "text", "text": "What do you see in this image?"}
            ]
        }
    ]
]

inputs = processor.apply_chat_template(
    messages,
    add_generation_prompt=True,
    padding=True,
    truncation=True,
    tokenize=True,
    return_dict=True,
    return_tensors="pt"
).to(model.device, dtype=model.dtype)

generated_ids = model.generate(**inputs, max_new_tokens=128)
generated_ids_trimmed = [
    out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]
output_text = processor.batch_decode(
    generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
)

print(output_text)

Training Details

Training Data

The Deepseek-VL-Hybrid model was trained on the following datasets:

image/jpeg

Training Pipeline

Training pipelines consist of three stages.

  • Stage 1 involves training the Vision-Language (VL) adaptor while keeping the hybrid vision encoder and language model fixed.
  • Stage 2 is the crucial part of the joint vision and language pretraining, where both VL adaptor and language model are trainable.
  • Stage 3 is the supervised fine-tuning phase, during which the low-resolution vision encoder SigLIP-L, VL adaptor, and language model will be trained

image/jpeg

Training Hyperparameters

image/jpeg

Evaluation

image/png

Citation

BibTeX:

@misc{lu2024deepseekvlrealworldvisionlanguageunderstanding,
      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},
      url={https://arxiv.org/abs/2403.05525},
}

Model Card Authors

Armaghan Shakir (geetu040)

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
DeepseekVLHybridForConditionalGeneration
Ревизия весов
4d6f7f4

0 моделей