Setting Up Your Own Private AI Infrastructure: How Hard Could It Be?

RootConf 2026

20 November 2026

Date: November 20, 2026 | 10:50 AM - 11:25 AM IST Event: RootConf 2026 Annual Conference Location: Auditorium, Ground Floor, TERI, Domlur II Stage, Bangalore Format: 35-minute Talk Level: Intermediate

Slides

Talk Video

Overview

Most private AI conversations sit at two ends: hosted API subscriptions on one side, datacenter-scale GPU clusters on the other. This talk covers the space in between, running AI infrastructure on hardware you directly own. That can be a workstation with a GPU, an Apple machine with unified memory, or a few machines joined over a private network.

The session opens with why I own this infrastructure at all. SaaS API access bills per token, imposes rate limits that move with the platform, and leaves reliability outside your control. Private is not cheaper once hardware, electricity, and your own time are counted, but it buys control over the hardware, the models that run on it, and who gets access.

From there it walks the full build: hardware selection between dedicated GPUs and unified memory machines, VRAM planning across weights, KV cache and buffers, and the power and cooling costs people forget. Then the software stack: inference gateways such as Ollama and LM Studio, llama-swap for model routing and lifecycle management, and runtimes including llama.cpp, vLLM, and MLX. Model selection, quantization, performance measurement, and day-2 maintenance follow, ending with the security work: threat modeling the environment, keeping ports off the internet, and containing AI coding agents.

Owning the stack shows up in the results too. The deck includes llama.cpp PRs merged after running owned Intel Arc hardware, and closes with llm-playbooks, a public repository of configs, optimization tips, and environment notes. An earlier version of this session was presented at the OWASP 25th Anniversary Virtual Conference in September 2026 with a stronger security focus; this one leans into hardware and the day-to-day of operating the stack.

Key Topics

The containment segment of this talk is AIDC, the AI Dev Container setup I built after asking “how hard could it be?” in June 2026. It runs AI coding agents inside hardened, project-specific containers instead of handing them the whole host, with package traffic routed through a gateway and session logs pulled back to the base system so observability tools see what the agent did.

AI Generated Summary

AI Generated Content Disclaimer

Note: This summary is AI-generated and may contain inaccuracies, errors, or omissions. If you spot any issues, please contact the site owner for corrections. Errors or omissions are unintended.

Anant Shrivastava delivered “Setting up your own private AI infrastructure: how hard could it be?” at RootConf 2026 in Bangalore on 20 November 2026, opening with the engineer’s reflex the title comes from: “just like every engineer who has ever worked on any problem, we start with how hard could it be.” He introduced himself as chief researcher at Cyfinoid Research, “the privilege of running your own company: you define your own titles”, with about 18 years in the corporate space and a set of public projects behind him: PoisonedPipeline, an index of software supply chain incidents with over 520 catalogued; Code Vigilant, started to learn code review and now finding, reporting and getting bugs fixed; Hacking Archives of India, documenting who in India is publicly doing security work; and Reduce the Attack Surface, built on the idea that “if you don’t have something, you don’t have to protect it.”

Summary

The talk runs the full arc from why SaaS AI is “rented cognition”, through what private infrastructure actually buys, to the hardware, software and day-2 operations of running it, closing with his own rig, his llama.cpp patches, and a public release of his configs.

The problem statement starts with the standard setup everyone knows: register with a provider, download an API key, plug it into your code or agent. “When you talk about SaaS based models, you’re basically talking about what I call as rented cognition. Imagine your whole body, but your brain is actually rented on a per token basis.” The provider decides which model runs, which quantization, the speed of answers, and whether you get an answer at all. He cited a frontier model (Mythos, from Anthropic) whose access was pulled “a day or two” after release, and noted you may not even get the model you asked for: “you are calling model fable, but they will serve you model sonnet.” Controls move with the company’s mood, sometimes literally (“hey, it’s my birthday today, so I give double the inference to everyone”), and he placed himself in a familiar tradition: “just like people used to rant on cloud, I rant on AI.” The net effect: reliability issues, performance impact and random cost variance, all outside your control.

The data trail got its own set of receipts. An OpenAI controversy around two independent mathematicians ended with the post carrying the line “While unlikely, we cannot rule out that the identified data derived from their usage of our model helped improve our model”, which he read as neither confirmation nor denial. OpenCode shows a prompt where letting them train on your data unlocks more models, and a different service provider makes the same trade explicit: “Now they are being open about it that hey, if you tick on this box, we will train on your data. Others may also train on your data, but they’re not going to tell you.” A researcher bought the data flowing through an LLM inference API gateway and found live secrets in it: about $500,000 drained from a wallet whose private key was sitting in the logs, plus SSH keys and server logs, documented in a proper whitepaper. Anthropic’s threat intelligence report alleged hacktivists misusing OpenAI’s open models and Moonshot’s Kimi diverting traffic to Claude; his conclusion: “we don’t know what is going on at the service provider level.”

