系统环境准备指南
PRAG要求Python 3.10.4环境,推荐通过Anaconda进行管理:
- Crie um ambiente isolado:
conda create -n prag python=3.10.4
- Ativar o ambiente:
conda activate prag
关键依赖安装
需要特别注意以下组件的版本兼容性:
- PyTorch 2.1.0:基础深度学习框架
- LoRA适配器:用于参数高效微调
- Transformers库:支持主流LLM集成
完整安装命令:pip install torch==2.1.0 && pip install -r requirements.txt
路径配置要点
modificaçõessrc/root_dir_path.py
中的ROOT_DIR变量时需注意:
- 使用绝对路径避免权限问题
- 确保路径包含PRAG所有子目录
- Windows系统需注意反斜杠转义
验证安装成功的标准是能正常导入prag模块且无版本冲突警告。
Essa resposta foi extraída do artigoPRAG: Parametric Retrieval Augmentation Generation Tool for Improving the Performance of Q&A Systems (Ferramenta de geração de aumento de recuperação paramétrica para melhorar o desempenho dos sistemas de perguntas e respostas)O