Skip to content
Projects

Zeyi-Lin/Qwen3-Medical-SFT

View on GitHub

About

Qwen3 fine-tuning: Medical R1-style chat.

AI & Machine Learning

How these counts are measured

Measured star growth

in 24h
0
in 7 days
0
in 15 days
-1
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README_EN.md

Original

Qwen3 Fine-tuning in Practice: Medical R1 Inference-Style Chat

中文

To further reduce VRAM requirements, consider using Qwen3-0.6B or decreasing MAX_LENGTH.

Environment Setup

pip install -r requirements.txt

Data Preparation

Automatically handles dataset downloading, preprocessing, and validation set splitting. Generates train.jsonl and val.jsonl.

python data.py

Training

Full-parameter Fine-tuning

python train.py

LoRA Fine-tuning

python train_lora.py

SwanLab Training Logs:

Comparison shows full-parameter fine-tuning outperforms LoRA:

Inference

Full-parameter Fine-tuning

python inference.py

LoRA Fine-tuning

python inference_lora.py

Related Tools

  • SwanLab: Open-source, modern deep learning experiment tracking and visualization platform
  • Transformers: HuggingFace's library for state-of-the-art pretrained models
  • PEFT: Parameter-Efficient Fine-Tuning library for large language models

Explore related projects

Loading…