Fix TypeError: Accelerator.__init__() got an unexpected keyword argument ‘use_seedable_sampler’ – LLM Tutorial

By | May 27, 2024

When we are fine-tuning a llm model, we get this error: TypeError: Accelerator.__init__() got an unexpected keyword argument ‘use_seedable_sampler’

In this tutorial, we will introduce you how to fix it.

Fix TypeError Accelerator.__init__() got an unexpected keyword argument 'use_seedable_sampler' - LLM Tutorial

Why does this error occur?

The version of accelerator is old.

For example:

Our transformers is 4.40.2, however, the version of accelerator is accelerate==0.21.0.

How to fix this error?

Install a new accelerate version.

pip install accelerate==0.30.1

Then, we will find this error is fixed.

Leave a Reply

Your email address will not be published. Required fields are marked *