From the huggingface datasets 4.0.0 [release notes](https://github.com/huggingface/datasets/releases/tag/4.0.0): > trust_remote_code is no longer supported code_generation.py should be updated in light of this, or datasets<4.0 should be used.