huggingface / 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
11.87k stars 748 forks source link

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

Open ghost opened 5 months ago

ghost commented 5 months 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 5 months 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?