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

Fix bug w.r.t. using gradient_checkpoint without tuning embed_tokens and Fix typo of template in langchain_qa.py #175

Merged
merged 3 commits into from
Aug 28, 2023

Conversation

Qznan
Copy link
Contributor

@Qznan Qznan commented Aug 23, 2023

Description

Fix bug w.r.t. using gradient_checkpoint without tuning embed_tokens. It's also mentioned in the wiki预训练脚本#节省显存小提示. The code basically refers to the latest version of PEFT to solve this problem.
After the fix, one can use --gradient_checkpointing while not using --modules_to_save ${modules_to_save} to run without Exception like RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn

Fix typo in template string of langchain_qa.py. Replace '"\nn" with "\n\n".

Related Issue

None

@Qznan Qznan closed this Aug 23, 2023
@Qznan Qznan reopened this Aug 23, 2023
@Qznan Qznan changed the title Fix template typo in langchain_qa.py @Qznan Fix bug w.r.t. using gradient_checkpoint without tuning embed_tokensFix template typo in langchain_qa.py Aug 23, 2023
@Qznan Qznan changed the title @Qznan Fix bug w.r.t. using gradient_checkpoint without tuning embed_tokensFix template typo in langchain_qa.py Fix bug w.r.t. using gradient_checkpoint without tuning embed_tokensFix template typo in langchain_qa.py Aug 23, 2023
@Qznan Qznan changed the title Fix bug w.r.t. using gradient_checkpoint without tuning embed_tokensFix template typo in langchain_qa.py Fix bug w.r.t. using gradient_checkpoint without tuning embed_tokens and Fix typo of template in langchain_qa.py Aug 23, 2023
@ymcui
Copy link
Owner

ymcui commented Aug 25, 2023

Thanks for your contribution. As we are now preparing for the next release, we will review this PR after that.

@ymcui ymcui merged commit 4746728 into ymcui:main Aug 28, 2023
1 check passed
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

Successfully merging this pull request may close these issues.

3 participants