DoctorGLM  by xionghonglin

Chinese medical Q&A model based on ChatGLM-6B

Created 2 years ago
826 stars

Top 42.9% on SourcePulse

GitHubView on GitHub
Project Summary

DoctorGLM is a Chinese medical question-answering model fine-tuned from ChatGLM-6B. It targets medical professionals and researchers seeking a specialized conversational AI for healthcare inquiries, offering improved reliability and multi-turn dialogue capabilities.

How It Works

DoctorGLM leverages ChatGLM-6B as its base, fine-tuning it on a large corpus of Chinese medical dialogues and Q&A pairs across various departments. The project explores both LoRA and P-Tuning v2 methods for fine-tuning, with a recent emphasis on P-Tuning v2 for enhanced multi-turn dialogue and model reliability. Quantized versions (INT4, INT8) are available for reduced memory footprint, though the README notes current performance issues with quantization.

Quick Start & Requirements

  • Install: pip install deep_training cpm_kernels icetk transformers>=4.26.1 torch >=1.12.0
  • Prerequisites: Python 3.12+, CUDA >= 12 (recommended for GPU), >= 13GB VRAM for unquantized models. Initial run downloads ChatGLM-6B weights.
  • Resources: Quantized models require 6-8GB VRAM. Setup involves downloading weights and potentially running Jupyter notebooks for inference or Gradio deployment.
  • Links: Project Page, Arxiv, Online Demo

Highlighted Details

  • Fine-tuned on 1.9M Chinese medical Q&A pairs across multiple departments.
  • Supports multi-turn conversations using P-Tuning v2.
  • Offers Gradio-based deployment for easy online interaction and parameter tuning.
  • Includes comparison results against base ChatGLM, noting potential "repeating" issues.

Maintenance & Community

The project was last updated on April 18, 2023, with planned updates including referencing sources in dialogue and uploading to Hugging Face. No specific community channels (Discord/Slack) are listed.

Licensing & Compatibility

The project's licensing is not explicitly stated in the README. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

Quantized models (INT4/INT8) are noted to have significant performance issues. The project acknowledges "repeating" issues in generated responses based on initial tests. The README mentions that LoRA fine-tuning was abandoned due to dialogue capability loss.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
6 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), and
4 more.

ChatGLM-6B by zai-org

0.0%
41k
Bilingual dialogue language model for research
Created 2 years ago
Updated 1 year ago
Feedback? Help us improve.