If you are using PyTorch 1.5, update to 1.6 or the nightly binaries, as assert statements were not properly working in 1.5.
Based on the illegal memory access in the embedding layer, I guess you are passing an input containing invalid indices to this layer. Instead of this memory violation you should get a proper indexing error.