clemsail commited on
Commit
9c8d4f8
·
verified ·
1 Parent(s): 36b784a

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

Browse files
Files changed (1) hide show
  1. README.md +120 -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,91 @@ library_name: peft
15
 
16
  # eu-kiki-devstral-cpp-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 (custom Studio scorer, EvalPlus extra-tests not run):** base 87.20 → +cpp 85.98 = −1.22 pts.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
- ## Usage
25
 
26
  ```python
27
  from mlx_lm import load
@@ -36,7 +116,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 +126,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 +171,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-cpp-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-cpp-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** | `cpp` |
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** (custom Studio scorer, EvalPlus extra-tests not run — Linux-only sandbox): base 87.20 → +cpp 85.98 = **−1.22 pts**. For rigorous HumanEval+ Δ, sample re-scoring on Linux is required.
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
+ | CommitPackFT | `bigcode/commitpackft` | `MIT` | 1,500 |
56
+ | ESP-IDF examples | `espressif/esp-idf` | `Apache-2.0` | 700 |
57
+ | STM32Cube examples | `STMicroelectronics/STM32CubeF4` | `BSD-3-Clause` | 450 |
58
+ | Arduino examples | `arduino/Arduino` | `CC0-1.0` | 200 |
59
+
60
+ **Total records used for this LoRA:** 2,850.
61
+
62
+ System-level inventory (all 35+ domains, full SPDX, scraping manifests,
63
+ PDF pipeline DSM Art. 4 TDM compliance):
64
+ [`docs/eu-ai-act-transparency.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/docs/eu-ai-act-transparency.md).
65
+
66
+ ### 3.1 Copyright policy (Art. 53(1)(c))
67
+
68
+ - All HF-traced datasets carry permissive licenses (Apache-2.0, MIT,
69
+ CC-BY-*, BSD); copyleft compatibility verified via SPDX matrix.
70
+ - PDF datasheets (when used) processed under EU DSM Directive
71
+ Article 4 TDM exception: robots.txt respected, SHA-256 manifests,
72
+ dedicated audit at
73
+ [`docs/pdf-compliance-report.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/docs/pdf-compliance-report.md).
74
+ - Opt-out / removal requests: open an issue on the source repo or
75
+ email the system operator (see §5).
76
+
77
+ ### 3.2 PII statement (Art. 10 + Art. 53(1)(d))
78
+
79
+ Training data scanned with **Microsoft Presidio + en_core_web_lg**
80
+ (2026-04-28) across all 35+ domain directories. **One** email address
81
+ detected in the unrelated `traduction-tech` corpus was redacted before
82
+ training. No high-signal PII (email, phone, credit card, SSN, IBAN)
83
+ remains. Low-signal detections (PERSON, LOCATION, DATE_TIME) are
84
+ common false positives in technical text and were left in place.
85
+ Full report: `data/pii-scan-report.json` in the source repo.
86
+
87
+ ## 4. Training configuration
88
+
89
+ | Parameter | Value |
90
+ |---|---|
91
+ | Method | LoRA |
92
+ | Rank | 16 |
93
+ | Alpha | 32 |
94
+ | Dropout | 0.05 |
95
+ | Target modules | `q_proj`, `k_proj`, `v_proj`, `o_proj` |
96
+ | Precision | BF16 |
97
+ | Optimiser | AdamW |
98
+ | Learning rate | 1e-5 |
99
+ | Batch size × grad-accum | 1 × 4–8 |
100
+ | Framework | MLX (`mlx_lm` fork on Apple Silicon) |
101
+ | Hardware | Mac Studio M3 Ultra 512 GB unified memory |
102
+ | Energy footprint | ≪ training a foundation model from scratch (LoRA is parameter-efficient by design) |
103
 
104
+ ## 5. Usage
105
 
106
  ```python
107
  from mlx_lm import load
 
116
  model.load_weights(f"{adapter_path}/adapters.safetensors", strict=False)
117
  ```
118
 
119
+ Or fuse and serve as a self-contained checkpoint:
120
 
121
  ```bash
122
  python -m mlx_lm fuse \
 
126
  --dequantize
127
  ```
128
 
129
+ ## 6. Limitations & out-of-scope use
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
 
131
+ - **Not for safety-critical decisions** (medical, legal, structural,
132
+ life-safety, biometric).
133
+ - **Not for high-stakes individual decisions** (hiring, credit, law
134
+ enforcement) — that would re-classify under EU AI Act Art. 6
135
+ high-risk and require additional obligations.
136
+ - **Hallucination present** at typical instruction-tuned LLM levels;
137
+ pair with a verifier or human-in-the-loop for factual outputs.
138
+ - **LoRA is a fine-tune of the base model**: it inherits all base-model
139
+ limitations and biases (training data cutoff, language coverage,
140
+ refusal patterns).
141
 
142
+ ## 7. Contact (Art. 53(1)(d))
 
 
143
 
144
+ | Subject | Contact |
145
+ |---|---|
146
+ | Operator | clemsail (`L-electron-Rare` on GitHub) |
147
+ | Issues / audit requests | https://github.com/L-electron-Rare/eu-kiki/issues |
148
+ | Base model PII / copyright | See base model card on Hugging Face |
149
+ | Apertus PII / copyright | `llm-privacy-requests@swiss-ai.org`, `llm-copyright-requests@swiss-ai.org` |
150
 
151
+ ## 8. EU AI Act compliance summary
152
 
153
+ | Article | Coverage |
154
+ |---|---|
155
+ | Art. 52 (transparency to users) | Adapter publishes its purpose, base, fine-tune nature, and limitations in this card |
156
+ | 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) |
157
+ | 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 |
158
+ | Art. 53(1)(c) (copyright policy) | §3.1 above + DSM Art. 4 TDM compliance for PDF-derived corpora |
159
+ | 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) |
160
+ | Art. 53(2) (open-source exemption) | All weights Apache-2.0, datasets traceable, no proprietary teacher used in deployed inference |
161
+ | Art. 55 (systemic risk) | **Not applicable** — no foundation model > 10²⁵ FLOPs trained here; this is a LoRA fine-tune |
162
 
163
+ ## 9. Citation
164
 
165
  ```bibtex
166
  @misc{eu-kiki-2026,
 
171
  note = {Live demo: https://ml.saillant.cc}
172
  }
173
  ```
174
+
175
+ ## 10. Changelog
176
+
177
+ | Date | Change |
178
+ |---|---|
179
+ | 2026-05-06 | First HF release — Apache-2.0, EU AI Act self-contained model card v0.4.1 |