To use nn.Embedding in PyTorch, follow these steps:

    Import nn module from PyTorch.
    Define an nn.Embedding layer, which maps integer-encoded words to dense vectors.
    Initialize the layer with the desired number of embeddings and the dimension of the embedding vectors.
    Pass a tensor of integer-encoded words as input to the layer.
    The output of the layer is the corresponding dense vector representation for each word.

Example code:

```python
import torch
import torch.nn as nn

# Define the embedding layer
embedding = nn.Embedding(num_embeddings=10, embedding_dim=3)

# Input tensor of shape (batch_size, sequence_length)
input_tensor = torch.LongTensor([[1,2,3], [4,5,6]])

# Output tensor of shape (batch_size, sequence_length, embedding_dim)
output = embedding(input_tensor)
```
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence