I’m getting the same error in the colab notebook for the NLP Course: Lesson 3 - Fine-tuning model with the Trainer API. In order to get around it you can:
- Run
pip install accelerate -U
in a cell - In the top menu click Runtime → Restart Runtime
- Do not rerun any cells with
!pip install
in them - Rerun all the other code cells and you should be good to go!
On a side note, be sure to turn on a GPU for this notebook by clicking Edit → Notebook Settings → GPU type - from the top menu. This was the next thing that got me : )