-
Notifications
You must be signed in to change notification settings - Fork 270
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
TypeError: 'NoneType' object is not subscriptable. With trl==0.15.0 and later. #568
Comments
It's recommended to use liger kernel by simply passing I assume that the code you provided was meant to be Below is why the error occurred: trl v0.15.0 introduced a new functionality for SFTTrainer to additionally compute token accuracies. Since the computation requires logits and liger doesn't materialize logits, it is supposed to be blocked when using Liger. However, currently there is no dynamic way to check whether the model is using Liger, it can only be determined by the flag in SFTConfig. If one is trying to pass an existed model patched by Liger to cc @kashif |
Yes, that is a bug… any idea how best to check? I can then fix it by tonight.
|
In Liger side, I think we can add an extra attr |
as you like... for now I explicitly check for the |
🐛 Describe the bug
After updating trl, I got
TypeError: 'NoneType' object is not subscriptable
when using Liger Kernel.The error does to occur with
transformer.AutoModelForCausalLM
Error:
Reproduce
Minimal code to reproduce the error:
Versions
Environment Report:
The text was updated successfully, but these errors were encountered: