View on GitHub

nlp-recipes

Natural Language Processing Best Practices & Examples

Common

This submodule contains high-level common utilities used across multiple algorithms and frameworks as well as helper functions for managing aspects of different frameworks like pytorch.
For example, pytorch_utils.py contains utilities to interact with PyTorch like getting a device architecture (cpu or gpu), moving a model to a specific device, and handling parallelism when multiple gpus are present.