TypeError: __init__() got an unexpected keyword argument 'gradient_checkpointing'

TypeError: __init__() got an unexpected keyword argument 'gradient_checkpointing'

this is the error and
the code

我一直在尝试使用我自己的一个模型作为预训练模型来训练模型,但每次 运行 时,我都会收到此错误。当我使用以前使用的预训练模型而不是我自己的模型时,我不会收到该错误。请帮我解决这个错误

您的 config.json 文件可能已丢失 "gradient_checkpointing": true, 我认为这会有所帮助。