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

Support for Non-Language Models? #1

Open
vitrun opened this issue Nov 14, 2024 · 1 comment
Open

Support for Non-Language Models? #1

vitrun opened this issue Nov 14, 2024 · 1 comment

Comments

@vitrun
Copy link

vitrun commented Nov 14, 2024

Hey there! Loving the research you've shared. I've been playing around with finetuning Stable Diffusion models and ran into some snags. Here's the error I got:

  File "/root/ws/peft/src/peft/tuners/lora/eva.py", line 586, in get_eva_state_dict
    eva_state_dict = _get_eva_state_dict(
  File "/root/ws/peft/src/peft/tuners/lora/eva.py", line 303, in _get_eva_state_dict
    model_inputs_for_hooks = prepare_model_inputs_fn(inputs, peft_config)
  File "/root/ws/peft/src/peft/tuners/lora/eva.py", line 218, in prepare_model_inputs_fn_language_modeling
    mask = model_input.get("attention_mask", torch.ones_like(model_input["input_ids"])).bool()
KeyError: 'input_ids'

Looks like it's set up just for language models, right? Did I miss something, or is there a way to tweak it for other types of models too? Would love to expand the use case if possible! Thanks!

@sirluk
Copy link
Collaborator

sirluk commented Nov 14, 2024

@vitrun great to hear you would like to train out EVA on Diffusion models! While the implementation in this repo does not support this, we just merged EVA into peft: huggingface/peft#2142. So if you install peft from source you can already use it.

In the Readme you can find info about how to customize eva to your use case.

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