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

The "distilbert" example fails to load the PyTorch model #2666

Open
fbilhaut opened this issue Dec 13, 2024 · 0 comments
Open

The "distilbert" example fails to load the PyTorch model #2666

fbilhaut opened this issue Dec 13, 2024 · 0 comments

Comments

@fbilhaut
Copy link

fbilhaut commented Dec 13, 2024

Reproduced a simple project with the main.rs from candle-examples/examples/distilbert with minimal dependencies.

Running:

cargo run --release -- --use-pth --prompt "..."

Tries to load pytorch_model.bin and fails with the following error:

invalid Zip archive: Could not find central directory end

Using model.safetensors works, though. I suppose that the PyTorch format of this quite ancient model file (distilbert-base-uncased) is not what is expected (not in ZIP file format).

Is there a way to deal with this using Candle ?

@fbilhaut fbilhaut changed the title distilbert example not working when using PyTorch model The "distilbert" example fails to load the PyTorch model Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant