huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
132.24k stars 26.34k forks source link

Is it possible to make wasm support all models in huggingface? #33293

Closed wa008 closed 1 week ago

wa008 commented 2 weeks ago

Feature request

As title Now, there are several model that support wasm.

  1. whisper.wasm, which can convert audio to text.
  2. secret-llama: text-to-text LLM, realize by web-gpu
  3. web-llm: text-to-text LLM If it is possible to make a project to support wasm for all huggingface models, this can definitely accelerate the development of LLM.

Motivation

Wasm have below advantages

  1. run locally, no server or extran machine needed, which can help user to try new model without any cost.
  2. no any privacy concerns

Your contribution

I can help to develop related project or function. I know it will be a huge project,I can not do that by myself.

LysandreJik commented 1 week ago

The best suited to answer you is probably @xenova :)

xenova commented 1 week ago

Hi @wa008! I responded to a similar question here (maybe you?), so let me copy my response here:

We have Transformers.js, the JavaScript/WASM/WebGPU port of the python library, which supports ~100 different architectures.

Is that the kind of thing you're looking for? :)

wa008 commented 1 week ago

Hi @wa008! I responded to a similar question here (maybe you?), so let me copy my response here:

We have Transformers.js, the JavaScript/WASM/WebGPU port of the python library, which supports ~100 different architectures.

Is that the kind of thing you're looking for? :)

Yes, this project is great! Thanks a lot.