Open razzzeeev opened 3 months ago
Same issue here. datasets==2.14.6 pandas==2.2.2 peft==0.10.0 scikit_learn==1.3.2 torch==2.2.0 git+https://github.com/huggingface/transformers.git@main sentence-transformers trl
The same issue is happening here. I tried debugging it, and it seems that periods (full stops) at certain points either resolves the issue or causes the error to appear. In some instances, removing full stops resolves the error. Example:
IndicLID_model.batch_predict(["maahe noor. Kahaniyan"], batch_size=1)
AttributeError: 'BertModel' object has no attribute 'attn_implementation'
IndicLID_model.batch_predict(["maahe noor Kahaniyan"], batch_size=1) # full stop removed
[('maahe noor Kahaniyan', 'mai_Latn', 0.81997746, 'IndicLID-FTR')]
While in other cases where the full stop initially worked fine, removing it causes the error to reappear. Example:
IndicLID_model.batch_predict(["Band ne is gaane ka ek animated nuskha jaari kiya hai jis kee hidayat Zeeshan Parvez ne dee hain."], batch_size=1)
[('Band ne is gaane ka ek animated nuskha jaari kiya hai jis kee hidayat Zeeshan Parvez ne dee hain.', 'eng_Latn', 0.937715, 'IndicLID-FTR')]
IndicLID_model.batch_predict(["Band ne is gaane ka ek animated nuskha jaari kiya hai jis kee hidayat Zeeshan Parvez ne dee hain"], batch_size=1) # full stop removed
AttributeError: 'BertModel' object has no attribute 'attn_implementation'
@ammarbagasrawala , @s-smits Hi, There is some problem with the new Transformer Version itself, try downgrading it, it worked for me. FYI https://github.com/huggingface/transformers/issues/30965#issuecomment-2246229856
@razzzeeev thanks a lot!! it worked
I am using a dataframe to predict the langauge. But encountering above issue.