huggingface / huggingface/course

Chapter 12 6 UnslothGRPOTrainer error

Open
#1,005 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
MDX
Stars
4.2k
Forks
1.4k
Avg merge
13m
Merged PRs (30d)
1

Description

/unsloth_compiled_cache/UnslothGRPOTrainer.py", line 1054, in compute_loss
prompt_ids, prompt_mask = inputs["prompt_ids"], inputs["prompt_mask"]
~~~~~~^^^^^^^^^^^^^^
TypeError: list indices must be integers or slices, not str

As I began this chapter after completing Chapter 5, I was using trl version 0.14.0, which resulted in the error described above.

Learners can update the trl version to resolve this issue.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.