Ways to run an LLM locally, compared
Browser runtimes, desktop apps and cloud services solve different problems. This page says which is which, including where AgentOp is the wrong choice.
The short version
There are three places a language model can run for you: inside a browser tab, in an application installed on your computer, or on someone else's servers. Each trades something away.
- In the browser (AgentOp, WebLLM, Transformers.js): nothing to install, nothing leaves the device, works from a link or a file. Limited to models that fit in a browser's memory, and needs a GPU for usable speed.
- On the desktop (Ollama, LM Studio, llamafile): faster, bigger models, the right tool for your own daily use. Someone has to install and operate it, which is the whole obstacle when the user is not you.
- In the cloud (OpenAI, Anthropic, Google): the strongest models and no hardware requirement, in exchange for your text leaving the machine and an account or API key.
AgentOp sits in the first group, with one difference from the other two browser runtimes: it packages the model loader, the agent's Python tools and its interface into a single HTML file that another person can open. It is built for handing a working local AI tool to someone who will never install a model server. If you only need a model for yourself, install Ollama or LM Studio and skip the rest of this page.
Side by side
| Option | Runs where | Install | Model format | Your text leaves the device? | Best for |
|---|---|---|---|---|---|
| AgentOp (wllama, llama.cpp in WebAssembly) | Browser tab, on your GPU via WebGPU | None; one HTML file or a link | Any GGUF from Hugging Face | No (local provider); yes if you choose a cloud provider with your own key | Sending someone a working document, transcription or extraction agent |
| WebLLM | Browser tab, WebGPU | None; a JavaScript library a developer adds to a page | Models compiled for the MLC runtime | No | Developers adding in-page inference to their own web app |
| Transformers.js | Browser tab, WebGPU or WebAssembly | None; a JavaScript library | ONNX conversions from the Hugging Face hub | No | Task models in the browser: embeddings, speech to text, vision, small LLMs |
| Ollama | Native process and local server on your computer | Yes | Its own library, GGUF-based | No | Your own daily local use, scripting, an OpenAI-compatible local API |
| LM Studio | Native desktop application | Yes | GGUF and others, with a built-in model browser | No | Exploring and chatting with many local models through a GUI |
| llamafile | Native single executable, serves a local web UI | No installer, but you run a downloaded executable | GGUF weights bundled into the executable | No | Distributing one specific model as one runnable file |
| Cloud APIs (OpenAI, Anthropic) | Provider's servers | None | Provider's models only | Yes | Highest quality; any device; no GPU needed |
Browser runtimes
AgentOp (wllama)
AgentOp runs llama.cpp compiled to WebAssembly (the wllama project, on a wasm64 build so models larger than 4 GB can load) and offloads to the GPU through WebGPU. Because it is llama.cpp, any GGUF file works the day it is uploaded to Hugging Face; the registry currently offers 27 models across 10 families, from 0.5 GB to 7.5 GB, with Qwen 3 4B (2.6 GB) as the default. Python tools run alongside the model through Pyodide, and the same page can compute embeddings, transcribe speech with Whisper and read images, all on-device. The output is one HTML file: the recipient opens it, the model downloads once into the browser cache, and from then on it runs offline. It is the right choice when the user of the agent is not the person who built it, and the wrong choice if you want the fastest possible inference for yourself.
WebLLM
WebLLM is the browser engine from the MLC LLM project. It also runs on WebGPU and exposes an OpenAI-style JavaScript API, and its compiled kernels are quick. The trade is the model format: models must be compiled for its runtime, so you choose from the list it provides rather than from every GGUF on the hub. It is a library for developers building their own web application, not an end-user tool.
Transformers.js
Hugging Face's Transformers.js runs ONNX models in the browser through ONNX Runtime Web, with WebGPU and WebAssembly backends. Its strength is breadth of task types rather than large chat models: embeddings, Whisper speech recognition, OCR and image captioning, classification. AgentOp uses it for exactly those jobs next to the llama.cpp chat model.
Desktop applications
Ollama and LM Studio
Both install a native application that runs models at full speed on your hardware and manages a library of them. Ollama is a command-line tool and local server with an OpenAI-compatible API; LM Studio is a desktop GUI with a model browser and its own local server. For your own use they are better than any browser runtime: larger models, faster tokens, no browser memory ceiling. The cost is that each user must install, choose a model and keep it running, which is fine for you and a wall for most other people.
llamafile
Mozilla's llamafile bundles llama.cpp and a model's weights into a single executable that runs on Windows, macOS and Linux and serves a local web interface. It shares the "one file" idea with an AgentOp export but the file is different in kind: a llamafile is a native program containing the weights, while an AgentOp agent is a small HTML page that runs in the browser and fetches the model once on first use.
Cloud services
ChatGPT, Claude and their APIs remain the strongest models by a wide margin and need no hardware. What they cannot offer is the guarantee that a document never left your machine. AgentOp agents can run on OpenAI or Anthropic with your own API key, encrypted in your browser and never sent to AgentOp, so the same agent can be built once and run either fully local or on a cloud model depending on who is using it and what they are allowed to upload.
Which one, for which job
- You want a model for yourself, today: Ollama or LM Studio.
- You are a developer adding inference to your own web app: WebLLM for chat, Transformers.js for task models.
- You want to give someone else a working local AI tool without support calls: AgentOp, as a file or a link.
- You want to distribute one specific model as one runnable program: llamafile.
- Quality matters more than where the text goes: a cloud API, or an AgentOp agent on a cloud provider.
Frequently asked questions
Can I run an LLM in the browser without installing anything?
Yes. With WebGPU and WebAssembly a language model can run entirely inside a browser tab. AgentOp uses llama.cpp compiled to WebAssembly (wllama) to load GGUF models such as Qwen 3, Llama 3.2 and Gemma 4 on your own GPU; WebLLM does the same with models compiled for its MLC runtime. Nothing is installed and no server is involved. You need a WebGPU-capable browser (Chrome or Edge on a machine with a graphics card, or an Apple Silicon Mac) and a one-time model download.
What is the difference between AgentOp and WebLLM?
Both run the model in the browser on WebGPU. WebLLM is a JavaScript library that runs models compiled for the MLC/TVM runtime and gives developers an OpenAI-style API. AgentOp runs llama.cpp in WebAssembly, so any GGUF model on Hugging Face works without conversion, and it packages the model loader, Python tools (via Pyodide) and a user interface into a single HTML file that you can send to someone who then runs the agent on their own machine.
What is the difference between AgentOp and Ollama or LM Studio?
Ollama and LM Studio are desktop applications you install; they run a local server and a large model library and are the better choice for your own daily use, with faster native inference. AgentOp exists for the other person: the agent is one HTML file that opens in a browser with nothing to install, which is what lets you hand a working local AI tool to someone who will never set up a model server.
Is llamafile the same idea as a single-HTML-file agent?
Close, but it is a different file. A llamafile is a single native executable that bundles llama.cpp and the model weights and runs outside the browser, serving a local web UI. An AgentOp export is a small HTML file that runs inside the browser; the model is downloaded once on first run and cached by the browser rather than being inside the file.
Is a local browser model as good as ChatGPT or Claude?
No. The models that fit in a browser are in the 0.5B to 9B parameter range and are weaker at open-ended reasoning and general knowledge. They are good at reading what is in front of them, which is why local agents work best around a document, a recording or an export. When quality matters more than privacy, AgentOp agents can also run on OpenAI or Anthropic with your own API key.
Does a browser LLM send my data anywhere?
Not when it runs on-device. With AgentOp's local provider the prompt, the document and the answer stay in the browser tab; the only network traffic is the one-time model download from Hugging Face and, on the first run, the Python runtime. After that a downloaded agent works with the network switched off.
What hardware do I need to run a model in the browser?
A GPU and a WebGPU-capable browser: Chrome or Edge on a Windows or Linux machine with a graphics card, or any Apple Silicon Mac. Phones are not supported. Without a usable GPU the model falls back to CPU, which works but is slow; the smallest models are around 0.5 GB.