Team Ai
Modelpublic

Ailiance-fr/devstral-python-lora

sourceHugging Faceapache-2.0updated 5mo agoView on Hugging Face
0likes10downloads
README.md155 linesDownload Raw Back to root
1---2license: apache-2.03base_model: mistralai/Devstral-Small-2-24B-Instruct-25124library_name: peft5tags:6- mlx7- lora8- peft9- ailiance10- devstral11- python12language:13- en14- fr15pipeline_tag: text-generation16---17 18# Ailiance — Devstral-Small-2-24B-Instruct python LoRA19 20LoRA adapter fine-tuned on `mistralai/Devstral-Small-2-24B-Instruct-2512` for **python** tasks.21 22> Maintained by **Ailiance** — French AI org publishing EU AI Act aligned LoRA adapters and datasets.23 24## Quick start (MLX)25 26```python27from mlx_lm import load, generate28 29model, tokenizer = load(30    "mistralai/Devstral-Small-2-24B-Instruct-2512",31    adapter_path="Ailiance-fr/devstral-python-lora",32)33 34print(generate(model, tokenizer, prompt="..."))35```36 37## Training38 39| Hyperparameter   | Value                  |40|------------------|------------------------|41| Base model       | `mistralai/Devstral-Small-2-24B-Instruct-2512`     |42| Method           | LoRA via `mlx-lm`      |43| Rank             | 16            |44| Scale            | 2.0           |45| Alpha            | 32           |46| Max seq length   | 2048  |47| Iterations       | 500           |48| Optimizer        | Adam, LR 1e-5          |49| Hardware         | Apple M3 Ultra 512 GB  |50 51## Training data lineage52 53Derived from the internal **eu-kiki / mascarade** curation. All upstream samples54are synthetic, permissively-licensed, or generated from Apache-2.0 base resources.55See the [Ailiance-fr catalog](https://huggingface.co/Ailiance-fr) for related cards.56 57## Benchmark roadmap58 59This LoRA has **not yet been evaluated** through `electron-bench` (the current60pipeline supports `gemma-4-E4B` base only). Training was completed with the61standard `mlx-lm` LoRA trainer (rank 16, alpha 32, scale 2.0, AdamW62LR 1e-5, 500 iters) — full hyperparameters are in the `Training` table above.63 64Planned evaluations:65 66- Perplexity on the validation split of the training data67- Functional benchmark on **devstral**-specific tasks68- Comparison vs base `mistralai/Devstral-Small-2-24B-Instruct-2512`69 70Track progress: [ailiance-bench issues](https://github.com/ailiance/ailiance-bench/issues).71 72For reference benchmarks on the `gemma-4-E4B` base, see the73[base-vs-LoRA matrix](https://github.com/ailiance/ailiance-bench/blob/main/bench-results/compare_base_vs_lora.md).74 75## License chain76 77| Component                         | License           |78|-----------------------------------|-------------------|79| Base model (`mistralai/Devstral-Small-2-24B-Instruct-2512`)        | apache-2.0    |80| Training data (internal Ailiance curation (synthetic + permissive sources))         | apache-2.0      |81| **LoRA adapter (this repo)**      | **apache-2.0**|82 83_All upstream components are Apache 2.0 / MIT — LoRA inherits permissive terms._84 85## EU AI Act compliance86 87- **Article 53(1)(c)**: training data licenses preserved (per-dataset cards declare upstream licenses).88- **Article 53(1)(d)**: training data summary — see upstream dataset cards on Ailiance-fr.89- **GPAI Code of Practice (July 2025)**: base `mistralai/Devstral-Small-2-24B-Instruct-2512` released under apache-2.0.90- **No web scraping by Ailiance**, **no licensed data**, **no PII**.91- Upstream Stack Exchange content (where applicable) is CC-BY-SA-4.0 and propagates to this adapter.92 93## License94 95LoRA weights: **apache-2.0** — see License chain table above for derivation rationale.96 97## Citation98 99```bibtex100@misc{ailiance_devstral_python_2026,101  author    = {Ailiance},102  title     = {Ailiance — Devstral-Small-2-24B-Instruct python LoRA},103  year      = {2026},104  publisher = {Hugging Face},105  url       = {https://huggingface.co/Ailiance-fr/devstral-python-lora}106}107```108 109## Related110 111See the full [Ailiance-fr LoRA collection](https://huggingface.co/Ailiance-fr).112 113 114## Bench comparison (2026-05-11)115 116### Base model (Devstral-Small-2-24B-MLX-4bit) capability117 118| Task | Score | Notes |119|---|---:|---|120| GSM8K-CoT flex EM | **0.96** | W3 lm-eval-harness (--limit 100) |121| ARC-Easy acc / acc_norm | **0.80 / 0.75** | |122| MMLU-Pro Computer Science | **0.64** | |123 124Source: <https://github.com/ailiance/ailiance/tree/main/output/lm-eval-base-2026-05-11>125 126### This LoRA (tuned) — bench PENDING127 128Will include kicad-sch / iact-bench validators + W3 lm-eval delta. See spec for129methodology:130<https://github.com/ailiance/ailiance-bench/blob/main/docs/superpowers/specs/2026-05-11-kicad-sch-gap-design.md>131 132## Upstream base model — official evaluations133 134This LoRA fine-tunes [`mistralai/Devstral-Small-2-24B-Instruct-2512`](https://huggingface.co/mistralai/Devstral-Small-2-24B-Instruct-2512),135Mistral's coding-specialist LLM. Headline software-engineering benchmarks136from the upstream model card:137 138| Benchmark                | Devstral Small 2 (24B) | Devstral 2 (123B) | DeepSeek v3.2 (671B) | Claude Sonnet 4.5 |139|--------------------------|-----------------------:|------------------:|---------------------:|------------------:|140| **SWE Bench Verified**   | **68.0 %**             | 72.2 %            | 73.1 %               | 77.2 %            |141| **SWE Bench Multilingual** | **55.7 %**           | 61.3 %            | 70.2 %               | 68.0 %            |142| **Terminal Bench 2**     | **22.5 %**             | 32.6 %            | 46.4 %               | 42.8 %            |143 144(For reference, GPT-5.1 Codex High: 73.7 % SWE Verified · 52.8 % Terminal Bench 2.)145 146Devstral Small 2 (24B) is competitive with much larger open models on147SWE Bench Verified (e.g. matches GLM-4.6 at 355B). Architecture uses148rope-scaling per Llama 4 + Scalable-Softmax ([arXiv:2501.19399](https://arxiv.org/abs/2501.19399)).149 150**Source:** [official Devstral-Small-2-24B-Instruct-2512 model card](https://huggingface.co/mistralai/Devstral-Small-2-24B-Instruct-2512).151 152> **Reading these alongside this LoRA:** Devstral Small 2 is a strong153> coding base. This LoRA inherits its SWE-Bench performance and adds154> language- or domain-specific specialization.155