Projects
View on GitHub
Zeyi-Lin/Qwen3-Medical-SFT
About
Qwen3 fine-tuning: Medical R1-style chat.
AI & Machine LearningMeasured 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
OriginalQwen3 Fine-tuning in Practice: Medical R1 Inference-Style Chat
- Base Model: Qwen3-1.7B
- Fine-tuned Model: Qwen3-1.7b-Medical-R1-sft
- Dataset: delicate_medical_r1_data
- SwanLab:qwen3-sft-medical
- Fine-tuning Methods: Full-parameter Fine-tuning, LoRA Fine-tuning
- Inference Style: R1 Reasoning Style
- Hardware Requirements:
- Full-parameter Fine-tuning: 32GB VRAM
- LoRA Fine-tuning: 28GB VRAM
- Tutorial: Hands-on Guide for Qwen3 LLM Fine-tuning (Complete Code)
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
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…