-
Notifications
You must be signed in to change notification settings - Fork 160
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
[FT] Custom model to TransformersModel #489
Comments
Hi! Thanks for the kind words! Easy way is simply to upload your quantized model to the hub, or save it locally and load from there. |
Yes I have been playing with it through the python API, passing AttributeError: 'TransformersModel' object has no attribute 'generation_config_dict' This happens also when loading a model from HF and then passing it to pipeline (no quantization or any other modification really to a normal |
After some experimenting, the issue seems to be due to a mismatch in how Also, unrelated to this, I noticed some smaller issues around some hyper-params like A similar issue seems to exist around the I can post a script to reproduce but I basically copy-pasted the API tutorial you linked with some minor modifications here and there. |
I second @Giuseppe5 's observations. @clefourrier, I definitely think it's a bug. |
I ended up doing a very ugly looking fix in a personal fork, but I would not recommend that for anything if not to understand what's missing to get custom models to "work", but a lot of clean-up is needed starting from there. I could try to put that into words if there's the chance to get a PR for that. |
@Giuseppe5 , |
Hello everyone,
First of all, thanks for the amazing work.
Issue encountered
I have been trying to use lighteval but I'm facing an issue.
From my current understanding, it is only possible to pass a
pretrained
string toTransformersModelConfig
, which means the model has to be already present on the hub and can't be modified in any way before using it for eval.I tried passing
model
directly toPipeline
but I get the following error:Solution/Feature
Instead of passing a
pretrained
string toTransformersModelConfig
, I was wondering if it's possible to pass atorch.nn.Module
and use that for evaluation purpose.The idea is to pass to
lighteval
a transformed HF model (e.g., after applying quantization through third-party libraries).Please let me know if I'm using the library wrong or misunderstanding something.
Many thanks,
Giuseppe
The text was updated successfully, but these errors were encountered: