clemsail commited on
Commit
fbd04a7
·
verified ·
1 Parent(s): 8426237

upload eu-kiki LoRA adapter

Browse files
Files changed (3) hide show
  1. README.md +90 -0
  2. adapter_config.json +16 -0
  3. adapters.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: swiss-ai/Apertus-70B-Instruct-2509
4
+ tags:
5
+ - lora
6
+ - peft
7
+ - mlx
8
+ - eu-kiki
9
+ - eu-ai-act
10
+ language:
11
+ - fr
12
+ - en
13
+ library_name: peft
14
+ ---
15
+
16
+ # eu-kiki-apertus-math-lora
17
+
18
+ LoRA adapter for **swiss-ai/Apertus-70B-Instruct-2509**, 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
+ ⚠️ Trained but **not yet evaluated on a public math benchmark** (training loss converged, validation loss = 0.5xx). Use at your own risk; we recommend pairing with a verifier.
23
+
24
+ ## Usage
25
+
26
+ ```python
27
+ from mlx_lm import load
28
+ from mlx_lm.tuner.utils import linear_to_lora_layers
29
+ from huggingface_hub import snapshot_download
30
+
31
+ base_path = snapshot_download("swiss-ai/Apertus-70B-Instruct-2509")
32
+ adapter_path = snapshot_download("clemsail/eu-kiki-apertus-math-lora")
33
+
34
+ model, tokenizer = load(base_path)
35
+ 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 \
43
+ --model swiss-ai/Apertus-70B-Instruct-2509 \
44
+ --adapter-path <adapter_path> \
45
+ --save-path /tmp/eu-kiki-apertus-math-lora-fused \
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,
84
+ title = {eu-kiki: EU-sovereign multi-model LLM serving with HF-traceable LoRA adapters},
85
+ author = {Saillant, Clément},
86
+ year = {2026},
87
+ url = {https://github.com/L-electron-Rare/eu-kiki},
88
+ note = {Live demo: https://ml.saillant.cc}
89
+ }
90
+ ```
adapter_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "fine_tune_type": "lora",
3
+ "lora_parameters": {
4
+ "rank": 16,
5
+ "alpha": 32,
6
+ "dropout": 0.05,
7
+ "scale": 2.0
8
+ },
9
+ "num_layers": 16,
10
+ "lora_layers": [
11
+ "self_attn.q_proj",
12
+ "self_attn.k_proj",
13
+ "self_attn.v_proj",
14
+ "self_attn.o_proj"
15
+ ]
16
+ }
adapters.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:982d5a5de7713b56a036dfc44df1d337d32ef279e2f3b89dccc470a5c1748936
3
+ size 786538979