System RAM crashes while training RNN

after a few minutes of training, system ram used inflates and it crashes.
please see colab file here:

why is this happening?