nvidia / domain-classifier

huggingface.co
Total runs: 8.7K
24-hour runs: -129
7-day runs: 1.1K
30-day runs: 1.5K
Model's Last Updated: September 23 2025

Introduction of domain-classifier

Model Details of domain-classifier

Domain Classifier

Model Overview

This is a text classification model to classify documents into one of 26 domain classes:

'Adult', 'Arts_and_Entertainment', 'Autos_and_Vehicles', 'Beauty_and_Fitness', 'Books_and_Literature', 'Business_and_Industrial', 'Computers_and_Electronics', 'Finance', 'Food_and_Drink', 'Games', 'Health', 'Hobbies_and_Leisure', 'Home_and_Garden', 'Internet_and_Telecom', 'Jobs_and_Education', 'Law_and_Government', 'News', 'Online_Communities', 'People_and_Society', 'Pets_and_Animals', 'Real_Estate', 'Science', 'Sensitive_Subjects', 'Shopping', 'Sports', 'Travel_and_Transportation'

Model Architecture

The model architecture is Deberta V3 Base Context length is 512 tokens

Training (details)

Training data:
Training steps:

Model was trained in multiple rounds using Wikipedia and Common Crawl data, labeled by a combination of pseudo labels and Google Cloud API.

How To Use This Model

Input

The model takes one or several paragraphs of text as input. Example input:

q Directions
1. Mix 2 flours and baking powder together
2. Mix water and egg in a separate bowl. Add dry to wet little by little
3. Heat frying pan on medium
4. Pour batter into pan and then put blueberries on top before flipping
5. Top with desired toppings!
Output

The model outputs one of the 26 domain classes as the predicted domain for each input sample. Example output:

Food_and_Drink

How to use in NeMo Curator

The inference code is available on NeMo Curator's GitHub repository . Download the model.pth file and check out this example notebook to get started.

How to use in transformers

To use the Domain classifier, use the following code:


import torch
from torch import nn
from transformers import AutoModel, AutoTokenizer, AutoConfig
from huggingface_hub import PyTorchModelHubMixin

class CustomModel(nn.Module, PyTorchModelHubMixin):
    def __init__(self, config):
        super(CustomModel, self).__init__()
        self.model = AutoModel.from_pretrained(config['base_model'])
        self.dropout = nn.Dropout(config['fc_dropout'])
        self.fc = nn.Linear(self.model.config.hidden_size, len(config['id2label']))

    def forward(self, input_ids, attention_mask):
        features = self.model(input_ids=input_ids, attention_mask=attention_mask).last_hidden_state
        dropped = self.dropout(features)
        outputs = self.fc(dropped)
        return torch.softmax(outputs[:, 0, :], dim=1)

# Setup configuration and model
config = AutoConfig.from_pretrained("nvidia/domain-classifier")
tokenizer = AutoTokenizer.from_pretrained("nvidia/domain-classifier")
model = CustomModel.from_pretrained("nvidia/domain-classifier")

# Prepare and process inputs
text_samples = ["Sports is a popular domain", "Politics is a popular domain"]
inputs = tokenizer(text_samples, return_tensors="pt", padding="longest", truncation=True)
outputs = model(inputs['input_ids'], inputs['attention_mask'])

# Predict and display results
predicted_classes = torch.argmax(outputs, dim=1)
predicted_domains = [config.id2label[class_idx.item()] for class_idx in predicted_classes.cpu().numpy()]
print(predicted_domains)
# ['Sports', 'News']

Evaluation Benchmarks

Evaluation Metric: PR-AUC

PR-AUC score on evaluation set with 105k samples - 0.9873

PR-AUC score for each domain:

