WebLLM & WebGPU Configuration

Step-by-step setup guide for running AI models directly on your hardware GPU inside the browser.

What is WebLLM and what are its advantages?

WebLLM is a cutting-edge engine that executes Large Language Models entirely inside the web browser utilizing your graphics card (GPU) through the standardized WebGPU API.

Hardware Requirements & VRAM Guidelines

WebGPU performance depends on available GPU video memory (VRAM):

Model Parameter Size Recommended VRAM Sample Models in Catalog
0.5B – 1.5B (Lightweight) 1.5 GB – 2.5 GB Qwen2.5-0.5B, SmolLM2-1.7B, Qwen2.5-1.5B
3B – 4B (Balanced) 3 GB – 4.5 GB Llama-3.2-3B, Phi-3.5-mini
7B – 8B (High Quality) 6 GB – 8 GB Llama-3.1-8B-Instruct, Mistral-7B-Instruct

Browser Configuration & WebGPU Setup

Google Chrome, Edge and Chromium

Chromium-based browsers provide top-tier performance and reliability with WebGPU.

  1. Enable hardware acceleration:

    Go to Settings > System and ensure "Use hardware acceleration when available" is enabled.

    chrome://settings/system
  2. Enable unsafe WebGPU (Recommended for maximum compatibility):

    Paste into your address bar, set the flag to Enabled, and relaunch your browser:

    chrome://flags/#enable-unsafe-webgpu
  3. WebGPU Interoperability on Linux (Recommended for Linux and Wayland):

    On Linux (especially when running Wayland or dedicated NVIDIA/AMD GPUs), enable this setting to connect WebGPU compute directly to the browser window without overloading the CPU:

    chrome://flags/#force-enable-webgpu-interop
  4. Check GPU diagnostics:

    Open the internal graphics status page and verify that WebGPU is listed as "Hardware accelerated":

    chrome://gpu

Mozilla Firefox

WebGPU is in active rollout in Firefox and requires enabling specific preferences:

  1. Open the advanced preferences editor:

    Type into the address bar and click "Accept the Risk and Continue":

    about:config
  2. Enable the WebGPU API:

    Search for this preference and toggle its value to true:

    dom.webgpu.enabled
  3. Ignore driver blocklist (Recommended on Linux/Windows):

    Allows Firefox to use WebGPU even if your driver is not yet on the official whitelist:

    gfx.webgpu.ignore-status
  4. Check Firefox GPU status:

    Review the Graphics > WebGPU section to confirm hardware adapter detection:

    about:support

How to Use WebLLM in ZeroChat

  1. In ZeroChat, open the Profile Management dialog.
  2. Select the WebLLM (local WebGPU) interface type.
  3. If you already have downloaded models: They appear automatically at the top of the model dropdown. Pick any downloaded model and save the profile immediately without needing to click Query.
  4. To download a new model: Click the Query button. Browse the available catalog with required VRAM metrics, click the download icon next to your desired model, and wait for shader compilation to finish.
  5. Once download completes, the model will be tagged as "Cached" and stored permanently in your browser.

Advanced WebGPU Execution Parameters

When configuring a profile with the WebLLM provider, next to the model selector you will find a gear icon button that reveals the advanced performance panel. These dropdown selectors allow you to fine-tune VRAM usage and inference speed according to your GPU capabilities:

The first choice in each dropdown is "Model default" (default), instructing ZeroChat to preserve the model's standard default configuration. These settings are stored as part of the connection profile.

How to Revert Changes and Restore Default Configuration

If you wish to undo the technical changes made to your browser or ZeroChat and return to factory defaults, follow the instructions below:

1. Google Chrome, Microsoft Edge, and Chromium

2. Mozilla Firefox

3. Freeing Disk Space (Deleting Downloaded Models from Cache)

Local WebLLM models are stored in the browser's persistent storage (Cache Storage / IndexedDB) and can take up several gigabytes. If you want to delete them to reclaim disk space:

Troubleshooting Common Issues & Compatibility

ZeroChat executes WebLLM through an in-memory self-contained classic Web Worker, ensuring full compatibility in both Google Chrome and Mozilla Firefox in a purely static web setup (without requiring local build steps or special browser flags). The JavaScript runtime is persistently cached in Cache Storage and automatically refreshed every 7 days when an active internet connection is available (with seamless offline fallback when disconnected).

Settings β†’ Clear all data deletes storage for the current origin, including RAG, attachments, downloaded models, IndexedDB, Cache Storage and browser-private files. Close other tabs before confirming. Deletion is irreversible and affects applications sharing the origin. Repeat it for each HTTP or HTTPS origin you used. It does not delete files downloaded to your computer, HttpOnly cookies or the browser's internal HTTP cache.

If preparation fails, the model row displays the error detail received from WebLLM. Copy the complete message to diagnose hardware resource access and GPU WebGPU acceleration.