Views
No views yet
1# Download the Modelfile
2curl -O https://huggingface.co/sallani/ISO27001-Qwen2.5-0.5B-Edge/resolve/main/Modelfile
3
4# Create and run
5ollama create iso27001-agent -f Modelfile
6ollama run iso27001-agent1llama-cli \
2 -m iso27001-qwen2.5-0.5b-q4_k_m.gguf \
3 --chat-template qwen \
4 -p "What are the mandatory documents required by ISO 27001:2022?" \
5 -n 5121from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_id = "sallani/ISO27001-Qwen2.5-0.5B-Edge"
4tokenizer = AutoTokenizer.from_pretrained(model_id)
5model = AutoModelForCausalLM.from_pretrained(model_id)
6
7messages = [
8 {
9 "role": "system",
10 "content": "You are an ISO 27001:2022 Lead Auditor and ISMS expert. Your answers are precise, actionable, and referenced to specific clauses and controls."
11 },
12 {
13 "role": "user",
14 "content": "What are the mandatory documents required by ISO 27001:2022?"
15 }
16]
17
18text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
19inputs = tokenizer(text, return_tensors="pt")
20outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.7)
21print(tokenizer.decode(outputs[0], skip_special_tokens=True))1pip install mlx-lm
2
3python -m mlx_lm.generate \
4 --model sallani/ISO27001-Qwen2.5-0.5B-Edge \
5 --prompt "What is the Statement of Applicability in ISO 27001?" \
6 --max-tokens 512| File | Format | Size | Usage |
|---|---|---|---|
model.safetensors | SafeTensors FP16 | ~988 MB | transformers, MLX |
iso27001-qwen2.5-0.5b-q4_k_m.gguf | GGUF Q4_K_M | ~398 MB | Ollama, llama.cpp |
tokenizer.json | JSON | — | tokenization |
config.json | JSON | — | architecture |
Modelfile | Ollama | — | local deployment |
| Parameter | Value |
|---|---|
| Architecture | Qwen2.5 Transformer decoder |
| Parameters | 0.5B |
| Base model | Qwen/Qwen2.5-0.5B-Instruct |
| Fine-tuning method | QLoRA / LoRA via MLX-LM |
| LoRA layers | 4 |
| Learning rate | 1e-4 |
| Iterations | 150 |
| Batch size | 8 |
| Max sequence length | 1,024 tokens |
| Max context | 32,768 tokens |
| GGUF quantization | Q4_K_M (~398 MB) |
| Languages | French 🇫🇷 + English 🇬🇧 |
1@model{iso27001_qwen25_edge_2025,
2 title = {ISO27001-Qwen2.5-0.5B-Edge},
3 author = {Sabri Allani},
4 year = {2025},
5 url = {https://huggingface.co/sallani/ISO27001-Qwen2.5-0.5B-Edge}
6}