CarperAI / CarperAI/trlx

Issues in experience rollout generation with FLAN-T5

Open
#468 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
4.8k
Forks
487
PR merge metrics
No merged PRs in 30d

Description

### 🐛 Describe the bug

When the `trlX` trainer makes a call to `model.generate` in the rollout phase, the process errors out with the following message:
```RuntimeError: probability tensor contains either `inf`, `nan` or element < 0```
There has been some documentation of this error on other bug reports in the `transformers` library (and perhaps this bug report is better suited there), but in all the cases I've seen, the generation kwargs are usually more exotic. In my case, I'm using a very basic sampling strategy, thus am not completely sure what's happened. My generation kwargs are:
```python
{
"max_new_tokens": 512,
"do_sample": True,
"top_k": 0,
"top_p": 1,
}
```

Could this be due to some kind of parameter collapse from training? Has anyone seen this kind of behavior before? Perhaps this is something unique to seq2seq models (as I'm using FLAN-T5 in my case)? Any and all help is appreciated.

### Which trlX version are you using?

`trlx==0.6.0`

### Additional system and package information

Python 3.9.12, transformers 4.27.1, Ubuntu 22.04.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.