在数据安保和隐衷包全日益遭到注重的背景下,私有化部署大模型的需求日益增长。Mintplex Labs Inc. 推出的开源名目 AnythingLLM,为团体和企业提供了一种安保、高效且可定制的处置打算。该工具基于RAG(Retrieval-Augmented Generation)模型,准许用户将本地文档转换为可由大型言语模型(LLM)援用的格局,成功对话式问答和常识治理。
二、AnythingLLM 部署实战
1. 装置Chroma Vectorstore: 经过Docker容器部署,创立汇兼并验证设置。
访问向量存储API文档:
2. LocalAI部署: 经常使用CLI运行程序启动API主机,与开源模型交互。
git clonechromadocker compose up -d --build
容器运转后,咱们须要下载、装置模型以供测试经常使用
Bert 的转换器嵌入模型:MiniLM L6
curl"Content-Type: application/json"-d '{ "id": "model-gallery@bert-embeddings" }'curl"Content-Type: application/json"-d '{ "input": "The food was delicious and the waiter...","model": "bert-embeddings" }'{"created": 1702050873,"object": "list","id": "b11eba4b-d65f-46e1-8b50-38d3251e3b52","model": "bert-embeddings","data": [{"embedding": [-0.043848168,0.067443006,...0.03223838,0.013112408,0.06982294,-0.017132297,-0.05828256],"index": 0,"object": "embedding"}],"usage": {"prompt_tokens": 0,"completion_tokens": 0,"total_tokens": 0 }}
大模型LLM:Zephyr-7B-β
curl"Content-Type: application/json"-d '{ "id": "huggingface@thebloke__zephyr-7b-beta-gguf__zephyr-7b-beta.q4_k_s.gguf","name": "zephyr-7b-beta" }'curl"Content-Type: application/json"-d '{ "model": "zephyr-7b-beta","messages": [{"role": "user","content": "Why is the Earth round?"}],"temperature": 0.9 }'{"created": 1702050808,"object": "chat.completion","id": "67620f7e-0bc0-4402-9a21-878e4c4035ce","model": "thebloke__zephyr-7b-beta-gguf__zephyr-7b-beta.q4_k_s.gguf","choices": [{"index": 0,"finish_reason": "stop","message": {"role": "assistant","content": "\nThe Earth appears round because it isactually a spherical body. This shape is a result of thegravitational forces acting upon it from all directions. The forceof gravity pulls matter towards the center of the Earth, causingit to become more compact and round in shape. Additionally, theEarth's rotation causes it to bulge slightly at the equator,further contributing to its roundness. While the Earth may appearflat from a distance, up close it is clear that our planet isindeed round."}}],"usage": {"prompt_tokens": 0,"completion_tokens": 0,"total_tokens": 0}}
3. 部署AnythingLLM:应用官网Docker镜像装置,而后性能LocalAI后端和嵌入模型。
docker pull mintplexlabs/anythingllm:masterexport STORAGE_LOCATION="/var/lib/anythingllm" && \mkdir -p $STORAGE_LOCATION && \touch "$STORAGE_LOCATION/.env" && \docker run -d -p 3001:3001 \-v ${STORAGE_LOCATION}:/app/server/storage \-v ${STORAGE_LOCATION}/.env:/app/server/.env \-e STORAGE_DIR="/app/server/storage" \mintplexlabs/anythingllm:master
访问: ,咱们可以在其中经常使用直观的 GUI 开局性能。
LocalAI 后端性能: 经过URL 访问
嵌入模型性能 与相反的 LocalAI 后端坚持分歧。
接上去, 性能 Chroma 向量数据库 ,经常使用URL
创立一个上班区 ,命名为“Playground”。
在“Playground”上班区,咱们可以上行文档,进一步裁减本地常识库。
至此咱们能够与文档开局启动交互式对话。
总结:
AnythingLLM和Vector Admin是Mintplex Labs提供的翻新开源工具,它们极大地简化了私有常识库的构建和治理。经过高效的RAG模型成功和直观的用户界面,这些工具不只保证了数据的安保性,同时也提供了弱小的交互式文档处置才干。随着技术的始终提高,这些工具将为企业和团体用户提供更多的或者性和价值。
了解更多概略:
AnythingLLM GitHub :
LocalAI Docs :
AnythingLLM :
原文链接: