多环境适配指南
HippoRAG通过统一接口设计支持灵活切换推理后端,主要操作如下:
- 云端OpenAI服务::
- set up
export OPENAI_API_KEY=sk-xxx
- 初始化时指定
llm_model_name='gpt-4o-mini'
- set up
- 本地vLLM部署::
- Starting services
vllm serve meta-llama/Llama-3.3-70B-Instruct
- configure
llm_base_url='http://localhost:8000/v1'
- Starting services
- hybrid model: By
--llm_name
cap (a poem)--llm_base_url
参数动态选择
关键调试技巧::
- 测试连接性:运行
hipporag.check_llm_connection()
- 性能调优:
- OpenAI模型建议添加
--max_tokens 512
限制响应长度 - vLLM模型调整
--gpu-memory-utilization 0.9
提高吞吐量
- OpenAI模型建议添加
This answer comes from the articleHippoRAG: A multi-hop knowledge retrieval framework based on long term memoryThe