Skip to content

Unable to use gemma 3n onnx model? #1383

@grctest

Description

@grctest

System Info

Windows, node.

Environment/Platform

  • Website/web-app
  • Browser extension
  • Server-side (e.g., Node.js, Deno, Bun)
  • Desktop app (e.g., Electron)
  • Other (e.g., VSCode extension)

Description

bun run .\test.js
20 | constructor(pathOrBuffer, options) {
21 | _OnnxruntimeSessionHandler_inferenceSession.set(this, void 0);
22 | (0, binding_1.initOrt)();
23 | __classPrivateFieldSet(this, _OnnxruntimeSessionHandler_inferenceSession, new binding_1.binding.InferenceSession(), "f");
24 | if (typeof pathOrBuffer === 'string') {
25 | __classPrivateFieldGet(this, _OnnxruntimeSessionHandler_inferenceSession, "f").loadModel(pathOrBuffer, options);
^
error: Deserialize tensor /embed_tokens_per_layer/Gather_quantized failed.tensorprotoutils.cc:1080 onnxruntime::utils::GetExtDataFromTensorProto External initializer: /embed_tokens_per_layer/Gather_quantized offset: 0 size to read: 2013265920 given file_length: 1811281499 are out of bounds or can not be read in full.
at new OnnxruntimeSessionHandler (C:\Users\user\Desktop\git\g3n-electron-webcam-agents\node_modules\onnxruntime-node\dist\backend.js:25:13)
at C:\Users\user\Desktop\git\g3n-electron-webcam-agents\node_modules\onnxruntime-node\dist\backend.js:67:29

Reproduction

Run the example image classification script, using v3.7.0, run into error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions