huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
132.32k stars 26.35k forks source link

Illegal instruction (core dumped) error: PowerPC8 #17344

Closed leonardottl closed 2 years ago

leonardottl commented 2 years ago

System Info

transformers              2.5.1
python3.8
pytorch                   1.10.2 

All packages installed with conda by way of the conda-forge or powerai repositories, all of them are ppc64-le compatible

Who can help?

I am trying to load a BERT pre-trained model. All imports work fine, and loading the tokenizer works fine, but loading the model does not.

I am running on an nvidia-docker2 container for pytorch, namely ibmcom/pytorch-ppc64le with updated libraries using only powerai repositories. The error occurs here:

import pandas as pd import numpy as np import matplotlib.pyplot as plt import torch import torch.nn as nn from sklearn.model_selection import train_test_split from sklearn.metrics import classification_report import transformers from transformers import BertTokenizer, BertForSequenceClassification

model = BertForMaskedLM.from_pretrained("dccuchile/bert-base-spanish-wwm-uncased")

@LysandreJik

Information

Tasks

Reproduction

import pandas as pd import numpy as np import matplotlib.pyplot as plt import torch import torch.nn as nn from sklearn.model_selection import train_test_split from sklearn.metrics import classification_report import transformers from transformers import BertTokenizer, BertForSequenceClassification

model = BertForMaskedLM.from_pretrained("dccuchile/bert-base-spanish-wwm-uncased")

Expected behavior

What is expected is that the model loads and I can use it to further train it.
github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.