Instructions to use Kanit/bert-hateXplain with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Kanit/bert-hateXplain with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Kanit/bert-hateXplain")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Kanit/bert-hateXplain") model = AutoModelForSequenceClassification.from_pretrained("Kanit/bert-hateXplain", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload config
Browse files13 unmodified lines141516171819202113 unmodified lines"hidden_act": "gelu","hidden_dropout_prob": 0.1,"hidden_size": 128,"initializer_range": 0.02,"intermediate_size": 512,"layer_norm_eps": 1e-12,"max_position_embeddings": 512,"model_type": "bert",13 unmodified lines1415161718192021222324252627282913 unmodified lines"hidden_act": "gelu","hidden_dropout_prob": 0.1,"hidden_size": 128,"id2label": {"0": "non-toxic","1": "toxic"},"initializer_range": 0.02,"intermediate_size": 512,"label2id": {"non-toxic": 0,"toxic": 1},"layer_norm_eps": 1e-12,"max_position_embeddings": 512,"model_type": "bert",
config.json+8