Files
ModelHub XC fc6fef9d10 初始化项目,由ModelHub XC社区提供模型
Model: sallani/ISO42001-Qwen2.5-0.5B-Edge
Source: Original Platform
2026-07-20 21:09:10 +08:00

215 lines
6.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
language:
- fr
- en
license: apache-2.0
base_model: Qwen/Qwen2.5-0.5B-Instruct
tags:
- iso42001
- ai-governance
- ai-management-system
- aims
- eu-ai-act
- grc
- compliance
- edge
- qlora
- mlx
- fine-tuned
- on-premise
- sovereign-ai
pipeline_tag: text-generation
library_name: transformers
---
# ISO42001-Qwen2.5-0.5B-Edge
<p align="center">
<img src="https://img.shields.io/badge/ISO%2FIEC%2042001%3A2023-AI%20Management%20System-blue?style=flat-square"/>
<img src="https://img.shields.io/badge/Base-Qwen2.5--0.5B--Instruct-orange?style=flat-square"/>
<img src="https://img.shields.io/badge/Fine--tuning-MLX%20%7C%20QLoRA-green?style=flat-square"/>
<img src="https://img.shields.io/badge/Deploy-On--premise%20%7C%20Offline-purple?style=flat-square"/>
<img src="https://img.shields.io/badge/License-Apache%202.0-lightgrey?style=flat-square"/>
</p>
> **Specialized SLM for ISO/IEC 42001:2023 — AI Management System.**
> Fine-tuned on Qwen2.5-0.5B-Instruct. Runs fully on-premise, offline, with no external dependencies.
---
## Overview
| | |
|---|---|
| **Base model** | `Qwen/Qwen2.5-0.5B-Instruct` (Apache 2.0) |
| **Architecture** | Qwen2 — 24 layers · 896 hidden dim · 14 heads · 0.5B parameters |
| **Fine-tuning** | MLX LoRA (Apple Silicon) · QLoRA 4-bit NF4 (GPU) |
| **Domain** | ISO/IEC 42001:2023 · EU AI Act · GDPR × AI · AI Governance |
| **Languages** | French · English |
| **Deployment** | On-premise · Offline · Ollama · llama.cpp · LM Studio |
---
## What is this model for?
ISO/IEC 42001:2023 is the first international standard for **AI Management Systems (AIMS)**. It provides organizations that develop, deploy, or use AI with a governance framework to demonstrate responsible and ethical AI use — increasingly required in the context of the EU AI Act.
This model gives CISOs, DPOs, CAIOs, and GRC consultants precise, clause-referenced answers on:
- **Clauses 410** — context, leadership, planning, support, operations, performance evaluation, improvement
- **Annex A** — all controls: A.2 policies · A.6 AI system operation · A.7 transparency · A.8 data governance · A.10 supply chain
- **EU AI Act × ISO 42001 mapping** — 4 risk levels, obligations per category
- **ISO 27001 × ISO 42001 × GDPR integration** — unified governance approach
- **Practical topics** — impact assessment, model cards, SoA, AI system register, privacy risk
---
## Example queries
```
What is the scope of ISO/IEC 42001:2023?
How is Annex A of ISO 42001 structured?
How to conduct an AI Impact Assessment per control A.6.1?
What are the human oversight requirements under ISO 42001 (A.6.2)?
How does ISO 42001 map to EU AI Act Article 9?
What data governance controls does ISO 42001 require for AI systems (A.8)?
Qu'est-ce qu'un Statement of Applicability dans ISO 42001 ?
Comment certifier un AIMS ISO 42001 ? Quelles sont les étapes ?
Quelle est la différence entre ISO 27001 et ISO 42001 ?
Comment créer un registre des systèmes d'IA conforme à ISO 42001 ?
```
---
## Inference
### HuggingFace Transformers
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "sallani/ISO42001-Qwen2.5-0.5B-Edge"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
messages = [
{
"role": "system",
"content": (
"You are an expert assistant in AI governance and management systems, "
"specializing in ISO/IEC 42001:2023 (AI Management System), the EU AI Act, "
"and GDPR applied to AI. Your answers are precise, clause-referenced, "
"and tailored to compliance professionals (CISOs, DPOs, CAIOs, GRC consultants)."
)
},
{
"role": "user",
"content": "What are the key controls in ISO 42001 Annex A for AI system operations?"
}
]
text = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=512,
temperature=0.1,
top_p=0.9,
repetition_penalty=1.1,
do_sample=True,
)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
```
### Ollama (GGUF Q4_K_M)
```bash
ollama create iso42001-edge -f Modelfile
ollama run iso42001-edge "How to conduct an AI Impact Assessment per ISO 42001 A.6.1?"
```
### llama.cpp
```bash
./llama-cli \
-m iso42001-qwen2.5-0.5b-q4_k_m.gguf \
--system-prompt "You are an ISO/IEC 42001:2023 AI governance expert." \
-p "What is the scope of ISO 42001?" \
-n 512 --temp 0.1
```
---
## Training details
### Dataset
47 instruction-following Q&A pairs (FR/EN) covering the full standard:
| File | Examples | Split |
|------|----------|-------|
| `iso42001_train.jsonl` | 37 | Training |
| `iso42001_test.jsonl` | 10 | Evaluation (out-of-distribution) |
**Thematic coverage:**
- Clauses 46: Context · Leadership · Planning · AI Impact Assessment · Risk assessment
- Clauses 78: Support · Operations · AI lifecycle · Data governance (A.8) · Human oversight (A.6.2)
- Clauses 910: Performance evaluation · Internal audit · Continual improvement
- EU AI Act × ISO 42001: full 4-level risk mapping
- ISO 27001 × ISO 42001 × GDPR integration
- Practical topics: SoA · AI system register · model card · certification steps
### Hyperparameters
| Parameter | Value |
|-----------|-------|
| Technique | MLX LoRA (Apple M-series) |
| LoRA rank | 8 |
| LoRA layers | 4 |
| Iterations | 100 |
| Batch size | 8 |
| Learning rate | 5e-5 |
| Max seq length | 1024 |
| Optimizer | Adam |
---
## Offline deployment
This model is designed to run **fully locally** with no network calls at inference time.
- ✅ No data sent to external cloud services
- ✅ CPU-compatible via GGUF Q4_K_M (8 GB RAM minimum)
- ✅ Apple Silicon optimized via MLX
- ✅ Compatible with Ollama · llama.cpp · LM Studio · Jan
- ✅ Apache 2.0 license — commercial use permitted
- ✅ Fully reproducible fine-tuning from source
---
## Limitations
- Compact dataset (47 pairs) — suited for specialized Q&A and evaluation, not production-critical use without further enrichment
- 0.5B model — limited on complex multi-step reasoning chains
- Does not replace a certified ISO 42001 audit conducted by a qualified professional
- Outputs should be reviewed by a subject matter expert before any regulatory decision
---
## License
This model is released under **Apache 2.0**.
Base model: [Qwen2.5-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct) — Apache 2.0, Alibaba Cloud.