transformers.js icon indicating copy to clipboard operation
transformers.js copied to clipboard

Example not working on Chrome/Arc v.124(M1 Mac)

Open justrach opened this issue 1 year ago • 1 comments

System Info

M1 Mac Sonoma Using the example code.

Environment/Platform

  • [X] Website/web-app
  • [ ] Browser extension
  • [ ] Server-side (e.g., Node.js, Deno, Bun)
  • [ ] Desktop app (e.g., Electron)
  • [ ] Other (e.g., VSCode extension)

Description

Using the repository from : https://github.com/xenova/transformers.js/tree/v3/examples/webgpu-chat and "@xenova/transformers": "github:xenova/transformers.js#v3", it gets stuck on ..loading model..

On the huggingface demo here is the output on the console: image

Meanwhile on the local page, here is how the output looks like: image

Reproduction

  1. Clone repo from https://github.com/xenova/transformers.js/tree/v3/examples/webgpu-chat
  2. npm i and do npm run dev;
  3. Go to url
  4. Load Model
  5. Model gets stuck on ...loading...

justrach avatar May 15 '24 07:05 justrach

Duplicate of https://github.com/xenova/transformers.js/issues/748.

xenova avatar May 15 '24 11:05 xenova

It should now work (commits: here and here)!

xenova avatar May 17 '24 13:05 xenova

Thanks! Do you have a page where there's documentation on how to convert ONNX models to ONNX-Web models by any chance

justrach avatar May 17 '24 17:05 justrach

Sure, we use Optimum, and you can find additional information there.

You can also use our helper conversion script for helping with quantization.

xenova avatar May 23 '24 20:05 xenova

Sure, we use Optimum, and you can find additional information there.

You can also use our helper conversion script for helping with quantization.

Thanks Joshua!

justrach avatar May 25 '24 07:05 justrach