We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在做finetune的时候,dataset.py下data_collator方法,会对数据做截断,丢掉max_length之后的tokens。这样在做监督训练的会后,会把模型学习的label截掉,导致报错"No tokens available to compute loss."
是否在做token截断的时候只对input做,不影响label的获取
No response
- OS: - Python: - Transformers: - PyTorch: - CUDA (`python -c 'import torch; print(torch.version.cuda)'`):
The text was updated successfully, but these errors were encountered:
你好,个人认为这里很难改,因为不好同时兼顾自动判断有效token长度和个人的显存。
Sorry, something went wrong.
用swift框架吧,直接删除超长的数据
No branches or pull requests
是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?
该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?
当前行为 | Current Behavior
在做finetune的时候,dataset.py下data_collator方法,会对数据做截断,丢掉max_length之后的tokens。这样在做监督训练的会后,会把模型学习的label截掉,导致报错"No tokens available to compute loss."
期望行为 | Expected Behavior
是否在做token截断的时候只对input做,不影响label的获取
复现方法 | Steps To Reproduce
No response
运行环境 | Environment
备注 | Anything else?
No response
The text was updated successfully, but these errors were encountered: