RuntimeError: probability tensor contains either `inf`, `nan` or element < 0

#18
by lcahill - opened

Getting this error only when running gemma 2.

Transformers version: transformers-4.43.3 (also get it when installing straight from github: transformers-4.44.0.dev0)

Pytorch: '2.3.1+cu118'
Cuda: 11.8

Google org
edited Aug 21

Hi @lcahill , Please try again by installing the latest stable transformers and torch version in your code using - !pip install -U transformers and !pip install torch=2.3.1 and let us know if the issue still persists. Thank you.

@Renu11 For torch version 2.3.1, is it recommended for all Gemma models? I wonder why not adopting 2.4.x.

Sign up or log in to comment