0hq / WebGPT

Run GPT model on the browser with WebGPU. An implementation of GPT inference in less than ~1500 lines of vanilla Javascript.
https://kmeans.org
Other
3.61k stars 206 forks source link

Error loading GPT2 on local #26

Closed abhayshiravanthe closed 1 year ago

abhayshiravanthe commented 1 year ago

Steps to duplicate

  1. Clone the repo
  2. serve the files using serve npm package
  3. Open on Canary with Unsafe WebGPU enabled
  4. Click on "Load GPT2 Model"

Current scenario - error on console Uncaught (in promise) SyntaxError: Unexpected token 'v', "version ht"... is not valid JSON

Expected - load the model successfully

shivam-singhal commented 1 year ago

Getting the same issue. Is this an issue with the main branch, or across the board?

felladrin commented 1 year ago

You need to install Git LFS and pull the repository files through it.

More details here:

abhayshiravanthe commented 1 year ago

I have installed Git LFS and pulled all large files.

0hq commented 1 year ago

Check if it's still an issue on latest, but this is most likely a Git LFS problem.

saram-aman commented 1 year ago

you can do it using Windows PowerShell or cmd (if using Windows)

aliasfoxkde commented 1 year ago

I'm not particularly familiar with node/npm/npx so I was running into the same issue. Wasn't related to Git LFS at all in my case, just created a batch file to launch locally with node using "npx serve" and it worked on clean install/clone. Thanks

0hq commented 1 year ago

Awesome!