Skip to content

[FT] Custom model to TransformersModel #489

Open
@Giuseppe5

Description

@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 to TransformersModelConfig, 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 to Pipeline but I get the following error:

AttributeError: 'TransformersModel' object has no attribute 'generation_config_dict'

Solution/Feature

Instead of passing a pretrained string to TransformersModelConfig, I was wondering if it's possible to pass a torch.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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions