Text Classification
Transformers
ONNX
Safetensors
roberta
code
cryptography
post-quantum
static-analysis
text-embeddings-inference
Instructions to use KRISHNAPURI/q-trust-codebert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KRISHNAPURI/q-trust-codebert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="KRISHNAPURI/q-trust-codebert")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("KRISHNAPURI/q-trust-codebert") model = AutoModelForSequenceClassification.from_pretrained("KRISHNAPURI/q-trust-codebert", device_map="auto") - Notebooks
- Google Colab
- Kaggle
model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: transformers
|
| 4 |
+
tags:
|
| 5 |
+
- cryptography
|
| 6 |
+
- post-quantum
|
| 7 |
+
- code
|
| 8 |
+
- graph-neural-networks
|
| 9 |
+
- reinforcement-learning
|
| 10 |
+
base_model: huggingface/CodeBERTa-small-v1
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Q-Trust Models
|
| 14 |
+
|
| 15 |
+
Checkpoints for the Q-Trust post-quantum migration project
|
| 16 |
+
(`humoge7502/q-trust` on GitHub). All metrics below are measured, never
|
| 17 |
+
estimated. No superiority is claimed where the evidence shows a tie.
|
| 18 |
+
|
| 19 |
+
## Files
|
| 20 |
+
|
| 21 |
+
| File | What | Measured result |
|
| 22 |
+
|---|---|---|
|
| 23 |
+
| `crypto_codebert/` | CodeBERTa-small-v1 fine-tune, 4 epochs, CUDA, seed 42 | F1 **0.9525** (P 0.952 / R 0.953, n=2,415, repo-disjoint split) |
|
| 24 |
+
| `gnn/model_gpu_v3.pt` + `model_ddp_v3.pt` | Migration-ranking GNN | 42-fold LOO τ-b **0.7168** vs heuristic **0.7210** — **honest tie**, no superiority claim |
|
| 25 |
+
| `rl/rl_agent.pt` | Migration-ordering RL agent | Reward 140.34 ± 8.13 vs heuristic 140.62 — tie |
|
| 26 |
+
| `side-channel/side_channel_model_real.pt` | Trace anomaly detector, retrained on 54 real trace sets | 46 VERIFIED + 8 LOW_RISK clean; 51/54 HIGH_RISK leak-injected |
|
| 27 |
+
| `reports/` | `training_report_real.json`, `benchmark_comparison.json` | Lineage: config + seed + metrics per artifact |
|
| 28 |
+
|
| 29 |
+
## Reproduce
|
| 30 |
+
|
| 31 |
+
```bash
|
| 32 |
+
python scripts/train_qtrust_all.py --real --hf-epochs 3 # discovery (needs CUDA)
|
| 33 |
+
python scripts/eval_real_cbom_loo.py # GNN 42-fold LOO (needs 2xA100)
|
| 34 |
+
python scripts/train_real_side_channel.py --traces-dir <dir>
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
## Limitations
|
| 38 |
+
|
| 39 |
+
GNN reproduces the doctrine heuristic rather than beating it; side-channel
|
| 40 |
+
model misses FALCON-512/1024 + SLH-DSA-256s keygen at n≤200; RL ties the
|
| 41 |
+
heuristic. Checkpoints pin via `models.sha256` at deploy (`QTRUST_ENFORCE_MODEL_MANIFEST=1`).
|