title: loading sequenceTagger of (bigger) language models in flair kills kernel
body: <p>I am rather new to NLP and especially to flair so I came across this issue while trying to work through the flair <a href="https://github.com/flairNLP/flair/blob/master/resources/docs/TUTORIAL_2_TAGGING.md" rel="nofollow noreferrer">tutorial</a> provided on their github-page. Everything worked just fine as long as I used the English language model which can be loaded via <code>SequenceTagger.load('ner')</code> But when I changed that model and tried to run the code my kernel got killed when the model was supposed to be loaded. Code looks as simple as this: <code>tagger = SequenceTagger.load('de-ner')</code>
  The log in the terminal is as follows:</p>
  <hr />
  <blockquote>
  <p># /home/user/anaconda3/envs/flair/lib/python3.8/__pycache__/netrc.cpython-38.pyc
  matches /home/user/anaconda3/envs/flair/lib/python3.8/netrc.py</p>
  <p># code object from '/home/user/anaconda3/envs/flair/lib/python3.8/__pycache__/netrc.cpython-38.pyc'</p>
  <p># import 'netrc' # &lt;_frozen_importlib_external.SourceFileLoader object
  at 0x7f83c1e6f700&gt; 2022-01-16 16:37:19,414 loading file
  /home/user/.flair/models/ner-german/a125be40445295f7e94d0afdb742cc9ac40ec4e93259dc30f35220ffad9bf1f6.f46c4c5cfa5e34baa838983373e30051cd1cf1e933499408a49e451e784b0a11</p>
  <p># /home/user/anaconda3/envs/flair/lib/python3.8/site-packages/torch/nn/backends/__pycache__/__init__.cpython-38.pyc
  matches
  /home/user/anaconda3/envs/flair/lib/python3.8/site-packages/torch/nn/backends/__init__.py</p>
  <p># code object from '/home/user/anaconda3/envs/flair/lib/python3.8/site-packages/torch/nn/backends/__pycache__/__init__.cpython-38.pyc'
  import 'torch.nn.backends' #
  &lt;_frozen_importlib_external.SourceFileLoader object at 0x7f83c1e6ff10&gt;</p>
  <p># /home/user/anaconda3/envs/flair/lib/python3.8/site-packages/torch/nn/backends/__pycache__/thnn.cpython-38.pyc
  matches
  /home/user/anaconda3/envs/flair/lib/python3.8/site-packages/torch/nn/backends/thnn.py</p>
  <p># code object from
  '/home/user/anaconda3/envs/flair/lib/python3.8/site-packages/torch/nn/backends/__pycache__/thnn.cpython-38.pyc'
  import 'torch.nn.backends.thnn' #
  &lt;_frozen_importlib_external.SourceFileLoader object at 0x7f83c1e6fd00&gt;</p>
  <p>Killed</p>
  </blockquote>
  <hr />
  <p>So I assume the problem has something to do with the import of torch.nn.backends.thnn but googling for it did not provide any helpful hits.
  Since some models are loading fine, part of the problem could be the size of the models: smaller ones are working (such as 'ner'), larger ones like 'de-ner' or 'de-ner-large' cannot be loaded/are causing this error.
  I already tried the most obvious (deleting and reloading the model); result stays the same.</p>
  <p>Version of possibly relevant packages etc. are:
  python 3.8.12
  flair 0.10
  pytorch 1.10.0
  transformers 4.15.0</p>
  <p>Any hints are much appreciated! I will gladly provide more information if needed!</p>