xenova / transformers.js

State-of-the-art Machine Learning for the web. Run 🤗 Transformers directly in your browser, with no need for a server!
https://huggingface.co/docs/transformers.js
Apache License 2.0
9.71k stars 571 forks source link

Have considered using wasm technology to implement this library? #763

Open ghost opened 1 month ago

ghost commented 1 month ago

Question

Hello, have you ever considered using wasm technology to implement this library? For example, rust's wgpu-rs and c++'s dawn are both implementations of webgpu. They can be converted to wasm and can also be accelerated with simd.

kungfooman commented 1 month ago

This library is based on ONNX Runtime for Web, which in turn uses WebAssembly (wasm). Do you mean something else or more wasm for slow functions in Transformers.js?