微信扫码
添加专属顾问
我要投稿
本篇文章我们要介绍的是一个开源项目GPT4All,它是由 nomic-ai 团队精心打造的开源项目,已经在 GitHub 上赢得了超过 69.1k 颗星星,人气爆棚!
GPT4All 不仅仅是一个应用,通过图形化界面帮你在日常的桌面和笔记本电脑上私下运行大语言模型(LLM)。无需 API 调用或 GPU,你只需下载应用程序即可开始使用。GPT4All 提供了 Python 客户端,让你可以方便地访问 LLM。Nomic 团队为了让 LLM 对所有人都易于访问和高效,贡献了开源软件,如 llama.cpp。
工具特征
完全私有的桌面应用程序
支持 1000 多种型号和所有主要操作系统
由 Nomic Embed 提供支持的本地文档聊天
MIT 许可
① 跨平台兼容:无论是 Windows、macOS、Ubuntu,GPT4All 都能完美适配,让你的聊天随时随地触手可及。
② 数据安全:GPT4All 使用 Python 客户端,让你的聊天数据安全又自由。
GPT4All 支持 LLaMa、Mistral、Nous-Hermes 等数百种流行模型。
https://www.nomic.ai/gpt4all
Windows 和 Linux 需要 Intel Core i3 第 2 代 / AMD Bulldozer 或更高版本。仅限 x86-64,无 ARM。
pip install gpt4all
from gpt4all import GPT4Allmodel = GPT4All("Meta-Llama-3-8B-Instruct.Q4_0.gguf") # downloads / loads a 4.66GB LLMwith model.chat_session():print(model.generate("How can I run LLMs efficiently on my laptop?", max_tokens=1024))
# 下载 GPT4All 模型并将其放置在您想要的目录中https://www.nomic.ai/gpt4all
模型调用
from langchain_community.llms import GPT4All
# Instantiate the model. Callbacks support token-wise streaming
model = GPT4All(model="./models/mistral-7b-openorca.Q4_0.gguf", n_threads=8)
# Generate text
response = model.invoke("Once upon a time, ")
流式调用
from langchain_community.llms import GPT4All
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
# There are many CallbackHandlers supported, such as
# from langchain.callbacks.streamlit import StreamlitCallbackHandler
callbacks = [StreamingStdOutCallbackHandler()]
model = GPT4All(model="./models/mistral-7b-openorca.Q4_0.gguf", n_threads=8)
# Generate text. Tokens are streamed through the callback manager.
model.invoke("Once upon a time, ", callbacks=callbacks)
https://github.com/nomic-ai/gpt4all
如果对内容有什么疑问和建议可以私信和留言,也可以添加我加入大模型交流群,一起讨论大模型在创作、RAG和agent中的应用。
53AI,企业落地大模型首选服务商
产品:场景落地咨询+大模型应用平台+行业解决方案
承诺:免费场景POC验证,效果验证后签署服务协议。零风险落地应用大模型,已交付160+中大型企业
2025-04-28
Spring-ai-Alibaba整合QwQ_32b
2025-04-28
程序员狂喜!DevDocs:开源AI文档神器,自动抓取+整理+喂给AI (MCP加持)
2025-04-28
DeepWiki深度探索:驾驭代码复杂性的AI百科全书
2025-04-28
Agent S2:像人一样操作 GUI,开源 AI 智能体新突破
2025-04-28
杨植麟再掀 AI 风暴!Kimi-Audio 如何让机器听懂人类 “弦外之音”?
2025-04-27
一文了解Text Embedding模型:从text2vec、openai-text embedding到m3e、bge(下)
2025-04-27
精选MCP服务器列表
2025-04-27
Google ADK框架:打造多智能体系统的开源利器
2024-07-25
2025-01-01
2025-01-21
2024-05-06
2024-09-20
2024-07-20
2024-07-11
2024-06-12
2024-08-13
2024-12-26
2025-04-28
2025-04-21
2025-04-19
2025-04-17
2025-04-15
2025-04-13
2025-04-10
2025-04-07