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 on MacOS #7

Closed rpruizc closed 1 year ago

rpruizc commented 1 year ago

After cloning the repo and enabling WebGPU in my canary chrome 114, when I tried to load either of the models, I get a console error:

Loading model from folder: gpt2

VM16:1 Uncaught (in promise) SyntaxError: Unexpected token 'v', "version ht"... is not valid JSON

await (async)
onclick @ (index):18`

This, when run in an M1 MacOS 13.3 MacBook pro

Any ideas? Thanks!

felladrin commented 1 year ago

You need to install Git LFS (brew install git-lfs) and then run git lfs install && git lfs pull in the folder where you cloned this repository. This will start the download of the files from models folder.

After it finishes downloading them, it should work fine through a local server:

image
rpruizc commented 1 year ago

Thank you! That solved it.