Hi n8henrie,
Thanks for the kind words. I had a look at your code, and I don’t see any obvious problems with it. The only difference with my version is that I use positional embeddings rather than encodings, but I see you already tried using position embeddings.
If I were in your situation, I’d probably try the following:

Check that the embedding parameters are getting gradients. You can do this by setting w.retain_grad() on the weight tensor, and then printing the values just after the backward pass.
Check the loss. Your model output is linear, so the loss should apply a softmax (i.e. use cross entropy loss).
Try it with 0 transformer layers (i.e. just train word embeddings). IMDb is simple enough that that should put you well over chance. You can compare to former with 0 layers to see what performance you can expect.
Disable the position encoding. The model should still be able to get some performance, without any position information. If the performance goes up with the positions disabled, you know that the problem is somewhere in the position encodings.

You may have tried all of this already, but this is where I’d start.
good luck,
Peter