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

[P0] reft_model loading as reft_model not as pyvene object #45

Closed
XiaoshuangJi opened this issue Apr 11, 2024 · 5 comments
Closed

[P0] reft_model loading as reft_model not as pyvene object #45

XiaoshuangJi opened this issue Apr 11, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@XiaoshuangJi
Copy link

A reft_model got by the method get_reft_model() is an instance of ReftModel and we can call the method print_trainable_parameters() to show the number of parameters. However, a reft_model loaded by the method ReftModel.load() is an instance of intervenable_base.IntervenableModel and we can not call the method print_trainable_parameters(). Is this
reasonable?

@frankaging
Copy link
Collaborator

frankaging commented Apr 11, 2024

@Jixs0528 good catch! this should be fixed!

assigning as a bug with P0. we should prioritize this. @PinetreePantry do you want to take a look?

@frankaging frankaging changed the title reft_model [P0] reft_model loading as reft_model not as pyvene object Apr 11, 2024
@frankaging frankaging added the bug Something isn't working label Apr 11, 2024
@PinetreePantry
Copy link
Collaborator

@frankaging cool let me take a look

@frankaging
Copy link
Collaborator

Fixed! closing this for now. Feel free to reopen if other issues arise. Ty for raising this again.

@frankaging
Copy link
Collaborator

hey @Jixs0528 can you provide the error log? NoreftIntervention runs fine on my end.

@frankaging
Copy link
Collaborator

Screenshot 2024-04-12 at 1 38 08 AM

providing more evidence here. the weight matrix in NoreftIntervention is initialized with (model_dim, low_rank_dim). the weight matrix is in a shape of (low_rank_dim*model_dim).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants