CoolFace
Modelpublic

sinatras/torug-safety-bert-q8

sourceHugging Faceupdated 9d agoView on Hugging Face
0likes36downloads
Model Card

Torug Turkish safety classifier — BERT q8

Three-label Turkish prompt classifier for Torug: safe, warn, and block. The model runs locally with Transformers.js and ONNX Runtime. It does not generate answers or send prompts to a hosted inference service.

Artifact

  • Architecture: 12-layer BertForSequenceClassification, hidden size 768.
  • Maximum input length: 512 tokens.
  • ONNX opset 17, dynamic batch and sequence dimensions.
  • Dynamic per-channel QUInt8 quantization; request dtype: "q8".
  • Weights: 111,844,312 bytes.
  • Weights SHA-256: bd0973b66f3eb973d13e753e9450737e2a6a606fc45ee5a1cbba3e9beb364e0c.
  • Supporting inference files bring the download to approximately 113 MB.

The q8 file is the exact artifact evaluated on September 11, 2026, not a subsequent re-export. artifact-manifest.json records every inference file's size and SHA-256 digest. Production consumers should pin the repository commit.

Intended use and limitations

This is one input-safety signal, not a guarantee that every unsafe prompt will be detected or that every allowed answer will be safe. Torug applies separate rules and thresholds; its warn result does not itself stop generation.

Local diagnostic testing found improved harmful-request detection compared with the earlier Torug DistilBERT classifier. It also found false blocks of benign educational/support requests, missed harmful requests, sensitivity to wording, and action changes between FP32, q8 CPU, and browser WASM execution. Truncating text beyond 512 tokens can hide relevant content; callers must account for all input they claim to check. The model alone does not evaluate conversation history or provide crisis-support routing.

Training data, training code, split manifests, and a model reuse license were not supplied with the checkpoint. No held-out benchmark accuracy, official TurkBench score, or permissive reuse license is claimed here. Check applicable rights and terms before redistribution or reuse.