Seems like you are looking for the Sentence Transformers library which trains Siamese BERT (etc.) networks on NLI data. That means that you can indeed pass one sentence to get a sentence embedding. They also have a few finetuned models that use cross-encoders instead. Those are obviously slower but lead to better performance on downstream tasks such as STSb.

  
      
      github.com
  
  
    

UKPLab/sentence-transformers 10


  Sentence Embeddings with BERT &amp; XLNet. Contribute to UKPLab/sentence-transformers development by creating an account on GitHub.