Paramir's picture
Add runtime artifact inventory README
3987419 verified
|
Raw
History Blame Contribute Delete
1.38 kB
# PromptGuard Context Runtime Artifacts
This directory is the PromptGuard context classifier runtime package.
It is not a single Hugging Face Transformer model directory. PromptGuard loads the source-of-truth manifest first, then resolves the LR and verifier paths from that manifest.
## Required Files
| Purpose | File |
| --- | --- |
| Runtime manifest | `context_lr_roberta_active_best_f1_manifest.json` |
| Target labels | `context_target_labels.json` |
| Verifier label definitions | `context_label_definitions_verifier_compact_v2.json` |
| LR candidate generator | `context_with_patch_v287_lr_c4_dev_classifier.joblib` |
| Verifier model directory | `context_verifier_klue_roberta_base_lrmined_v287_global002_compactv2_lpft_focal_1p2ep/` |
## Model Roles
- The LR file is a scikit-learn One-vs-Rest Logistic Regression classifier. It consumes Qwen embedding vectors and proposes candidate context-risk labels.
- The verifier directory is a fine-tuned `klue/roberta-base` sequence classifier. It accepts or rejects candidate labels using the label definitions and thresholds in the manifest.
## Loading Rule
Do not load this directory with `AutoModelForSequenceClassification.from_pretrained()` at the repository root. PromptGuard should load `context_lr_roberta_active_best_f1_manifest.json`, then load the LR `joblib` and the verifier directory named in that manifest.