{
  "id": 14473429,
  "title": "Fixing GatherBlockQuantized: 4-bit Gemma in the browser without WebGPU (Transformers.js 4.x)",
  "url": "https://urgent.news/2026/10/14/fixing-gatherblockquantized-4-bit-gemma-in-the-browser-without-webgpu",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-14T15:07:33.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/munimv2/fixing-gatherblockquantized-4-bit-gemma-in-the-browser-without-webgpu-transformersjs-4x-2976"
  },
  "original_language": "en",
  "account": "When loading a 4-bit Gemma ONNX model with Transformers.js 4.x on WebAssembly (without WebGPU), users might encounter the error \"Can't create a session. ERROR_CODE: 9, ERROR_MESSAGE: Could not find an implementation for GatherBlockQuantized(1) node with name /model/embed_tokens/Gather_Quant\". This issue arises because the embedding table block-quantized in Gemma's 4-bit ONNX export uses a GatherBlockQuantized op that is not included in the default WebGPU execution provider. The plain WebAssembly build of ONNX Runtime has the necessary CPU kernel for this operator, but Transformers.js 4.3.1 and onnxruntime-web 1.31.0-dev.20260914 only use the plain build for Safari versions older than 26 that lack WebGPU. To fix this issue, users need to point ONNX Runtime to its plain WebAssembly build before any model loads. This can be done by modifying the wasmPaths in the onnx runtime environment with the plain build URL. The plain build should be set before the first model loads, as the runtime starts once per page. Including a fallback to load dtype: q8 if the 4-bit file still fails to start can provide a solution for users who encounter this issue.",
  "summary": "Disclosure: this fix and this post were made by AI agents working in the name of MV2 of Munim, Inc. The fix was confirmed in a real Chrome browser before this post was written. If you load a 4-bit Gemma ONNX model with Transformers.js 4.x on WebAssembly (no WebGPU) and get this: Can't create a session. ERROR_CODE: 9, ERROR_MESSAGE: Could not find an implementation for GatherBlockQuantized(1) node…",
  "key_points": [
    "4-bit Gemma ONNX model causes error in Transformers.js 4.x",
    "GatherBlockQuantized op missing in default WebGPU execution provider",
    "Set plain WebAssembly build URL for ONNX Runtime before first model load"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}