clemsail commited on
Commit
b855e29
·
verified ·
1 Parent(s): c53eeaf

upload eu-kiki LoRA adapter

Browse files
Files changed (3) hide show
  1. README.md +90 -0
  2. adapter_config.json +42 -0
  3. adapters.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: mistralai/Devstral-Small-2-24B-Instruct-2512
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-devstral-rust-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):** base 87.20 → +rust 86.59 = −0.61 pts (best of the 3 Devstral adapters).
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("mistralai/Devstral-Small-2-24B-Instruct-2512")
32
+ adapter_path = snapshot_download("clemsail/eu-kiki-devstral-rust-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 mistralai/Devstral-Small-2-24B-Instruct-2512 \
44
+ --adapter-path <adapter_path> \
45
+ --save-path /tmp/eu-kiki-devstral-rust-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,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "adapter_path": "/Users/clems/KIKI-Mac_tunner/output/eu-kiki-hf/devstral-rust",
3
+ "batch_size": 1,
4
+ "clear_cache_threshold": 0,
5
+ "config": "/Users/clems/KIKI-Mac_tunner/output/eu-kiki-hf/devstral-rust/train_config.yaml",
6
+ "data": "/Users/clems/eu-kiki/data/hf-traced/rust",
7
+ "fine_tune_type": "lora",
8
+ "grad_accumulation_steps": 4,
9
+ "grad_checkpoint": true,
10
+ "iters": 500,
11
+ "learning_rate": 1e-05,
12
+ "lora_parameters": {
13
+ "alpha": 32,
14
+ "dropout": 0.05,
15
+ "rank": 16,
16
+ "scale": 2.0
17
+ },
18
+ "lr_schedule": null,
19
+ "mask_prompt": false,
20
+ "max_seq_length": 2048,
21
+ "model": "/Users/clems/KIKI-Mac_tunner/models/Devstral-Small-2-24B-Instruct-2512",
22
+ "num_layers": -1,
23
+ "optimizer": "adam",
24
+ "optimizer_config": {
25
+ "adam": {},
26
+ "adamw": {},
27
+ "muon": {},
28
+ "sgd": {},
29
+ "adafactor": {}
30
+ },
31
+ "project_name": null,
32
+ "report_to": null,
33
+ "resume_adapter_file": null,
34
+ "save_every": 200,
35
+ "seed": 42,
36
+ "steps_per_eval": 200,
37
+ "steps_per_report": 10,
38
+ "test": false,
39
+ "test_batches": 500,
40
+ "train": true,
41
+ "val_batches": 5
42
+ }
adapters.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e297c0d2046c798ecb93085a31c835c8f08d4c6fc467a7e2033e3ee74ef651c
3
+ size 369693523