# RuntimeError when running on Colab GPU

**URL:** <https://discuss.huggingface.co/t/runtimeerror-when-running-on-colab-gpu/12061>\
**Category:** 🤗Transformers\
**Created:** [November 19, 2021, 9:39am UTC](https://discuss.huggingface.co/t/runtimeerror-when-running-on-colab-gpu/12061 "2021-11-19T09:39:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rory-hurley-gds](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/rory-hurley-gds/32/3243_2.png) [@rory-hurley-gds](https://discuss.huggingface.co/u/rory-hurley-gds)\
**Post date:** [November 19, 2021, 9:39am UTC](https://discuss.huggingface.co/t/runtimeerror-when-running-on-colab-gpu/12061/1 "2021-11-19T09:39:53Z")

</div>

Hello,

I am trying to train a model for token classification (NER), more or less following the example on the Huggingface course on [Token Classification](https://huggingface.co/course/chapter7/2?fw=pt).

When I attempt to initiate arguments, using transformers.TrainingArguments, as below:

```auto
from transformers import TrainingArguments

args = TrainingArguments(
    "bert-finetuned-ner",
    evaluation_strategy="epoch",
    save_strategy="epoch",
    learning_rate=2e-5,
    num_train_epochs=3,
    weight_decay=0.01,
    push_to_hub=True,
)

```

I get the error:

```auto
RuntimeError: Failed to import transformers.training_args because of the following error (look up to see its traceback):
/usr/local/lib/python3.7/dist-packages/_XLAC.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN2at13_foreach_erf_EN3c108ArrayRefINS_6TensorEEE

```

Why is this? Is this a bug for transformers on Colab GPUs?

---

<div class="post-metadata">

**Author:** ![nielsr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nielsr/32/39617_2.png) [@nielsr](https://discuss.huggingface.co/u/nielsr)\
**Post date:** [November 19, 2021, 2:16pm UTC](https://discuss.huggingface.co/t/runtimeerror-when-running-on-colab-gpu/12061/2 "2021-11-19T14:16:16Z")

</div>

Can you provide a Colab to reproduce this error? What’s your Transformers version?

---

<div class="post-metadata">

**Author:** ![raphaelmerx](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/raphaelmerx/32/56182_2.png) [@raphaelmerx](https://discuss.huggingface.co/u/raphaelmerx)\
**Post date:** [November 28, 2021, 7:55am UTC](https://discuss.huggingface.co/t/runtimeerror-when-running-on-colab-gpu/12061/3 "2021-11-28T07:55:47Z")

</div>

Same issue here when following the [Fine-tuning a masked language model](https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/chapter7/section3_pt.ipynb) tutorial with a GPU Colab instance, which installs transformers v4.12.5 and torch v1.10. Could this be linked to the installation of pytorch from a TPU wheel [https://storage.googleapis.com/tpu-pytorch/wheels/torch\_xla-1.9-cp37-cp37m-linux\_x86\_64.whl](https://storage.googleapis.com/tpu-pytorch/wheels/torch_xla-1.9-cp37-cp37m-linux_x86_64.whl) in the first cell?

EDIT: opened an issue in the notebooks repo: [`undefined symbol` error when running chapter 7 notebooks on a GPU instance · Issue #120 · huggingface/notebooks · GitHub](https://github.com/huggingface/notebooks/issues/120)
