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

相关推荐
带娃的IT创业者13 小时前
预测编码=Decoder 训练?Friston 自由能的 Transformer 实现
人工智能·深度学习·transformer·脑机接口·nct·硅基生命·意识编码
沪漂阿龙13 小时前
大模型能力基准深度对比:MMLU、HumanEval、GSM8K谁主沉浮?
人工智能
vm3213 小时前
01:Agent Loop 深度剖析:ReAct 循环的工程实现
人工智能·ai·自然语言处理·开源
星爷AG I13 小时前
12-9 社会记忆(AGI基础理论)
人工智能·agi
田里的水稻13 小时前
EP_基于UWB和单线激光雷达的托盘转送
人工智能·算法·数学建模·机器人·自动驾驶
隔壁大炮13 小时前
08. PyTorch_张量基本创建方式
人工智能·pytorch·python
pen-ai13 小时前
【Yolo系列】 评价指标
人工智能·yolo·目标跟踪
ZWZhangYu13 小时前
【LangChain专栏】LangChain模块中Chains 链的使用
人工智能·langchain
GuokLiu13 小时前
260223-Gartner Hype Cycle 2026 AI 报告调研与解读
人工智能
量子-Alex13 小时前
【大模型综述】Large Language Models: A Survey
人工智能