Question on AllenNLP vocabulary and huggingface BERT out of sync
Perhaps this should also be posted in the allennlp repo. 
I'm currently trying to use a pretrained model (clinicalBERT) with a different set of vocabulary with huggingface's BertModel. Even though the code runs, I'm not 100% convinced that the vocabulary index to weight mappings are synced between the allennlp vocabulalry object and the BertModel. The tokenizer used for clinicalBERT is scispacy, not wordpiece. First of all, are there any examples in this repo or other places online that does this (has a stack of allennlp vocab + huggingface BERT, and loading a pretrained BERT model with vocab.txt?).

This is what I do:
` model = pytorch_transformers.BertModel.from_pretrained("my/path/to/clinicalBERT", output_hidden_states=True)`
Then, for the vocabulary, I do: 
    ` vocab = Vocabulary(counter=None, max_vocab_size=max_v_sizes) ` 
    ` vocab.set_from_file(filename="path/to/clinicalBERT/vocab.txt", is_padded=1, namespace="scispacy")` 
I then use resize_tokens on the model, and use a TokenIndexer from allennlp and index my instances with that vocabulary. Even at this point though, ` vocab.get_token_from_index(0, "scispacy")` 
 returns ` @@PADDING@@` , and ` @@UNKNOWN@@`  is at index 101 for the vocab (even though allennlp's vocabulary to my understanding sets ` @@UNKNOWN@@`  to 1).  
What should I do to realign the Vocabulary back to the vocab index -> weight embedding mapping in the model?

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.
