퀵스타트(빠른 시작)
퀵스타트(빠른 시작)
EasyRAG의 매력은 데이터 다운로드나 사전 학습 없이도 바로 RAG를 체험할 수 있다는 점이에요. 웹 검색을 이용한 Rapid Prototyping부터 시작해 볼게요.
먼저 리포를 클론하고 의존성을 설치해요. PyTorch(CUDA 12.1), Faiss GPU, 나머지 요구사항을 순서대로 설치합니다.
# 1. Clone the repository
git clone https://github.com/ii-research/EasyRAG.git
cd EasyRAG
# 2. Install PyTorch with CUDA 12.1
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
# 3. Install Faiss GPU
pip install faiss-gpu-cu12==1.13.2
# 4. Install remaining dependencies
pip install -r requirements.txt
이제 데이터 다운로드 없이 웹 검색으로 바로 테스트할 수 있어요. 대화형 모드나 단일 쿼리, 그리고 Naive RAG vs Closed-book 비교까지 명령 하나로 실행할 수 있죠.
# Interactive mode
python web_demo/web_rag_demo.py --interactive --model t5base
# Single query
python web_demo/web_rag_demo.py --query "Who directed Parasite?" --mode naive_rag --model t5base
# Compare: Naive RAG vs. Closed-book (Direct)
python web_demo/web_rag_demo.py --query "Who directed Parasite?" --mode direct --model t5base
웹 대시보드 전체를 띄우려면 다음을 실행하고 http://localhost:8080으로 접속해요.
python -m web_demo.app
대시보드는 다섯 페이지로 나뉘어요. 파이프라인 상태와 실시간 손실 곡선을 보여주는 Dashboard, 체크포인트 평가를 하는 Evaluate, 훈련된 모델로 대화하는 Inference, 여러 알고리즘을 비교하는 Compare, 그리고 웹 검색으로 바로 테스트하는 Rapid Prototyping이에요.