Instructions to use odoom/nixpkgs-security-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use odoom/nixpkgs-security-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.2") model = PeftModel.from_pretrained(base_model, "odoom/nixpkgs-security-lora") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from odoom/nixpkgs-security-lora: direct link, hf CLI and curl.
- Browser
- Download file 1.74 kB
-
https://huggingface.co/odoom/nixpkgs-security-lora/resolve/main/README.md
- Command line
-
hf download hf://odoom/nixpkgs-security-lora/README.md
-
curl -L -o README.md https://huggingface.co/odoom/nixpkgs-security-lora/resolve/main/README.md
1.74 kB
metadata
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 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
- 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.