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

Better error message when loading adapter models with peft dependency missing #34733

Open
maxjeblick opened this issue Nov 14, 2024 · 0 comments
Labels
Feature request Request for a new feature

Comments

@maxjeblick
Copy link

Feature request

Loading adapter models (such as https://huggingface.co/lightonai/MonoQwen2-VL-v0.1/tree/main) fails with an error message when peft isn't installed. The error message
OSError: lightonai/MonoQwen2-VL-v0.1 does not appear to have a file named pytorch_model.bin, model.safetensors, tf_model.h5, model.ckpt or flax_model.msgpack.
is a bit cryptic and requires the user to understand that

  • the model that will be loaded is a peft adapter
  • peft isn't installed in the current env

To improve UX, it would be useful to show a different error message such as "The model lightonai/MonoQwen2-VL-v0.1 is an adapter model. To load it, you need to install peft (hint: run pip install peft)".

Motivation

Improve UX. The user may get the impression that the model repository is corrupted.

Your contribution

This feature should probably be implemented by core maintainers that are familiar with the internals of the model loading code.

@maxjeblick maxjeblick added the Feature request Request for a new feature label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

1 participant