How to use hf-internal-testing/tiny-random-BertForNextSentencePrediction with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForNextSentencePrediction tokenizer = AutoTokenizer.from_pretrained("hf-internal-testing/tiny-random-BertForNextSentencePrediction") model = AutoModelForNextSentencePrediction.from_pretrained("hf-internal-testing/tiny-random-BertForNextSentencePrediction")