GraphRAG+本地部署模型
记录GraphRAG + 本地部署模型
GraphRAG 安装
非常的简单 跟着官方文档即可
LMStudio方案(失败)
没有成功
模型和embedding模型的端口一样都是到v1结尾的端口
模型名称 到GGUF结尾的文件夹
但是最后在关系汇总阶段出错,我怀疑是因为这个电脑的GPU不是英伟达显卡
OLlama方案(成功)
ollama部署
OLlmama和LMStudio属于是竞品关系
这次我把OLlama部署在了服务器
https://github.com/ollama/ollama
ollama常用命令
计算机上已下载的模型
1 |
|
启动 Ollama
1 |
|
进程
1 |
|
Graphrag-Local-Ollama——rga和ollama适配后的项目
https://github.com/TheAiSingularity/graphrag-local-ollama
1 |
|
尝试记录
配置 llama3 nojson maxToken:2000
❌ create_final_community_reports
配置 llama3 json maxToken:2000
🚀 All workflows completed successfully.
提问
Error parsing search response json
可能是模型的温度过高导致 开始对ollama模型进行设置
Ollama modelfile指令详解
https://wx.kaifamiao.info/index.php/2024/05/08/ollama-modelfile-zhi-ling-xiang-jie/
成功得到回答
但是仍然不知道为什么llama3 nojson为什么不行
Ollama modelfile自定义模型
先创建一个文件名xx.modelfile
然后填入
1 |
|
运行命令创建模型
1 |
|
可视化图文件
需要修改配置文件中的
在根目录创建脚本
1 |
|
但是我发现有更好的方案
https://noworneverev.github.io/graphrag-visualizer/
选择到output的节点文件夹即可
参考博客
https://developer.aliyun.com/article/1575047
不同模型的回答对比
qwen
Machine Learning refers to a subset of artificial intelligence that enables systems to learn and improve from experience without explicit programming [Data: Reports (1)]. It is primarily used for statistical analysis, data analysis, and prediction.
One type of machine learning algorithm, Convolutional Neural Networks (CNNs), are particularly effective in processing grid-like data such as images [Data: Reports (1)]. They are widely employed in various fields including Medical Imaging, Autonomous Vehicles, Natural Language Processing, Video Analysis, and Facial Recognition Systems.
In the field of Medical Imaging, CNNs have led to improved diagnostic accuracy and reduced human error by analyzing X-rays, MRIs, and CT scans [Data: Reports (1)]. In Autonomous Vehicles, CNNs are used for tasks like lane detection and obstacle recognition, which could significantly reduce accidents caused by human error, making roads safer [Data: Reports (1)].
However, concerns about privacy and security persist as autonomous vehicles collect vast amounts of data. Similarly, the use of CNNs in various applications raises privacy concerns due to the potential for mass surveillance [Data: Reports (+more)]. It is crucial to address these issues to ensure the responsible use of this technology.
llama3.1
:Machine Learning: A Subset of Artificial Intelligence
Machine learning is a subset of artificial intelligence (AI) that involves training algorithms on data to enable them to make predictions or decisions without being explicitly programmed.
Key Characteristics
Machine learning can be used for tasks such as image and speech recognition, natural language processing, and predictive analytics. It has several key characteristics:
- Data-driven: Machine learning models are trained on large datasets to learn patterns and relationships.
- Algorithmic: Machine learning algorithms are designed to make predictions or decisions based on the data they’ve been trained on.
- Adaptive: Machine learning models can adapt to new data and improve their performance over time.
Applications
Machine learning has a wide range of applications, including:
- Image recognition: Machine learning algorithms can be used to recognize objects in images, such as faces or products.
- Speech recognition: Machine learning algorithms can be used to transcribe spoken language into text.
- Predictive analytics: Machine learning algorithms can be used to make predictions about future events or trends.
Data References
Machine learning is a powerful tool for analyzing and making decisions based on data. Some relevant data references include:
- Reports (1, 3)
- Entities (35)