Text Classification
Transformers
Safetensors
English
modernbert
multi-head-classification
llm-routing
llm-gateway
model-routing
prompt-classification
query-classification
data-classification
retrieval-augmented-generation
calibration
synthetic-data
Instructions to use s-ttp/aiva-rlcd-modernbert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use s-ttp/aiva-rlcd-modernbert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="s-ttp/aiva-rlcd-modernbert")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("s-ttp/aiva-rlcd-modernbert", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download rlcd_config.json from s-ttp/aiva-rlcd-modernbert: direct link, hf CLI and curl.
- Browser
- Download file 4.25 kB
-
https://huggingface.co/s-ttp/aiva-rlcd-modernbert/resolve/main/rlcd_config.json
- Command line
-
hf download hf://s-ttp/aiva-rlcd-modernbert/rlcd_config.json
-
curl -L -o rlcd_config.json https://huggingface.co/s-ttp/aiva-rlcd-modernbert/resolve/main/rlcd_config.json
4.25 kB
| { | |
| "architecture": "aiva-rlcd-multihead", | |
| "base_model": "answerdotai/ModernBERT-base", | |
| "base_revision": "8949b909ec900327062f0ebf497f51aef5e6f0c8", | |
| "dataset": "s-ttp/aiva-rlcd-labels-v2", | |
| "dataset_revision": "7c3c0971267a011320d487af0c30bea6c4e18f7f", | |
| "pooling": "mean", | |
| "max_length": 1024, | |
| "heads": { | |
| "task_category": [ | |
| "qa", | |
| "summarization", | |
| "coding", | |
| "rag", | |
| "analysis", | |
| "generation", | |
| "agentic" | |
| ], | |
| "sensitivity": [ | |
| "public", | |
| "internal", | |
| "confidential", | |
| "restricted", | |
| "sovereign-only" | |
| ], | |
| "complexity": [ | |
| "simple", | |
| "moderate", | |
| "complex", | |
| "advanced" | |
| ], | |
| "context_need": [ | |
| "sufficient", | |
| "needs-retrieval", | |
| "needs-packaging" | |
| ] | |
| }, | |
| "temperatures": { | |
| "task_category": 1.0844, | |
| "sensitivity": 0.9798, | |
| "complexity": 1.4548, | |
| "context_need": 1.0657 | |
| }, | |
| "input_format": "messages joined as '[role] content' lines (aiva_ml.rlcd.labels.render)", | |
| "hyperparameters": { | |
| "base_model": "answerdotai/ModernBERT-base", | |
| "dataset": "s-ttp/aiva-rlcd-labels-v2", | |
| "dataset_revision": "7c3c0971267a011320d487af0c30bea6c4e18f7f", | |
| "data_dir": "combined", | |
| "balance_sensitivity": 0.5, | |
| "bucket_by_length": true, | |
| "prior": "public=0.1458,internal=0.5272,confidential=0.2970,restricted=0.0236,sovereign-only=0.0064", | |
| "output_repo": "s-ttp/aiva-rlcd-modernbert-v2-staging", | |
| "max_length": 1024, | |
| "epochs": 3.0, | |
| "learning_rate": 5e-05, | |
| "batch_size": 32, | |
| "max_train_samples": null, | |
| "max_eval_samples": null, | |
| "no_push": false | |
| }, | |
| "train_seconds": 641, | |
| "test_report": { | |
| "task_category": { | |
| "classes": [ | |
| "qa", | |
| "summarization", | |
| "coding", | |
| "rag", | |
| "analysis", | |
| "generation", | |
| "agentic" | |
| ], | |
| "test_rows": 3727, | |
| "accuracy": 0.9911, | |
| "macro_f1": 0.986, | |
| "ece_before": 0.0061, | |
| "ece_after": 0.0054, | |
| "temperature": 1.0758, | |
| "provenance": "measured" | |
| }, | |
| "sensitivity": { | |
| "classes": [ | |
| "public", | |
| "internal", | |
| "confidential", | |
| "restricted", | |
| "sovereign-only" | |
| ], | |
| "test_rows": 3727, | |
| "accuracy": 0.9799, | |
| "macro_f1": 0.7854, | |
| "ece_before": 0.0115, | |
| "ece_after": 0.0117, | |
| "temperature": 0.9782, | |
| "provenance": "measured" | |
| }, | |
| "complexity": { | |
| "classes": [ | |
| "simple", | |
| "moderate", | |
| "complex", | |
| "advanced" | |
| ], | |
| "test_rows": 3727, | |
| "accuracy": 0.8924, | |
| "macro_f1": 0.8699, | |
| "ece_before": 0.048, | |
| "ece_after": 0.024, | |
| "temperature": 1.4539, | |
| "provenance": "measured" | |
| }, | |
| "context_need": { | |
| "classes": [ | |
| "sufficient", | |
| "needs-retrieval", | |
| "needs-packaging" | |
| ], | |
| "test_rows": 3727, | |
| "accuracy": 0.971, | |
| "macro_f1": 0.9719, | |
| "ece_before": 0.0178, | |
| "ece_after": 0.017, | |
| "temperature": 1.0647, | |
| "provenance": "measured" | |
| } | |
| }, | |
| "calibration": { | |
| "temperatures_fitted_on": "s-ttp/aiva-rlcd-labels-v2 natural/natural-validation.jsonl (2,018 twice-agreed rows), CPU float32 logits as the gateway computes them, NLL weighted to the realistic sensitivity prior", | |
| "realistic_prior": { | |
| "public": 0.1458, | |
| "internal": 0.5272, | |
| "confidential": 0.297, | |
| "restricted": 0.0236, | |
| "sovereign-only": 0.0064 | |
| }, | |
| "training_job_temperatures": { | |
| "task_category": 1.0758048295974731, | |
| "sensitivity": 0.9781951904296875, | |
| "complexity": 1.4539148807525635, | |
| "context_need": 1.0646779537200928 | |
| } | |
| }, | |
| "evaluation": { | |
| "report": "ml/reports/rlcd-v2-gates-run1.md (AiVa repository)", | |
| "eval_run": "s-ttp/aiva-eval-runs runs/rlcd-v2-eval-run1", | |
| "frozen_test": "s-ttp/aiva-rlcd-labels-v2@773a37d9c06934b46c52eb8a06314918332ee826 natural/natural-test.jsonl", | |
| "gates_passed": "33 of 33 at max_length 1024", | |
| "decision": "every gate passes at 1024; 512 does not", | |
| "provenance": "measured" | |
| }, | |
| "training_dataset": { | |
| "repo": "s-ttp/aiva-rlcd-labels-v2", | |
| "revision": "7c3c0971267a011320d487af0c30bea6c4e18f7f", | |
| "data_dir": "combined" | |
| } | |
| } |