Show HN: RAGstack – private ChatGPT for enterprise VPCs, built with Llama 2 (github.com)
We’re the cofounders at Psychic.dev (http://psychic.dev) where we help companies connect LLMs to private data. With the launch of Llama 2, we think it’s finally viable to self-host an internal application that’s on-par with ChatGPT, so we did exactly that and made it an open source project.
We also included a vector DB and API server so you can upload files and connect Llama 2 to your own data.
The RAG in RAGstack stands for Retrieval Augmented Generation, a technique where the capabilities of a large language model (LLM) are augmented by retrieving information from other systems and inserting them into the LLM’s context window via a prompt. This gives LLMs information beyond what was provided in their training data, which is necessary for almost every enterprise application. Examples include data from current web pages, data from SaaS apps like Confluence or Salesforce, and data from documents like sales contracts and PDFs.
RAG works better than fine-tuning the model because it’s cheaper, it’s faster, and it’s more reliable since the provenance of information is attached to each response.
While there are quite quite a few “chat with your data” apps at this point, most have external dependencies to APIs like OpenAI or Pinecone. RAGstack, on the other hand, only has open-source dependencies and lets you run the entire stack locally or on your cloud provider. This includes:
- Containerizing LLMs like Falcon, Llama2, and GPT4all with Truss - Vector search with Qdrant. - File parsing and ingestion with Langchain, PyMuPDF, and Unstructured.io - Cloud deployment with Terraform
If you want to dive into it yourself, we also published a couple of tutorials on how to deploy open source LLMs for your organization, and optionally give it access to internal documents without any data ever leaving your VPC.
- How to deploy Llama 2 to Google Cloud (GCP): https://www.psychic.dev/post/how-to-deploy-llama-2-to-google... - How to connect Llama 2 to your own data using RAGstack: https://www.psychic.dev/post/how-to-self-host-llama-2-and-co...
Let a thousand private corporate oracles bloom!
30 comments
[ 3.3 ms ] story [ 76.8 ms ] threadThanks for the feedback! We’ll include a demo soon.
Open source and on-prem are two different things. Llama 2 doesn't seem to be open source.
While it would be nice to have the data set Meta used I think open sourcing the weights is good enough.
Also, people who just want to be able to run something on their computer without paying money for it shouldn't call it "open source", unless it actually is.
These distinctions have been going on for decades, for very good reasons. No need to throw away that progress now.
>In the default-pool > Nodes tab, set:
>Machine Configuration from General Purpose to GPU
>GPU type: Nvidia TF
>Number of GPUs: 1
>Enable GPU time sharing
>Max shared clients per GPU: 8
>Machine type: n1-standard-4
>Boot disk size: 50 GB
>Enable nodes on spot VMs
Not familiar with GCP, but I see n1-standard-4's are in an instance type that is $.19/hr. Are there any other significant costs to take into account?
> GPT4All: When you run locally, RAGstack will download and deploy Nomic AI's gpt4all model, which runs on consumer CPUs.
> Falcon-7b: On the cloud, RAGstack deploys Technology Innovation Institute's falcon-7b model onto a GPU-enabled GKE cluster.
> LLama 2: On the cloud, RAGstack can also deploy the 7B paramter version of Meta's Llama 2 model onto a GPU-enabled GKE cluster.
Why not llama2 on dedicated/local hardware? Memory and download size requirements?
Ed: After reading the linked tutorial - it looks like the built docker container will run fine on local/dedicated hardware?
https://www.psychic.dev/post/how-to-deploy-llama-2-to-google...
In terms of cost - just ran our deployed cluster through GCP's pricing calculator and it's about $300 USD per month. Definitely not cheap for individual use, but pretty affordable for enterprise use. Running the 40B parameter version will be significantly more.
"D<D,8H8,H<,,DH8DHH,,<<,DH<,<DHD<<,<<D,D,HD88<<H8<<D8D88,,8D,DH<,8,D<D,D,D8,D8<D8H,DHH8,D8H<,8D,,H8DHD88DD8H8<,8,HD<8D<,8D,<<888D<H,8<HD<HHD<8<<D8DD<DD<HHHH,,DDD<<DHDH,88HDH8,8DHD<<,D8,<8<H8<8H<,,<,,,D,88,<,<<8D,8<8,,H8,,D888D8<HD8<D,D8,<8<<H8D,,D<D,8<DD,<8"
I'm sure I'm doing something wrong :)
Are you using it with input docs or without? Locally it uses GPT4all which isn't nearly as good as Llama or Falcon. I saw a project that is docker for Llama 2 so we might use that instead!
https://huggingface.co/sentence-transformers/all-MiniLM-L6-v...
You can also specify a specific embeddings model from SentenceTransformers to use in /server/.env
In the meantime it uses GPT4all when running locally so you can technically deploy it as well, but it's not very good.
Upper limit depends on the model, Llama 2 is 4k including the prompt.