Downloads · 30 days
5
25% of all-time downloads
MrBenL/controlsense
controlsense is a text generation model from MrBenL. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as other.
A LoRA adapter that fine-tunes mistralai/Mistral-7B-Instruct-v0.2 to analyze security and governance control statements: it maps a control to recognized frameworks (NIST CSF 2.0, CIS Controls v8, NIST AI RMF 1.0), ide…
Downloads · 30 days
5
25% of all-time downloads
All-time downloads
20
Public
Repo size
83.9 MB
Likes
0
Public
Click a slice to open those files.
.safetensors83.9 MB · 96%
From the Hugging Face model README
A LoRA adapter that fine-tunes mistralai/Mistral-7B-Instruct-v0.2 to analyze security and governance control statements: it maps a control to recognized frameworks (NIST CSF 2.0, CIS Controls v8, NIST AI RMF 1.0), identifies coverage gaps, and emits a structured result suitable for a gap register.
This adapter is the trained component of ControlSense, a locally-running GRC policy analysis tool. The adapter on its own is roughly 84 MB; it is meant to be applied to the Mistral base model. For the full application, including the document ingestion pipeline, UI, and Docker setup, see the project repository.
ControlSense is a decision-support tool. It is intended to help security governance practitioners triage and draft control-to-framework mappings and surface candidate gaps for review. It is not a source of authoritative compliance determinations, and its output should be reviewed by a qualified practitioner before being used in any audit, attestation, or compliance decision.
The adapter is designed to be run inside the ControlSense application, which constructs the prompt format the model was trained on and handles framework validation of the output. Using the adapter outside that prompt structure will not reliably produce well-formed results.
To load the adapter directly with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = "mistralai/Mistral-7B-Instruct-v0.2"
model = AutoModelForCausalLM.from_pretrained(base, device_map="auto")
model = PeftModel.from_pretrained(model, "MrBenL/controlsense")
tokenizer = AutoTokenizer.from_pretrained("MrBenL/controlsense")
The adapter is evaluated against a held-out set of 100 hand-curated control examples, each specifying the framework mappings the model should produce and keywords for the gaps it should surface. On the measured baseline, required- mapping accuracy is 53.1% (scoped to NIST CSF 2.0, the framework with the densest training coverage, with each miss expert-adjudicated as a genuine miss rather than a key error). NIST AI RMF and OWASP LLM mappings are produced and measured but reported as emerging coverage pending expanded training data. The product-level fabricated-ID rate is 0.0%: the application's output sanitizer validates every category against the official framework enumerations and rejects fabricated or retired IDs before display (the pre-sanitizer model-level rate was 5.2%, almost entirely retired NIST CSF 1.1 numbers). All outputs are intended for human verification rather than unattended use.
This adapter is released under the PolyForm Noncommercial License 1.0.0. Use for any noncommercial purpose is free. Commercial use by or on behalf of a for-profit organization requires a separate commercial license; contact support@benluthy.com.
The base model, Mistral-7B-Instruct-v0.2, is licensed separately by Mistral AI under Apache-2.0.
This adapter was trained using TRL:
@software{vonwerra2020trl,
title = {{TRL: Transformers Reinforcement Learning}},
author = {von Werra, Leandro and Belkada, Younes and Tunstall, Lewis and Beeching, Edward and Thrush, Tristan and Lambert, Nathan and Huang, Shengyi and Rasul, Kashif and Gallouédec, Quentin},
license = {Apache-2.0},
url = {https://github.com/huggingface/trl},
year = {2020}
}