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.69k stars 729 forks source link

(V3) `examples/demo-stite` had problems generating results #907

Open NingW101 opened 2 months ago

NingW101 commented 2 months ago

System Info

transformers.js : @huggingface/transformers@3.0.0-alpha.13 browser: chrome node: v20.17.0

Environment/Platform

Description

Reproduction

  1. clone the repo
  2. cd examples/demo-site
  3. change the @xenova/transformers.js -> "@huggingface/transformers": "^3.0.0-alpha.10" in package.json
  4. npm i
  5. cd examples/demo-site/node_modules/@hugginface/transformers && npm i
  6. copy the webpack.config.js from the repo into the node_modules/@hugginface/transformers && npm run build
  7. cd examples/demo-site && npm run build && npm run preview
NingW101 commented 2 months ago

I submitted #903 to fix the bug in text-generation example, and root cause of the issue that newly generated token is not returned is similar, if this PR gets merged I can draft another patch to fix the rest of the text generation examples.