Text Classification
Transformers
Safetensors
English
modernbert
iab
content-taxonomy
news-classification
text-embeddings-inference
Instructions to use mdonigian/modernbert-iab-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mdonigian/modernbert-iab-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="mdonigian/modernbert-iab-classifier")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("mdonigian/modernbert-iab-classifier") model = AutoModelForSequenceClassification.from_pretrained("mdonigian/modernbert-iab-classifier") - Notebooks
- Google Colab
- Kaggle
| { | |
| "architectures": [ | |
| "ModernBertForSequenceClassification" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 50281, | |
| "classifier_activation": "gelu", | |
| "classifier_bias": false, | |
| "classifier_dropout": 0.0, | |
| "classifier_pooling": "mean", | |
| "cls_token_id": 50281, | |
| "decoder_bias": true, | |
| "deterministic_flash_attn": false, | |
| "dtype": "bfloat16", | |
| "embedding_dropout": 0.0, | |
| "eos_token_id": 50282, | |
| "global_attn_every_n_layers": 3, | |
| "gradient_checkpointing": false, | |
| "hidden_activation": "gelu", | |
| "hidden_size": 768, | |
| "id2label": { | |
| "0": "Attractions", | |
| "1": "Automotive", | |
| "2": "Books and Literature", | |
| "3": "Business and Finance", | |
| "4": "Careers", | |
| "5": "Communication", | |
| "6": "Crime", | |
| "7": "Disasters", | |
| "8": "Education", | |
| "9": "Entertainment", | |
| "10": "Events", | |
| "11": "Family and Relationships", | |
| "12": "Fine Art", | |
| "13": "Food & Drink", | |
| "14": "Healthy Living", | |
| "15": "Hobbies & Interests", | |
| "16": "Holidays", | |
| "17": "Home & Garden", | |
| "18": "Law", | |
| "19": "Medical Health", | |
| "20": "Personal Celebrations & Life Events", | |
| "21": "Personal Finance", | |
| "22": "Pets", | |
| "23": "Politics", | |
| "24": "Pop Culture", | |
| "25": "Real Estate", | |
| "26": "Religion & Spirituality", | |
| "27": "Science", | |
| "28": "Shopping", | |
| "29": "Sports", | |
| "30": "Style & Fashion", | |
| "31": "Technology & Computing", | |
| "32": "Travel", | |
| "33": "Video Gaming", | |
| "34": "War and Conflicts" | |
| }, | |
| "initializer_cutoff_factor": 2.0, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 1152, | |
| "label2id": { | |
| "Attractions": 0, | |
| "Automotive": 1, | |
| "Books and Literature": 2, | |
| "Business and Finance": 3, | |
| "Careers": 4, | |
| "Communication": 5, | |
| "Crime": 6, | |
| "Disasters": 7, | |
| "Education": 8, | |
| "Entertainment": 9, | |
| "Events": 10, | |
| "Family and Relationships": 11, | |
| "Fine Art": 12, | |
| "Food & Drink": 13, | |
| "Healthy Living": 14, | |
| "Hobbies & Interests": 15, | |
| "Holidays": 16, | |
| "Home & Garden": 17, | |
| "Law": 18, | |
| "Medical Health": 19, | |
| "Personal Celebrations & Life Events": 20, | |
| "Personal Finance": 21, | |
| "Pets": 22, | |
| "Politics": 23, | |
| "Pop Culture": 24, | |
| "Real Estate": 25, | |
| "Religion & Spirituality": 26, | |
| "Science": 27, | |
| "Shopping": 28, | |
| "Sports": 29, | |
| "Style & Fashion": 30, | |
| "Technology & Computing": 31, | |
| "Travel": 32, | |
| "Video Gaming": 33, | |
| "War and Conflicts": 34 | |
| }, | |
| "layer_norm_eps": 1e-05, | |
| "layer_types": [ | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention" | |
| ], | |
| "local_attention": 128, | |
| "max_position_embeddings": 8192, | |
| "mlp_bias": false, | |
| "mlp_dropout": 0.0, | |
| "model_type": "modernbert", | |
| "norm_bias": false, | |
| "norm_eps": 1e-05, | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 22, | |
| "pad_token_id": 50283, | |
| "position_embedding_type": "absolute", | |
| "rope_parameters": { | |
| "full_attention": { | |
| "rope_theta": 160000.0, | |
| "rope_type": "default" | |
| }, | |
| "sliding_attention": { | |
| "rope_theta": 10000.0, | |
| "rope_type": "default" | |
| } | |
| }, | |
| "sep_token_id": 50282, | |
| "sparse_pred_ignore_index": -100, | |
| "sparse_prediction": false, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.4.0", | |
| "use_cache": false, | |
| "vocab_size": 50368 | |
| } | |