clemsail commited on
Commit
92b7510
Β·
verified Β·
1 Parent(s): de9dd9c

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 +149 -77
README.md CHANGED
@@ -9,79 +9,159 @@ 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-rust-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-rust-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** | `rust` |
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): base 87.20 β†’ +rust 86.59 = **βˆ’0.61 pts**. Best of the 3 Devstral adapters in this release.
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
  |---|---|
@@ -89,16 +169,25 @@ Full report: `data/pii-scan-report.json` in the source repo.
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
@@ -123,7 +212,9 @@ 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).
@@ -132,32 +223,12 @@ python -m mlx_lm fuse \
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,
@@ -169,8 +240,9 @@ python -m mlx_lm fuse \
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 |
 
 
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-rust-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-rust-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
+ | StarCoder2 Self-Instruct (Rust subset) | https://huggingface.co/datasets/bigcode/starcoder2-self-align | `Apache-2.0` | 2,850 | Public HF dataset, Rust instruction-tuning 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
+ _No web-scraped data used._
73
 
74
+ ### 2.4 User-provided data and synthetic data
 
 
 
 
 
 
 
75
 
76
+ _No user-provided or synthetic data used._
77
+
78
+ ---
79
+
80
+ ## Section 3 β€” Aggregate description of training content
81
+
82
+ | Aggregate field | Value |
83
+ |---|---|
84
+ | **Total records used for this LoRA** | 2,850 |
85
+ | **Domain label in the eu-kiki router** | `rust` |
86
+ | **Time-period of source data** | Mixed; per-source download dates logged in `_provenance` fields |
87
+ | **Modalities in training data** | Text only |
88
+ | **Languages in training data** | English |
89
+ | **Estimated total tokens** | β‰ˆ 570,000 (heuristic 200 tokens / record average) |
90
+
91
+ The full system-level inventory (all 35+ domains across 7 base models /
92
+ candidates, β‰ˆ 82 K records, with per-source SPDX license, download dates,
93
+ and `n_used` counts) is published at
94
+ [`docs/eu-ai-act-transparency.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/docs/eu-ai-act-transparency.md)
95
+ Β§4.4. This adapter consumes a strict subset of that inventory.
96
+
97
+ ---
98
+
99
+ ## Section 4 β€” Other relevant elements
100
+
101
+ ### 4.1 Copyright compliance and TDM opt-out (Art. 53(1)(c))
102
+
103
+ - **Public datasets (Β§2.1):** all carry permissive open-source licenses
104
+ (Apache-2.0, MIT, CC-BY-*, BSD); SPDX matrix verified.
105
+ - **Third-party-licensed data (Β§2.2):** vendor datasheets used under EU
106
+ Directive 2019/790 (DSM Directive) **Article 4 β€” Text and Data Mining
107
+ exception**. Robots.txt respected at collection time. SHA-256 manifests
108
+ published at
109
+ [`docs/pdf-compliance-report.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/docs/pdf-compliance-report.md).
110
+ - **Scraped data (Β§2.3):** opt-out signals (robots.txt `Disallow`,
111
+ `<meta name="robots" content="noai">`, TDM Reservation headers,
112
+ ai.txt) are honoured at collection time. Manifests under
113
+ `data/scraped/<source>/manifest.json` in the source repo.
114
+ - **Removal requests:** open an issue at the source repo URL above or
115
+ contact the operator listed in Β§1. We commit to remove disputed
116
+ content within 30 days and re-train the adapter on the next release
117
+ cycle.
118
+
119
+ ### 4.2 Quality and curation
120
+
121
+ - Per-record `_provenance` fields (source URL, SPDX license,
122
+ `record_idx`, `access_date`) attached to 49,956 records across
123
+ 21 domains (system-level), enabling per-record audit and removal.
124
+ - Per-domain cap of ≀ 3 000 records applied to keep classes balanced
125
+ across the routing surface.
126
+ - Synthetic data (when present) is explicitly marked `source: "synthetic"`
127
+ in the row provenance.
128
+
129
+ ### 4.3 Personal data and PII (Art. 10 + Art. 53(1)(d))
130
 
131
  Training data scanned with **Microsoft Presidio + en_core_web_lg**
