-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Compatibility with Models from PyReft Library #2012
Comments
Hi there! Thanks for your interest. PyREFT is a very cool project, but I think ultimately we can't support every external library / option without making either the maintenance overhead too high or making the code far less modifiable for a majority of users. I'm therefore disinclined to add this as a feature natively, though if many users request it or say a wide variety of ready-to-use REFTs are available on the HF hub then perhaps we can reconsider. I'd recommend modifying the Might leave this issue open for now so that others can express interest if it's an often-requested feature though. |
Thank you very much for your prompt and detailed response. I completely understand that it's almost impossible to support every new model or library out there. Regarding your suggestions, I found the example at https://github.com/state-spaces/mamba/blob/main/evals/lm_harness_eval.py quite helpful. However, I'm still missing some contextual information to confidently proceed with customizing the library for a specific model. Would it be possible to provide a minimal guide or some additional support for writing a main script? For instance, inspired by the tutorial for loading REFT models available at the following link: In this tutorial, the model is essentially loaded with:
And used with:
I'd appreciate any guidance or resources you could provide to help with integrating REFT models into the lm-eval framework. This could also serve as a first script to be added to the examples section, benefiting other users with similar needs. Thank you again for your time and assistance! |
The Mamba example is pretty nice in that you can simply call I'd recommend in this instance subclassing HFLM, and overwriting the |
Great! I also assume that I need to overwrite the |
For cases that can be solved with subclass of LM class, ability to load them in the way like included tasks might be a solution. But this functionality is still awaiting PRs: #1457 |
Hi, @LSinev! I think the solution suggested by @haileyschoelkopf can be "easy". I think that I need to reimplement the init and the |
Hi everyone,
First, I'm sorry if this issue has already been raised.
I wanted to ask if the framework supports models obtained through the PyReft library (https://github.com/stanfordnlp/pyreft). Currently, in lm-eval, there is support for models obtained by applying LoRA through PEFT, but I haven’t found any information regarding loading models obtained via LoReft.
Is there anyone who can help me with this?
Thank you for your time and help!
The text was updated successfully, but these errors were encountered: