Q-Trust CryptoCodeDetector (CodeBERTa fine-tune)
Fine-tuned crypto-usage discovery model from Q-Trust
(qtrust_ai/ intelligence layer). Detects cryptographic API usage and algorithm families in
source code โ the discovery stage that feeds CBOM generation and PQC migration planning.
Training
- Corpus: 13,973 real code files โ SolidiFI, SmartBugs, EIPs, WebAuthn blockchain contracts, OSS crypto repos
- Schedule: 4-epoch GPU fine-tune (A100), deterministic seed (same seed โ same F1)
- Dataset:
KRPur/q-trust-datasets(code_corpus.json)
Held-out results (repo-disjoint, n=2415)
| Metric | Q-Trust ensemble | Rules-only | Majority | Random |
|---|---|---|---|---|
| F1 | 0.9525 | 0.673 | 0.8683 | 0.5981 |
| Precision | 0.952 | 0.979 | โ | โ |
| Recall | 0.953 | 0.513 | 1.0 | โ |
Source: qtrust_ai/artifacts/benchmark_comparison.json (seed 42) in the GitHub repo.
Usage
from transformers import AutoModelForSequenceClassification, AutoTokenizer
m = AutoModelForSequenceClassification.from_pretrained("KRPur/q-trust-codebert")
t = AutoTokenizer.from_pretrained("KRPur/q-trust-codebert")
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support