Part 2: Abstractions, Design, and Testing

Building your model

This chapter gives a deep dive into one of the most important components of AllenNLP—Model—and an in-depth guide to building your own model.

Models play a central role in AllenNLP and NLP applications in general. They implement the computation performed to transform input to output, and hold parameters that get optimized through training. In this chapter, we’ll give a deep dive into inner workings of AllenNLP Models, and provide an in-depth guide to building, using, saving and loading your own model.

1Model and Model.forward()

2Looking at model outputs

3Saving and loading a model

4Initialization and regularization