Update README.md
Browse files
README.md
CHANGED
|
@@ -55,34 +55,24 @@ pipeline_tag: question-answering
|
|
| 55 |
tags:
|
| 56 |
- biology
|
| 57 |
- medical
|
| 58 |
-
---
|
| 59 |
# Democratizing Medical LLMs For Much More Languages
|
| 60 |
|
| 61 |
Covering 12 Major Languages including English, Chinese, French, Hindi, Spanish, Arabic, Russian, Japanese, Korean, German, Italian, Portuguese and 38 Minor Languages So far.
|
| 62 |
-
<center>
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
<p align="center">
|
| 67 |
-
๐ <a href="https://arxiv.org/abs/2410.10626" target="_blank">Paper</a> โข ๐ <a href="" target="_blank">Demo</a> โข ๐ค <a href="https://huggingface.co/datasets/FreedomIntelligence/ApolloMoEDataset" target="_blank">ApolloMoEDataset</a> โข ๐ค <a href="https://huggingface.co/datasets/FreedomIntelligence/ApolloMoEBench" target="_blank">ApolloMoEBench</a> โข ๐ค <a href="https://huggingface.co/collections/FreedomIntelligence/apollomoe-and-apollo2-670ddebe3bb1ba1aebabbf2c" target="_blank">Models</a> โข ๐ <a href="https://github.com/FreedomIntelligence/Apollo" target="_blank">Apollo</a>
|
| 68 |
</p>
|
| 69 |
|
| 70 |
-

|
| 71 |
|
| 72 |
-
## ๐ Update
|
| 73 |
-
|
| 74 |
-
* **[2024.10.15]** ApolloMoE repo is published๏ผ๐
|
| 75 |
|
|
|
|
| 76 |
|
| 77 |
-
## Languages Coverage
|
| 78 |
-
12 Major Languages and 38 Minor Languages
|
| 79 |
|
| 80 |
-
|
| 81 |
-
<summary>Click to view the Languages Coverage</summary>
|
| 82 |
-
|
| 83 |
-

|
| 84 |
|
| 85 |
-
|
| 86 |
|
| 87 |
|
| 88 |
## Architecture
|
|
@@ -98,24 +88,29 @@ Covering 12 Major Languages including English, Chinese, French, Hindi, Spanish,
|
|
| 98 |
|
| 99 |
### Dense
|
| 100 |
๐ค <a href="https://huggingface.co/FreedomIntelligence/Apollo2-0.5B" target="_blank">Apollo2-0.5B</a> โข ๐ค <a href="https://huggingface.co/FreedomIntelligence/Apollo2-1.5B" target="_blank">Apollo2-1.5B</a> โข ๐ค <a href="https://huggingface.co/FreedomIntelligence/Apollo2-2B" target="_blank">Apollo2-2B</a> โข ๐ค <a href="https://huggingface.co/FreedomIntelligence/Apollo2-3.8B" target="_blank">Apollo2-3.8B</a> โข ๐ค <a href="https://huggingface.co/FreedomIntelligence/Apollo2-7B" target="_blank">Apollo2-7B</a> โข ๐ค <a href="https://huggingface.co/FreedomIntelligence/Apollo2-9B" target="_blank">Apollo2-9B</a>
|
| 101 |
-
|
| 102 |
<details>
|
| 103 |
<summary>Click to view the Dense Models Results</summary>
|
| 104 |
-
|
| 105 |

|
| 106 |
|
| 107 |
</details>
|
| 108 |
|
| 109 |
### Post-MoE
|
| 110 |
๐ค <a href="https://huggingface.co/FreedomIntelligence/Apollo-MoE-0.5B" target="_blank">Apollo-MoE-0.5B</a> โข ๐ค <a href="https://huggingface.co/FreedomIntelligence/Apollo-MoE-1.5B" target="_blank">Apollo-MoE-1.5B</a> โข ๐ค <a href="https://huggingface.co/FreedomIntelligence/Apollo-MoE-7B" target="_blank">Apollo-MoE-7B</a>
|
| 111 |
-
|
| 112 |
<details>
|
| 113 |
<summary>Click to view the Post-MoE Models Results</summary>
|
| 114 |
-
|
| 115 |

