Views
No views yet
1from transformers import AutoModelForCausalLM, AutoTokenizer
2model_id = "BiMediX/BiMediX-Eng"
3tokenizer = AutoTokenizer.from_pretrained(model_id)
4model = AutoModelForCausalLM.from_pretrained(model_id)
5text = "Hello BiMediX! I've been experiencing increased tiredness in the past week."
6inputs = tokenizer(text, return_tensors="pt")
7outputs = model.generate(**inputs, max_new_tokens=500)
8print(tokenizer.decode(outputs[0], skip_special_tokens=True))| Model | CKG | CBio | CMed | MedGen | ProMed | Ana | MedMCQA | MedQA | PubmedQA | AVG |
|---|---|---|---|---|---|---|---|---|---|---|
| PMC-LLaMA-13B | 63.0 | 59.7 | 52.6 | 70.0 | 64.3 | 61.5 | 50.5 | 47.2 | 75.6 | 60.5 |
| Med42-70B | 75.9 | 84.0 | 69.9 | 83.0 | 78.7 | 64.4 | 61.9 | 61.3 | 77.2 | 72.9 |
| Clinical Camel-70B | 69.8 | 79.2 | 67.0 | 69.0 | 71.3 | 62.2 | 47.0 | 53.4 | 74.3 | 65.9 |
| Meditron-70B | 72.3 | 82.5 | 62.8 | 77.8 | 77.9 | 62.7 | 65.1 | 60.7 | 80.0 | 71.3 |
| BiMediX | 78.9 | 86.1 | 68.2 | 85.0 | 80.5 | 74.1 | 62.7 | 62.8 | 80.2 | 75.4 |