Abstract
Med42-v2 introduces a suite of clinical large language models (LLMs) designed to address the limitations of generic models in healthcare settings. These models are built on Llama3 architecture and fine-tuned using specialized clinical data. They underwent multi-stage preference alignment to effectively respond to natural prompts. While generic models are often preference-aligned to avoid answering clinical queries as a precaution, Med42-v2 is specifically trained to overcome this limitation, enabling its use in clinical settings. Med42-v2 models demonstrate superior performance compared to the original Llama3 models in both 8B and 70B parameter configurations and GPT-4 across various medical benchmarks. These LLMs are developed to understand clinical queries, perform reasoning tasks, and provide valuable assistance in clinical environments. The models are now publicly available at https://huggingface.co/m42-health.
Introduction
Generic Large Language Models (LLMs), while powerful, often struggle in healthcare settings. They frequently lack the deep, domain-specific knowledge required to navigate complex medical terminology and clinical reasoning. Furthermore, generic models are often "over-aligned" for safety; to mitigate the risk of providing medical advice, they are frequently tuned to refuse clinical queries entirely or provide vague, unhelpful responses.
Med42-v2 aims to bridge this gap by creating a model that is both medically "smart" (possessing deep clinical knowledge) and "willing" (specifically trained to engage with clinical tasks rather than defaulting to a refusal). Built on the Llama 3 and 3.1 architectures, this suite consistently outperforms general-purpose models like GPT-4 on medical benchmarks.
Methodology
The development of Med42-v2 followed a rigorous two-stage training pipeline designed to transition from a base model to a specialized clinical assistant.
- Instruction Fine-tuning (SFT): The researchers started with base Llama 3 and 3.1 models (8B and 70B versions). They fine-tuned these using a curated dataset of nearly 1 million medical samples. This stage focused on teaching the model clinical terminology, chain-of-thought reasoning, and conversational medical interactions.
- Preference Alignment via DPO: This is the core of the Med42-v2 "secret sauce." Instead of standard Reinforcement Learning from Human Feedback (RLHF), which can be unstable, the team used Direct Preference Optimization (DPO). They employed an iterative, three-stage process using AI feedback to align the model's outputs with clinical expectations.
As shown in the model overview, while the original Med42-Llama2-70B was fine-tuned but not aligned, the newer Llama 3 and 3.1 iterations incorporate full alignment. This stage was specifically designed to "un-train" the model's tendency to refuse medical questions, encouraging it to provide detailed, reasoned clinical assistance without sacrificing safety standards.
Datasets and Evaluation
The training utilized a massive hybrid dataset comprising approximately 1.3 million samples:
- Medical Domain (73.5%): ~953,000 samples from sources like MedMCQA, PubMedQA, USMLE-style questions (MedQA), and specialized medical instruction sets.
- General Domain (26.5%): ~344,000 samples from datasets like SlimOrca and UltraChat to ensure the model retained general linguistic fluidity and reasoning capabilities.
By maintaining a significant portion of general domain data, the researchers avoided "catastrophic forgetting," ensuring the model remains a capable conversationalist while becoming a medical expert.
Key Results
Med42-v2 demonstrates state-of-the-art performance for open-weights medical models, frequently surpassing proprietary giants.
Key performance highlights include:
- Beating the Giants: The Med42-Llama3.1-70B model achieved an average score of 81.2% across all benchmarks, outperforming GPT-4 (78.9%) and the original Llama 3.1-70B-Instruct (80.5%).
- USMLE Excellence: On the USMLE (medical licensing exam) benchmark, the 70B model reached a staggering 94.5% accuracy, significantly higher than GPT-4's 84.1%.
- Scaling Efficiency: Even the smaller 8B version of Med42-v2 (68.1% average) outperformed several much larger models, such as Gemma-2-27B (65.0%) and Mixtral-8x7B (64.1%), demonstrating that domain-specific tuning can punch well above its weight class.
Discussion and Limitations
One of the most significant insights from this work is that the "safety refusals" seen in general-purpose models are alignment choices rather than hard-coded limitations. Med42-v2 proves that targeted preference alignment can make a model helpful in a specialized domain without making it "unsafe."
However, several caveats remain. Current evaluations are primarily based on closed-ended, multiple-choice benchmarks. Real-world clinical work involves open-ended reasoning, which is more difficult to quantify. Furthermore, like all LLMs, Med42-v2 is not entirely immune to hallucinations. It is intended as a clinical assistant to support professional judgment, not as a replacement for it. Future work will focus on evaluating the model's utility in real-world clinical workflows and high-stakes environments.
Summary updated