web-llm icon indicating copy to clipboard operation
web-llm copied to clipboard

Where is the source code for vicuna-7b_webgpu.wasm?

Open zeritonius opened this issue 1 year ago • 6 comments

Where is the source code for vicuna-7b_webgpu.wasm, please?

Thank you.

zeritonius avatar Apr 18 '23 16:04 zeritonius

We will post a tutorial on how to build the model into generated source code, but currently that's not ready until we migrate the vicuna-v0 to vicuna-v1.1 (The reason is that vicuna-v0 is deprecated and it's complicated to get its weight compared with v1.1). Do you want a link to the generated code in .wgsl format right now?

jinhongyii avatar Apr 18 '23 21:04 jinhongyii

I will wait for that tutorial. Thank you for the info.

zeritonius avatar Apr 18 '23 21:04 zeritonius

hi, you can find it in https://github.com/mlc-ai/web-llm/tree/gh-pages/docs/dist/vicuna-7b

Ryan-yang125 avatar Apr 20 '23 04:04 Ryan-yang125

@Ryan-yang125 At the above location, I found the compiled file | the executable (.wasm), but not the text file | the source file (.wat). Do I need a special kind of access to see the .wat file?

Thank you.

zeritonius avatar Apr 20 '23 15:04 zeritonius

Thanks for your patience. We've just added an instruction for building models and deploy locally. Feel free to check it out. The wasm filet will be under dist/vicuna-7b-v1 after running build.py

jinhongyii avatar Apr 22 '23 04:04 jinhongyii

Additional info to get source code, run

python3 build.py --target webgpu --debug-dump

you will see the IR and wgsl file under dist/vicuna-7b-v1/debug

jinhongyii avatar Apr 22 '23 04:04 jinhongyii