PyText is a deep-learning based NLP modeling framework built on
PyTorch. PyText addresses the often-conflicting requirements of enabling
rapid experimentation and of serving models at scale. It achieves this
by providing simple and extensible interfaces and abstractions for model
components, and by using PyTorch’s capabilities of exporting models for
inference via the optimized Caffe2 execution engine. We are using
PyText in Facebook to iterate quickly on new modeling ideas and then
seamlessly ship them at scale.
Core PyText features:
Production ready models for various NLP/NLU tasks:
Detailed instructions and more installation options can be found in our Documentation. If you encounter issues with missing dependencies during installation, please refer to OS Dependencies.
Train your first text classifier
For this first example, we'll train a CNN-based text-classifier that classifies text utterances, using the examples in tests/data/train_data_tiny.tsv. The data and configs files can be obtained either by cloning the repository or by downloading the files manually from GitHub.