His definition of private AI is control all the way down: the hardware and technology stack, which models run and when, who gets access, and the data’s ownership, residency and retention, which become “our responsibility and our privilege”. The cheapness myth gets shut down hard: “so far, two years of my experience, it is never going to be cheaper. It is always going to be costlier compared to SaaS models”, because procurement, electricity and upkeep are the forgotten line items, including downtime that is now yours (a kernel bug means he reboots his own hardware). What you get instead is control, ownership and certainty: a power cut means his AI is down, power means it works. Borrowing the cloud shared-responsibility framing, he walked three approaches: corporate renting (control from the model and stack up, monthly bill), co-located datacenter (big upfront hardware cost plus a monthly fee, facility handles everything below), and personal ownership (control over everything, “humongous” upfront cost), with cloud GPU renting as the standing alternative, since “every single cloud service provider that was there is also a GPU service provider right now.”

From there private AI is equated with LLMs, which need exactly two things: huge processing power and the fastest memory available. The dedicated GPU path (card plus the PC assembled around it) offers higher bandwidth, supports training and suits dense models; the largest retail single card cited is the RTX 6000 Pro at 96 GB, and datacenter clusters reach about 13 TB of combined VRAM over NVLink-style meshes. The unified memory path (one chip carrying CPU, GPU and RAM blocks) comes as AMD’s AI Max 395 and 495 (192 GB maximum) or Apple’s M-series, with Mac Studio topping out at 512 GB of RAM, roughly 20 GB of which the OS reserves; it suits Mixture-of-Experts models. The buying experience differs: unified memory is “you buy a box and you give it a power and you run it”, while dedicated GPU is buy the card, “pray to God that the RAM cost is cheap, the hard disk is cheap, the motherboard works with it”, then assemble and worry about power.

On models: a download is four things (tensor weights, hyperparameter architecture, tokenizer, prompt template), safetensors and GGUF are the safe formats, and for sources he named Hugging Face and ModelScope (“Hugging Face is the most dominant place where you get the models right now”). Quantization is storing weights in fewer bits, from 32-bit vectors down through FP16/BF16 (still full precision “where the intelligence is retained”) to 8-bit and 4-bit. His working definition of model intelligence is next-word selection: given “a cat in a jail”, does the model pick “jumps”, “meows” or “ducks”; fewer bits shrink the candidate space until models hallucinate, loop or crash. That is why Ollama and LM Studio mostly hand you 4-bit models: at FP16 or 32-bit “you will not be able to run even a 20 billion parameter model” on typical local hardware. The KV cache stores previous calculations so inference does not recompute them; it grows with context and is per session. His experiment-backed guidance: leave it unquantized, or quantize it less than the model (“if your model is Q4, your KV cache should be Q8 or FP16”), because VRAM must hold weights plus cache plus a buffer, and “if you have to squeeze space, prefer squeezing model rather than squeezing KV cache.”

People forget the hardware is physical. Ask about adding RAM and “their imagination is I’ll go to a dashboard, click plus plus plus”. Power is the other forgotten item: the RTX Pro 5000 draws 300 W for 48 GB while the RTX 5090 draws 575 W for 32 GB, so at roughly 1000 W per electricity unit the 5000 Pro costs about one unit per three hours of inference and the 5090 more than one per two, with the energy returning as heat (“the 5090 can actually be used as a room heater in winter time frame if you keep the inference running all the time”). Consumer cards are built for clean, air-conditioned rooms, and homes are not that; his cards ran around 90°C on stock fan curves until he customised them (NVIDIA and Intel fan-control utilities) to engage earlier and hold 80°C or below.

The software stack has many moving parts, so it should be maintained with infrastructure as code (“if needed, use something like state of the art model to actually help you in configuring these systems, which is what I do”), and his ownership rule is blunt: “any open source software that you’re using, consider it as dead on arrival. You are now the owner of that software.” Inference gateways (Ollama, LM Studio, or Llama Swap, which is what he runs, upstream by mostlygeek) receive requests and route them to runtimes: llama.cpp for single-user setups and larger models, vLLM for many parallel users, MLX on Apple hardware. His llama-swap fork carries heavy customisation, including a breakdown that shows how the 17,000 tokens of one captured message split across system message, user message and tool calls. Remote access rule: never open a port, since around 14,000 publicly exposed Ollama instances have been documented with strangers running free inference on them; use Tailscale or Headscale, WireGuard or OpenVPN, or fall back to SSH port forwarding, “the poor man’s VPN. I have been using it for years. It works and it works brilliantly.”

