File size: 1,741 Bytes
97e7dd6 23f6f1c cd0d9d4 97e7dd6 cd0d9d4 c83383f cd0d9d4 97e7dd6 c83383f 97e7dd6 c83383f 97e7dd6 c83383f 97e7dd6 cd0d9d4 c83383f cd0d9d4 97e7dd6 cd0d9d4 97e7dd6 c83383f cd0d9d4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | ---
library_name: peft
base_model: mistralai/Mistral-7B-Instruct-v0.2
license: apache-2.0
tags:
- nixpkgs
- security
- lora
- nix
- patch-generation
- deprecated
datasets:
- odoom/nixpkgs-security-patches
---
# nixpkgs-security-lora (Deprecated)
> **This adapter is deprecated.** Use [odoom/nixpkgs-security-qwen-lora](https://huggingface.co/odoom/nixpkgs-security-qwen-lora) instead — Qwen 2.5 Coder 32B with multi-turn tool-calling, lower loss (0.54 vs 0.87), and higher accuracy (90% vs 80%).
## What Changed
| | v2 (this repo) | v3 (new repo) |
|---|---|---|
| Base model | Mistral 7B Instruct v0.2 | Qwen 2.5 Coder 32B Instruct |
| Format | Single-turn (system/user/assistant) | Multi-turn tool-calling conversations |
| Loss | 0.867 | 0.540 |
| Token accuracy | 80.5% | 90.1% |
| Adapter size | 160 MB | 256 MB |
| Tool calling | Broken (`raw: true` disabled it) | Native Qwen 2.5 tool calling |
## Original Model Details (v2)
- **Base model**: [Mistral 7B Instruct v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2)
- **Method**: QLoRA (4-bit NF4 quantization + LoRA rank 32)
- **Target**: Cloudflare Workers AI `@cf/mistral/mistral-7b-instruct-v0.2-lora`
- **Adapter size**: 160 MB
- **Training data**: 586 complex security patches (version bumps filtered out)
- **Epochs**: 3 (110 steps), ~61 minutes on NVIDIA L4
### Training Metrics
| Metric | Start | End |
|--------|-------|-----|
| Loss | 1.166 | 0.867 |
| Token accuracy | 74.6% | 80.5% |
| Eval loss | — | 0.924 |
| Eval accuracy | — | 78.4% |
## Changelog
- **v2** (2026-03-03): Retrained on filtered dataset — removed 763 version bump / hash-only examples.
- **v1** (2026-03-02): Initial training on 1,273 unfiltered examples.
|