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

edit is successful but prompts stay the same #26

Open
nrosen1 opened this issue Nov 18, 2023 · 1 comment
Open

edit is successful but prompts stay the same #26

nrosen1 opened this issue Nov 18, 2023 · 1 comment
Assignees

Comments

@nrosen1
Copy link

nrosen1 commented Nov 18, 2023

image

tested with gptj + llama-13 models from huggingface

@arnab-api arnab-api self-assigned this Nov 24, 2023
@arnab-api
Copy link
Collaborator

Hi,

I need a little more context to look into this issue. How are you calculating your LREs? Does it seem to work for an example?

And, from the code snippet you provided I think the problem is how you are calling the editor. mt.model inside the editor is just a reference to the model itself. It will work the same. So,

First you should approximate an LRE (checkout this or the demo. Then, create the editor object like this,

editor = editors.LowRankPInvEditor(
    lre=lre,           # the LRE operator approximated on a set of samples
    rank=rank,    # rank of the edit
)

And, then you call the edit

result = editor(
     subject = sample.subject,
     target = target.subject,
)

If you think this is not the problem and you are doing everything properly, please provide the full script to reproduce this issue. And, I will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants