Notes
Short write-ups of problems found running ML models in the browser: ONNX Runtime Web errors, Transformers.js gaps, WebGPU and quantization.
- Fix “Missing required scale” in ONNX Runtime Web — Why quantized decoders fail on ONNX Runtime Web's WASM backend with qdq_actions.cc “Missing required scale”, and the per-graph dtype fix.
- Transformers.js NER and QA return no offsets — Transformers.js token-classification and question-answering leave start and end undefined. How to recover character offsets safely.
- WebGPU shader-f16: check it before loading q4f16 — “Program Gather requires f16 but the device does not support it”: why having a GPU is the wrong check for fp16 and q4f16 models.
- Send Transformers.js tensors through postMessage — Why a Transformers.js Tensor “could not be cloned” and a RawImage loses its methods in a Web Worker, and how to serialise both.
- When int8 quantization is wrong, not just worse — Measured cases where a q8 ONNX model gives a confident wrong answer in the browser, and how a known-answer test catches it.