Language modeling is a key component of natural language processing. The language model tries to make a correct prediction of the next word in the sentence based on the available data corpora. It usually performs this prediction either with the help of words located before the predicted word, ie it proceeds in one direction or also takes into account the words behind the predicted word, which means a two-way language model. Within the theoretical part of the work, we begin with an introduction to language modeling and description of neural networks, and at the end of the theoretical part we analyze current methods of language modeling based on neural networks and their application to specific language tasks. In the practical part of the work, we train our own language model using the RoBERT method using the fairseq tool, which we then evaluate on the CommonSenseQA data set. At the end of the practical part, we strive to improve the result of the evaluation of our model, which we perform by changing the training parameters.