Text Classification
Transformers
Safetensors
bert
multilingual
multi-label-classification
community-notes
topic-classification
text-embeddings-inference
Instructions to use ychuai/community-notes-topic-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ychuai/community-notes-topic-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ychuai/community-notes-topic-classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("ychuai/community-notes-topic-classifier") model = AutoModelForSequenceClassification.from_pretrained("ychuai/community-notes-topic-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from ychuai/community-notes-topic-classifier: direct link, hf CLI and curl.
- Browser
- Download file 1.34 kB
-
https://huggingface.co/ychuai/community-notes-topic-classifier/resolve/main/config.json
- Command line
-
hf download hf://ychuai/community-notes-topic-classifier/config.json
-
curl -L -o config.json https://huggingface.co/ychuai/community-notes-topic-classifier/resolve/main/config.json
1.34 kB
| { | |
| "architectures": [ | |
| "BertForSequenceClassification" | |
| ], | |
| "attention_probs_dropout_prob": 0.1, | |
| "classifier_dropout": null, | |
| "dtype": "float32", | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 768, | |
| "id2label": { | |
| "0": "Politics and Elections", | |
| "1": "War and Geopolitics", | |
| "2": "Health and Medicine", | |
| "3": "Economy and Finance", | |
| "4": "Technology and AI", | |
| "5": "Crime and Public Safety", | |
| "6": "Sports and Games", | |
| "7": "Celebrity and Entertainment", | |
| "8": "Religion and Spirituality", | |
| "9": "Gender and Identity" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "label2id": { | |
| "Celebrity and Entertainment": 7, | |
| "Crime and Public Safety": 5, | |
| "Economy and Finance": 3, | |
| "Gender and Identity": 9, | |
| "Health and Medicine": 2, | |
| "Politics and Elections": 0, | |
| "Religion and Spirituality": 8, | |
| "Sports and Games": 6, | |
| "Technology and AI": 4, | |
| "War and Geopolitics": 1 | |
| }, | |
| "layer_norm_eps": 1e-12, | |
| "max_position_embeddings": 512, | |
| "model_type": "bert", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "pad_token_id": 0, | |
| "position_embedding_type": "relative_key", | |
| "problem_type": "multi_label_classification", | |
| "transformers_version": "4.57.6", | |
| "type_vocab_size": 2, | |
| "use_cache": true, | |
| "vocab_size": 250002 | |
| } | |