Practical overview
When it fits
Use it when you intend to run model training or fine-tuning yourself and need a code-based pipeline for medical-domain adaptation.
Who it is for
- Developers adapting GPT-style models to medical-domain data.
- Research teams exploring fine-tuning and alignment workflows for domain language models.
Documented uses
- Continue pretraining a base model on medical-domain documents.
- Supervise fine-tune a model for a medical-domain task.
- Apply preference-optimization approaches such as RLHF, DPO, ORPO or GRPO.
Requirements & limits
The repository is public and identifies its license as Apache-2.0.
- It is a training framework, not a documented hosted inference API.
- The stated pipeline includes optional continued pretraining, supervised fine-tuning and several preference-optimization methods.
- Model-family and method support should be checked against the current repository instructions for the intended workflow.
- The user must arrange suitable training data and computing resources.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install MedicalGPT dependencies
Clone the repository and install or update its Python dependencies.
Before you start
- Git and pip are available.
- The README badge indicates Python 3.8 or later.
Steps
Clone the MedicalGPT repository: the command below.
git clone https://github.com/shibing624/MedicalGPTChange into the repository directory:
cd MedicalGPT.Install or update the listed dependencies: the command below.
pip install -r requirements.txt --upgrade
Expected outcome
The repository is cloned locally and dependencies from requirements.txt are installed or upgraded.
Guide limitations
- This covers dependency setup only, not training or inference.
- The README notes that requirements.txt may change over time.
- The README lists estimated GPU memory needs that vary by model size, training method, and precision.
Run interactive inference with a base model and optional LoRA adapter
Start interactive text generation using the repository's inference script.
Before you start
- A Hugging Face-format base-model directory containing model weights and configuration.
- A compatible tokenizer directory; by default, the tokenizer path is the same as the base-model path.
- For adapter-based inference, a LoRA directory or a Hugging Face Model Hub model name; omit it if LoRA weights are already merged into the base model.
- The repository dependencies are installed.
Steps
From the repository directory, set
CUDA_VISIBLE_DEVICES=0and run the command below with--base_modelset to the base-model directory.python demo/inference.pyOptionally provide
--lora_modelwith the LoRA directory or Hub model name.Add
--interactiveto start multi-turn streaming inference.
Expected outcome
The script starts interactive, multi-turn text generation with the specified base model and optional LoRA adapter.
Guide limitations
- The example selects GPU 0; the README separately documents
--only_cpuand--gpusoptions. - The README describes model and tokenizer paths in Hugging Face format.
- This recipe does not establish a hosted API or guarantee output quality.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 7 October 2026
- Original website title
- shibing624/MedicalGPT · Official homepage title · retained in its source language

