MS-SWIFT 빠른 시작 — CLI로 SFT와 추론
MS-SWIFT 빠른 시작
MS-SWIFT는 CLI 한 줄로 파인튜닝을 시작할 수 있어요. 공식 퀵 스타트는 설치부터 SFT 훈련, 추론까지를 짧게 이어 줍니다.
출처: https://github.com/modelscope/ms-swift/blob/main/docs/source/GetStarted/Quick-start.md
설치
pip install 'ms-swift[all]' -U
소스 설치는 git clone https://github.com/modelscope/ms-swift.git 후 pip install -e .이에요.
SFT 훈련(LoRA) 예
swift sft --model Qwen/Qwen2.5-7B-Instruct --dataset 'AI-ModelScope/alpaca-gpt4-data-zh#500' --tuner_type lora --output_dir output
추론 예
swift infer --adapters output/vx-xxx/checkpoint-xxx --infer_backend vllm
훈련 지표로 "10 minutes of self-cognition fine-tuning of Qwen2.5-7B-Instruct on a single 3090 GPU" 같은 실전 예시가 공식 문서에 소개돼요.