Fine-tuning script for medical QA ChatGLM models
Top 84.6% on sourcepulse
This project provides fine-tuned versions of the ChatGLM model for medical question answering, targeting researchers and developers in the medical AI domain. It offers several fine-tuning methods (LoRA, P-Tuning V2, Freeze) on medical dialogue datasets, enabling improved performance on medical Q&A tasks.
How It Works
The project fine-tunes the ChatGLM-6B base model using various parameter-efficient fine-tuning techniques like LoRA, P-Tuning V2, and Freeze. It leverages the cMedQA2 dataset, which includes real medical dialogues, to adapt the model for medical contexts. This approach allows for significant performance gains with reduced computational resources compared to full model fine-tuning.
Quick Start & Requirements
pip install -r requirements.txt
CUDA_VISIBLE_DEVICES=0 python MedQA-ChatGLM/finetune.py --do_train --dataset merged-cMedQA --finetuning_type lora --output_dir ./med-lora ...
web_demo.py
) or command line (infer.py
).docs/参数详解.md
.Highlighted Details
Maintenance & Community
The project references several related GitHub repositories, indicating community engagement and shared development in the medical LLM space. No specific community channels (Discord/Slack) or active maintainer information is provided in the README.
Licensing & Compatibility
The project explicitly states: "本项目相关资源仅供学术研究之用,严禁用于商业用途." (These resources are for academic research only and strictly prohibited for commercial use.) It also notes adherence to third-party code licenses.
Limitations & Caveats
The project is strictly for academic research and prohibits commercial use. The generated medical content is not guaranteed for accuracy and should not be used for actual medical diagnosis. The dataset is largely model-generated.
1 year ago
1 day