/ Модель

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

Контекст
32 768 токенов
Параметры
7,1 млрд
Лицензия
Apache 2.0
Архитектура
mistral · dense
Базовая модель
BioMistral-7B
Библиотека
transformers
Опубликована
3 фев 2024

BioMistral-7B-SLERP

Генерация текстаТекст → текст3 профессии

Слитая модель Mistral на 7,1 млрд параметров для диалоговой генерации текста и исследовательских ответов на вопросы по биомедицинским темам.

824скачиваний за 30 дней8лайковвеса обновлены19 фев 2024

Бенчмарки

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

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

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

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

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

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

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

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

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

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

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

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

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

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

BioMistral-7B-SLERP — модель генерации текста, созданная слиянием SLERP через mergekit моделей BioMistral/BioMistral-7B и mistralai/Mistral-7B-Instruct-v0.1. Это плотная авторегрессионная модель семейства Mistral с 7,1 млрд параметров, рассчитанная на диалог и генерацию ответов в биомедицинской тематике. Поддерживает контекст до 32 768 токенов и доступна в формате safetensors. Модель подходит для исследовательских экспериментов с медицинскими и биологическими вопросами, включая ответы на вопросы и подготовку черновиков текста.

В карточке указаны языки английский, французский, испанский, итальянский, польский, нидерландский и немецкий; BioMistral обучалась на текстах PubMed Central, а мультиязычные оценки проводились на автоматически переведённых медицинских наборах. Авторы предупреждают, что модель не проверялась в клинической практике, может содержать смещения и не предназначена для профессиональных медицинских решений или применения в производстве без специального выравнивания и тщательной проверки. Лицензия — Apache-2.0.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

BioMistral-7B-slerp

This is a merge of pre-trained language models created using mergekit.

Merge Details

Merge Method

This model was merged using the SLERP merge method.

Models Merged

The following models were included in the merge:

Configuration

The following YAML configuration was used to produce this model:


slices:
  - sources:
      - model: mistralai/Mistral-7B-Instruct-v0.1
        layer_range: [0, 32]
      - model: BioMistral/BioMistral-7B
        layer_range: [0, 32]
merge_method: slerp
base_model: mistralai/Mistral-7B-Instruct-v0.1
parameters:
  t:
    - filter: self_attn
      value: [0, 0.5, 0.3, 0.7, 1]
    - filter: mlp
      value: [1, 0.5, 0.7, 0.3, 0]
    - value: 0.5
dtype: bfloat16

BioMistral: A Collection of Open-Source Pretrained Large Language Models for Medical Domains

Abstract:

Large Language Models (LLMs) have demonstrated remarkable versatility in recent years, offering potential applications across specialized domains such as healthcare and medicine. Despite the availability of various open-source LLMs tailored for health contexts, adapting general-purpose LLMs to the medical domain presents significant challenges. In this paper, we introduce BioMistral, an open-source LLM tailored for the biomedical domain, utilizing Mistral as its foundation model and further pre-trained on PubMed Central. We conduct a comprehensive evaluation of BioMistral on a benchmark comprising 10 established medical question-answering (QA) tasks in English. We also explore lightweight models obtained through quantization and model merging approaches. Our results demonstrate BioMistral's superior performance compared to existing open-source medical models and its competitive edge against proprietary counterparts. Finally, to address the limited availability of data beyond English and to assess the multilingual generalization of medical LLMs, we automatically translated and evaluated this benchmark into 7 other languages. This marks the first large-scale multilingual evaluation of LLMs in the medical domain. Datasets, multilingual evaluation benchmarks, scripts, and all the models obtained during our experiments are freely released.

Advisory Notice! Although BioMistral is intended to encapsulate medical knowledge sourced from high-quality evidence, it hasn't been tailored to effectively, safely, or suitably convey this knowledge within professional parameters for action. We advise refraining from utilizing BioMistral in medical contexts unless it undergoes thorough alignment with specific use cases and undergoes further testing, notably including randomized controlled trials in real-world medical environments. BioMistral 7B may possess inherent risks and biases that have not yet been thoroughly assessed. Additionally, the model's performance has not been evaluated in real-world clinical settings. Consequently, we recommend using BioMistral 7B strictly as a research tool and advise against deploying it in production environments for natural language generation or any professional health and medical purposes.

