@karpathy has been a legend with making intuitive models. His famous blog on Recurrent Neural Network, The Unreasonable Effectiveness of Recurrent Neural Networks is one of the best there is. While explaining RNNs he links the readers to his famous gist on character level language model. I have gone a little further to add commentary to the code. The losses being derived provides further intuition to the code.
Don't forget to tag @ariG23498 in your comment, otherwise they may not be notified.