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

相关推荐
魔乐社区9 分钟前
DeepSeek在昇腾上的模型部署 - 常见问题及解决方案
人工智能·深度学习·deepseek
不想有bug的小菜鸟15 分钟前
vue3使用iframe全屏展示pdf效果
前端·pdf
夜幕龙21 分钟前
深度生成模型(二)——基本概念与数学建模
人工智能·深度学习·transformer
游王子26 分钟前
OpenCV(11):人脸检测、物体识别
人工智能·opencv·计算机视觉
山海青风28 分钟前
从零开始玩转TensorFlow:小明的机器学习故事 3
人工智能·机器学习·tensorflow
@心都29 分钟前
机器学习数学基础:35.效度
人工智能·机器学习
幻想趾于现实31 分钟前
傅里叶分析
人工智能
春末的南方城市38 分钟前
VidSketch:具有扩散控制的手绘草图驱动视频生成
人工智能·深度学习·计算机视觉·aigc
Toky丶1 小时前
【文献阅读】A Survey on Model Compression for Large Language Models
人工智能·语言模型·自然语言处理
Williams101 小时前
解锁高效开发新姿势:Trae AI编辑器深度体验
人工智能·编辑器