Model selection follows the hardware split: dense for dedicated GPUs, MoE for unified memory. Download from official sources and scan (Palo Alto’s insights-db queries model names for suspicious parameters, “not 100% accurate, but slow and steady, there is progress”). The small models he is currently experimenting with are MiniCPM5 (2B) and Spark-X (4B), which carry tool calling and reasoning in a small footprint, though “you can’t expect a Kimi K 2.3 level of intelligence from them.” Parameter count still matters: a 3-trillion-parameter model crushed to Q1 will outperform a 9-billion model at FP32. Avoid pickle checkpoints and anything with trust_remote_code (“you want the model to be local in nature”). On measurement, “a novice says I want a model with maximum token generation and prefill speed. An expert says I want maximum token generation and prefill in the model of my choice”; public benchmarks are benchmaxxed, so compare the model against your own manual work instead. The OS advice is Linux first, macOS on Apple hardware, Windows avoided, and the maintenance principle: “make it boring and make it stable… You don’t want to deal with inference infrastructure on a daily basis. It should just run.”

On security he put the full threat-landscape slide up and skipped ahead (“I will not cover all of this”), keeping one point: the LLM itself rarely makes outside calls, “what will send data anywhere is the agent. So the agent needs to be contained”, along with its harness; his own answer to that is AIDC, his AI Dev Container project, shown briefly by URL to protect time. The closing question, should you self-host, got a decision flow rather than a blanket yes: full data control, or compliance and data-residency requirements, or scale and economics (the same tilt every startup goes through, running in cloud until the bill flips the logic) all point to private AI; otherwise public SaaS remains reasonable; plus the catch-all branch on his decision slide, which is his own case: “You simply want full control over all the elements.”

His own setup is two boxes with clients connecting over Tailscale, running customized builds of llama-swap and llama.cpp on an RTX 5000 Pro, an Intel Arc B70 and a MacBook Pro for everyday work, system administration, code review and penetration testing. The ownership shows upstream in a table of his llama.cpp pull requests, made, as he put it, “using AI, I am editing llama.cpp to get maximum performance in the graphic card that I have”. For the audience he announced the public release of his llm-playbooks repository of configs and optimization tips, and ran about two minutes over his slot before the moderator opened the floor.

The Q&A had two questions. On choosing between NVIDIA’s CUDA ecosystem and Apple’s unified-memory world, his answer was that “the choice now is taken away from you and it becomes a factor of how much money do you have”: the RTX 6000 Pro costs about 22 to 28 lakh rupees, which buys a Mac Studio with 512 GB of unified memory instead; unified memory wins when you want the largest model your budget allows and can live with around five tokens per second, while training or fastest responses mean NVIDIA, whose memory class he gave as the reason (“Nvidia is the only dedicated GPU service provider that runs on DDR7 RAM. Every other GPU provider is using DDR6 on dedicated GPUs, on unified memories you have DDR5s”). On whether open source can match SaaS capability, he split the question: for his security work a combination of Qwen 3.6 (27B) and Spark 4B, customized and fine-tuned for penetration testing, gives “far better results than Opus 5.5 or Saul or any other even GLM 5.3 models”, because hosted frontier models carry a restriction layer a local model lets you remove; and a conditioned small model beats a slow trillion-parameter generalist for a defined job. The measured payoff: his automated penetration testing framework went from about six hours on standard NVIDIA hardware to two to three hours flat with much smaller tuned models, so “if you know what you are looking for, smaller models are a better approach.”

Key Themes

Notable Points

Notable Quotes

“Imagine your whole body, but your brain is actually rented on a per token basis.”

“It is never going to be cheaper. It is always going to be costlier compared to SaaS models.”

“Any open source software that you’re using, consider it as dead on arrival. You are now the owner of that software. You maintain it, you own it.”

“You don’t want to deal with inference infrastructure on a daily basis. It should just run.”

“If nothing else works, SSH port forward, that’s the poor man’s VPN. I have been using it for years. It works and it works brilliantly.”

“The choice now is taken away from you and it becomes a factor of how much money do you have?”

“Although it looks like the SOTA models are the way to go, but if you know what you are looking for, smaller models are a better approach.”