No, it doesn’t resolve the error. Rather throws another one:
  BertModel.to(options.device)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 425, in to
    return self._apply(convert)
AttributeError: 'torch.device' object has no attribute '_apply'

I don’t think we are supposed to pass the BertModel to the device. For example, the following code snippet is from huggingface’s official implementation of BertForQuestionAnswering model.
class BertForQuestionAnswering(BertPreTrainedModel):
    def __init__(self, config):
        super().__init__(config)
        self.num_labels = config.num_labels

        self.bert = BertModel(config)
        self.qa_outputs = nn.Linear(config.hidden_size, config.num_labels)

        self.init_weights()