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

question on training loss #9

Open
zluw1117 opened this issue May 30, 2022 · 1 comment
Open

question on training loss #9

zluw1117 opened this issue May 30, 2022 · 1 comment

Comments

@zluw1117
Copy link

Thank you for sharing this great work.
I am using a similar code and added soft prompt tuning to encoder. However, my training loss is super strange, I keep getting training loss > 40 (the regular training loss should be small for my case, usually >0.001). Did you have the same issue? Thanks 🙏

@albertbn
Copy link

albertbn commented Mar 23, 2023

hey, I was wondering if that's all it takes to be able to train a model with soft prompt. I mean the example.ipynb in this repo. So once I have the SoftEmbedding set via model.set_input_embeddings(s_wte) and I pad the input_ids and attention_mask from then on it's regular training? I mean - in the training/eval loop I just pad the inputs and that's all

Can someone provide a brief example of the prep needed for fine tuning (with freezing the base model) and saving and reloading the trained SoftEmbedding

If it's that simple, how come Huggingface's implementation for PEFT even just for the soft prompt is large and overwhelming?

BTW skipping the padding (mentioned by someone else) doesn't work for me in the example.ipynb. My HF transformers version is transformers==4.25.1

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