tutorials
tutorials copied to clipboard
Text transformer tutorial doesn't work with the latest transformer version
🐛 Bug
This text transformer tutorial fails with the transformers==4.31.0 version
and works fine with transformers==4.27.0 and bellow
To Reproduce
Run the notebook
Error: " File "/opt/conda/envs/cb-ml/lib/python3.10/site-packages/torch/autograd/init.py", line 200, in backward Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn Epoch 0: 0%| | 0/32 [00:01<?, ?it/s] "
Any thoughts on what could be the root of this issue? So far you refer to Torch so not sure how this can be fixed in lightning...
the latest build is with transformers==4.43.1
so I believe this was resolved :flamingo:
https://github.com/Lightning-AI/tutorials/blob/publication/.notebooks/lightning_examples/text-transformers.yaml