Text Classification
Transformers
Safetensors
English
deberta-v2
safety
biosecurity
content-classification
constitutional-classifiers
deberta-v3
dual-use
nsabb
biology
Eval Results (legacy)
text-embeddings-inference
Instructions to use jang1563/constitutional-bioguard-deberta-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jang1563/constitutional-bioguard-deberta-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="jang1563/constitutional-bioguard-deberta-v1")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("jang1563/constitutional-bioguard-deberta-v1") model = AutoModelForSequenceClassification.from_pretrained("jang1563/constitutional-bioguard-deberta-v1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "train_metrics": { | |
| "train_runtime": 397.6795, | |
| "train_samples_per_second": 37.316, | |
| "train_steps_per_second": 1.169, | |
| "total_flos": 3123710468358144.0, | |
| "train_loss": 0.2441582655714404, | |
| "epoch": 4.0 | |
| }, | |
| "eval_metrics": { | |
| "eval_loss": 0.08734048902988434, | |
| "eval_accuracy": 0.9669291338582677, | |
| "eval_precision": 0.9759615384615384, | |
| "eval_recall": 0.973621103117506, | |
| "eval_f1": 0.9747899159663865, | |
| "eval_auroc": 0.9965018810639561, | |
| "eval_fpr": 0.045871559633027525, | |
| "eval_runtime": 6.9183, | |
| "eval_samples_per_second": 91.786, | |
| "eval_steps_per_second": 11.564, | |
| "epoch": 4.0 | |
| }, | |
| "config": { | |
| "model": { | |
| "name": "microsoft/deberta-v3-base", | |
| "max_seq_length": 512 | |
| }, | |
| "training": { | |
| "num_train_epochs": 5, | |
| "per_device_train_batch_size": 16, | |
| "gradient_accumulation_steps": 2, | |
| "learning_rate": 2e-05, | |
| "lr_scheduler_type": "cosine", | |
| "warmup_ratio": 0.1, | |
| "weight_decay": 0.01, | |
| "bf16": false, | |
| "seed": 42, | |
| "logging_steps": 50, | |
| "eval_strategy": "epoch", | |
| "save_strategy": "epoch", | |
| "save_total_limit": 3, | |
| "load_best_model_at_end": true, | |
| "metric_for_best_model": "f1", | |
| "early_stopping_patience": 2, | |
| "optim": "adamw_torch" | |
| }, | |
| "data": { | |
| "train_file": "data/processed/train.jsonl", | |
| "val_file": "data/processed/val.jsonl", | |
| "test_file": "data/processed/test.jsonl", | |
| "class_weights": true, | |
| "text_column": "text", | |
| "label_column": "label" | |
| }, | |
| "output": { | |
| "model_dir": "models/deberta_bioguard_v1", | |
| "log_dir": "results/training_logs" | |
| } | |
| } | |
| } |