Views
No views yet
1[{"line": 4, "severity": "error",
2 "message": "`vvim` is not a nixpkgs attribute — did you mean `vim`?"}]1ollama pull hf.co/OpenxAILabs/nix-reviewer-1.5b-GGUF:Q4_K_M
2ollama run hf.co/OpenxAILabs/nix-reviewer-1.5b-GGUF:Q4_K_M '{ pkgs, ... }:
3{
4 environment.systemPackages = with pkgs; [ vim vvim ];
5}'1from peft import PeftModel
2from transformers import AutoModelForCausalLM, AutoTokenizer
3import torch
4
5base = AutoModelForCausalLM.from_pretrained(
6 "Qwen/Qwen2.5-Coder-1.5B-Instruct", dtype=torch.bfloat16
7)
8model = PeftModel.from_pretrained(base, "OpenxAILabs/nix-reviewer-1.5b")
9tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-Coder-1.5B-Instruct")1# fp16 LoRA adapter
2PeftModel.from_pretrained(base, "OpenxAILabs/nix-reviewer-1.5b", revision="v0.1") # or v0.2, v0.2a1# GGUF via git clone + checkout, then import into Ollama
2git clone https://huggingface.co/OpenxAILabs/nix-reviewer-1.5b-GGUF
3cd nix-reviewer-1.5b-GGUF && git checkout v0.1main is always the latest version (currently v0.2a).| metric | v0 base Qwen 1.5B | v0 live hermes3:3b | v0.1 LoRA | v0.2 LoRA (3 ep.) | v0.2a LoRA · live |
|---|---|---|---|---|---|
| schema_valid | 100% ¹ | 96% | 96% | 88% | 96% |
| no_hallucinated_options | n/a ² | 88.9% | 100% | n/a ² | 100% |
| line_exact | 0% | 20% | 90% | 50% ³ | 90% |
| severity_match | 20% | 45% | 75% | 40% | 70% |
| message_keywords_hit | 0% | 25% | 45% | 40% | 45% |
| empty_on_negative | 0% | 0% | 0% | 100% ³ | 60% |
| dialect_awareness | 100% | 100% | 100% | 100% | 100% |
| avg latency (fp16 adapter, XPU) | 5.5 s | 18 s | 3.3 s | 2.0 s | 2.9 s |
services.*, programs.*, or environment.*, that path exists in the real nixpkgs module tree. The review pipeline double-validates at inference time, so a hallucinated output would be rejected before reaching the user.Qwen/Qwen2.5-Coder-1.5B-Instruct (Apache-2.0)q_proj, k_proj, v_proj, o_projOpenxAILabs/nix-reviewer-training — 1,187 synthesized (broken_config, structured_review) pairs
package_attr_path_driftsyntax_error_missing_semicolonflake_arg_not_destructuredcompletion: "[]")torch-xpu 2.11inputs.X without destructuring inputs from function args".nix eval --json inside a nixos/nix Docker container to capture the ground-truth error message, line number, and column.[].| tag | shipped? | highlight |
|---|---|---|
v0.1 | live 2026-04-23 → 2026-04-24 | First fine-tune. 445 pairs, 3 epochs. line_exact 20→90%. |
v0.2 | not shipped | 1187 pairs + first 37 negatives, 3 epochs. Hit 100% on refusal but over-fit — line_exact regressed to 50%. Published on HF at tag v0.2 for reproducibility. |
v0.2a | live 2026-04-24 → present | Same 1187 pairs as v0.2 at 2 epochs. Kept v0.1's accuracy AND captured 60% of the negatives win. Best overall. |
completion: "[]" creates a low-loss attractor — the model learns to return [] when uncertain, including on out-of-distribution test cases. v0.2a's 2-epoch retrain left enough flexibility in the weights to still emit real findings while learning the refusal pattern for genuine negatives.unknown_option, option_wrong_type, redundant_default) + a full NixOS-module eval oracle before scaling data. All test-set classes become in-distribution; then larger data becomes leverage instead of a trap.You are nix-assistant. Review the Nix config and output ONLY a JSON array: [{"line":int,"severity":"error"|"warning"|"hint","message":str}]package_attr_path_drift, syntax_error_missing_semicolon, and flake_arg_not_destructured. On out-of-distribution classes (unknown_option, option_wrong_type, redundant_default), v0.2a usually returns [] — technically safer than hallucinating, but not helpful. v0.3 closes this gap.empty_on_negative at 60% — the model refuses Python, YAML, bash most of the time but occasionally hallucinates findings on prose or ambiguous inputs. Expanding the negatives pool in v0.3 targets this.programs.git.settings exists on unstable but not on 25.05. A option_renamed_across_channels pattern is on the v0.3+ roadmap.eval/ directory. Every row in the table above can be re-run via:1python -m eval.run --runner local_adapter \
2 --dataset eval/dataset/v0_seed.jsonl \
3 --out eval/results/v0.2a_qwen_1.5b_lora.json \
4 --version v0.2a_qwen_1.5b_loralive_xnode, local_pipeline, local_adapter), and the rescore utility all ship in the repo.1@misc{nixreviewer2026,
2 title = {nix-reviewer-1.5b: A specialist Nix config reviewer},
3 author = {Forfar, John},
4 year = {2026},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/OpenxAILabs/nix-reviewer-1.5b}},
7 note = {Apache-2.0. Fine-tuned from Qwen/Qwen2.5-Coder-1.5B-Instruct on synthetic (broken-config, review) pairs verified by the Nix evaluator.}
8}