File size: 1,385 Bytes
5c0cca9
 
9216ebc
 
 
 
 
 
 
 
a2cab41
5c0cca9
9216ebc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
license: llama3
datasets:
- Henrychur/MMedC
- Henrychur/MedS-Ins
language:
- en
base_model: Henrychur/MMedS-Llama-3-8B
tags:
- medical
library_name: transformers
---


# MMedS-Llama3
[💻Github Repo](https://github.com/MAGIC-AI4Med/MedS-Ins)   [🖨️arXiv Paper](https://arxiv.org/abs/2408.12547)

The official codes for "Towards Evaluating and Building Versatile Large Language Models for Medicine"


## Introduction
This repository hosts MMedS-Llama-3-8B. Its foundation model, [MMed-Llama-3-8B](https://huggingface.co/Henrychur/MMed-Llama-3-8B), 
is a multilingual medical language model which has undergone additional continuous pretraining on MMedC. Furthermore, the model has 
been fine-tuned under supervision using MedS-Ins, a comprehensive dataset designed specifically for supervised fine-tuning (SFT), 
featuring 13.5 million samples across 122 tasks. For more details, please refer to our paper.


## Usage
The model can be loaded as follows:
```py
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Henrychur/MMed-Llama-3-8B-EnIns")
model = AutoModelForCausalLM.from_pretrained("Henrychur/MMed-Llama-3-8B-EnIns", torch_dtype=torch.float16)
```

- Inference format is the same as Llama 3, you can check the inference code [here](https://github.com/MAGIC-AI4Med/MedS-Ins/blob/main/Inference/model.py).