Views
No views yet
maxBufferSize reports 2GB per buffer, but total allocation far exceeds thisggml-webgpu.cpp) has a buffer aliasing bug in the GLU shader that crashes all Gemma-4 MoE models. The GeGLU operation binds overlapping regions of the same GPU buffer as separate writable storage bindings — Vulkan allows this, WebGPU forbids it.src0 and src1 tensor views overlap (share the same backing buffer), force the NO_SPLIT shader variant which reads both halves from a single binding with offset computation. This follows the same pattern as PRs #22266 (RMS_NORM_MUL) and #22456 (SSM_SCAN).ggml-webgpu-shader-lib.hpp — Added overlap detection to GLU pipeline keyggml-webgpu.cpp — Skip separate src1 binding when overlappingglu.wgsl — Added INPLACE mode for src0/dst overlap case1# 1. Clone this repo
2git clone https://huggingface.co/LJTSG/gemma-webgpu
3
4# 2. Split your Gemma GGUF into <2GB chunks
5llama-gguf-split --split-max-size 512M /path/to/gemma-4-26B-A4B.gguf ./model_splits/gemma-26b
6
7# 3. Start the server
8node serve_gemma.js
9
10# 4. Open http://localhost:8150
11# Click "Load Model" → wait for 20GB download → "Generate"index.html — Test page with Load/Generate buttonsserve_gemma.js — Node.js server with Range requests + CORS/COEP/COOP headersmemory_test.html — WebGPU memory ceiling allocation testwllama-patch/ — The GLU aliasing fix (diff against wllama v3.4.1)