Literature · BioMistral
BioMistral-7B-SLERP
A medical language model merging BioMistral-7B and Mistral-7B-Instruct using spherical linear interpolation.
What BioMistral-7B-SLERP is
BioMistral-7B-SLERP is a medical large language model developed by the BioMistral team. It is built by merging BioMistral-7B, an open-source model further pre-trained on textual data from PubMed Central Open Access, with Mistral-7B-Instruct-v0.1.
The model addresses the challenge of adapting general-purpose language models to health and life science contexts. By combining biomedical domain adaptation with instruction-following capabilities, it aims to retain specialized scientific understanding alongside conversational proficiency.
Evaluated across a benchmark of 10 established English medical question-answering tasks, BioMistral-7B-SLERP achieved an average accuracy of 58.8%, surpassing both base BioMistral-7B and Mistral-7B-Instruct. However, it is released strictly for research purposes and is not validated for real-world clinical deployment.
How it works
BioMistral-7B-SLERP is constructed using mergekit via spherical linear interpolation (SLERP), a technique that geometrically blends weights between two models across high-dimensional parameter spaces. The merge uses mistralai/Mistral-7B-Instruct-v0.1 as the base model and combines it across all 32 layers with BioMistral-7B, which itself was further pre-trained on the Jean Zay French high-performance computing cluster using PubMed Central articles.
The interpolation parameters apply different blending weights (t) across model components: self-attention layers use values of [0, 0.5, 0.3, 0.7, 1], multilayer perceptron (MLP) blocks use [1, 0.5, 0.7, 0.3, 0], and other parameters default to 0.5. The merged weights are saved in bfloat16 format with a sequence length of 2048.
Key facts
- Model type
- Merged language model (SLERP)
- Base models
- BioMistral/BioMistral-7B and mistralai/Mistral-7B-Instruct-v0.1
- Sequence length
- 2048
- Precision
- bfloat16
- Training data for pre-trained component
- PubMed Central Open Access (CC0, CC BY, CC BY-SA, CC BY-ND)
- Compute infrastructure
- CNRS Jean Zay supercomputer
- Input format
- Text
- Output format
- Text
What you can use it for
- Medical question answering
- Evaluating and generating answers to multiple-choice and open questions across biomedical and clinical domains such as MedQA, MedMCQA, and PubMedQA.
- Biomedical research evaluation
- Serving as a research benchmark to study the efficacy of spherical linear interpolation for combining domain-adapted medical models with instruction-tuned models.
- Multilingual medical NLP research
- Exploring cross-lingual transfer and performance across medical benchmarks translated into languages including French, Spanish, Italian, Polish, Dutch, and German.
Run it here
We list this model but cannot run it yet: its test run took 121 s, too close to the limit of a single run; it waits for the long-job path.
Everything on this page still applies. Running it needs a loader for this repository, not a bigger machine.
Strengths and limits
Good at
- Attains a 58.8% average 3-shot accuracy across 10 medical question-answering benchmarks, outperforming both standalone BioMistral-7B (57.3%) and Mistral-7B-Instruct (55.9%).
- Outperforms other open medical 7B baselines including MedAlpaca 7B (51.5%), BioMedGPT-LM-7B (49.7%), MediTron-7B (42.7%), and PMC-LLaMA 7B (30.4%).
- Requires no additional pre-training compute to create, utilising geometric model merging via mergekit.
- Achieves top-tier performance on the PubMedQA benchmark (77.8% accuracy).
Watch out for
- For research use only: it is not a medical device and must not be used for diagnosis, treatment or any clinical decision.
- Not evaluated or approved for clinical practice, professional medical decision-making, or real-world patient care.
- May contain unassessed biases, inaccuracies, or safety risks inherent to generative language models.
- Lags behind proprietary general-purpose baselines such as GPT-3.5 Turbo across benchmark medical question-answering tasks.
Inputs and outputs
You provide
Prompt
The model continues from here.
You get back
The model's completion.
Licence
Check the licence before commercial use · apache-2.0
The apache-2.0 licence carries terms worth reading before you depend on it.
Questions
Can I use BioMistral-7B-SLERP commercially?
Check the licence before commercial use. The apache-2.0 licence carries terms worth reading before you depend on it.
What is the difference between BioMistral-7B and BioMistral-7B-SLERP?
BioMistral-7B is a Mistral model further pre-trained directly on PubMed Central text. BioMistral-7B-SLERP is a hybrid model created by mathematically merging BioMistral-7B with Mistral-7B-Instruct-v0.1 using spherical linear interpolation.
Can this model be used to provide medical advice to patients?
No. The model is advised strictly for research purposes and has not undergone randomized controlled trials or safety evaluations in clinical settings.
Are quantized versions of BioMistral-7B-SLERP available?
Yes. An AWQ 4-bit GEMM quantized version with a group size of 128 is available, requiring approximately 4.68 GB of VRAM.
What sequence length does BioMistral-7B-SLERP support?
The model operates with a sequence length of 2048 tokens.
How to cite it
Labrak, Y., Bazoge, A., Morin, E., Gourraud, P.-A., Rouvier, M., & Dufour, R. (2024). BioMistral: A Collection of Open-Source Pretrained Large Language Models for Medical Domains. arXiv preprint arXiv:2402.10373.
Written from BioMistral-7B-SLERP's own documentation (model card). Statements citing a figure that does not appear there are removed before publication. Licence and running details come from our registry.
