BiMediX/BiMediX-Ara

Model

6

stars

12

commits

1

linked in READMEs

Feb 26, 2024

updated

conversational
endpoints_compatible
feature-extraction
medical
mixtral
safetensors
text-generation
text-generation-inference
transformers

README

Model Card for BiMediX-Bilingual

Model Details

  • Name: BiMediX
  • Version: 1.0
  • Type: Bilingual Medical Mixture of Experts Large Language Model (LLM)
  • Languages: Arabic
  • Model Architecture: Mixtral-8x7B-Instruct-v0.1
  • Training Data: BiMed1.3M-Arabic, an arabic dataset with diverse medical interactions.

Intended Use

  • Primary Use: Medical interactions in both English and Arabic.
  • Capabilities: MCQA, closed QA and chats.

Getting Started

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "BiMediX/BiMediX-Ara"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)

text = "مرحبًا بيميديكس! لقد كنت أعاني من التعب المتزايد في الأسبوع الماضي."
inputs = tokenizer(text, return_tensors="pt")

outputs = model.generate(**inputs, max_new_tokens=500)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Training Procedure

  • Dataset: BiMed1.3M-Arabic.
  • QLoRA Adaptation: Implements a low-rank adaptation technique, incorporating learnable low-rank adapter weights into the experts and the routing network. This results in training about 4% of the original parameters.
  • Training Resources: The model underwent training on the Arabic corpus.

Model Performance

ModelCKGCBioCMedMedGenProMedAnaMedMCQAMedQAPubmedQAAVG
Jais-30B52.150.740.549.039.343.037.028.874.646.1
BiMediX (Arabic)60.054.955.558.058.149.646.040.276.655.4
BiMediX (Bilingual)63.857.652.664.052.950.449.147.378.456.5

Safety and Ethical Considerations

  • Potential issues: hallucinations, toxicity, stereotypes.
  • Usage: Research purposes only.

Accessibility

Authors

Sara Pieri, Sahal Shaji Mullappilly, Fahad Shahbaz Khan, Rao Muhammad Anwer Salman Khan, Timothy Baldwin, Hisham Cholakkal
Mohamed Bin Zayed University of Artificial Intelligence (MBZUAI)

Contributors

HuggingSara

12 commits

BiMediX/BiMediX-Ara

Model

6

stars

12

commits

1

linked in READMEs

Feb 26, 2024

updated

conversational
endpoints_compatible
feature-extraction
medical
mixtral
safetensors
text-generation
text-generation-inference
transformers

README

Model Card for BiMediX-Bilingual

Model Details

  • Name: BiMediX
  • Version: 1.0
  • Type: Bilingual Medical Mixture of Experts Large Language Model (LLM)
  • Languages: Arabic
  • Model Architecture: Mixtral-8x7B-Instruct-v0.1
  • Training Data: BiMed1.3M-Arabic, an arabic dataset with diverse medical interactions.

Intended Use

  • Primary Use: Medical interactions in both English and Arabic.
  • Capabilities: MCQA, closed QA and chats.

Getting Started

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "BiMediX/BiMediX-Ara"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)

text = "مرحبًا بيميديكس! لقد كنت أعاني من التعب المتزايد في الأسبوع الماضي."
inputs = tokenizer(text, return_tensors="pt")

outputs = model.generate(**inputs, max_new_tokens=500)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Training Procedure

  • Dataset: BiMed1.3M-Arabic.
  • QLoRA Adaptation: Implements a low-rank adaptation technique, incorporating learnable low-rank adapter weights into the experts and the routing network. This results in training about 4% of the original parameters.
  • Training Resources: The model underwent training on the Arabic corpus.

Model Performance

ModelCKGCBioCMedMedGenProMedAnaMedMCQAMedQAPubmedQAAVG
Jais-30B52.150.740.549.039.343.037.028.874.646.1
BiMediX (Arabic)60.054.955.558.058.149.646.040.276.655.4
BiMediX (Bilingual)63.857.652.664.052.950.449.147.378.456.5

Safety and Ethical Considerations

  • Potential issues: hallucinations, toxicity, stereotypes.
  • Usage: Research purposes only.

Accessibility

Authors

Sara Pieri, Sahal Shaji Mullappilly, Fahad Shahbaz Khan, Rao Muhammad Anwer Salman Khan, Timothy Baldwin, Hisham Cholakkal
Mohamed Bin Zayed University of Artificial Intelligence (MBZUAI)

Contributors

HuggingSara

12 commits