系统环境准备指南
PRAG要求Python 3.10.4环境,推荐通过Anaconda进行管理:
- 创建隔离环境:
conda create -n prag python=3.10.4
- Activate the environment:
conda activate prag
关键依赖安装
需要特别注意以下组件的版本兼容性:
- PyTorch 2.1.0:基础深度学习框架
- LoRA适配器:用于参数高效微调
- Transformers Library:支持主流LLM集成
完整安装命令:pip install torch==2.1.0 && pip install -r requirements.txt
路径配置要点
modificationssrc/root_dir_path.py
中的ROOT_DIR变量时需注意:
- 使用绝对路径避免权限问题
- 确保路径包含PRAG所有子目录
- Windows系统需注意反斜杠转义
验证安装成功的标准是能正常导入prag模块且无版本冲突警告。
This answer comes from the articlePRAG: Parameterized Retrieval Augmentation Generation Tool for Improving the Performance of Q&A SystemsThe