Skip to content

How to Run a Local LLM on Your Own Hardware

Published Updated

To run a local large language model (LLM), pick a version that fits your GPU memory and load it in a runtime such as Ollama. Test answer quality and speed on real tasks using a machine you already have before buying a server.

When a Local LLM Makes Sense

Run a local LLM when prompts and documents must stay on your network or when a site cannot rely on an internet connection. A site with an unreliable link can keep answering questions from the manuals it holds locally once the model and its files are in place.

Local AI models also give engineers a place to experiment with different models and make running costs easier to budget when demand is steady. Budget for the hardware purchase, power and staff time to patch the runtime, replace equipment and retest model updates. A model that fits your workstation can struggle with reasoning or long documents that a more capable cloud model handles well.

If the requirement is to keep data in Australia and your policy permits cloud processing, start with a model hosted in an Australian cloud region. Confirm where it processes requests and stores logs and backups. Those details determine whether the service fits your data sovereignty requirements.

Hardware You Need for Local AI Models

GPU memory, also called video random-access memory (VRAM), usually sets the limit for a model you want to run at interactive speed. A larger parameter count needs more memory for the model weights. Quantisation stores those weights at lower precision, which reduces memory use and can affect answer quality. Leave memory for the running software and the context, which holds the input and the tokens the model has generated so far.

These are starting points for one short chat session. Model design and context length change the actual fit.

Hardware Memory Model to try
Laptop 16 GB of unified memory A quantised 4B to 8B model. The operating system and GPU share the same memory, so leave room for the apps staff keep open.
Workstation 24 GB on one GPU A 4-bit 26B to 32B model with a short context. Google estimates 17.5 GB to load Gemma 4 31B at 4-bit before adding context memory.
Server 48 GB on each of two GPUs A candidate for a 70B model at 8-bit if the runtime can split it across both cards. Test the memory available per card at the context and request volume you intend to serve.

Before ordering hardware, use the LLM VRAM calculator with the exact model size, quantisation and context length. Confirm the estimate by loading that model on comparable hardware with a representative prompt.

Choosing the Best Local LLM for the Job

Shortlist open-weight models by the job they need to do, the memory they need and the languages staff use. Open weights let you run the model on your own hardware. The licence for the particular checkpoint sets the terms for using or distributing it.

  • Start with Qwen3 4B Instruct for short text tasks such as extracting fields from a note or drafting a reply. Try it in each language your staff use before settling on it.
  • Try an instruction-tuned Gemma 4 model when the input includes an image as well as text, such as a photo of a label a staff member needs to read. Budget for image inputs when testing memory and response time.

The best local LLM for your organisation is the one that passes your own tasks on your own hardware. Test the exact quantised file you would deploy. The open-weight model comparison can help you choose which families to put on the shortlist.

Setting Up a Local LLM Step by Step

Ollama can load a 4-bit Qwen3 model on a compatible machine and give you a local chat endpoint. Set aside room for a 2.5 GB download and enough free memory to run the model. Download the installer and model on an approved connection before testing a machine that will operate offline.

  1. Install Ollama for your operating system and start it. Set OLLAMA_NO_CLOUD=1 and OLLAMA_CONTEXT_LENGTH=4096 in the server environment before starting or restarting it. If you run Ollama from a terminal, start the server with ollama serve and leave it open. Run ollama ls in another terminal. A model table, even an empty one, confirms the client can reach the server.

  2. Download the 4-bit model with ollama pull qwen3:4b-instruct-2507-q4_K_M. Run ollama ls again and check that the exact tag appears.

  3. Run ollama run qwen3:4b-instruct-2507-q4_K_M "Reply with one greeting in four words or fewer.". Expect a short greeting. Run ollama ps while the model is still loaded. Look for 100% GPU under PROCESSOR and 4096 under CONTEXT. If you see both CPU and GPU listed, the model is using system memory as well.

  4. Measure output speed with ollama run --verbose qwen3:4b-instruct-2507-q4_K_M "Explain in three sentences why a team might run a language model on its own computer.". Read the eval rate for generated tokens per second. In a single run on an Apple M2 Max with 96 GB of unified memory, it generated 80 tokens at about 76 tokens per second. Set a wait limit for a typical staff chat reply and subtract the time to the first token. If staff can wait five seconds for an 80-token reply and see the first token after one second, aim for at least 20 tokens per second.

    Measure both times on typical staff prompts.

  5. Point an OpenAI-compatible client at http://127.0.0.1:11434/v1/ and pass the same model tag to Chat Completions. Use a dummy value such as ollama if the client requires an API key. The local endpoint ignores that value. Confirm that POST /v1/chat/completions returns an answer in choices[0].message.content.

  6. For a small staff trial, connect a self-hosted chat interface such as LibreChat. Add Ollama as a custom endpoint using the OpenAI-compatible base URL reachable from the chat server. Sign in with a pilot account, select the model and confirm a reply arrives through the interface before inviting staff.

Testing and Securing a Local Model

Run a fixed set of real staff tasks through the local model and an approved cloud model. Use the same prompt and source material for both. Redact restricted information or create equivalent test cases before sending anything outside your network. Include an expected answer and a passing time for each task. Reject an answer if it invents facts or omits information staff need to act.

Keep the Ollama backend bound to loopback. For shared use, bind an HTTPS gateway to the internal network interface, require staff or service authentication and firewall the backend from other machines. Log request identity, time, model and status at the gateway. Restrict log access and exclude prompt and response text unless your policy specifically requires it. Test that a signed-in pilot user gets a reply and an unauthenticated request is denied.

Symptom Check Fix
Out-of-memory error Check available GPU memory and the configured context length while loading the model. Start with a shorter context. If the weights still do not fit, try a smaller model or lower-precision weights.
Slow output Check GPU placement with ollama ps. Compare generation speed and the wait for the first token on short and representative prompts. If the model spills onto the CPU, reduce memory use until it fits. If prompt processing is the delay, trim unused context.
Poor answers Compare errors against expected answers and check what information the model received. Supply the missing source text. If the model still misses the answer, try a larger or less heavily quantised model and score the same tasks again.

Before commercial use, read the licence for the exact weights and any fine-tune you intend to deploy. The Qwen3 Instruct version used above and Google’s Gemma 4 model card each list Apache 2.0. Check the applicable notices and any redistribution conditions for the files you will ship.

Moving a Local LLM From Desk to Production

Move a local LLM to a GPU server when several staff depend on it and the workstation cannot meet their response times under load. Choose serving software that can batch concurrent requests. Test with peak traffic and monitor queue time, time to first token, GPU memory and failures. Pin the model and runtime versions so you can retest and roll back updates.

For answers from internal documents, check each person’s access before retrieving excerpts for the prompt. Test with two accounts that have different file permissions and verify each account only sees answers and sources it can access.

When Australian residency is sufficient, a private deployment in an Australian cloud region can be the better choice if demand spikes or you lack staff to maintain GPU servers. Confirm the region and access controls for the model, document store and logs. Run your scored tasks at peak concurrency before choosing where the service will run.

What Data Sovereignty Means for AI in Australia

Data sovereignty means your data is subject to laws where it’s stored or processed and laws that apply to the provider. In Australia, that also shapes sovereign cloud and sovereign AI choices.