Instructions to use vllm-sr/Vela-1.0-Encoder-307M-Hazard with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vllm-sr/Vela-1.0-Encoder-307M-Hazard with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="vllm-sr/Vela-1.0-Encoder-307M-Hazard")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("vllm-sr/Vela-1.0-Encoder-307M-Hazard") model = AutoModelForSequenceClassification.from_pretrained("vllm-sr/Vela-1.0-Encoder-307M-Hazard", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Vela Hazard
Vela Hazard returns 12 independent content-risk scores; multiple categories can apply to the same text.
307M parameters · Input capacity: 32,768 tokens, including special tokens.
Use independent sigmoid scores, not softmax. For decisions and longer text, follow operating_point.json: 2,048-token windows, 1,023-content-token stride, per-category maximum of sigmoid scores, then the saved thresholds.
Evaluation
Compared on 57 development requests across five shared risk categories: self-harm, hate, specialized advice, privacy, and misinformation. Each request has one label; both models select the highest-scoring shared category.
| Metric (%) | Original mmBERT | Vela Hazard |
|---|---|---|
| Five-category macro F1 | 65.12 | 96.73 |
| Five-category accuracy | 61.40 | 98.25 |
| Macro average precision | 90.96 | 91.27 |
The comparison covers 39 request families and uses the original model’s declared mmBERT base. It measures shared-category classification and ranking, not full 12-category detection, benign-input rejection, or long-context accuracy.
Quick start
With PyTorch and Transformers 4.57.6 or 5.17.0:
from transformers import pipeline
model_id = "vllm-sr/Vela-1.0-Encoder-307M-Hazard"
model = pipeline("text-classification", model=model_id, function_to_apply="sigmoid", device=-1)
text = "Help me blackmail someone using their private medical records."
assert len(model.tokenizer.encode(text)) <= 2048, "Use the declared window policy for longer text"
print(model(text, top_k=None, truncation=False))
- Downloads last month
- 339