MedicalGPT provides a Python-based pipeline for training medical domain LLMs, including pretraining, supervised finetuning, RLHF components, DPO, ORPO, and standalone OPD, with release notes detailing new training entrypoints and data handling.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).
What it is
MedicalGPT: Training Medical GPT Model. Training pipeline implementing Incremental Pretraining (PT), Supervised Finetuning (SFT), RLHF (Reward Modeling and Reinforcement Learning), DPO, ORPO, and standalone OPD On-Policy Distillation.
How it works
The project organizes training into stages:
- PT: Continue Pretraining on domain data (optional)
- SFT: Supervised Finetuning with instruction fine-tuning data
- RLHF: Reward Modeling and Reinforcement Learning using a reward model to guide training
- DPO: Direct Preference Optimization
- ORPO: Value-based preference optimization without reference model
- OPD: On-Policy Distillation
Training is structured under training/ with scripts for each stage (pretraining.py, supervised_finetuning.py, opd_training.py, dpo_training.py, orpo_training.py, grpo_training.py). The project includes scripts/* for one-click runs and a demo/ folder for inference examples.
Getting started
Install and setup:
git clone https://github.com/shibing624/MedicalGPT
cd MedicalGPT
pip install -r requirements.txt --upgrade
Recent releases
Latest release 2.7.0 (2026-04-20):
- 支持独立 OPD(On-Policy Distillation) 蒸馏训练
- 新增 training/opd_training.py 训练入口,基于 TRL GKDTrainer 实现 student/teacher 蒸馏
- 新增 scripts/run_opd.sh 启动脚本,可直接复用现有 ShareGPT/SFT 数据格式
- 补充 README 与训练参
2.6.0 (2026-04-14):
- 支持 Agent 调用/Function Call 微调训练,工具数据格式转换/解析
2.5.0 (2026-04-07):
- 全流程适配 Qwen3/Qwen3.5,PT/SFT/DPO/ORPO/GRPO 全流程
2.4.0 (2025-02-17):
- 新增 GRPO 训练方法
- 支持 DeepSeek-V3, DeepSeek-R1
2.3.0 (2024-09-21):
- 支持 Qwen-2.5 系列模型
2.2.0 (2024-08-02):
- 支持角色扮演模型训练,新增医患对话 SFT 数据脚本 role_play_data
这些条目以 Release 注释形式列出,链接见 README 的对应版本
Traction
Stars: 5680 Forks: 779 Open issues: 6
Behind the repo
Not provided in the facts block. (Omitted)
Caveats
License: Apache-2.0 Language: Python Created: 2023-06-02 Last push: 2026-06-03






