Domain-specialised using LoRA on Apple Silicon via
MLX
for cross-framework AI security and risk management analysis across:
1learning_rate: 5e-5
2lr_schedule: cosine_decay (100-iter warmup)
3batch_size: 4
4iters: 1200
5lora_rank: 8
6lora_alpha: 16.0
7lora_dropout: 0.05
8num_layers: 16
1from mlx_lm import load, generate
2
3model, tokenizer = load(
4 "Dbristol/aisec_model_v1"
5)
6
7prompt = "Provide a cross-framework analysis of indirect prompt injection defences \
8for a code generation assistant using OWASP AI Exchange, SAIF, MITRE ATLAS, \
9and NIST AI RMF."
10
11messages = [
12 {
13 "role": "system",
14 "content": (
15 "You are an expert AI security and risk management assistant "
16 "specialising in NIST AI RMF 1.0, MITRE ATLAS, OWASP AI Exchange, "
17 "and Google SAIF frameworks."
18 )
19 },
20 {"role": "user", "content": prompt}
21]
22
23formatted = tokenizer.apply_chat_template(
24 messages,
25 tokenize=False,
26 add_generation_prompt=True
27)
28
29response = generate(
30 model,
31 tokenizer,
32 prompt=formatted,
33 max_tokens=512,
34 temp=0.4,
35 top_p=0.85,
36)
37print(response)
This model is designed for security practitioners, researchers, and AI governance
professionals who need structured cross-framework analysis. Suitable use cases include:
This model should not be used as the sole basis for security decisions without
human expert review. Framework guidance evolves; always verify against current
official documentation.
This model is released under
Apache 2.0.
The base model (
Mistral-7B-Instruct-v0.3)
is also Apache 2.0 licensed.
The training dataset is derived from publicly available framework documentation.
See the
dataset card
for full provenance and source attribution.
1@misc{aisec_model_v1,
2 author = {<your-name>},
3 title = {aisec\_model\_v1: Mistral 7B Fine-Tuned for AI Security Framework Analysis},
4 year = {2026},
5 publisher = {HuggingFace},
6 url = {https://huggingface.co/dbristol/aisec_model_v1}
7}