/ Модель

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

Лицензия
Своя лицензия
Опубликована
9 окт 2023

med42-70b

Генерация текстаТекст → текст

Med42-70B — дообученная на медицинских данных языковая модель для ответов на клинические и общие вопросы о здоровье и обобщения записей пациентов.

0скачиваний за 30 дней188лайковвеса обновлены5 июл 2024

Бенчмарки

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

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

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

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

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

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

Med42-70B — клиническая большая языковая модель, разработанная командой M42 Health AI. Модель построена на LLaMA 2 с 70 млрд параметров и дообучена следовать инструкциям на примерно 250 млн токенов из открытых медицинских карточек, экзаменационных вопросов и диалогов. Она принимает текст и генерирует текст; длина контекста составляет 4 тыс. токенов.

Модель предназначена для ответов на медицинские вопросы, обобщения записей пациентов, поддержки анализа возможных диагнозов и общих вопросов о здоровье. В описанных разработчиками оценках она показала конкурентные результаты на медицинских тестах, включая MedQA и USMLE. Это статическая версия, обученная на офлайн-данных; разработчики предупреждают, что модель может выдавать неверную или вредную информацию и отражать предвзятость данных, поэтому она не готова к клиническому применению без строгой проверки безопасности. Для весов действует специальная лицензия M42 Health; для доступа требуется принять её условия.

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

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

Ограничения

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

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

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

Открыть на Hugging Face

🚨 Update: Version 2 of Med42 Released! 🚨

Please find the models here: Med42-v2-70B and Med42-v2-8B

Med42 - Clinical Large Language Model

Med42 is an open-access clinical large language model (LLM) developed by M42 to expand access to medical knowledge. Built off LLaMA-2 and comprising 70 billion parameters, this generative AI system provides high-quality answers to medical questions.

Model Details

Note: Use of this model is governed by the M42 Health license. In order to download the model weights (and tokenizer), please read the Med42 License and accept our License by requesting access here.

Beginning with the base LLaMa-2 model, Med42 was instruction-tuned on a dataset of ~250M tokens compiled from different open-access sources, including medical flashcards, exam questions, and open-domain dialogues.

Model Developers: M42 Health AI Team

Finetuned from model: Llama-2 - 70B

Context length: 4k tokens

Input: Text only data

Output: Model generates text only

Status: This is a static model trained on an offline dataset. Future versions of the tuned models will be released as we enhance model's performance.

License: A custom license is available here

Research Paper: Med42 - Evaluating Fine-Tuning Strategies for Medical LLMs: Full-Parameter vs. Parameter-Efficient Approaches

Intended Use

Med42 is being made available for further testing and assessment as an AI assistant to enhance clinical decision-making and enhance access to an LLM for healthcare use. Potential use cases include:

  • Medical question answering
  • Patient record summarization
  • Aiding medical diagnosis
  • General health Q&A

To get the expected features and performance for the model, a specific formatting needs to be followed, including the <|system|>, <|prompter|> and <|assistant|> tags.

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name_or_path = "m42-health/med42-70b"

model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
                                             device_map="auto")

tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)

prompt = "What are the symptoms of diabetes ?"
prompt_template=f'''
<|system|>: You are a helpful medical assistant created by M42 Health in the UAE.
<|prompter|>:{prompt}
<|assistant|>:
'''

input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True,eos_token_id=tokenizer.eos_token_id, pad_token_id=tokenizer.pad_token_id, max_new_tokens=512)
print(tokenizer.decode(output[0]))

Hardware and Software

The training process was performed on the Condor Galaxy 1 (CG-1) supercomputer platform.

Evaluation Results

Med42 achieves achieves competitive performance on various medical benchmarks, including MedQA, MedMCQA, PubMedQA, HeadQA, and Measuring Massive Multitask Language Understanding (MMLU) clinical topics. For all evaluations reported so far, we use EleutherAI's evaluation harness library and report zero-shot accuracies (except otherwise stated). We compare the performance with that reported for other models (ClinicalCamel-70B, GPT-3.5, GPT-4.0, Med-PaLM 2).

DatasetMed42ClinicalCamel-70BGPT-3.5GPT-4.0Med-PaLM-2 (5-shot)*
MMLU Clinical Knowledge74.369.869.886.088.3
MMLU College Biology84.079.272.295.194.4
MMLU College Medicine68.867.061.376.980.9
MMLU Medical Genetics86.069.070.091.090.0
MMLU Professional Medicine79.871.370.293.095.2
MMLU Anatomy67.462.256.380.077.8
MedMCQA60.947.050.169.571.3
MedQA61.553.450.878.979.7
USMLE Self-Assessment71.7-49.183.8-
USMLE Sample Exam72.054.356.984.3-

**We note that 0-shot performance is not reported for Med-PaLM 2. Further details can be found at https://github.com/m42health/med42*.

Key performance metrics:

  • Med42 achieves a 72% accuracy on the US Medical Licensing Examination (USMLE) sample exam, surpassing the prior state of the art among openly available medical LLMs.
  • 61.5% on MedQA dataset (compared to 50.8% for GPT-3.5)
  • Consistently higher performance on MMLU clinical topics compared to GPT-3.5.

Limitations & Safe Use

  • Med42 is not ready for real clinical use. Extensive human evaluation is undergoing as it is required to ensure safety.
  • Potential for generating incorrect or harmful information.
  • Risk of perpetuating biases in training data.

Use this model responsibly! Do not rely on it for medical usage without rigorous safety testing.

Accessing Med42 and Reporting Issues

Please report any software "bug" or other problems through one of the following means:

Citation

Our paper has been published at AAAI 2024 Spring Symposium - Clinical Foundation Models and is available on arXiv: https://arxiv.org/abs/2404.14779

@article{christophe2024med42,
      title={Med42 -- Evaluating Fine-Tuning Strategies for Medical LLMs: Full-Parameter vs. Parameter-Efficient Approaches}, 
      author={Clément Christophe and Praveen K Kanithi and Prateek Munjal and Tathagata Raha and Nasir Hayat and Ronnie Rajan and Ahmed Al-Mahrooqi and Avani Gupta and Muhammad Umar Salman and Gurpreet Gosal and Bhargav Kanakiya and Charles Chen and Natalia Vassilieva and Boulbaba Ben Amor and Marco AF Pimentel and Shadab Khan},
      year={2024},
      eprint={2404.14779},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

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

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

GPU в ailist

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

Нельзя запустить

Доступ к модели ограничен автором; у платформы нет доступа к весам.

Ревизия весов
8a35e5f

0 моделей