Henrychur/MMedC

Dataset

36

stars

18

commits

3

linked in READMEs

Jul 25, 2024

updated

medical
Browse cluster: Medical Language Models and Benchmarking β†’

README

MMedC

πŸ’»Github Repo πŸ–¨οΈarXiv Paper

The official pre-training dataset for "Towards Building Multilingual Language Model for Medicine".

News

  • We add Arabic and German corpus to MMedC.

Introduction

This repo contains MMedC, a multilingual medical corpus with 25.5 billion tokens.

LanguageFamilyFiltering ContentTextbooksWebsitesSmall-scale DatasetTotAmt
EnglishIndo-European6.564.000.000.0010.56
SpanishIndo-European3.980.310.050.024.35
FrenchIndo-European1.900.020.000.172.10
RussianIndo-European1.290.400.000.001.69
ChineseSino-Tibetan3.341.210.000.194.74
JapanesesSino-Tibetan1.930.000.100.012.05
ArabicAfro-Asiatic0.640.000.000.000.64
GermanIndo-European1.540.000.000.001.54
  • English Textbooks is not included in this repo due to copyright issues. For this part of 4B English corpus, please refer to PMC-LLaMA

You can download the MMedC.zip file to access all the data. The data are saved in txt format, and the zip file contains four folders corresponding to four types of data sources: filtering content, medical websites, medical textbooks, and small-scale datasets. Please refer to our paper for details.

You can use the following method to obtain the paths to all txt files in the directory. Afterward, you can read these txt files and customize subsequent operations.

import os
txt_root = "PATH/TO/MMEDC"
txt_paths = []
for root, dirs, files in os.walk(txt_root):
    if 'cultural_filtered_data_used' not in root:
        for file in files:
            if file.endswith('.txt'):
                txt_paths.append(os.path.join(root, file))

Our GitHub provides a data collection pipeline as well as our data preprocessing code.

News

[2024.2.21] Our pre-print paper is released ArXiv. Dive into our findings here.

[2024.2.20] We release MMedLM and MMedLM 2. With an auto-regressive continues training on MMedC, these models achieves superior performance compared to all other open-source models, even rivaling GPT-4 on MMedBench.

[2023.2.20] We release MMedC, a multilingual medical corpus containing 25.5B tokens.

[2023.2.20] We release MMedBench, a new multilingual medical multi-choice question-answering benchmark with rationale. Check out the leaderboard here.

Evaluation on MMedBench

The further pretrained MMedLM 2 showcast it's great performance in medical domain across different language.

MethodSizeYearMMedCMMedBenchEnglishChineseJapaneseFrenchRussianSpanishAvg.
GPT-3.5-2022.12βœ—βœ—56.8852.2934.6332.4866.3666.0651.47
GPT-4-2023.3βœ—βœ—78.0075.0772.9156.5983.6285.6774.27
Gemini-1.0 pro-2024.1βœ—βœ—53.7360.1944.2229.9073.4469.6955.20
BLOOMZ7B2023.5βœ—trainset43.2858.0632.6626.3762.8947.3445.10
InternLM7B2023.7βœ—trainset44.0764.6237.1924.9258.2044.9745.67
Llama\ 27B2023.7βœ—trainset43.3650.2925.1320.9066.8047.1042.26
MedAlpaca7B2023.3βœ—trainset46.7444.8029.6421.0659.3845.0041.11
ChatDoctor7B2023.4βœ—trainset43.5243.2625.6318.8162.5043.4439.53
PMC-LLaMA7B2023.4βœ—trainset47.5342.4424.1220.7462.1143.2940.04
Mistral7B2023.10βœ—trainset61.7471.1044.7248.7174.2263.8660.73
InternLM\ 27B2024.2βœ—trainset57.2777.5547.7441.0068.3659.5958.59
MMedLM~(Ours)7B-βœ—trainset49.8870.4946.2336.6672.2754.5255.01
MMedLM\ 2~(Ours)7B-βœ—trainset61.7480.0161.8152.0980.4767.6567.30
  • GPT and Gemini is evluated under zero-shot setting through API
  • Open-source models first undergo training on the trainset of MMedBench before evaluate.

Contact

If you have any question, please feel free to contact qiupengcheng@pjlab.org.cn.

Citation

