MedicalGPT is an open-source framework for fine-tuning large language models, with a dedicated focus on adapting general models to the medical domain. It provides a complete pipeline that covers continued pretraining on domain-specific corpora, supervised instruction tuning, tokenizer vocabulary extension with medical terminology, and alignment to clinician preferences through direct preference optimization, reinforcement learning, or knowledge distillation. The framework also supports training models to invoke external tools and functions in multi-turn clinical conversations.
The platform distinguishes itself by integrating multiple adaptation techniques into a single, configurable workflow. It handles multi-stage domain adaptation—chaining continued pretraining, supervised fine-tuning, preference alignment, and optional knowledge distillation—to inject specialized knowledge and then align model behavior. Beyond standard alignment methods, it offers adapter-based model merging, incremental pretraining with extended vocabularies, and a unified interface that supports over twenty open-source LLM families without requiring manual architecture adaptation.
In addition to core training capabilities, MedicalGPT includes utilities for dataset preparation, such as formatting multi-turn conversations, converting dataset formats, generating synthetic role-play dialogues, and compiling pretraining corpora. It provides inference tools like an interactive command-line chat session and a web-based demo interface for serving trained models.