esm icon indicating copy to clipboard operation
esm copied to clipboard

esm c (esmc-300m-2024-12 or esmc-600m-2024-12): AttributeError: property 'cls_token' of 'EsmSequenceTokenizer' object has no setter.

Open 595693085 opened this issue 8 months ago • 2 comments

When using the latest version of esmc (esmc==3.2.0), the code "model = ESMC.from_pretrained("esmc_300m")" throws the following error: AttributeError: property 'cls_token' of 'EsmSequenceTokenizer' object has no setter. Currently, there appears to be no solution available online, and we can only wait for the developers to explain or fix the issue. Based on testing, the error does not occur when the esm version is below 3.1.5, but it consistently occurs with version 3.1.5 or above. The current workaround is to downgrade esm to version 3.1.4. Does anyone have a better solution?

595693085 avatar May 15 '25 08:05 595693085

Hi, I also encountered the same problem. At that time, I lowered the ESM to version 3.1.4 but still couldn't solve it.

xiaofeng0118 avatar May 26 '25 06:05 xiaofeng0118

Hi, I also encountered the same problem. At that time, I lowered the ESM to version 3.1.4 but still couldn't solve it.

This issue occurs when deploying the model locally, but it doesn't happen if the model is loaded directly from Hugging Face. You could give that a try.

595693085 avatar Aug 04 '25 09:08 595693085