1. BioMistral models

BioMistral is a suite of Mistral-based further pre-trained open source models suited for the medical domains and pre-trained using textual data from PubMed Central Open Access (CC0, CC BY, CC BY-SA, and CC BY-ND). All the models are trained using the CNRS (French National Centre for Scientific Research) Jean Zay French HPC.

Model NameBase ModelModel TypeSequence LengthDownload
BioMistral-7BMistral-7B-Instruct-v0.1Further Pre-trained2048HuggingFace
BioMistral-7B-DAREMistral-7B-Instruct-v0.1Merge DARE2048HuggingFace
BioMistral-7B-TIESMistral-7B-Instruct-v0.1Merge TIES2048HuggingFace
BioMistral-7B-SLERPMistral-7B-Instruct-v0.1Merge SLERP2048HuggingFace

2. Quantized Models

Base ModelMethodq_group_sizew_bitversionVRAM GBTimeDownload
BioMistral-7BFP16/BF1615.02x1.00HuggingFace
BioMistral-7BAWQ1284GEMM4.68x1.41HuggingFace
BioMistral-7BAWQ1284GEMV4.68x10.30HuggingFace
BioMistral-7BBnB.445.03x3.25HuggingFace
BioMistral-7BBnB.888.04x4.34HuggingFace
BioMistral-7B-DAREAWQ1284GEMM4.68x1.41HuggingFace
BioMistral-7B-TIESAWQ1284GEMM4.68x1.41HuggingFace
BioMistral-7B-SLERPAWQ1284GEMM4.68x1.41HuggingFace

2. Using BioMistral

You can use BioMistral with Hugging Face's Transformers library as follow.

Loading the model and tokenizer :

from transformers import AutoModel, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("BioMistral/BioMistral-7B")
model = AutoModel.from_pretrained("BioMistral/BioMistral-7B")

3. Supervised Fine-tuning Benchmark

Clinical KGMedical GeneticsAnatomyPro MedicineCollege BiologyCollege MedicineMedQAMedQA 5 optsPubMedQAMedMCQAAvg.
BioMistral 7B59.964.056.560.459.054.750.642.877.548.157.3
Mistral 7B Instruct62.957.055.659.462.557.242.040.975.746.155.9
BioMistral 7B Ensemble62.862.757.563.564.355.750.643.677.548.858.7
BioMistral 7B DARE62.367.055.861.466.958.051.145.277.748.759.4
BioMistral 7B TIES60.165.058.560.560.456.549.543.277.548.157.9
BioMistral 7B SLERP62.564.755.862.764.856.350.844.377.848.658.8
MedAlpaca 7B53.158.054.158.858.148.640.133.773.637.051.5
PMC-LLaMA 7B24.527.735.317.430.323.325.520.272.926.630.4
MediTron-7B41.650.346.427.944.430.841.628.174.941.342.7
BioMedGPT-LM-7B51.452.049.453.350.749.142.533.976.837.649.7
GPT-3.5 Turbo 1106*74.7174.0065.9272.7972.9164.7357.7150.8272.6653.7966.0

Supervised Fine-Tuning (SFT) performance of BioMistral 7B models compared to baselines, measured by accuracy (↑) and averaged across 3 random seeds of 3-shot. DARE, TIES, and SLERP are model merging strategies that combine BioMistral 7B and Mistral 7B Instruct. Best model in bold, and second-best underlined. *GPT-3.5 Turbo performances are reported from the 3-shot results without SFT.

Citation BibTeX

Arxiv : https://arxiv.org/abs/2402.10373

@misc{labrak2024biomistral,
      title={BioMistral: A Collection of Open-Source Pretrained Large Language Models for Medical Domains}, 
      author={Yanis Labrak and Adrien Bazoge and Emmanuel Morin and Pierre-Antoine Gourraud and Mickael Rouvier and Richard Dufour},
      year={2024},
      eprint={2402.10373},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

CAUTION! Both direct and downstream users need to be informed about the risks, biases, and constraints inherent in the model. While the model can produce natural language text, our exploration of its capabilities and limitations is just beginning. In fields such as medicine, comprehending these limitations is crucial. Hence, we strongly advise against deploying this model for natural language generation in production or for professional tasks in the realm of health and medicine.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
MistralForCausalLM
Ревизия весов
769fb99

0 моделей