Skip to content

fs-eire/ort-webgpu-nodejs-chatapp-prototype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimal example of using ONNX Runtime with WebGPU in Node.js

Setup steps

  1. build onnxruntime with WebGPU

    use branch fs-eire/webgpu-ep

    in the root folder of onnxruntime source code, run the following command:

    build --config Debug --use_webgpu --build_nodejs --skip_tests
    
  2. make a symbol link to the root folder of ONNX Runtime source code. (assume the source code is in C:\code\onnxruntime)

    mklink /D /J onnxruntime C:\code\onnxruntime
    
  3. run npm install in the root folder of this project.

  4. prepare model.

    md models\microsoft
    cd models\microsoft
    git clone https://huggingface.co/microsoft/Phi-3-mini-4k-instruct-onnx-web
    

    if not working, try this link.

  5. run node .\main.js to run the sample code.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published