Topic. Huggingface 에 등록된 LLM 을 Base 모델로 하여 미세조정(Fine-tuning) 하기 위한 환경설정 내용을 공유합니다.
* 파이썬 설치는 아래 링크에서
1. Hardware Information
OS : Linux Ubuntu 18.04.6 LTS (Windows11 WSL)
CPU : AMD Ryzen 9 7950X3D 16-Core Processor
GPU : NVIDIA GeForce RTX 4090 24GB
RAM : 128GB
2. Lib Version Information (Linux Ubuntu)
lib_name | version | etc |
python | 3.10.13 | conda env |
pytorch | 2.0 | conda |
torchvision | 0.15.0 | conda |
torchaudio | 2.0.0 | conda |
pytorch-cuda | 11.8 | conda |
accelerate | 0.25.0 | pip |
transformers | latest | conda |
peft | 0.7.0 | pip |
datasets | 2.12.0 | pip install -U datasets |
bitsandbytes | 0.41.3.post2 | pip |
scipy |
1.11.4 | conda |
sentencepiece | 0.1.99 | conda |
protobuf | 3.20.3 | conda |
conda install -y pytorch==2.0.0 torchvision==0.15.0 torchaudio==2.0.0 pytorch-cuda=11.8 -c pytorch -c nvidia
conda install -y transformers==4.37.2 scipy==1.11.4 sentencepiece==0.1.99 protobuf==3.20.3
pip install -U datasets
pip install bitsandbytes accelerate==0.25.0 peft==0.7.0
# torch 2.2.0, cuda 12.1
conda install pytorch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 pytorch-cuda=12.1 -c pytorch -c nvidia
# 최신버전
conda install -y pytorch torchvision torchaudio pytorch-cuda -c pytorch -c nvidia
conda install -y transformers scipy sentencepiece protobuf
pip install -U datasets
pip install bitsandbytes accelerate peft==0.9.0 trl tensorboardX
# DeepSpeed
conda install -c nvidia cuda-compiler
pip install -U triton
pip install deepspeed
# windows
pip install torch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 --index-url https://download.pytorch.org/whl/cu121
# 한번에 설치
conda install -y pytorch torchvision torchaudio pytorch-cuda -c pytorch -c nvidia
conda install -y transformers scipy sentencepiece protobuf psycopg2
pip install -U datasets
pip install bitsandbytes accelerate peft==0.9.0 trl tensorboardX flask waitress flask_socketio flask_cors google.generativeai bardapi elasticsearch gluonts lightning chardet matplotlib orjson gliner
pip install openai
* 설치시 오류가 나고 잘 안된다면 아래 게시글을 참고해보세요.
'A.I.(인공지능) & M.L.(머신러닝) > Development Environments' 카테고리의 다른 글
[실습] WSL 환경 CUDA 설치 (0) | 2024.03.07 |
---|---|
[실습] Model Fine-tuning 환경설정시 시행착오(Linux Ubuntu) (1) | 2024.01.11 |
[실습] GPU CUDA 사용 설정 (0) | 2023.12.14 |
[실습] windows10 이상에서 WSL 환경 (0) | 2023.12.13 |
Python 설치 및 가상 환경(conda evn) (0) | 2023.08.15 |