@misc{qiu2024building,
      title={Towards Building Multilingual Language Model for Medicine}, 
      author={Pengcheng Qiu and Chaoyi Wu and Xiaoman Zhang and Weixiong Lin and Haicheng Wang and Ya Zhang and Yanfeng Wang and Weidi Xie},
      year={2024},
      eprint={2402.13963},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

Contributors

Henrychur

18 commits

Henrychur/MMedC

Dataset

36

stars

18

commits

3

linked in READMEs

Jul 25, 2024

updated

medical
Browse cluster: Medical Language Models and Benchmarking β†’

README

MMedC

πŸ’»Github Repo πŸ–¨οΈarXiv Paper

The official pre-training dataset for "Towards Building Multilingual Language Model for Medicine".

News

  • We add Arabic and German corpus to MMedC.

Introduction

This repo contains MMedC, a multilingual medical corpus with 25.5 billion tokens.

LanguageFamilyFiltering ContentTextbooksWebsitesSmall-scale DatasetTotAmt
EnglishIndo-European6.564.000.000.0010.56
SpanishIndo-European3.980.310.050.024.35
FrenchIndo-European1.900.020.000.172.10
RussianIndo-European1.290.400.000.001.69
ChineseSino-Tibetan3.341.210.000.194.74
JapanesesSino-Tibetan1.930.000.100.012.05
ArabicAfro-Asiatic0.640.000.000.000.64
GermanIndo-European1.540.000.000.001.54
  • English Textbooks is not included in this repo due to copyright issues. For this part of 4B English corpus, please refer to PMC-LLaMA

You can download the MMedC.zip file to access all the data. The data are saved in txt format, and the zip file contains four folders corresponding to four types of data sources: filtering content, medical websites, medical textbooks, and small-scale datasets. Please refer to our paper for details.

You can use the following method to obtain the paths to all txt files in the directory. Afterward, you can read these txt files and customize subsequent operations.

import os
txt_root = "PATH/TO/MMEDC"
txt_paths = []
for root, dirs, files in os.walk(txt_root):
    if 'cultural_filtered_data_used' not in root:
        for file in files:
            if file.endswith('.txt'):
                txt_paths.append(os.path.join(root, file))

Our GitHub provides a data collection pipeline as well as our data preprocessing code.

News

[2024.2.21] Our pre-print paper is released ArXiv. Dive into our findings here.

[2024.2.20] We release MMedLM and MMedLM 2. With an auto-regressive continues training on MMedC, these models achieves superior performance compared to all other open-source models, even rivaling GPT-4 on MMedBench.

[2023.2.20] We release MMedC, a multilingual medical corpus containing 25.5B tokens.

[2023.2.20] We release MMedBench, a new multilingual medical multi-choice question-answering benchmark with rationale. Check out the leaderboard here.

Evaluation on MMedBench

The further pretrained MMedLM 2 showcast it's great performance in medical domain across different language.

MethodSizeYearMMedCMMedBenchEnglishChineseJapaneseFrenchRussianSpanishAvg.
GPT-3.5-2022.12βœ—βœ—56.8852.2934.6332.4866.3666.0651.47
GPT-4-2023.3βœ—βœ—78.0075.0772.9156.5983.6285.6774.27
Gemini-1.0 pro-2024.1βœ—βœ—53.7360.1944.2229.9073.4469.6955.20
BLOOMZ7B2023.5βœ—trainset43.2858.0632.6626.3762.8947.3445.10
InternLM7B2023.7βœ—trainset44.0764.6237.1924.9258.2044.9745.67
Llama\ 27B2023.7βœ—trainset43.3650.2925.1320.9066.8047.1042.26
MedAlpaca7B2023.3βœ—trainset46.7444.8029.6421.0659.3845.0041.11
ChatDoctor7B2023.4βœ—trainset43.5243.2625.6318.8162.5043.4439.53
PMC-LLaMA7B2023.4βœ—trainset47.5342.4424.1220.7462.1143.2940.04
Mistral7B2023.10βœ—trainset61.7471.1044.7248.7174.2263.8660.73
InternLM\ 27B2024.2βœ—trainset57.2777.5547.7441.0068.3659.5958.59
MMedLM~(Ours)7B-βœ—trainset49.8870.4946.2336.6672.2754.5255.01
MMedLM\ 2~(Ours)7B-βœ—trainset61.7480.0161.8152.0980.4767.6567.30
  • GPT and Gemini is evluated under zero-shot setting through API
  • Open-source models first undergo training on the trainset of MMedBench before evaluate.

Contact

If you have any question, please feel free to contact qiupengcheng@pjlab.org.cn.

Citation

@misc{qiu2024building,
      title={Towards Building Multilingual Language Model for Medicine}, 
      author={Pengcheng Qiu and Chaoyi Wu and Xiaoman Zhang and Weixiong Lin and Haicheng Wang and Ya Zhang and Yanfeng Wang and Weidi Xie},
      year={2024},
      eprint={2402.13963},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

Contributors

Henrychur

18 commits