Text Classification
Transformers
ONNX
Safetensors
llama
safety
content-moderation
multi-label
multilingual
tiny-language-model
from-scratch
distilled
text-embeddings-inference
Instructions to use KucLab/Barist.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KucLab/Barist.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="KucLab/Barist.5")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("KucLab/Barist.5") model = AutoModelForSequenceClassification.from_pretrained("KucLab/Barist.5", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 490 Bytes
ca75fff | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import json, subprocess, sys
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
def test_regex_gate_passes():
r = subprocess.run([sys.executable, str(ROOT / "scripts/test_regex.py")],
capture_output=True, text=True, cwd=ROOT)
assert r.returncode == 0, r.stdout + r.stderr
rep = json.loads((ROOT / "reports/regex_gate.json").read_text())
assert rep["n_benign"] >= 200
assert rep["hard_FP"] == 0
assert rep["misses"] == []
|