clemsail commited on
Commit
0ab975d
Β·
verified Β·
1 Parent(s): 9c8d4f8

docs: PST-aligned model card v0.4.2 (EU AI Act Art. 53(1)(d))

Browse files
Files changed (1) hide show
  1. README.md +153 -80
README.md CHANGED
@@ -9,82 +9,163 @@ tags:
9
  - eu-ai-act
10
  - art-52
11
  - art-53
 
 
12
  language:
13
- - fr
14
  - en
15
  library_name: peft
16
  ---
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
  |---|---|
@@ -92,16 +173,25 @@ Full report: `data/pii-scan-report.json` in the source repo.
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
@@ -126,7 +216,9 @@ 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).
@@ -135,32 +227,12 @@ python -m mlx_lm fuse \
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,
@@ -172,8 +244,9 @@ python -m mlx_lm fuse \
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 |
 
 
9
  - eu-ai-act
10
  - art-52
11
  - art-53
12
+ - gpai-fine-tune
13
+ - pst-aligned
14
  language:
 
15
  - en
16
  library_name: peft
17
  ---
18
 
19
  # eu-kiki-devstral-cpp-lora
20
 
21
+ 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.
22
 
23
+ > **EU AI Act compliance posture.** This model card is structured to follow the
24
+ > European Commission's *Public Summary Template* (PST) for the training content
25
+ > of general-purpose AI models, published by the AI Office under
26
+ > **Article 53(1)(d)** of Regulation (EU) 2024/1689. The structure below
27
+ > (Sections 1–4) maps directly to the PST. Where the official template wording
28
+ > differs from what is reproduced here, the **official template wins**;
29
+ > please consult the
30
+ > [AI Office page](https://digital-strategy.ec.europa.eu/en/policies/ai-office)
31
+ > for the canonical version. This card is **PST-aligned, not PST-verbatim**.
32
+
33
+ ---
34
+
35
+ ## Section 1 β€” General information about the model
36
 
37
  | Field | Value |
38
  |---|---|
39
+ | **Model name** | `eu-kiki-devstral-cpp-lora` |
40
+ | **Type** | LoRA adapter (parameter-efficient fine-tune) |
41
  | **Base model** | [`mistralai/Devstral-Small-2-24B-Instruct-2512`](https://huggingface.co/mistralai/Devstral-Small-2-24B-Instruct-2512) |
42
+ | **Provider of the fine-tune** | L'Γ‰lectron Rare (Saillant ClΓ©ment), `clemsail` |
43
+ | **Provider contact** | https://github.com/L-electron-Rare/eu-kiki/issues |
44
+ | **Date of first public release** | 2026-05-06 |
45
+ | **Latest version date** | 2026-05-06 |
46
+ | **Modalities** | Text in / text out (no image, audio, or video) |
47
+ | **Languages of intended use** | English |
48
+ | **Risk classification (EU AI Act)** | Limited risk (Art. 52) |
49
+ | **Systemic-risk class (Art. 51 / 55)** | **Not applicable** β€” this is a LoRA fine-tune, not a foundation model > 10²⁡ FLOPs |
50
+ | **Foundation-model provider responsibility** | The base model provider remains the GPAI provider for the base; this card describes only the fine-tune delta |
 
51
 
52
+ ---
53
 
54
+ ## Section 2 β€” Description of training content
55
 
56
+ The following four categories follow the PST four-way classification of
57
+ training-content sources. **Empty categories are listed explicitly** so
58
+ absence is auditable.
59
 
60
+ ### 2.1 Publicly available datasets
61
 
62
+ | Source | URL / Hub ID | SPDX licence | Records | Notes |
63
+ |---|---|---|---:|---|
64
+ | CommitPackFT (C/C++ subset) | https://huggingface.co/datasets/bigcode/commitpackft | `MIT` | 1,500 | Public HF dataset, real-world commit pairs |
 
65
 
66
+ ### 2.2 Data obtained from third parties under licence
 
 
 
 
 
67
 
68
+ _No third-party-licensed data used._
69
 
70
+ ### 2.3 Data collected through web scraping
 
 
71
 
72
+ | Source | URL / Hub ID | SPDX licence | Records | Notes |
73
+ |---|---|---|---:|---|
74
+ | ESP-IDF examples | https://github.com/espressif/esp-idf | `Apache-2.0` | 700 | Official Espressif repo, scraped under DSM Art. 4 TDM, robots.txt verified |
75
+ | STM32Cube examples | https://github.com/STMicroelectronics/STM32CubeF4 | `BSD-3-Clause` | 450 | Official STMicroelectronics repo, scraped under DSM Art. 4 TDM |
76
+ | Arduino examples | https://github.com/arduino/Arduino | `CC0-1.0` | 200 | Official Arduino repo, scraped under DSM Art. 4 TDM |
77
 
78
+ ### 2.4 User-provided data and synthetic data
 
 
 
 
 
 
 
79
 
80
+ _No user-provided or synthetic data used._
81
+
82
+ ---
83
+
84
+ ## Section 3 β€” Aggregate description of training content
85
+
86
+ | Aggregate field | Value |
87
+ |---|---|
88
+ | **Total records used for this LoRA** | 2,850 |
89
+ | **Domain label in the eu-kiki router** | `cpp` |
90
+ | **Time-period of source data** | Mixed; per-source download dates logged in `_provenance` fields |
91
+ | **Modalities in training data** | Text only |
92
+ | **Languages in training data** | English |
93
+ | **Estimated total tokens** | β‰ˆ 570,000 (heuristic 200 tokens / record average) |
94
+
95
+ The full system-level inventory (all 35+ domains across 7 base models /
96
+ candidates, β‰ˆ 82 K records, with per-source SPDX license, download dates,
97
+ and `n_used` counts) is published at
98
+ [`docs/eu-ai-act-transparency.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/docs/eu-ai-act-transparency.md)
99
+ Β§4.4. This adapter consumes a strict subset of that inventory.
100
+
101
+ ---
102
+
103
+ ## Section 4 β€” Other relevant elements
104
+
105
+ ### 4.1 Copyright compliance and TDM opt-out (Art. 53(1)(c))
106
+
107
+ - **Public datasets (Β§2.1):** all carry permissive open-source licenses
108
+ (Apache-2.0, MIT, CC-BY-*, BSD); SPDX matrix verified.
109
+ - **Third-party-licensed data (Β§2.2):** vendor datasheets used under EU
110
+ Directive 2019/790 (DSM Directive) **Article 4 β€” Text and Data Mining
111
+ exception**. Robots.txt respected at collection time. SHA-256 manifests
112
+ published at
113
+ [`docs/pdf-compliance-report.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/docs/pdf-compliance-report.md).
114
+ - **Scraped data (Β§2.3):** opt-out signals (robots.txt `Disallow`,
115
+ `<meta name="robots" content="noai">`, TDM Reservation headers,
116
+ ai.txt) are honoured at collection time. Manifests under
117
+ `data/scraped/<source>/manifest.json` in the source repo.
118
+ - **Removal requests:** open an issue at the source repo URL above or
119
+ contact the operator listed in Β§1. We commit to remove disputed
120
+ content within 30 days and re-train the adapter on the next release
121
+ cycle.
122
+
123
+ ### 4.2 Quality and curation
124
+
125
+ - Per-record `_provenance` fields (source URL, SPDX license,
126
+ `record_idx`, `access_date`) attached to 49,956 records across
127
+ 21 domains (system-level), enabling per-record audit and removal.
128
+ - Per-domain cap of ≀ 3 000 records applied to keep classes balanced
129
+ across the routing surface.
130
+ - Synthetic data (when present) is explicitly marked `source: "synthetic"`
131
+ in the row provenance.
132
+
133
+ ### 4.3 Personal data and PII (Art. 10 + Art. 53(1)(d))
134
 
135
  Training data scanned with **Microsoft Presidio + en_core_web_lg**
136
  (2026-04-28) across all 35+ domain directories. **One** email address
137
  detected in the unrelated `traduction-tech` corpus was redacted before
138
+ training. **No high-signal PII** (email, phone, credit card, SSN, IBAN)
139
+ remains in the released adapters. Low-signal Presidio detections
140
+ (PERSON, LOCATION, DATE_TIME) are common false positives in technical
141
+ text and were left in place. Full report:
142
+ `data/pii-scan-report.json` in the source repo.
143
+
144
+ ### 4.4 Special categories of personal data (GDPR Art. 9)
145
+
146
+ No special-category data (health, religion, sexual orientation, etc.)
147
+ was intentionally collected. The PII scan above also screens for
148
+ identifiers that could lead to special-category inference; none were
149
+ flagged.
150
+
151
+ ### 4.5 Copyright opt-out registry
152
+
153
+ The provider tracks opt-outs via the Issues tracker on the source
154
+ repository. As of release date no removal requests have been received.
155
 
156
+ ---
157
+
158
+ ## Section 5 β€” Performance evaluation (Art. 53(1)(a))
159
+
160
+ **HumanEval** (custom Studio scorer, EvalPlus extra-tests not run β€” Linux-only sandbox): base 87.20 β†’ +cpp 85.98 = **βˆ’1.22 pts**. Linux re-scoring required for rigorous Ξ” HE+.
161
+
162
+ Full bench results, methodology, env.json, and rerun.sh per measurement:
163
+ [`eval/results/SUMMARY.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/eval/results/SUMMARY.md) Β·
164
+ [`MODEL_CARD.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/MODEL_CARD.md).
165
+
166
+ ---
167
+
168
+ ## Section 6 β€” Training configuration
169
 
170
  | Parameter | Value |
171
  |---|---|
 
173
  | Rank | 16 |
174
  | Alpha | 32 |
175
  | Dropout | 0.05 |
176
+ | Target modules | `q_proj`, `k_proj`, `v_proj`, `o_proj` (attention only) |
177
  | Precision | BF16 |
178
  | Optimiser | AdamW |
179
  | Learning rate | 1e-5 |
180
  | Batch size Γ— grad-accum | 1 Γ— 4–8 |
181
  | Framework | MLX (`mlx_lm` fork on Apple Silicon) |
182
  | Hardware | Mac Studio M3 Ultra 512 GB unified memory |
 
183
 
184
+ ### 6.1 Compute resources (Art. 53(1)(d))
185
+
186
+ LoRA training is parameter-efficient: only β‰ˆ 0.1–0.5 % of base-model
187
+ parameters are updated. **Estimated training compute β‰ͺ 10²⁡ FLOPs** β€”
188
+ the systemic-risk threshold of Art. 51. Single-machine training on
189
+ Mac Studio M3 Ultra; no datacentre footprint. No proprietary teacher
190
+ model is used in deployed inference.
191
+
192
+ ---
193
+
194
+ ## Section 7 β€” Usage
195
 
196
  ```python
197
  from mlx_lm import load
 
216
  --dequantize
217
  ```
218
 
219
+ ---
220
+
221
+ ## Section 8 β€” Limitations and out-of-scope use
222
 
223
  - **Not for safety-critical decisions** (medical, legal, structural,
224
  life-safety, biometric).
 
227
  high-risk and require additional obligations.
228
  - **Hallucination present** at typical instruction-tuned LLM levels;
229
  pair with a verifier or human-in-the-loop for factual outputs.
230
+ - **LoRA inherits all base-model limitations**: training cutoff,
231
+ language coverage, refusal patterns.
 
 
 
 
 
 
 
 
 
 
 
 
232
 
233
+ ---
 
 
 
 
 
 
 
 
234
 
235
+ ## Section 9 β€” Citation
236
 
237
  ```bibtex
238
  @misc{eu-kiki-2026,
 
244
  }
245
  ```
246
 
247
+ ## Section 10 β€” Changelog
248
 
249
+ | Date | Card version | Change |
250
+ |---|---|---|
251
+ | 2026-05-06 | v0.4.1 | First HF release β€” Apache-2.0, EU AI Act self-contained model card |
252
+ | 2026-05-06 | v0.4.2 | Restructured to align with Commission Public Summary Template (PST) Β§1–4; explicit empty-category disclosure; opt-out registry section added |