Skip to content

Javascript web chat example is broken locally and in demo. #525

@drkclw

Description

@drkclw

When trying to run the phi3-mini demo located here: https://guschmue.github.io/ort-webgpu/chat/index.html I am seeing the following errors:

TypeError: Cannot read properties of undefined (reading 'run')
at LLM.generate (llm.js:209:1)
at Query (main.js:233:1)

2025-07-27 15:07:51.676000 [W:onnxruntime:, session_state.cc:1166 VerifyEachNodeIsAssignedToAnEp] Some nodes were not assigned to the preferred execution providers which may or may not have an negative impact on performance. e.g. ORT explicitly assigns shape related ops to CPU to improve perf.

2025-07-27 15:09:42.913699 [W:onnxruntime:, session_state.cc:1168 VerifyEachNodeIsAssignedToAnEp] Rerunning with verbose output on a non-minimal build will show node assignments.

TypeError: A float16 tensor's data must be type of function Float16Array() { [native code] }
at new ze (ort.webgpu.bundle.min.mjs:6:12047)
at LLM.initilize_feed (llm.js:135:44)
at LLM.load (llm.js:118:1)
at async Init (main.js:256:1)

The sample is also broken when trying to run locally although with different errors:

Error: no available backend found. ERR: [webgpu] TypeError: r.requestAdapterInfo is not a function
at On (ort.webgpu.min.js:6:1623)
at async e.create (ort.webgpu.min.js:6:18113)
at async LLM.load (llm.js:113:1)
at async Init (main.js:256:1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions