For a WebGPU implementation, one can use transformers.js directly (or many other libraries actually), maybe WebGL is more original.
[1]: https://huggingface.co/docs/transformers.js/index