|
| 116 |
|
| 117 |
</details>
|
| 118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
|
| 120 |
## Usage Format
|
| 121 |
#### Apollo2
|
|
@@ -125,7 +120,7 @@ Covering 12 Major Languages including English, Chinese, French, Hindi, Spanish,
|
|
| 125 |
|
| 126 |
#### Apollo-MoE
|
| 127 |
- 0.5B, 1.5B, 7B: User:{query}\nAssistant:{response}<|endoftext|>
|
| 128 |
-
|
| 129 |
## Dataset & Evaluation
|
| 130 |
|
| 131 |
- Dataset
|
|
@@ -139,12 +134,12 @@ Covering 12 Major Languages including English, Chinese, French, Hindi, Spanish,
|
|
| 139 |
|
| 140 |
|
| 141 |
</details>
|
| 142 |
-
|
| 143 |
- Evaluation
|
| 144 |
๐ค <a href="https://huggingface.co/datasets/FreedomIntelligence/ApolloMoEBench" target="_blank">ApolloMoEBench</a>
|
| 145 |
|
| 146 |
<details><summary>Click to expand</summary>
|
| 147 |
-
|
| 148 |
- EN:
|
| 149 |
- [MedQA-USMLE](https://huggingface.co/datasets/GBaker/MedQA-USMLE-4-options)
|
| 150 |
- [MedMCQA](https://huggingface.co/datasets/medmcqa/viewer/default/test)
|
|
@@ -180,25 +175,29 @@ Covering 12 Major Languages including English, Chinese, French, Hindi, Spanish,
|
|
| 180 |
- PT: [BioInstructQA](https://huggingface.co/datasets/BioMistral/BioInstructQA): Portuguese part
|
| 181 |
- RU: [RuMedBench](https://github.com/sb-ai-lab/MedBench)
|
| 182 |
|
| 183 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
</details>
|
| 185 |
|
| 186 |
-
|
| 187 |
## Results reproduction
|
| 188 |
<details><summary>Click to expand</summary>
|
| 189 |
|
| 190 |
-
|
| 191 |
-
We take
|
| 192 |
1. Download Dataset for project:
|
| 193 |
|
| 194 |
```
|
| 195 |
-
bash 0.download_data.sh
|
| 196 |
```
|
| 197 |
|
| 198 |
-
2. Prepare test and dev
|
| 199 |
|
| 200 |
|
| 201 |
-
- Create test data for with special token
|
| 202 |
|
| 203 |
```
|
| 204 |
bash 1.data_process_test&dev.sh
|
|
@@ -206,21 +205,23 @@ Covering 12 Major Languages including English, Chinese, French, Hindi, Spanish,
|
|
| 206 |
|
| 207 |
3. Prepare train data for specific model (Create tokenized data in advance):
|
| 208 |
|
| 209 |
-
|
| 210 |
-
- You can adjust data Training order and Training Epoch in this step
|
| 211 |
|
|
|
|
|
|
|
| 212 |
```
|
| 213 |
bash 2.data_process_train.sh
|
| 214 |
```
|
| 215 |
-
|
| 216 |
4. Train the model
|
| 217 |
|
| 218 |
-
|
| 219 |
-
- If you want to train in Multi Nodes please refer to ./
|
|
|
|
|
|
|
| 220 |
|
| 221 |
|
| 222 |
```
|
| 223 |
-
bash 3.
|
| 224 |
```
|
| 225 |
|
| 226 |
|
|
@@ -230,6 +231,12 @@ Covering 12 Major Languages including English, Chinese, French, Hindi, Spanish,
|
|
| 230 |
bash 4.eval.sh
|
| 231 |
```
|
| 232 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 233 |
</details>
|
| 234 |
|
| 235 |
|
|
|
|
| 55 |
tags:
|
| 56 |
- biology
|
| 57 |
- medical
|
|
|
|
| 58 |
# Democratizing Medical LLMs For Much More Languages
|
| 59 |
|
| 60 |
Covering 12 Major Languages including English, Chinese, French, Hindi, Spanish, Arabic, Russian, Japanese, Korean, German, Italian, Portuguese and 38 Minor Languages So far.
|
|
|
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
<p align="center">
|
| 65 |
+
๐ <a href="https://arxiv.org/abs/2410.10626" target="_blank">Paper</a> โข ๐ <a href="" target="_blank">Demo</a> โข ๐ค <a href="https://huggingface.co/datasets/FreedomIntelligence/ApolloMoEDataset" target="_blank">ApolloMoEDataset</a> โข ๐ค <a href="https://huggingface.co/datasets/FreedomIntelligence/ApolloMoEBench" target="_blank">ApolloMoEBench</a> โข ๐ค <a href="https://huggingface.co/collections/FreedomIntelligence/apollomoe-and-apollo2-670ddebe3bb1ba1aebabbf2c" target="_blank">Models</a> โข ๐ <a href="https://github.com/FreedomIntelligence/Apollo" target="_blank">Apollo</a> โข ๐ <a href="https://github.com/FreedomIntelligence/ApolloMoE" target="_blank">ApolloMoE</a>
|
| 66 |
</p>
|
| 67 |
|
|
|
|
| 68 |
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
+

|
| 71 |
|
|
|
|
|
|
|
| 72 |
|
| 73 |
+
## ๐ Update
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
+
* **[2024.10.15]** ApolloMoE repo is published๏ผ๐
|
| 76 |
|
| 77 |
|
| 78 |
## Architecture
|
|
|
|
| 88 |
|
| 89 |
### Dense
|
| 90 |
๐ค <a href="https://huggingface.co/FreedomIntelligence/Apollo2-0.5B" target="_blank">Apollo2-0.5B</a> โข ๐ค <a href="https://huggingface.co/FreedomIntelligence/Apollo2-1.5B" target="_blank">Apollo2-1.5B</a> โข ๐ค <a href="https://huggingface.co/FreedomIntelligence/Apollo2-2B" target="_blank">Apollo2-2B</a> โข ๐ค <a href="https://huggingface.co/FreedomIntelligence/Apollo2-3.8B" target="_blank">Apollo2-3.8B</a> โข ๐ค <a href="https://huggingface.co/FreedomIntelligence/Apollo2-7B" target="_blank">Apollo2-7B</a> โข ๐ค <a href="https://huggingface.co/FreedomIntelligence/Apollo2-9B" target="_blank">Apollo2-9B</a>
|
| 91 |
+
|
| 92 |
<details>
|
| 93 |
<summary>Click to view the Dense Models Results</summary>
|
| 94 |
+
|
| 95 |

|
| 96 |
|
| 97 |
</details>
|
| 98 |
|
| 99 |
### Post-MoE
|
| 100 |
๐ค <a href="https://huggingface.co/FreedomIntelligence/Apollo-MoE-0.5B" target="_blank">Apollo-MoE-0.5B</a> โข ๐ค <a href="https://huggingface.co/FreedomIntelligence/Apollo-MoE-1.5B" target="_blank">Apollo-MoE-1.5B</a> โข ๐ค <a href="https://huggingface.co/FreedomIntelligence/Apollo-MoE-7B" target="_blank">Apollo-MoE-7B</a>
|
| 101 |
+
|
| 102 |
<details>
|
| 103 |
<summary>Click to view the Post-MoE Models Results</summary>
|
| 104 |
+
|
| 105 |

|
| 106 |
|
| 107 |
</details>
|
| 108 |
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
|
| 112 |
+
โ
|
| 113 |
+
|
| 114 |
|
| 115 |
## Usage Format
|
| 116 |
#### Apollo2
|
|
|
|
| 120 |
|
| 121 |
#### Apollo-MoE
|
| 122 |
- 0.5B, 1.5B, 7B: User:{query}\nAssistant:{response}<|endoftext|>
|
| 123 |
+
|
| 124 |
## Dataset & Evaluation
|
| 125 |
|
| 126 |
- Dataset
|
|
|
|
| 134 |
|
| 135 |
|
| 136 |
</details>
|
| 137 |
+
|
| 138 |
- Evaluation
|
| 139 |
๐ค <a href="https://huggingface.co/datasets/FreedomIntelligence/ApolloMoEBench" target="_blank">ApolloMoEBench</a>
|
| 140 |
|
| 141 |
<details><summary>Click to expand</summary>
|
| 142 |
+
|
| 143 |
- EN:
|
| 144 |
- [MedQA-USMLE](https://huggingface.co/datasets/GBaker/MedQA-USMLE-4-options)
|
| 145 |
- [MedMCQA](https://huggingface.co/datasets/medmcqa/viewer/default/test)
|
|
|
|
| 175 |
- PT: [BioInstructQA](https://huggingface.co/datasets/BioMistral/BioInstructQA): Portuguese part
|
| 176 |
- RU: [RuMedBench](https://github.com/sb-ai-lab/MedBench)
|
| 177 |
|
| 178 |
+
|
| 179 |
+
โ
|
| 180 |
+
โ
|
| 181 |
+
|
| 182 |
+
|
| 183 |
</details>
|
| 184 |
|
| 185 |
+
|
| 186 |
## Results reproduction
|
| 187 |
<details><summary>Click to expand</summary>
|
| 188 |
|
| 189 |
+
|
| 190 |
+
We take Gemma-2b as example
|
| 191 |
1. Download Dataset for project:
|
| 192 |
|
| 193 |
```
|
| 194 |
+
bash 0.download_data.sh
|
| 195 |
```
|
| 196 |
|
| 197 |
+
2. Prepare test and dev for specific model:
|
| 198 |
|
| 199 |
|
| 200 |
+
- Create test data for with special token, you can use ./util/check.ipynb to check models' special tokens
|
| 201 |
|
| 202 |
```
|
| 203 |
bash 1.data_process_test&dev.sh
|
|
|
|
| 205 |
|
| 206 |
3. Prepare train data for specific model (Create tokenized data in advance):
|
| 207 |
|
|
|
|
|
|
|
| 208 |
|
| 209 |
+
- You can adjust data Training order and Training Epoch in this step
|
| 210 |
+
|
| 211 |
```
|
| 212 |
bash 2.data_process_train.sh
|
| 213 |
```
|
| 214 |
+
|
| 215 |
4. Train the model
|
| 216 |
|
| 217 |
+
|
| 218 |
+
- If you want to train in Multi Nodes please refer to ./scripts/multi_node_train_*.sh
|
| 219 |
+
|
| 220 |
+
|
| 221 |
|
| 222 |
|
| 223 |
```
|
| 224 |
+
bash 3.single_node_train_gemma.sh
|
| 225 |
```
|
| 226 |
|
| 227 |
|
|
|
|
| 231 |
bash 4.eval.sh
|
| 232 |
```
|
| 233 |
|
| 234 |
+
6. Evaluate your model: Play with your ckpts in bash
|
| 235 |
+
|
| 236 |
+
```
|
| 237 |
+
python ./src/evaluate/cli_demo.py --model_name='./ckpts/your/path/tfmr'
|
| 238 |
+
```
|
| 239 |
+
|
| 240 |
</details>
|
| 241 |
|
| 242 |
|