Text Classification
PEFT
Safetensors
Transformers
Bengali
English
qwen3
text-generation
lora
safety-classification
bangla
banglish
safeage
text-embeddings-inference
Instructions to use mehedi4/SafeAge-Guard with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use mehedi4/SafeAge-Guard with PEFT:
from peft import PeftModel from transformers import AutoModelForSequenceClassification base_model = AutoModelForSequenceClassification.from_pretrained("Qwen/Qwen3-1.7B") model = PeftModel.from_pretrained(base_model, "mehedi4/SafeAge-Guard") - Transformers
How to use mehedi4/SafeAge-Guard with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="mehedi4/SafeAge-Guard")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mehedi4/SafeAge-Guard") model = AutoModelForCausalLM.from_pretrained("mehedi4/SafeAge-Guard", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download decision_threshold.json from mehedi4/SafeAge-Guard: direct link, hf CLI and curl.
- Browser
- Download file 278 Bytes
-
https://huggingface.co/mehedi4/SafeAge-Guard/resolve/main/decision_threshold.json
- Command line
-
hf download hf://mehedi4/SafeAge-Guard/decision_threshold.json
-
curl -L -o decision_threshold.json https://huggingface.co/mehedi4/SafeAge-Guard/resolve/main/decision_threshold.json
278 Bytes
| { | |
| "threshold": 0.24, | |
| "selected_using": "validation_macro_f1", | |
| "tie_break": "closest to 0.5, then lower threshold", | |
| "source_split": "valid", | |
| "positive_class": "attack", | |
| "positive_class_id": 1, | |
| "comparison": "probability_attack >= threshold", | |
| "smoke_run": false | |
| } | |