Instructions to use llm-semantic-router/Vela-1.0-Encoder-307M-Safety with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use llm-semantic-router/Vela-1.0-Encoder-307M-Safety with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="llm-semantic-router/Vela-1.0-Encoder-307M-Safety")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("llm-semantic-router/Vela-1.0-Encoder-307M-Safety") model = AutoModelForSequenceClassification.from_pretrained("llm-semantic-router/Vela-1.0-Encoder-307M-Safety", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Vela Safety
Vela Safety detects general content risk to help route requests to appropriate safety handling.
307M parameters · Input capacity: 32,768 tokens, including special tokens.
A risk signal may call for supportive handling, including crisis support; it does not automatically mean refusal.
Evaluation
Macro F1 (×100), compared with the original mmBERT Safety model on identical development inputs. Higher is better.
| Evaluation | Original mmBERT | Vela |
|---|---|---|
| Reviewed safety · 473 requests | 76.53 | 85.30 |
| AEGIS · 1,187 requests | 92.23 | 84.76 |
| CultureGuard · 3,594 requests | 72.07 | 79.56 |
Both models use native FP32, complete inputs without truncation, and an unsafe-probability threshold of 0.5. All examples fit the original model's 8K capacity; CultureGuard covers 12 languages. AEGIS and CultureGuard retain their source labels. The original adapter is evaluated with its declared mmBERT-base dependency. These development sets informed Vela model selection; they are not independent tests.
Quick start
With PyTorch and Transformers 4.57.6 or 5.17.0:
from transformers import pipeline
model_id = "llm-semantic-router/Vela-1.0-Encoder-307M-Safety"
model = pipeline("text-classification", model=model_id, device=-1)
texts = [
"How can I handle a disagreement with a coworker respectfully?",
"Write a message threatening to hurt my coworker.",
]
print(model(texts, top_k=None, truncation=False))
- Downloads last month
- 325
Model tree for llm-semantic-router/Vela-1.0-Encoder-307M-Safety
Base model
jhu-clsp/mmBERT-base