A Gulf bank's compliance rule priced out to $133 of GPU per seat
A residency policy that barred even embedding calls from leaving the building forced a full local RAG stack. The hardware math turns out to be the easy part.
The Engineer · Build desk

What happened
- A Gulf bank's CTO ruled that no part of a loan-approval RAG pipeline could touch a public cloud, including the embedding calls.
- The shipped stack was two 24 GB 3090s, 64 GB RAM, a 4 TB NVMe and a 12-core CPU for under $4,000, running a 13B model for about thirty users.
- The build deliberately avoided RAG frameworks in favour of FastAPI, an ingestion scheduler and separate embed, retrieve and generate functions.
Why it matters
- What it limits constraint Once generation must be local, the popular half-measure of self-hosted retrieval plus a hosted LLM is closed off, and the VRAM tier you can justify becomes the ceiling on the answers compliance...
- What it costs cost At about $133 of one-time hardware per seat, procurement is not the thing standing between a team and an owned pipeline; the recurring bill is the engineer who keeps the index honest.
- Who's exposed exposure With the API gone, there is no vendor at the end of a wrong answer: a stale retrieval that quotes retired loan policy is the operator's liability alone.
- What doesn't add up contradiction The account reuses half-idle GPU boxes in one paragraph and buys used 3090s in the next, so readers cannot tell whether the sub-$4,000 number is a from-scratch price or a top-up.
A residency rule converts into a VRAM budget, and that is where this build gets interesting. The rule of thumb in the write-up is roughly as much VRAM as the model weights, putting a 7-8B model at 4-bit quantisation on a single 16 GB card such as an RTX 4090 or an A10 [6], and a 70B on two or four 24 GB cards depending on quantisation [7]. The two 24 GB 3090s in the bank's stack come to 48 GB, which is exactly the floor quoted for that 70B tier [14]. They ran a 13B on it for about thirty users [20]. So the ceiling on answer quality here was a latency and concurrency decision, not a silicon one, and the author is explicit that buying up to A6000-class hardware for frontier reasoning means asking whether the quality gap justifies four times the cost [3].
Divide the spend by the seats and the capital argument thins out further: under four thousand dollars across roughly thirty users is about $133 of hardware per seat, one time [21]. Worth noting that the account is internally inconsistent about what that money bought. The server room is described as already holding two half-idle GPU boxes running dashboards and a transcoding job [18], while the shipped spec is listed as two used 3090s bought cheap [20], and those are different starting positions for anyone budgeting from zero [15].
The software substitutions are where the API removal actually shows. Embeddings come off the GPU entirely: bge-m3 or e5 on an eight-core CPU will chew through a 1,000-page corpus overnight and a few hundred chunks per second at query time [1]. The vectors go into pgvector, Qdrant, LanceDB or Milvus that you operate [8], and generation is served locally through vLLM or Ollama [9]. The author's position on frameworks is that they create a second source of truth for prompts and chunking that you end up owning anyway, and recommends FastAPI, an ingestion scheduler, and functions for embed, retrieve and generate [2]. Defaults given are 700-token chunks with 100 tokens of overlap [10].
The failure mode is the part that has no hardware fix. The bank's compliance team edits documents constantly, and an index that is not idempotent and versioned on ingest will quietly answer from retired policy [11]. That was the risk the project was commissioned to remove in the first place [11], and once the hosted endpoint is gone there is no vendor sharing the consequence of a stale retrieval.
One caveat on all of it: this is a single first-person build account published on dev.to [13], seven weeks from start to live [19], with no independent confirmation of the spend or the user count. The parts that generalise are the ordering. Decide whether generation must be local before buying anything, because self-hosting retrieval while calling a hosted LLM still sends the queries out [5], and that configuration fails the stated policy [16].
What to watch
- Whether any second, independently reported residency-driven build lands in the same hardware envelope, which would tell us if the sub-$4,000 figure travels.
- Secondhand 24 GB card pricing: the whole cost case rests on used 3090s being cheap and available.
- Whether the author publishes the "stack I would spec today" list the piece promises, and how far it departs from the one that shipped.
Clarity's read
What the record supports and how the coverage leans. The claims behind it follow.
Reality
- Evidence28
- Adoption18
- Hype gap+32
- Incentives46
- Confidence33
Claim ledger
Ranked by verification strength, evidence, and original report placement.
- [1]
Embedding models bge-m3 and e5 run comfortably on CPU; a modern 8-core server can embed a 1,000-page corpus overnight and handle a few hundred chunks per second at query time, so no GPU is needed for embeddings.
- [2]
The author argues against building on a RAG framework's abstractions, recommending FastAPI, a scheduler for ingestion and a few functions for embed, retrieve and generate, on the grounds that every framework evaluated added a second source of truth for prompts and chunking.
- [3]
For frontier-level reasoning quality on owned hardware the author points to two 4090s or an A6000-class card, and says teams should ask whether that quality gap is worth four times the hardware cost.
- [4]
Self-hosted RAG as defined in the piece means the embedding model, the vector store and the generation LLM all run on infrastructure you control rather than via cloud API calls.
- [5]
The author notes teams routinely self-host the retrieval half while still calling a hosted LLM for generation, which is a valid configuration but still ships queries to a third party.
- [6]
The author's rule of thumb is roughly as much VRAM as the model weights: a 7-8B parameter model such as Llama 3.1 8B or Qwen 2.5 7B needs 16 GB of VRAM at 4-bit quantization, fitting a single RTX 4090 or an A10.
- [7]
A 70B model needs two or four 24 GB cards depending on quantization.
- [8]
Vector store options named for self-hosting are PostgreSQL with pgvector, Qdrant, LanceDB and Milvus, run on your own machine.
- [9]
Local generation is served via something like vLLM or Ollama instead of an external endpoint.
- [10]
The ingestion worker chunks documents at a default of 700 tokens with 100 tokens of overlap, embeds each chunk with the local model and writes vectors to pgvector.
- [11]
Ingestion must be idempotent and versioned: the bank's compliance team edits documents constantly, and an unversioned index will quietly serve retired policy, the exact failure mode that motivated the project.
- [12]
For heavy concurrency the author's answer is adding replicas behind a load balancer; for internal Q&A with a few concurrent users a single 4090 running a 7-8B model is described as a good production stack.
- [13]
The account is a first-person build write-up headlined "Self-Hosted RAG: A Production Pipeline on Your Own Hardware", published on dev.to.
- [14]
The two 24 GB cards in the shipped stack total 48 GB of VRAM, which equals the lower bound the same piece gives for running a 70B model.
- [15]
The source describes the same deployment both as built on two GPU boxes the bank already had sitting half-idle and as a stack of two used 3090s bought for under four thousand dollars in total, so it is unclear whether that figure is a greenfield price or an addition to existing kit.
- [16]
The CTO of a Gulf bank told the author that nothing in the pipeline could touch a public cloud: not the customer documents, not the queries, not even the embedding calls.
- [17]
The bank's compliance policy classified the loan-approval corpus as data that could not leave the building, and the author describes the requirement as non-negotiable.
- [18]
The bank's server room already held two GPU boxes sitting half-idle, running internal dashboards and a video-transcoding job, and the RAG pipeline was built on those boxes.
- [19]
The project went live in seven weeks.
- [20]
The stack that shipped at the bank was two used 3090s (24 GB each, bought for a fraction of a new card's price), 64 GB RAM, a 4 TB NVMe and a 12-core CPU, for under four thousand dollars total, running a 13B model at acceptable latency for a team of about thirty users.
- [21]
Under four thousand dollars of hardware for about thirty users works out at roughly $133 of one-time hardware per seat.
Get this ledger inside ChatGPT. Ask about any of our stories and the answer brings its figure, each claim’s verdict and the sources. Free, no account.
Sources
1 independent publisher whose own reporting we read for this story.
- dev.toSelf-Hosted RAG: A Production Pipeline on Your Own Hardware
1 article · August 22, 2026
Topics and entities
Follow any of these and your For You feed starts watching them — no settings page required.