Domain PR-AUC
Adult 0.999
Arts_and_Entertainment 0.997
Autos_and_Vehicles 0.997
Beauty_and_Fitness 0.997
Books_and_Literature 0.995
Business_and_Industrial 0.982
Computers_and_Electronics 0.992
Finance 0.989
Food_and_Drink 0.998
Games 0.997
Health 0.997
Hobbies_and_Leisure 0.984
Home_and_Garden 0.997
Internet_and_Telecom 0.982
Jobs_and_Education 0.993
Law_and_Government 0.967
News 0.918
Online_Communities 0.983
People_and_Society 0.975
Pets_and_Animals 0.997
Real_Estate 0.997
Science 0.988
Sensitive_Subjects 0.982
Shopping 0.995
Sports 0.995
Travel_and_Transportation 0.996
Mean 0.9873

References

License

License to use this model is covered by the Apache 2.0. By downloading the public and release version of the model, you accept the terms and conditions of the Apache License 2.0. This repository contains the code for the domain classifier model.

Runs of nvidia domain-classifier on huggingface.co

8.7K
Total runs
-129
24-hour runs
-268
3-day runs
1.1K
7-day runs
1.5K
30-day runs

More Information About domain-classifier huggingface.co Model

More domain-classifier license Visit here:

https://choosealicense.com/licenses/apache-2.0

domain-classifier huggingface.co

domain-classifier huggingface.co is an AI model on huggingface.co that provides domain-classifier's model effect (), which can be used instantly with this nvidia domain-classifier model. huggingface.co supports a free trial of the domain-classifier model, and also provides paid use of the domain-classifier. Support call domain-classifier model through api, including Node.js, Python, http.

domain-classifier huggingface.co Url

https://huggingface.co/nvidia/domain-classifier

nvidia domain-classifier online free

domain-classifier huggingface.co is an online trial and call api platform, which integrates domain-classifier's modeling effects, including api services, and provides a free online trial of domain-classifier, you can try domain-classifier online for free by clicking the link below.

nvidia domain-classifier online free url in huggingface.co:

https://huggingface.co/nvidia/domain-classifier

domain-classifier install

domain-classifier is an open source model from GitHub that offers a free installation service, and any user can find domain-classifier on GitHub to install. At the same time, huggingface.co provides the effect of domain-classifier install, users can directly use domain-classifier installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

domain-classifier install url in huggingface.co:

https://huggingface.co/nvidia/domain-classifier

Url of domain-classifier

domain-classifier huggingface.co Url

Provider of domain-classifier huggingface.co

nvidia
ORGANIZATIONS

Other API from nvidia

huggingface.co

Total runs: 1.3M
Run Growth: 157.0K
Growth Rate: 11.28%
Updated:June 27 2026
huggingface.co

Total runs: 459.2K
Run Growth: 454.8K
Growth Rate: 99.03%
Updated:August 11 2026
huggingface.co

Total runs: 313.5K
Run Growth: 81.3K
Growth Rate: 25.94%
Updated:July 10 2026
huggingface.co

Total runs: 232.6K
Run Growth: 214.6K
Growth Rate: 92.28%
Updated:September 10 2025
huggingface.co

Total runs: 158.3K
Run Growth: 71.4K
Growth Rate: 43.62%
Updated:April 11 2026
huggingface.co

Total runs: 143.4K
Run Growth: 69.0K
Growth Rate: 48.07%
Updated:July 10 2026
huggingface.co

Total runs: 128.4K
Run Growth: 24.0K
Growth Rate: 18.70%
Updated:January 15 2025
huggingface.co

Total runs: 92.7K
Run Growth: -35.9K
Growth Rate: -38.73%
Updated:November 29 2025
huggingface.co

Total runs: 77.1K
Run Growth: -67.8K
Growth Rate: -87.92%
Updated:November 15 2023
huggingface.co

Total runs: 76.7K
Run Growth: 59.4K
Growth Rate: 77.48%
Updated:September 10 2025
huggingface.co

Total runs: 57.6K
Run Growth: 33.7K
Growth Rate: 58.45%
Updated:August 06 2022