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

list indices must be integers or slices, not str #43

Open
zy1998-c opened this issue Feb 21, 2025 · 1 comment
Open

list indices must be integers or slices, not str #43

zy1998-c opened this issue Feb 21, 2025 · 1 comment

Comments

@zy1998-c
Copy link

prompt_ids, prompt_mask = inputs["prompt_ids"], inputs["prompt_mask"]
~~~~~~^^^^^^^^^^^^^^
list indices must be integers or slices, not str
用Unsloth训练,一直报这个错?什么原因?

@ShawnHoo7256
Copy link

遇到同样问题,解决方法:

注意 trl和unsloth版本,可以试一下
pip install unsloth trl==0.15.0

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