/ Модель

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

Размер весов
15,1 ГБ
Лицензия
Apache 2.0
Архитектура
llava · dense
Базовая модель
llava-med-v1.5-mistral-7b
Опубликована
21 авг 2025

llava-med-v1.5-mistral-7b-hf

Вопросы по изображениюИзображение, текст → текст3 профессии

Медицинская визуально-языковая модель на базе LLaVA-Med v1.5 для ответов на вопросы по биомедицинским изображениям.

1 328скачиваний за 30 дней8лайковвеса обновлены27 июн 2026

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Это совместимый с Hugging Face чекпойнт llava-med-v1.5-mistral-7b-hf, конвертированный из медицинской визуально-языковой модели Microsoft LLaVA-Med v1.5 на базе Mistral 7B. Он предназначен для ответов на вопросы по биомедицинским изображениям, например для исследовательского анализа медицинских снимков и биологических изображений. Архитектура — плотная LLaVA с генерацией текста по визуальному и текстовому вводу; README отмечает расширение словаря на два токена, при этом слои внимания не менялись.

Модель поддерживает английский язык и распространяется в формате safetensors по лицензии Apache-2.0. Ответы модели могут быть неточными; выводы по медицинским изображениям требуют проверки специалистом.

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

  • ответы на вопросы по медицинским изображениям
  • исследовательский анализ биомедицинских снимков
  • описание содержимого биологических изображений

Ограничения

Ответы по изображениям могут содержать ошибки и не заменяют медицинскую оценку специалиста. README описывает изменение словаря, но не приводит результатов оценки качества.

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

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

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

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

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

Открыть на Hugging Face

llava-med-v1.5-mistral-7b-hf

This repository contains a drop-in, Hugging Face–compatible checkpoint converted from
https://huggingface.co/microsoft/llava-med-v1.5-mistral-7b.
You can load it with the exact same code you use for the original model—no extra conversion steps required.


✅ Clarification on Vocab Size Expansion & Weight Integrity

You can refer to the original conversion code we provided to access the relevant implementation details and code snippets. You may wonder if the vocab size mismatch (e.g., 32000 vs. 32064) breaks the original weights by causing dimension mismatches between embed_tokens/lm_head and the original weights.

The answer is no. Below are key clarifications:

1. Does expanding embed_tokens affect the attention mechanism?

No. The embed_tokens layer is simply an embedding lookup table (nn.Embedding) that maps token IDs to vectors.
The attention mechanism (e.g., nn.MultiheadAttention or LlamaAttention) does not operate on this lookup table directly. It only cares if the dimension of input hidden states is consistent.
Thus, even if you add more tokens, as long as the hidden_size remains unchanged, the weight shape of the attention layer is not affected at all.

2. Which layers actually change after expansion?

ModuleWeight Shape ChangeAffects Attention Calculation?
embed_tokens[vocab_size+2, hidden_size]❌ No
lm_head[vocab_size+2, hidden_size]❌ No
All attention layersNo shape change✅ Completely unchanged

Analogy for easier understanding

Think of the model as a dictionary:

  • embed_tokens is the "new word list": You add two new words, but the length of each word’s explanation (hidden_size) stays the same.
  • Attention is the "reading rule": It only focuses on how the vectors of each word in a sentence interact with each other, not how many words are in the dictionary.

The only "change" lies in input distribution

  • The original model never encountered embeddings for tokens like <image> or <pad>.
  • Now these tokens are initialized, and their new vectors appear during the first forward pass.
  • This is a data-level change, not damage to the model’s parameters.

Summary

Expanding the vocab only changes the "dictionary size", not the "reading rules". The weight shape and calculation logic of the attention mechanism remain completely unchanged. The output layer (lm_head) changes in shape but not in functional logic.

3. What exactly changes in the output layer (lm_head)?

The line below modifies the weight matrix of lm_head (the language modeling head):

model.resize_token_embeddings(config.text_config.vocab_size + 2, pad_shape)

Quick Start

from transformers import LlavaForConditionalGeneration, AutoProcessor
import torch

model_path = "chaoyinshe/llava-med-v1.5-mistral-7b-hf"

model = LlavaForConditionalGeneration.from_pretrained(
    model_path,
    torch_dtype=torch.bfloat16,
    attn_implementation="flash_attention_2",   # requires FA2
    device_map="auto"                          # multi-GPU ready
)

processor = AutoProcessor.from_pretrained(model_path)

# Example inference
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image"},
            {"type": "text", "text": "What is the main finding in this chest X-ray?"}
        ]
    }
]

prompt = processor.tokenizer.apply_chat_template(
    messages, tokenize=False, add_generation_prompt=True
)

inputs = processor(
    images=[image], text=prompt, return_tensors="pt"
).to(model.device, torch.bfloat16)

with torch.inference_mode():
    out = model.generate(**inputs, max_new_tokens=256)

print(processor.decode(out[0], skip_special_tokens=True))

✅ Training Screenshot

(Note: The image below is for illustrative purposes only — actual training metrics may vary.) 🤗

image/png

image/png

image/png

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
LlavaForConditionalGeneration
Ревизия весов
627be53

0 моделей