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

相关推荐
极客BIM工作室10 小时前
大模型中的Scaling Law:AI的“增长密码“
人工智能
纪伊路上盛名在10 小时前
Alphafold实用指南—官网教程3
数据库·人工智能·机器学习·alphafold·计算生物学·结构生物学
茶杯67510 小时前
数字孪生厂商推荐:跨行业通用型平台与垂直领域专精企业对比指南
人工智能
道可云10 小时前
场景搭桥,产业赋能:新政策如何激活乡村振兴新动能
人工智能
诸葛务农11 小时前
人形机器人:热成像血管分布图及糖尿病足早期病变预警模型
人工智能·机器人
拾零吖11 小时前
Attention by 3B1B
人工智能·深度学习·机器学习
钟智强11 小时前
线性映射(Linear Mapping)原理详解:机器学习中的数学基石
人工智能·算法·机器学习
红尘炼丹客11 小时前
简析大模型(LLM)技术与量化交易
人工智能·金融
samroom11 小时前
langchain+ollama+Next.js实现AI对话聊天框
javascript·人工智能·langchain
西西o11 小时前
面向Agentic Coding的未来:豆包Doubao-Seed-Code模型深度测评与实战
人工智能