This tutorial shows how to use nce-loss to speed up multi-class classification when the number of classes is huge.
You can get the source code for this example on GitHub.
Run word2vec.py with the following command:
./get_text8.sh python word2vec.py
Run lstm_word.py with the following command:
./get_text8.sh python lstm_word.py
For more details, see http://www.jianshu.com/p/e439b43ea464 (in Chinese).