stardust-coder
commited on
Commit
•
0614bd9
1
Parent(s):
078cd49
Update README.md
Browse files
README.md
CHANGED
@@ -8,19 +8,18 @@ tags:
|
|
8 |
|
9 |
# MedSwallow-70B🏥
|
10 |
|
11 |
-
[東工大Swallow](tokyotech-llm/Swallow-70b-instruct-hf)をベースモデルとし, 医療Q&AデータセットでInstruction Tuningを施した医療ドメインの日本語LLMです.
|
12 |
|
13 |
チューニングには独自で用意した米国医師国家試験(USMLE)を和訳したQ&Aデータセットを用いました.
|
14 |
|
15 |
|
16 |
MedSwallow is a Japanese medical LLM for medical question-answering.
|
17 |
|
18 |
-
MedSwallow is based on [Swallow-70B](
|
19 |
|
20 |
|
21 |
## Training procedure
|
22 |
|
23 |
-
|
24 |
The following `bitsandbytes` quantization config was used during training:
|
25 |
- quant_method: bitsandbytes
|
26 |
- load_in_8bit: False
|
@@ -44,6 +43,46 @@ The following `bitsandbytes` quantization config was used during training:
|
|
44 |
Non-commercial.
|
45 |
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
## How to cite
|
48 |
```
|
49 |
coming soon...
|
|
|
8 |
|
9 |
# MedSwallow-70B🏥
|
10 |
|
11 |
+
[東工大Swallow](https://huggingface.co/tokyotech-llm/Swallow-70b-instruct-hf)をベースモデルとし, 医療Q&AデータセットでInstruction Tuningを施した医療ドメインの日本語LLMです.
|
12 |
|
13 |
チューニングには独自で用意した米国医師国家試験(USMLE)を和訳したQ&Aデータセットを用いました.
|
14 |
|
15 |
|
16 |
MedSwallow is a Japanese medical LLM for medical question-answering.
|
17 |
|
18 |
+
MedSwallow is based on [Swallow-70B](https://huggingface.co/tokyotech-llm/Swallow-70b-instruct-hf) and has passed instruction tuning with USMLE dataset translated in Japanese by our own.
|
19 |
|
20 |
|
21 |
## Training procedure
|
22 |
|
|
|
23 |
The following `bitsandbytes` quantization config was used during training:
|
24 |
- quant_method: bitsandbytes
|
25 |
- load_in_8bit: False
|
|
|
43 |
Non-commercial.
|
44 |
|
45 |
|
46 |
+
## Usage
|
47 |
+
|
48 |
+
```
|
49 |
+
model_name = "tokyotech-llm/Swallow-70b-instruct-hf"
|
50 |
+
peft_model= "AIgroup-CVM-utokyohospital/MedSwallow-70b"
|
51 |
+
|
52 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|
53 |
+
|
54 |
+
bnb_config = BitsAndBytesConfig(
|
55 |
+
load_in_4bit=True,
|
56 |
+
bnb_4bit_quant_type="nf4",
|
57 |
+
bnb_4bit_compute_dtype=torch.float16,
|
58 |
+
)
|
59 |
+
|
60 |
+
model = AutoModelForCausalLM.from_pretrained(
|
61 |
+
model_name,
|
62 |
+
load_in_8bit=False,
|
63 |
+
torch_dtype=torch.float16,
|
64 |
+
device_map=device,
|
65 |
+
|
66 |
+
model = PeftModel.from_pretrained(
|
67 |
+
model,
|
68 |
+
peft_model,
|
69 |
+
torch_dtype=torch.float16,
|
70 |
+
device_map=device,
|
71 |
+
)
|
72 |
+
|
73 |
+
```
|
74 |
+
|
75 |
+
|
76 |
+
## Benchmark
|
77 |
+
|
78 |
+
See also [Japanese Medical Language Model Evaluation Harness](https://github.com/stardust-coder/japanese-lm-med-harness).
|
79 |
+
|
80 |
+
- IgakuQA (in English):
|
81 |
+
- IgakuQA (in Japanese):
|
82 |
+
- MedQA (in English) :
|
83 |
+
- MedQA (in Japanese) :
|
84 |
+
|
85 |
+
|
86 |
## How to cite
|
87 |
```
|
88 |
coming soon...
|