govtech/lionguard-v1
By govtech · ↓ 14 · ♥ 10 · Updated 2024-11-16
What's in this repo
This page lists the files in govtech/lionguard-v1, including lionguard-binary.onnx, lionguard-harassment.onnx, lionguard-hateful.onnx and more.
- 8 ONNX models (.onnx files)
- 14 files, including 8 .onnx, 1 .md, 1 .json, 1 .py
- Last updated 2024-11-16
ONNX files
| File | Size | Download |
|---|---|---|
| models/lionguard-binary.onnx | — | Download |
| models/lionguard-harassment.onnx | — | Download |
| models/lionguard-hateful.onnx | — | Download |
| models/lionguard-public_harm.onnx | — | Download |
| models/lionguard-self_harm.onnx | — | Download |
| models/lionguard-sexual.onnx | — | Download |
| models/lionguard-toxic.onnx | — | Download |
| models/lionguard-violent.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
LionGuard
LionGuard is a classifier for detecting unsafe content in the Singapore context. It uses pre-trained BAAI English embeddings and performs classification with a trained Ridge Classification model.
Usage
- Install
transformers,onnxruntimeandhuggingface_hublibraries.
pip install transformers onnxruntime huggingface_hub
- Run inference.
python inference.py '["Example text 1"]'
Technical report is available here.
Model info
Created: 2024-07-16
Updated: 2024-11-16
View on Hugging FaceFiles (14)
Related models
More models
No task type declared.