Help loading BioBERT weights
I have completed the following:

**1. Downloaded pretrained BioBERT weights from their current release**

**2. Convert TensorFlow checkpoints into Pytorch weights bin file using the following code**

import os

os.system( ' pytorch_pretrained_bert convert_tf_checkpoint_to_pytorch \
  "/content/biobert_v1.1_pubmed/model.ckpt.index" \
  "/content/biobert_v1.1_pubmed/bert_config.json" \
  "/content/biobert_pytorch.bin"            ' )

`
**3. I then tried to test whether I can load these weights. In order to do so, I tried the following code**

state_dict = torch.load( "/content/biobert_pytorch.bin" )
model.load_state_dict(state_dict)

**but I get the error**

> IncompatibleKeys(missing_keys=[], unexpected_keys=[])

***Please guide me***
Not really providing a solution here, but have you considered https://github.com/allenai/scibert instead?
AllenAI provides PyTorch weights, and through tests they claim their model is superior https://arxiv.org/pdf/1903.10676.pdf on their suite of tasks. For that and for ease of use, it may be a valid alternative.<|||||>Hello, I am trying to figure out how to load the SciBert weights. I see that you can use

```
# Simple serialization for models and tokenizers
model.save_pretrained('./directory/to/save/')  # save
model = model_class.from_pretrained('./directory/to/save/')  # re-load
tokenizer.save_pretrained('./directory/to/save/')  # save
```

So my guess is to download them from here
https://github.com/allenai/scibert#pytorch-models

Untar them, then point to that directory

```
model = model_class.from_pretrained('DIRECTORY/TO/DOWNLOADED/UNZIPPED/SCIBERT/Pytorch.bin')  
```

Unless there is more to that, the part I am confused about is that SciBert also has it's own vocab and 'vocab.txt' file. I am wondering how to point to that file, and not the default one. 

Edit

Found the answer

https://github.com/huggingface/pytorch-transformers/issues/69#issuecomment-443215315

you can just do a direct path to it<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
