Views
No views yet
| Component | Description |
|---|---|
| Encoder | Snowflake/snowflake-arctic-embed-l-v2.0 — 568M params, 1024-dim embeddings, loaded from HuggingFace at inference |
| Classifier | harassment_arctic_mlp.joblib — sklearn MLP (512→128, ReLU) trained on frozen Arctic embeddings, bundled in this repo (~7 MB) |
| Metric | Score |
|---|---|
| F1 | 0.6916 |
| Precision | 0.6852 |
| Recall | 0.6981 |
| Accuracy | 0.7130 |
| Model | Classifier | F1 |
|---|---|---|
| Arctic | MLP | 0.6916 |
| Arctic | LogReg | 0.6903 |
| Harrier (270M) | LightGBM | 0.6729 |
| jina-nano (239M) | LightGBM | 0.6573 |
| jina-small (677M) | MLP | 0.6195 |
1from huggingface_hub import hf_hub_download
2from sentence_transformers import SentenceTransformer
3import joblib
4import numpy as np
5
6# Load components
7clf = joblib.load(hf_hub_download(
8 repo_id="gregco/balance-tes-haters-classifier",
9 filename="harassment_arctic_mlp.joblib",
10))
11encoder = SentenceTransformer("Snowflake/snowflake-arctic-embed-l-v2.0")
12
13def predict(text: str) -> int:
14 """Returns 1 (harassment) or 0 (benign)."""
15 X = encoder.encode([text], convert_to_numpy=True)
16 return int(clf.predict(X)[0])
17
18def predict_proba(text: str) -> float:
19 """Returns harassment probability between 0 and 1."""
20 X = encoder.encode([text], convert_to_numpy=True)
21 return float(clf.predict_proba(X)[0, 1])
22real split only (no synthetic augmentation for this checkpoint)0 — Absence de cyberharcèlement1 — Any of: Cyberharcèlement, Injure, Diffamation, Menaces, Doxxing, Incitation au suicide, Incitation à la haine, Cyberharcèlement à caractère sexuel, and otherspip install sentence-transformers scikit-learn huggingface_hub