Browser LLM or local server? Choosing where your app runs inference

Compare WebLLM in the browser, a localhost model service and a shared GPU server using the same document-summary feature.

Imagine adding “summarize this document” to an internal web app. The button looks identical whether the model runs in the browser tab, in a desktop service or on an office GPU. The choice changes who downloads the weights, where the document travels and who waits when five people click at once.

When the browser should do the work

WebLLM can run a supported model in a compatible WebGPU browser. The first visitor has to obtain the model assets. A returning visitor may already have them cached. Measure both experiences on the least powerful device you support. A useful acceptance test is to open a fresh browser profile, summarize a fictional document, then reload and try again. Record the download size and both wait times. Check that analytics and application code also keep the document on the intended path. WebLLM project

When a desktop process makes more sense

If the same employee uses both a document app and a coding tool, a local service can give both clients an endpoint on the machine. Ollama manages downloaded models. LM Studio combines a desktop workflow with a local server. With Docker Model Runner, test from the container where your application actually runs: its loopback address belongs to that container, so use the endpoint documented for your setup. Try shutting down the model service while the document app is open. A clear reconnect message makes an offline failure understandable. Ollama docs · LM Studio docs · Docker Model Runner

When several people need one GPU

With a shared vLLM or SGLang server, teammates can use one installation and one copy of the model on the host. Their documents now travel to that host. Decide which users can connect, where logs go and how long they can wait. Send five requests together, including one long document. Record when each user sees the first word and when the last user receives a complete answer. A single fast demonstration cannot tell you how the queue will behave. vLLM · SGLang

Occasional peaks can also be handled by an explicitly selected encrypted API route for documents approved to leave the machine. Compare its per-request cost with keeping a GPU available throughout the day. Confidential API example · Local LLM runner comparison