Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to load a model with use_external_data_format in V3 alpha fails #963

Open
1 of 5 tasks
benc-uk opened this issue Oct 5, 2024 · 0 comments
Open
1 of 5 tasks
Labels
bug Something isn't working

Comments

@benc-uk
Copy link

benc-uk commented Oct 5, 2024

System Info

Version: [email protected]
Runtime: Vanilla JS (ESM) in browser, no React or Next.js

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

Trying to create a pipeline with the Phi-3 models
microsoft/Phi-3-mini-4k-instruct-onnx-web or Xenova/Phi-3-mini-4k-instruct which both have external data files, results in a error message that the external data file is not available (which is incorrect, the file exists!),
I am setting use_external_data_format: true and dtype: "q4f16" (or q4 in the case of the Xenova version of the model)

I don't believe this is a dupe of this issue, as I'm not using Node.js

image

Error: Can't create a session. ERROR_CODE: 1, 
ERROR_MESSAGE: Deserialize tensor model.layers.27.mlp.gate_proj.MatMul.weight_Q4 failed.Failed to load external data file ""model_q4f16.onnx_data"", error: Module.MountedFiles is not available.

Reproduction

Try to create a pipeline with use_external_data_format: true e.g.

import { env, pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/[email protected]'

pipeline = await pipeline('text-generation', 'microsoft/Phi-3-mini-4k-instruct-onnx-web', {
  device: 'webgpu',
  use_external_data_format: true,
  dtype: 'q4f16',
})
@benc-uk benc-uk added the bug Something isn't working label Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant