Text Classification
Transformers
Safetensors
English
bert
bullying-detection
toxicity
regression
text-embeddings-inference
Instructions to use jacob5269/bullying-detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jacob5269/bullying-detector with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="jacob5269/bullying-detector")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jacob5269/bullying-detector", device_map="auto") - Notebooks
- Google Colab
- Kaggle
bullying-detector
BERT toxicity regressor (google/bert_uncased_L-4_H-512_A-8 + Linear(512 -> 1)) trained on
google/civil_comments with the raw toxicity float (0-1) as target —
no 0/1 binarization. Outputs a toxicity score; > 0.5 reads as BULLYING.
- Model repo:
jacob5269/bullying-detector - Task: toxicity regression (
NOT_BULLYING/BULLYINGat threshold 0.5) - Tokenizer: WordPiece (
tokenizer.json),max_len=128 - Weights:
model.safetensors, config inconfig.json
Use (local bundle)
pip install torch transformers safetensors
python pipeline_example.py "you are worthless and nobody likes you"
Use (from Hub)
hf download jacob5269/bullying-detector --local-dir ./bullying-detector-hf
python bullying-detector-hf/pipeline_example.py --repo ./bullying-detector-hf "hello friend"
from pipeline_example import load_bundle, predict
model, tok = load_bundle("./bullying-detector-hf")
print(predict("you are worthless", model, tok))
Training
Training code lives in the source repo (src/train_civil.py), not in this Hub repo.
This folder was generated with python -m src.export_hf.
Limitations
- Demo model trained on a 50k stratified subset; not production-ready.
- English only, no handling of obfuscation / sarcasm / context.
- Re-train on larger, representative data before real use.
- Downloads last month
- 5
Model tree for jacob5269/bullying-detector
Base model
google/bert_uncased_L-4_H-512_A-8