CoolFace
Modelpublic

sallani/ISO27001-Qwen2.5-0.5B-Edge

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
0likes2.6kdownloads
Model Card

<div align="center">

πŸ” ISO27001-Qwen2.5-0.5B-Edge

ISO 27001:2022 fine-tuned SLM β€” on-premise, offline, sovereign

![Base Model](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct) ![License](LICENSE) ![Lang]() ![GGUF]()

</div>


About

A specialized AI agent for ISO/IEC 27001:2022 and ISO/IEC 27002:2022, designed to run entirely on-premise and offline β€” no data ever leaves your infrastructure.

Fine-tuned on 199 Q&A pairs covering the full ISO 27001:2022 requirements: clauses 4-10, all 93 Annex A controls, gap assessment, audit preparation, and regulatory alignment with NIS2, DORA, and GDPR.


Use Cases

  • β€”πŸ” ISMS Gap Assessment β€” maturity evaluation, non-conformity identification
  • β€”πŸ“‹ ISO 27001 Audit Support β€” clauses, Annex A controls, expected audit evidence
  • β€”πŸ›‘οΈ CISO / DPO Advisory β€” risk management, risk treatment plan, Statement of Applicability
  • β€”πŸ“„ Certification Preparation β€” auditor checklist, mandatory documentation
  • β€”πŸ”— Regulatory Alignment β€” NIS2, DORA, GDPR, ISO 42001 mapped to ISO 27001

Quick Start

Ollama (recommended)

bash
# Download the Modelfile
curl -O https://huggingface.co/sallani/ISO27001-Qwen2.5-0.5B-Edge/resolve/main/Modelfile

# Create and run
ollama create iso27001-agent -f Modelfile
ollama run iso27001-agent

llama.cpp

bash
llama-cli \
  -m iso27001-qwen2.5-0.5b-q4_k_m.gguf \
  --chat-template qwen \
  -p "What are the mandatory documents required by ISO 27001:2022?" \
  -n 512

Python / transformers

python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "sallani/ISO27001-Qwen2.5-0.5B-Edge"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)

messages = [
    {
        "role": "system",
        "content": "You are an ISO 27001:2022 Lead Auditor and ISMS expert. Your answers are precise, actionable, and referenced to specific clauses and controls."
    },
    {
        "role": "user",
        "content": "What are the mandatory documents required by ISO 27001:2022?"
    }
]

text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

MLX β€” Apple Silicon

bash
pip install mlx-lm

python -m mlx_lm.generate \
  --model sallani/ISO27001-Qwen2.5-0.5B-Edge \
  --prompt "What is the Statement of Applicability in ISO 27001?" \
  --max-tokens 512

Available Files

FileFormatSizeUsage
model.safetensorsSafeTensors FP16~988 MBtransformers, MLX
iso27001-qwen2.5-0.5b-q4_k_m.ggufGGUF Q4KM~398 MBOllama, llama.cpp
tokenizer.jsonJSONβ€”tokenization
config.jsonJSONβ€”architecture
ModelfileOllamaβ€”local deployment

Model Details

ParameterValue
ArchitectureQwen2.5 Transformer decoder
Parameters0.5B
Base modelQwen/Qwen2.5-0.5B-Instruct
Fine-tuning methodQLoRA / LoRA via MLX-LM
LoRA layers4
Learning rate1e-4
Iterations150
Batch size8
Max sequence length1,024 tokens
Max context32,768 tokens
GGUF quantizationQ4KM (~398 MB)
LanguagesFrench πŸ‡«πŸ‡· + English πŸ‡¬πŸ‡§

Training Dataset

Fine-tuned on [sallani/iso27001-isms-dataset](https://huggingface.co/datasets/sallani/iso27001-isms-dataset) β€” 199 unique Q&A pairs (159 train / 40 test).

Coverage:

  • β€”Clauses 4-10 (all mandatory ISMS requirements)
  • β€”All 93 Annex A controls across 4 themes: Organisational, People, Physical, Technological
  • β€”All 11 new ISO 27001:2022 controls (threat intelligence, cloud security, secure coding, DLP, data masking…)
  • β€”Gap assessment methodology and ISMS maturity levels
  • β€”Practical scenarios: ransomware response, NIS2/DORA alignment, Zero Trust, AI/ISO 42001
  • β€”Bilingual FR/EN with Lead Auditor system prompt

Limitations

  • β€”0.5B parameter model β€” reasoning capabilities are limited compared to larger models (>7B)
  • β€”Does not replace a professional ISO 27001 audit or a certified Lead Auditor
  • β€”Answers should be validated by an expert before use in a real audit context
  • β€”Knowledge is limited to the fine-tuning date

License

Apache 2.0 β€” same license as the base model Qwen2.5-0.5B-Instruct.


Citation

bibtex
@model{iso27001_qwen25_edge_2025,
  title   = {ISO27001-Qwen2.5-0.5B-Edge},
  author  = {Sabri Allani},
  year    = {2025},
  url     = {https://huggingface.co/sallani/ISO27001-Qwen2.5-0.5B-Edge}
}