ColossalAI
ColossalAI copied to clipboard
[BUG]: when i use coloasslai to load the huggingface model "Salesforce/codegen-2B-mono", i get the error "AttributeError: _old_init is not found in the CodeGenAttention, please make sure that you have imported CodeGenAttention before entering the context."
🐛 Describe the bug
when i use coloasslai to load the huggingface model "Salesforce/codegen-2B-mono":https://github.com/salesforce/CodeGen, i get the error "AttributeError: _old_init is not found in the CodeGenAttention, please make sure that you have imported CodeGenAttention before entering the context."
Environment
No response
Have a similar issue with a ViT transformer. In my case at least, it seems to stem from using the Auto huggingface classes inside the context.
Have a similar issue with a ViT transformer. In my case at least, it seems to stem from using the Auto huggingface classes inside the context.
Hi grafail, have you fixed the issue?
Hi @lupingllp and @grafail Could you please provide more details about your issue? It's hard for us to follow/reproduce/fix it now. Thanks.
Hi @lupingllp and @grafail , just as the bug hint, you need to import the CodeGenAttention class rather than only replace the model. We are also working at 'lazy init', which can reduce the corresponding work. Thanks.
We have updated a lot. Please check the latest code. This issue was closed due to inactivity. Thanks.