LLM之RAG实战(四十四)| rag-chatbot:支持Huggingface和Ollama任意模型的多PDF本地RAG方案

特点:

  • 支持本地运行和Kaggle (new)运行
  • 支持HuggingfaceOllama 的任意模型
  • Process multiple PDF inputs.
  • Chat with multiples languages (Coming soon).
  • Simple UI with Gradio.

一、安装使用

1.1 Kaggle(推荐)

Step1:把https://github.com/datvodinh/rag-chatbot/blob/main/notebooks/kaggle.ipynb脚本导入到Kaggle。

Step2:把<YOUR_NGROK_TOKEN>替换为自己的token。

1.2 本地安装

a)克隆项目

复制代码
git clone https://github.com/datvodinh/rag-chatbot.gitcd rag-chatbot

b)安装

Docker方式

复制代码
docker compose up --build

脚本方式(Ollama, Ngrok, python package)

复制代码
source ./scripts/install_extra.sh

手动安装

Step1:Ollama
Step2:Ngrok

Step3:安装rag_chatbot包

复制代码
source ./scripts/install.sh

c)启动

复制代码
source ./scripts/run.sh

或者

复制代码
python -m rag_chatbot --host localhost

使用Ngrok

复制代码
source ./scripts/run.sh --ngrok

此时,会下载大模型

大模型的配置文件:https://github.com/datvodinh/rag-chatbot/blob/main/rag_chatbot/setting/setting.py

LLM默认是:llama3:8b-instruct-q8_0

Embedding模型默认是:BAAI/bge-large-en-v1.5

此时,登录http://0.0.0.0:7860即可访问:

参考文献:

1\] https://github.com/datvodinh/rag-chatbot

相关推荐
大拿爱科技几秒前
低清视频修复怎么接入批处理?AI画质增强流程拆解
人工智能·自动化·aigc·音视频
zyk_computer2 分钟前
AI 时代,或许 Rust 比 Python 更合适
人工智能·后端·python·ai·rust·ai编程·vibe coding
m0_6346667310 分钟前
OpenDeepThink:让大模型不再只沿着一条思路硬想
人工智能·深度学习·机器学习
Wilber的技术分享16 分钟前
【大模型面试八股 3】大模型微调技术:LoRA、QLoRA等
人工智能·深度学习·面试·lora·peft·qlora·大模型微调
kaixuan_dashen18 分钟前
Codex使用DeepSeek API的方法(cc switch + codex bridge方案)
人工智能·codex·deepseek·cc switch·codex bridge
threelab34 分钟前
Three.js 初中数学函数可视化 | 三维可视化 / AI 提示词
开发语言·前端·javascript·人工智能·3d·着色器
咖啡里的茶i1 小时前
视觉显著目标的自适应分割与动态网格生成算法研究
人工智能·算法·目标跟踪
怪祝浙1 小时前
AI实战之RAG知识库构建和私有化agent设计
人工智能
weelinking1 小时前
【企业级】企业级大模型合规实战:数据安全与跨境传输的技术解决方案
数据库·人工智能·机器学习·云计算·github
耕烟煮云1 小时前
本文深入解析AI Native产品设计的核心范式——Linear三层架构模型
人工智能·架构