Run this model with HF Jobs
Run JungleLee/bert-toxic-comment-classification on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/JungleLee/bert-toxic-comment-classification. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/JungleLee/bert-toxic-comment-classification on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use JungleLee/bert-toxic-comment-classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JungleLee/bert-toxic-comment-classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="JungleLee/bert-toxic-comment-classification")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("JungleLee/bert-toxic-comment-classification") model = AutoModelForSequenceClassification.from_pretrained("JungleLee/bert-toxic-comment-classification", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Create README.md
Browse files123456789101112131415161718192021222324252627282930313233343536---license: afl-3.0datasets:- jigsaw_toxicity_predlanguage:- enmetrics:- accuracylibrary_name: transformerspipeline_tag: text-classification---
## Model descriptionThis model is a fine-tuned version of the [bert-base-uncased model](https://huggingface.co/transformers/model_doc/bert.html) to classify toxic comments.
## How to use
You can use the model with the following code.
```pythonfrom transformers import AutoModelForSequenceClassification, AutoTokenizer, TextClassificationPipeline
model_path = "JungleLee/bert-toxic-comment-classification"tokenizer = AutoTokenizer.from_pretrained(model_path)model = AutoModelForSequenceClassification.from_pretrained(model_path)
pipeline = TextClassificationPipeline(model=model, tokenizer=tokenizer)print(pipeline('You're a fucking nerd.'))```
## Training dataThe training data comes this [Kaggle competition](https://www.kaggle.com/c/jigsaw-unintended-bias-in-toxicity-classification/data). We use 90% of the `train.csv` data to train the model.
## Evaluation results
The model achieves 0.95 AUC in a 1500 rows held-out test set.README.mdAdded+36