clemsail commited on
Commit
05daa5c
·
verified ·
1 Parent(s): 8701776

docs: EU AI Act self-contained model card v0.4.1

Browse files
Files changed (1) hide show
  1. README.md +117 -31
README.md CHANGED
@@ -7,6 +7,8 @@ tags:
7
  - mlx
8
  - eu-kiki
9
  - eu-ai-act
 
 
10
  language:
11
  - fr
12
  - en
@@ -15,13 +17,88 @@ library_name: peft
15
 
16
  # eu-kiki-devstral-python-lora
17
 
18
- LoRA adapter for **mistralai/Devstral-Small-2-24B-Instruct-2512**, part of the [eu-kiki](https://github.com/L-electron-Rare/eu-kiki) project — a 100 % EU-sovereign multi-model LLM serving pipeline. EU AI Act Article 52/53 compliant.
19
 
20
- ## Performance
21
 
22
- **HumanEval+ (Linux EvalPlus, 164 problems, greedy):** base 87.20 / 82.90 → +python −1.20 / −1.80 pts.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
- ## Usage
25
 
26
  ```python
27
  from mlx_lm import load
@@ -36,7 +113,7 @@ linear_to_lora_layers(model, num_layers=32, config={"rank": 16, "alpha": 32})
36
  model.load_weights(f"{adapter_path}/adapters.safetensors", strict=False)
37
  ```
38
 
39
- Or, simpler, fuse and serve via `mlx_lm fuse`:
40
 
41
  ```bash
42
  python -m mlx_lm fuse \
@@ -46,38 +123,41 @@ python -m mlx_lm fuse \
46
  --dequantize
47
  ```
48
 
49
- ## Training configuration
50
-
51
- | Parameter | Value |
52
- |---|---|
53
- | Method | LoRA |
54
- | Rank | 16 |
55
- | Alpha | 32 |
56
- | Dropout | 0.05 |
57
- | Target modules | q_proj, k_proj, v_proj, o_proj |
58
- | Precision | BF16 |
59
- | Optimiser | AdamW |
60
- | Learning rate | 1e-5 |
61
- | Framework | MLX (`mlx_lm` fork on Apple Silicon) |
62
- | Hardware | Mac Studio M3 Ultra 512 GB unified memory |
63
-
64
- ## Provenance & EU AI Act compliance
65
 
66
- Datasets used to train this adapter are HF-traceable. Per-source SPDX licenses, download dates, source row counts, and used row counts are documented in:
 
 
 
 
 
 
 
 
 
67
 
68
- - [`docs/eu-ai-act-transparency.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/docs/eu-ai-act-transparency.md) system-level transparency record (Art. 52/53)
69
- - [`MODEL_CARD.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/MODEL_CARD.md) — full evaluation summary across HumanEval+, MT-Bench, GSM8K, KIKI-DSL v3
70
- - [`eval/results/SUMMARY.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/eval/results/SUMMARY.md) — per-bench reproducible results
71
 
72
- ## Risk classification
73
-
74
- **Limited risk** (EU AI Act Art. 52). General-purpose AI; not deployed in safety-critical contexts.
 
 
 
75
 
76
- ## License
77
 
78
- Apache 2.0, matching the base model.
 
 
 
 
 
 
 
 
79
 
80
- ## Citation
81
 
82
  ```bibtex
83
  @misc{eu-kiki-2026,
@@ -88,3 +168,9 @@ Apache 2.0, matching the base model.
88
  note = {Live demo: https://ml.saillant.cc}
89
  }
90
  ```
 
 
 
 
 
 
 
7
  - mlx
8
  - eu-kiki
9
  - eu-ai-act
10
+ - art-52
11
+ - art-53
12
  language:
13
  - fr
14
  - en
 
17
 
18
  # eu-kiki-devstral-python-lora
19
 
20
+ LoRA adapter for **mistralai/Devstral-Small-2-24B-Instruct-2512**, part of the [eu-kiki](https://github.com/L-electron-Rare/eu-kiki) project — a 100 % EU-sovereign multi-model LLM serving pipeline. **EU AI Act Article 52 / 53 compliant** (limited risk, GPAI fine-tune).
21
 
22
+ ## 1. Model identity
23
 
24
+ | Field | Value |
25
+ |---|---|
26
+ | **Adapter name** | `eu-kiki-devstral-python-lora` |
27
+ | **Base model** | [`mistralai/Devstral-Small-2-24B-Instruct-2512`](https://huggingface.co/mistralai/Devstral-Small-2-24B-Instruct-2512) |
28
+ | **Adapter method** | LoRA (rank 16, alpha 32, dropout 0.05) |
29
+ | **Target modules** | `q_proj`, `k_proj`, `v_proj`, `o_proj` (attention only) |
30
+ | **Precision** | BF16 |
31
+ | **Domain** | `python` |
32
+ | **Training records** | 2,850 (curated, deduplicated) |
33
+ | **License** | Apache-2.0 (matches base model) |
34
+ | **Risk class** | **Limited risk** (Art. 52). Not safety-critical. |
35
+ | **System operator** | L'Électron Rare (clemsail), Saillant Clément |
36
+ | **Live demo** | https://ml.saillant.cc |
37
+ | **Source repo** | https://github.com/L-electron-Rare/eu-kiki |
38
+
39
+ ## 2. Performance evaluation (Art. 53(1)(d))
40
+
41
+ **HumanEval+** (Linux EvalPlus, 164 problems, greedy, 1 sample): base 87.20 / 82.90 → fused +python 86.00 / 81.10. **Δ HE+ = −1.80 pts** vs base. Linux scoring on `kx6tm-23` (Proxmox PVE 6.17, official EvalPlus sandbox).
42
+
43
+ Full bench results, methodology, env.json, and rerun.sh per measurement:
44
+ [`eval/results/SUMMARY.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/eval/results/SUMMARY.md) · [`MODEL_CARD.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/MODEL_CARD.md).
45
+
46
+ ## 3. Training data (Art. 53(1)(b)+(d))
47
+
48
+ The following sources were used to fine-tune **this specific adapter**.
49
+ Per-record `_provenance` fields (source, SPDX license, record_idx,
50
+ access_date) are present in the source dataset; see system-level
51
+ transparency record for full audit trail.
52
+
53
+ | Source | HF / URL | SPDX License | Records used |
54
+ |---|---|---|---:|
55
+ | StarCoder2 Self-Instruct | `bigcode/starcoder2-self-align` | `Apache-2.0` | 2,850 |
56
+
57
+ **Total records used for this LoRA:** 2,850.
58
+
59
+ System-level inventory (all 35+ domains, full SPDX, scraping manifests,
60
+ PDF pipeline DSM Art. 4 TDM compliance):
61
+ [`docs/eu-ai-act-transparency.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/docs/eu-ai-act-transparency.md).
62
+
63
+ ### 3.1 Copyright policy (Art. 53(1)(c))
64
+
65
+ - All HF-traced datasets carry permissive licenses (Apache-2.0, MIT,
66
+ CC-BY-*, BSD); copyleft compatibility verified via SPDX matrix.
67
+ - PDF datasheets (when used) processed under EU DSM Directive
68
+ Article 4 TDM exception: robots.txt respected, SHA-256 manifests,
69
+ dedicated audit at
70
+ [`docs/pdf-compliance-report.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/docs/pdf-compliance-report.md).
71
+ - Opt-out / removal requests: open an issue on the source repo or
72
+ email the system operator (see §5).
73
+
74
+ ### 3.2 PII statement (Art. 10 + Art. 53(1)(d))
75
+
76
+ Training data scanned with **Microsoft Presidio + en_core_web_lg**
77
+ (2026-04-28) across all 35+ domain directories. **One** email address
78
+ detected in the unrelated `traduction-tech` corpus was redacted before
79
+ training. No high-signal PII (email, phone, credit card, SSN, IBAN)
80
+ remains. Low-signal detections (PERSON, LOCATION, DATE_TIME) are
81
+ common false positives in technical text and were left in place.
82
+ Full report: `data/pii-scan-report.json` in the source repo.
83
+
84
+ ## 4. Training configuration
85
+
86
+ | Parameter | Value |
87
+ |---|---|
88
+ | Method | LoRA |
89
+ | Rank | 16 |
90
+ | Alpha | 32 |
91
+ | Dropout | 0.05 |
92
+ | Target modules | `q_proj`, `k_proj`, `v_proj`, `o_proj` |
93
+ | Precision | BF16 |
94
+ | Optimiser | AdamW |
95
+ | Learning rate | 1e-5 |
96
+ | Batch size × grad-accum | 1 × 4–8 |
97
+ | Framework | MLX (`mlx_lm` fork on Apple Silicon) |
98
+ | Hardware | Mac Studio M3 Ultra 512 GB unified memory |
99
+ | Energy footprint | ≪ training a foundation model from scratch (LoRA is parameter-efficient by design) |
100
 
101
+ ## 5. Usage
102
 
103
  ```python
104
  from mlx_lm import load
 
113
  model.load_weights(f"{adapter_path}/adapters.safetensors", strict=False)
114
  ```
115
 
116
+ Or fuse and serve as a self-contained checkpoint:
117
 
118
  ```bash
119
  python -m mlx_lm fuse \
 
123
  --dequantize
124
  ```
125
 
126
+ ## 6. Limitations & out-of-scope use
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
 
128
+ - **Not for safety-critical decisions** (medical, legal, structural,
129
+ life-safety, biometric).
130
+ - **Not for high-stakes individual decisions** (hiring, credit, law
131
+ enforcement) — that would re-classify under EU AI Act Art. 6
132
+ high-risk and require additional obligations.
133
+ - **Hallucination present** at typical instruction-tuned LLM levels;
134
+ pair with a verifier or human-in-the-loop for factual outputs.
135
+ - **LoRA is a fine-tune of the base model**: it inherits all base-model
136
+ limitations and biases (training data cutoff, language coverage,
137
+ refusal patterns).
138
 
139
+ ## 7. Contact (Art. 53(1)(d))
 
 
140
 
141
+ | Subject | Contact |
142
+ |---|---|
143
+ | Operator | clemsail (`L-electron-Rare` on GitHub) |
144
+ | Issues / audit requests | https://github.com/L-electron-Rare/eu-kiki/issues |
145
+ | Base model PII / copyright | See base model card on Hugging Face |
146
+ | Apertus PII / copyright | `llm-privacy-requests@swiss-ai.org`, `llm-copyright-requests@swiss-ai.org` |
147
 
148
+ ## 8. EU AI Act compliance summary
149
 
150
+ | Article | Coverage |
151
+ |---|---|
152
+ | Art. 52 (transparency to users) | Adapter publishes its purpose, base, fine-tune nature, and limitations in this card |
153
+ | Art. 53(1)(a) (technical doc) | This card + system-level [`MODEL_CARD.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/MODEL_CARD.md) |
154
+ | Art. 53(1)(b) (training data summary) | §3 above + system-level [`transparency.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/docs/eu-ai-act-transparency.md) §4 |
155
+ | Art. 53(1)(c) (copyright policy) | §3.1 above + DSM Art. 4 TDM compliance for PDF-derived corpora |
156
+ | Art. 53(1)(d) (evaluation summary) | §2 above + per-bench reproducible results in [`eval/results/SUMMARY.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/eval/results/SUMMARY.md) |
157
+ | Art. 53(2) (open-source exemption) | All weights Apache-2.0, datasets traceable, no proprietary teacher used in deployed inference |
158
+ | Art. 55 (systemic risk) | **Not applicable** — no foundation model > 10²⁵ FLOPs trained here; this is a LoRA fine-tune |
159
 
160
+ ## 9. Citation
161
 
162
  ```bibtex
163
  @misc{eu-kiki-2026,
 
168
  note = {Live demo: https://ml.saillant.cc}
169
  }
170
  ```
171
+
172
+ ## 10. Changelog
173
+
174
+ | Date | Change |
175
+ |---|---|
176
+ | 2026-05-06 | First HF release — Apache-2.0, EU AI Act self-contained model card v0.4.1 |