Instructions to use debjyotikm/siliconshield-rtl-contract-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Laya
How to use debjyotikm/siliconshield-rtl-contract-2 with Laya:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
SiliconShield-RTL Contract-2 (temporal specialist)
Contract-2 judges RTL against security requirements over FIFO,
counter, and arbitration behavior: occupancy, backpressure,
saturation, commit/hold, grant handshakes, and missing implementation
context. It returns one three-way verdict per requirement:
satisfies_requirement, violates_requirement, or
insufficient_context, with all three scores.
Pair it with Contract-1, which owns local guard, register-write, and access-control behavior. Neither model alone covers every RTL area. The SiliconShield router consults each on its qualified scopes and reports the rest as thin-evidence.
Labels
Given a self-contained RTL region, an explicit security requirement, and stated execution assumptions, the model produces one of three structured answers. It runs locally and keeps design inputs on user hardware.
| Label | Description |
|---|---|
| satisfies_requirement | The model predicts that the supplied RTL region looks consistent with the stated requirement under the supplied assumptions. |
| violates_requirement | The model predicts a possible inconsistency between the RTL and the requirement. |
| insufficient_context | The model predicts that omitted implementation detail, assumption, or policy information prevents a reliable determination. |
Quickstart
from huggingface_hub import snapshot_download
checkpoint = snapshot_download(
repo_id="debjyotikm/siliconshield-rtl-contract-2",
revision="b96211872d573ae48b6dabe128c0d96aad291156",
)
import json
from laya.agent import load
agent = load(checkpoint)
contract = json.load(open(checkpoint + "/question_contract.json"))
questions = {
"security": {
"type": "security",
"instructions": contract["instructions"],
"criteria": contract["criteria"],
"option_order": [0, 1, 2],
}
}
answers = agent.predict_batch(
[state_text],
questions,
batch_size=16,
sort_by_length=False,
max_len=1536,
head_max_len=256,
)
probs = answers[0]["answers"]["security"]["probabilities"]
label = max(probs, key=lambda name: float(probs[name]))
state_text is the RTL plus requirement and assumptions in the
benchmark row format (see below). Scores round to four decimals.
Treat exact-zero target scores as confident misses. The SiliconShield
workflow conclusion combines model assessment, executable checks, a
repair proposal, and post-patch verification. The decision model
alone neither proves the violation nor accepts the repair.
Benchmark
Scored with the pinned prompt above on the public SiliconShield RTL benchmark (5,589 rows, 11 areas). Development evidence. Sealed qualification and test populations were never opened.
| Area | Contract-2 | Contract-1 |
|---|---|---|
| fifo | 97/108 | 36/108 |
| counter | 92/108 | 41/108 |
| arbitration | 14/18 | 14/18 |
| interrupt-wake | 145/234 | 158/234 |
| input-filter | 94/162 | 91/162 |
| ot-access-control | 77/108 | 108/108 |
| local-safety-cwe | 933/2610 | 2601/2610 |
| transfer-pairs | 275/621 | 606/621 |
| write-paths | 244/432 | 179/432 |
| guard-semantics | 268/432 | 171/432 |
| requirement-clarity | 271/756 | 346/756 |
Overall 2,510/5,589. In-domain (fifo/counter/arbitration): 203/234 with perfect 78/78 missing-context judgment and 51/78 whole triplets, with 8 of 20 mechanisms perfect. Violation recall there is 61/78 with 17 false-safes.
Full per-area and per-mechanism detail (classes, false-safes,
false violations, abstentions, triplets, NLL, inference settings) is
in benchmark-results.json in this repo.
Reproduce with the SiliconShield repo (no training needed):
python -m siliconshield.benchmark run --registry models.json \
--out-dir bench-out
What it handles well
Contract-2 is strongest on FIFO occupancy control and counter behavior under explicit requirements, with 97/108 and 92/108 on those benchmark areas and perfect missing-context judgment in domain. Arbitration support is narrow at 14/18.
Limitations
- Narrow specialist. Local safety, transfer behavior, access-control bugs, write paths, and plain-English policy reasoning are at or near chance. Route those to Contract-1.
- Misses one in five in-domain violations (17 false-safes on the focused set). Commit-hold, arbiter-tree, empty-data-blanking, and stored-word-hold families are unreliable.
- Owner-selected research checkpoint. It did not pass the frozen promotion floor (violation recall, false-safe, and NLL gates). The trainer's selector held the parent instead.
- Small-fragment scope. Judges bounded RTL regions against one requirement at a time. No full-IP, SoC-level, FSM, clock-domain, bus-protocol, crypto, or firmware-interface reasoning.
- Out of scope. Broad discovery, CWE classification, localization, calibrated risk scores, and automatic patch approval.
- A verdict is not a proof. Confirm findings by simulation or formal verification before acting on them.
Training and lineage
Continued from a temporal-pilot parent export through the
SiliconShield security task: existing residual adapters and
decision head with the encoder frozen. Two single-GPU arms ran
and the triplet arm produced this checkpoint. Training used
2,700 solver-verified FIFO, counter, and arbitration rows in
complete triplets. Learning rate 1e-7 with 5-update warmup and
hold-decay to 0.2, batch 48, seed 7502, 300-update horizon with
evaluation every 10, row cross-entropy plus worst-member triplet
loss. The owner selected this checkpoint for satisfies and
context recovery at minimal violation cost. It did not pass the
frozen promotion floor. Question contract
siliconshield-requirement-context-v1, max length 1536.
Provenance
| Field | Evaluated value |
|---|---|
| Release | SiliconShield-RTL Contract-2 |
| Weights SHA-256 | f916444ff45cfc67bc5a67c81a36a770a20709fcd7a85fbfc0258fb411144ed8 |
| Question contract | siliconshield-requirement-context-v1 |
| Contract file SHA-256 | dd1f38ee223abac1f75b19d9086fd26d90865c9aa43097674fffdd61dbbf8bd3 |
| Evaluation precision | BF16 model inference, FP32 probabilities and metrics |
| Input budgets | max_len 1536, head_max_len 256 |
Model bytes plus question contract plus runtime behavior plus label order are one identity. Marginal decisions can differ across hardware even when identities match, so reproducible claims must name runtime, precision, contract, checkpoint, and population.
License
Apache-2.0. LAYA foundation weights retain their upstream terms. See the SiliconShield repository for the exact pinned revision.
- Downloads last month
- 30
Model tree for debjyotikm/siliconshield-rtl-contract-2
Base model
convaiinnovations/laya