<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/models/blob/v2.20.0/tensorflow_models/nlp/__init__.py) |

TensorFlow Models NLP Libraries.

## Modules

[`encoders`](https://www.tensorflow.org/api_docs/python/tfm/nlp/encoders) module: Transformer Encoders.

[`layers`](https://www.tensorflow.org/api_docs/python/tfm/nlp/layers) module: Layers are the fundamental building blocks for NLP models.

[`losses`](https://www.tensorflow.org/api_docs/python/tfm/nlp/losses) module: Losses contains common loss computation used in NLP (subject to change).

[`models`](https://www.tensorflow.org/api_docs/python/tfm/nlp/models) module: Models are combinations of [`tf.keras`](https://www.tensorflow.org/api_docs/python/tf/keras) layers and models that can be trained.

[`networks`](https://www.tensorflow.org/api_docs/python/tfm/nlp/networks) module: Networks are combinations of [`tf.keras`](https://www.tensorflow.org/api_docs/python/tf/keras) layers (and possibly other networks).

[`ops`](https://www.tensorflow.org/api_docs/python/tfm/nlp/ops) module: Ops package definition.

[`serving_modules`](https://www.tensorflow.org/api_docs/python/tfm/nlp/serving_modules) module: Serving export modules for TF Model Garden NLP models.

[`tasks`](https://www.tensorflow.org/api_docs/python/tfm/nlp/tasks) module: TensorFlow Models NLP Tasks.