﻿# Trellis-WebGPU: what the Qwen3-8B memory demo establishes

A trellis-coded Qwen3-8B runs in a browser demo with a short KV cache. Separate allocated buffers, hardware wording and numerical checks from broader claims.

Author: Retrivium editorial team
Updated: 2026-11-05
Canonical URL: https://retrivium.ai/journal/trellis-webgpu-qwen3-8b-four-gb-demo-limits/
Language: en

Trellis-WebGPU reports a small-memory browser execution path for a trellis-quantized Qwen3-8B. The result is best understood as a demonstrated short generation with a specific packed format, not a throughput study or proof that an arbitrary long conversation fits the same GPU.

## What is being ported

The project independently implements trellis quantization and a WGSL decoder for WebGPU. The original [QTIP paper](https://arxiv.org/html/2406.11235v4) explains the underlying idea: weights are represented through a trellis code rather than independently rounded scalar values, with a bitshift structure supporting parallel decoding and avoiding a large stored graph.

This distinction is useful when comparing formats. The nominal bit rate does not describe all metadata, decoding work or intermediate storage. A successful low-bit representation also needs an execution kernel that can recover the values efficiently on the target backend. QTIP's own hardware results are not measurements of this browser port.

## Keep the reported memory boundary

The [project README](https://raw.githubusercontent.com/Azimml/trellis-webgpu/main/README.md) reports approximately 2.9 GB of weights, a 256-token KV cache and 2.96 GB of application-allocated buffers for the larger model. It says a complete generation fits a 4 GB RTX 3050 in Chrome. The [model card](https://huggingface.co/Azimml/Qwen3-8B-trellis-3bit-webgpu) identifies a laptop RTX 3050 Ti instead. Preserve this source difference rather than silently assuming an identical exact GPU.

Application buffer accounting is not an independent measurement of total physical VRAM. Browser, driver and other workloads can consume memory beyond buffers tracked by the application. The short configured cache also matters: extending the supported context requires a new memory budget and a new test.

## Numerical checks have different scopes

The model card reports WikiText-2 perplexity 10.34 against 9.02 for the half-precision reference, without fine-tuning. That is a bounded quality comparison, not unchanged model behavior.

The repository describes kernel agreement and a smaller 135M model's top-5 logit agreement with a reference. The larger model's successful short output is another type of evidence. Do not upgrade the smaller-model check into a claim that every output distribution of Qwen3-8B was exhaustively validated.

A local acceptance set should include prompts whose outputs expose tokenizer, attention and context-boundary errors. Plausible geography answers alone cannot distinguish a generally correct implementation from one that fails only after a cache transition or on less common tokens.

## Use the supplied runtime format

The model card explicitly says this is not a standard Transformers checkpoint. It uses a manifest, sharded binary weights and incoherence-processing metadata for the project's runtime. An automatically generated library snippet on a hosting page is not evidence that a conventional loader understands that packed representation.

Keep the packed artifacts and their decoder revision together in the [software record](/journal/software-stack-reproducibility/). A later decoder change can invalidate a previous compatibility observation even when the displayed model name stays unchanged.

## What remains to establish

A meaningful device evaluation needs startup time, sustained prefill and decode measurements, longer context, repeated sessions and failures under memory pressure. Apply [timing and variability checks](/journal/gpu-benchmark-median-dispersion/) to completed work, not only shader submission.

The repository makes an inspectable browser-decoder experiment available. Its published demonstration supports feasibility within the stated short-cache configuration. It does not yet establish universal device compatibility, a performance ranking against other browser engines or a dependable maximum conversation length.
