PyText Documentation

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 use PyText at Facebook to iterate quickly on new modeling ideas and then seamlessly ship them at scale.

Core PyText Features:

How To Use

Please follow the tutorial series in Getting Started to get a sense of how to train a basic model and deploy to production.

After that, you can explore more options of builtin models and training methods in Training More Advanced Models

If you want to use PyText as a library and build your own models, please check the tutorial in Extending PyText


All the demo configs and test data for the tutorials can be found in source code. You can either install PyText from source or download the files manually from GitHub.

Indices and tables