FastNLP is a modular Natural Language Processing system based on PyTorch, built for fast development of NLP models.
A deep learning NLP model is the composition of three types of modules:
For example:
Run the following commands to install fastNLP package.
pip install fastNLP
module type | functionality | example |
encoder | encode the input into some abstract representation | embedding, RNN, CNN, transformer |
aggregator | aggregate and reduce information | self-attention, max-pooling |
decoder | decode the representation into the output | MLP, CRF |
fastNLP | an open-source NLP library |
fastNLP.api | APIs for end-to-end prediction |
fastNLP.core | data representation & train/test presedure |
fastNLP.models | a collection of NLP models |
fastNLP.modules | a collection of PyTorch sub-models/components/wheels |
fastNLP.io | readers & savers |