Facing issue in Run Fine tune LM
So my LM sample.txt is such that each doc has only one line 
So in BERTDataSet len is giving negative 
I tried changing it to self.num_docs - 1
def __len__(self):
        print(self.corpus_lines ,self.num_docs)
        return self.corpus_lines - self.num_docs - 1
I am also getting errors at multiple steps, Is the code written with the assumption that each document will have multiple lines in it?


Yes, you need documents with multiple lines because only sentences from the same doc are used as positive examples for the nextSentence prediction. <|||||>Seems like the expected behavior. Feel free to open a PR to extend the example if you want @tuhinjubcse.