Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Run Local LLM in Browser with Free Extension

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Yes, you can run a local LLM (like Llama 3, Mistral, or Phi) right in your browser using a free extension called WebLLM (or its companion extension for Chrome/Edge). This lets you chat with an AI entirely on your device—no cloud, no data leaving your computer, and no API costs. You only need a reasonably modern computer with at least 8GB of RAM (16GB recommended) and a browser that supports WebGPU (Chrome or Edge on Windows/Mac). The extension handles downloading the model, running inference, and providing a chat interface.

What You'll Need

  • A computer with Chrome or Edge (latest version) and WebGPU enabled (it's on by default in recent versions).
  • At least 8GB of RAM (16GB+ for larger models).
  • Stable internet connection for the initial model download (models are 1–4GB).
  • The free WebLLM extension from the Chrome Web Store or Edge Add-ons.

Step-by-Step

  1. Install the extension. Go to the Chrome Web Store (or Edge Add-ons) and search for “WebLLM”. Click “Add to Chrome” (or “Get” on Edge) and confirm the installation. The extension icon will appear in your toolbar.
  2. Open the extension. Click the WebLLM icon in your browser toolbar. If you don't see it, click the puzzle piece icon to find it, then pin it for easy access.
  3. Choose a model. On first launch, the extension will show a list of available models (e.g., Llama 3.2 1B, Phi-3 mini, Mistral 7B). Pick a small one (1B–3B) if you have 8GB RAM; larger ones (7B) need 16GB+. Click “Download” next to your choice.
  4. Wait for the download. The model will download—this can take a few minutes depending on your internet speed. You'll see a progress bar. Do not close the browser during this step.
  5. Start chatting. Once downloaded, the extension will show a chat window. Type your first message in the input box at the bottom and press Enter. The model will generate a response entirely on your device.
  6. Adjust settings (optional). Click the gear icon in the chat window to adjust parameters like temperature (creativity) or max tokens (response length). Leave them at defaults if you're unsure.
  7. Use offline. After the initial download, you can disconnect from the internet and the extension will still work—the model is stored locally in your browser's cache.

Common Mistakes

  • Choosing a model too large for your RAM. If you have 8GB RAM and pick a 7B model, the browser may crash or the extension will be extremely slow. Start with a 1B or 3B model.
  • Not enabling WebGPU. The extension requires WebGPU. If you're on an older browser or have disabled hardware acceleration, it won't work. Go to chrome://settings/system and ensure “Use hardware acceleration when available” is on.
  • Closing the tab during download. The model download is tied to the extension's service worker. If you close the browser, the download may pause or corrupt. Let it finish.
  • Expecting GPT-4 level quality. Local models are smaller and less capable. They're great for privacy and offline use, but don't expect the same reasoning as cloud AI.

Tips

  • Use a 1B model if you're on a laptop with 8GB RAM—it's still surprisingly capable for simple Q&A and brainstorming.
  • Keep the extension updated. Developers regularly add new models and performance improvements.
  • If you have a dedicated GPU (NVIDIA or AMD), the extension will use it automatically for faster inference. Check your browser's task manager (Shift+Esc) to see GPU usage.
  • For privacy, this is ideal—all conversations stay on your device. No data is sent to any server.
  • You can switch models anytime by clicking the model name at the top of the chat window.

Troubleshooting

If the extension doesn't work as expected, try these in order:

  1. Restart your browser. Close all Chrome/Edge windows and reopen them. This clears temporary glitches.
  2. Check WebGPU support. Visit chrome://gpu and look for “WebGPU” in the feature status. If it says “Disabled”, go to chrome://flags, search for “WebGPU”, set it to “Enabled”, and relaunch the browser.
  3. Update your browser. Go to chrome://settings/help and let it update to the latest version.
  4. Reinstall the extension. Remove it from your extensions page, then re-add it from the store. This clears any corrupted cache.
  5. Clear browser cache. Go to chrome://settings/clearBrowserData, clear cached images and files, then reload the extension. This won't delete your model, but you may need to re-download it if it was corrupted.
  6. If the model fails to download, check your internet connection and try again. If it still fails, try a different model—some may be temporarily unavailable.

Frequently Asked Questions

Is this really free?

Yes, the extension is free, and the models are open-source. You only pay with your device's resources (RAM, CPU, GPU).

Does it work on Firefox or Safari?

No, WebLLM currently requires WebGPU, which is only fully supported in Chrome and Edge (and partially in Firefox Nightly). Stick to Chrome or Edge for best results.

Can I use it on my phone?

Technically yes, if you have a recent Android phone with Chrome and WebGPU, but it's not recommended due to limited RAM and battery drain. The extension is designed for desktop.

How much disk space does it take?

Models range from about 600MB (1B) to 4GB (7B). The extension stores them in your browser's cache, so you may need to free up space if you're low.

Can I use my own custom model?

The extension supports only the models listed in its interface. You cannot load arbitrary GGUF files unless the extension explicitly allows it—check the extension's documentation for that.

Is my data private?

Yes, everything runs locally. No prompts or responses are sent to any server. That's the main advantage of this approach.