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

Shouldn't this work? #v3 #784

Open GianlucaIavicoli opened 4 weeks ago

GianlucaIavicoli commented 4 weeks ago

Question

Issue with Transformer.js v3 and WebGPU

Description

Yesterday I installed transformer.js with the "v3" branch to test the new features with WebGPU, but I get an error.

Error Message

@xenova_transformers.js?v=3b2ad0ed:24861 Uncaught (in promise)
Error: This pipeline is not yet supported in Transformers.js v3.

My code

const transcriber = await pipeline("automatic-speech-recognition", "Xenova/whisper-small.en", {
    device: 'webgpu',
    dtype: 'fp32'
});

Additional Information

With the following code, it works perfectly fine:

const extractor = await pipeline('feature-extraction', 'Xenova/all-MiniLM-L6-v2', {
    device: 'webgpu',
    dtype: 'fp32', // or 'fp16'
});
xenova commented 4 weeks ago

Hi there. As you can see by the error message, this pipeline still a work in progress. We'll be putting out a whisper webgpu demo soon though, so stay tuned for updates!

GianlucaIavicoli commented 4 weeks ago

I'm developing a project, is there an estimated date available for this feature? Thank you

xenova commented 4 weeks ago

Unfortunately not... Everything it still quite experimental at the moment.