132
  (2026-04-28) across all 35+ domain directories. **One** email address
133
  detected in the unrelated `traduction-tech` corpus was redacted before
134
+ training. **No high-signal PII** (email, phone, credit card, SSN, IBAN)
135
+ remains in the released adapters. Low-signal Presidio detections
136
+ (PERSON, LOCATION, DATE_TIME) are common false positives in technical
137
+ text and were left in place. Full report:
138
+ `data/pii-scan-report.json` in the source repo.
139
+
140
+ ### 4.4 Special categories of personal data (GDPR Art. 9)
141
+
142
+ No special-category data (health, religion, sexual orientation, etc.)
143
+ was intentionally collected. The PII scan above also screens for
144
+ identifiers that could lead to special-category inference; none were
145
+ flagged.
146
+
147
+ ### 4.5 Copyright opt-out registry
148
+
149
+ The provider tracks opt-outs via the Issues tracker on the source
150
+ repository. As of release date no removal requests have been received.
151
 
152
+ ---
153
+
154
+ ## Section 5 β€” Performance evaluation (Art. 53(1)(a))
155
+
156
+ **HumanEval** (custom Studio scorer): base 87.20 β†’ +rust 86.59 = **βˆ’0.61 pts**. Best Devstral adapter in this release.
157
+
158
+ Full bench results, methodology, env.json, and rerun.sh per measurement:
159
+ [`eval/results/SUMMARY.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/eval/results/SUMMARY.md) Β·
160
+ [`MODEL_CARD.md`](https://github.com/L-electron-Rare/eu-kiki/blob/main/MODEL_CARD.md).
161
+
162
+ ---
163
+
164
+ ## Section 6 β€” Training configuration
165
 
166
  | Parameter | Value |
167
  |---|---|
 
169
  | Rank | 16 |
170
  | Alpha | 32 |
171
  | Dropout | 0.05 |
172
+ | Target modules | `q_proj`, `k_proj`, `v_proj`, `o_proj` (attention only) |
173
  | Precision | BF16 |
174
  | Optimiser | AdamW |
175
  | Learning rate | 1e-5 |
176
  | Batch size Γ— grad-accum | 1 Γ— 4–8 |
177
  | Framework | MLX (`mlx_lm` fork on Apple Silicon) |
178
  | Hardware | Mac Studio M3 Ultra 512 GB unified memory |
 
179
 
180
+ ### 6.1 Compute resources (Art. 53(1)(d))
181
+
182
+ LoRA training is parameter-efficient: only β‰ˆ 0.1–0.5 % of base-model
183
+ parameters are updated. **Estimated training compute β‰ͺ 10²⁡ FLOPs** β€”
184
+ the systemic-risk threshold of Art. 51. Single-machine training on
185
+ Mac Studio M3 Ultra; no datacentre footprint. No proprietary teacher
186
+ model is used in deployed inference.
187
+
188
+ ---
189
+
190
+ ## Section 7 β€” Usage
191
 
192
  ```python
193
  from mlx_lm import load
 
212
  --dequantize
213
  ```
214
 
215
+ ---
216
+
217
+ ## Section 8 β€” Limitations and out-of-scope use
218
 
219
  - **Not for safety-critical decisions** (medical, legal, structural,
220
  life-safety, biometric).
 
223
  high-risk and require additional obligations.
224
  - **Hallucination present** at typical instruction-tuned LLM levels;
225
  pair with a verifier or human-in-the-loop for factual outputs.
226
+ - **LoRA inherits all base-model limitations**: training cutoff,
227
+ language coverage, refusal patterns.
 
 
 
 
 
 
 
 
 
 
 
 
228
 
229
+ ---
 
 
 
 
 
 
 
 
230
 
231
+ ## Section 9 β€” Citation
232
 
233
  ```bibtex
234
  @misc{eu-kiki-2026,
 
240
  }
241
  ```
242
 
243
+ ## Section 10 β€” Changelog
244
 
245
+ | Date | Card version | Change |
246
+ |---|---|---|
247
+ | 2026-05-06 | v0.4.1 | First HF release β€” Apache-2.0, EU AI Act self-contained model card |
248
+ | 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 |