📌 Model Overview
krishna1707/buildfail-slm-qwen7b-adapter is a specialized coding and DevOps Low-Rank Adaptation (QLoRA) model fine-tuned on top of Qwen/Qwen2.5-Coder-7B-Instruct across 80,000+ curated CI/CD failure-repair pairs.
It powers FixFlow—an enterprise-grade autonomous CI/CD failure localization, root cause diagnosis, and unified diff code repair engine.
Unlike generic frontier LLM APIs that require sending internal code and environment secrets over third-party networks, this model is built for private, local execution on consumer hardware:
- Quantization: Runs in 4-bit NormalFloat (
NF4) with double quantization.
- Hardware Footprint: ~5.33 GB VRAM (fits comfortably on consumer laptops such as an NVIDIA GeForce RTX 3050 Laptop GPU with 6 GB VRAM).
- Latency: ~1.85 seconds end-to-end patch generation (~28 tokens/sec).
- Non-Destructive Design: Synthesizes standard git unified diffs (
--- a/... +++ b/...) and terminal verification commands (pytest, npm test, mvn test) without unilaterally mutating repositories.
🎯 Key Capabilities
- Deterministic 13-Class Canonical Failure Taxonomy (Zero Unknown Policy):
Classifies every failure into exactly one of 13 canonical categories (e.g., Code Error, Dependency Error, Test Failure, Docker/Container Error, Authentication/Permission Error).
- Disentangled Multi-Level Fault Localization:
Distinguishes between:
- Observed Failure Location: Terminal step or log trace where the error surfaced.
- Test Suite Location: Test assertion module asserting expectations.
- Implementation Location: Source code module being tested.
- Actual Repair Target: The exact file that must be modified (e.g., manifest
package.json / requirements.txt vs. workflow .github/workflows/*.yml vs. source code).
- Syntactically Valid Unified Diffs (
--- a/... +++ b/...):
Produces clean, dry-run-verified diff hunks ready for human code review and automated git apply checks.
📊 Quantitative Benchmarks & Empirical Comparison
The model was comprehensively benchmarked on 4,700 in-distribution test samples (test.jsonl) and 489 strictly held-out out-of-distribution (OOD) repository samples (ood_test.jsonl):
Table with columns: Evaluation Metric, Qwen2.5-Coder-3B (Base), BuildFail-SLM 3B (Fine-Tuned 38k), LLaMA-3-8B-Instruct, Qwen2.5-Coder-7B (Base), BuildFail-SLM 7B (Fine-Tuned 80k - Production)| Evaluation Metric | Qwen2.5-Coder-3B (Base) | BuildFail-SLM 3B (Fine-Tuned 38k) | LLaMA-3-8B-Instruct | Qwen2.5-Coder-7B (Base) | BuildFail-SLM 7B (Fine-Tuned 80k - Production) |
|---|
| Pass@1 (Exact Functional Test Fix) | 48.2% | 79.6% | 61.4% | 54.1% | 83.4% |
Patch Apply Rate (git apply Valid) | 62.1% | 97.8% | 78.3% | 69.8% |
🗂️ 13-Class Canonical Taxonomy
FixFlow enforces a zero-unknown policy, mapping any observed build, runtime, or workflow failure into one of 13 canonical categories:
Table with columns: #, Category, Scope & Diagnostic Characteristics| # | Category | Scope & Diagnostic Characteristics |
|---|
| 1 | Code Error | Syntax errors, variable scope bugs, type errors, null references, and logic flaws in application source code. |
| 2 | Dependency Error | Missing packages (ModuleNotFoundError, npm ERR! code E404), version conflicts (ERESOLVE), and peer dependency mismatches. |
| 3 | Build Error | Packaging and bundling failures (webpack, vite, , , ). |
📦 Training Data Engineering
The model was trained on the krishna1707/buildfail-dataset master dataset, curated across 6 distinct data tables:
Table with columns: Source Dataset, Harvested Records, Role & Contribution, Direct Access Link| Source Dataset | Harvested Records | Role & Contribution | Direct Access Link |
|---|
| GHALogs | 84,000 | GitHub Actions workflow mining (Tests, Dependencies, Containers, Runner telemetry) | GitHub: PRL-PRG/ghalogs / Zenodo: 4646736 |
| Travis CI Torrent | 40,000 | Longitudinal multi-lingual build and test failure logs (Java, Python, JS, C++) | TravisTorrent Portal |
|
Stratified Splits Produced after Cryptographic Deduplication (SHA-256):
train.jsonl: 80,000+ quality instruction samples
validation.jsonl: ~8,500 samples (real-time validation loss)
test.jsonl: ~4,700 samples (in-domain benchmark)
ood_test.jsonl: 489 unseen samples (held-out generalization benchmark)
⚙️ Fine-Tuning Hyperparameters & Procedure
Fine-tuning was conducted on Kaggle Dual Tesla T4 GPUs (32 GB total VRAM) using trl.SFTTrainer and peft:
Table with columns: Hyperparameter, Value, Description| Hyperparameter | Value | Description |
|---|
| Base Foundation Model | Qwen/Qwen2.5-Coder-7B-Instruct | 7.61B parameter coding foundation model |
| Quantization Scheme | 4-bit NormalFloat (NF4) | bitsandbytes memory-efficient quantization |
| Double Quantization | True | Saves ~0.37 bits/param on quantization constants |
| Compute Data Type | |
💻 Quickstart: How to Use
1. Installation
pip install torch transformers peft bitsandbytes accelerate
2. Loading the Model with 4-Bit NF4 Quantization
import torchfrom transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfigfrom peft import PeftModel ADAPTER_REPO = "krishna1707/buildfail-slm-qwen7b-adapter"BASE_MODEL_NAME = "Qwen/Qwen2.5-Coder-7B-Instruct" # 1. Load tokenizertokenizer = AutoTokenizer.from_pretrained(ADAPTER_REPO, trust_remote_code=True)if tokenizer.pad_token is None: tokenizer.pad_token = tokenizer.eos_token # 2. Configure 4-bit NF4 Quantization (requires ~5.33 GB VRAM)bnb_config = BitsAndBytesConfig( load_in_4bit=True, bnb_4bit_quant_type="nf4", bnb_4bit_compute_dtype=torch.float16, bnb_4bit_use_double_quant=True) # 3. Load base modelbase_model = AutoModelForCausalLM.from_pretrained( BASE_MODEL_NAME, quantization_config=bnb_config, device_map="auto", torch_dtype=torch.float16, trust_remote_code=True) # 4. Attach fine-tuned BuildFail-SLM LoRA adaptermodel = PeftModel.from_pretrained(base_model, ADAPTER_REPO)model.eval()model.config.use_cache = True print("✅ BuildFail-SLM 7B Adapter successfully loaded onto GPU!")
prompt_template = """<|im_start|>systemYou are BuildFail-SLM, an expert AI DevOps and software repair model.Analyze CI/CD failures accurately, identify root causes, and propose non-destructive unified diffs.<|im_end|><|im_start|>userAnalyze the following CI/CD failure log, diagnose the root cause, classify the failure category according to the 13-class taxonomy, and propose a concrete code patch in unified diff format. ### Target Context:- Target File: Dockerfile- Environment: Docker / Linux ### Failure Log:
Step 4/10 : RUN pip install -r requirements.txt
ERROR: Could not find a version that satisfies the requirement torch==2.6.0+cu124
ERROR: No matching distribution found for torch==2.6.0+cu124
The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1
Format your response exactly as:### Failure Category:<One of the 13 canonical categories>### Root Cause Analysis:<Precise, technical explanation of why the build or test failed>### Recommended Remediation:<Remediation steps or terminal command>### Proposed Code Fix (Unified Diff):```diff--- a/<target_file>+++ b/<target_file>@@ ... @@- <old code>+ <fixed code>
<|im_end|>
<|im_start|>assistant
"""
inputs = tokenizer(prompt_template, return_tensors="pt").to("cuda")
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=250,
temperature=0.1,
top_p=0.9,
repetition_penalty=1.05,
pad_token_id=tokenizer.eos_token_id
)
output_text = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print(output_text)
### 4. Sample Model Output```text### Failure Category:Docker / Container Error### Root Cause Analysis:The PyTorch wheel `torch==2.6.0+cu124` is not hosted on default PyPI indexes and requires the dedicated `--extra-index-url https://download.pytorch.org/whl/cu124` flag during pip installation.### Recommended Remediation:Update pip install command inside the Dockerfile to include PyTorch's official CUDA wheel index.### Proposed Code Fix (Unified Diff):```diff--- a/Dockerfile+++ b/Dockerfile@@ -4,2 +4,2 @@-RUN pip install -r requirements.txt+RUN pip install --extra-index-url https://download.pytorch.org/whl/cu124 -r requirements.txt
---## 🔒 Intended Uses, Ethical Considerations & Safety### Direct & Permitted Use- **Automated CI/CD Triage:** Automated analysis of broken GitHub Actions, GitLab CI, or Jenkins pipelines.- **Developer Pair Programming:** Providing junior and senior software engineers with immediate root cause diagnostics and suggested diff patches.- **Air-Gapped & Edge Deployments:** Running inside secure corporate networks and air-gapped VPCs without leaking source code to public LLM APIs.### Non-Destructive GuaranteeFixFlow and BuildFail-SLM operate as **diagnostic advisors**. The model produces git unified diffs for human review or automated staging test pipelines; it **never** directly commits or pushes destructive changes to production codebases.### Out-of-Scope Use- Not intended for general-purpose conversational chat or creative writing.- Not intended for unverified autonomous application of diffs directly to production without testing.---## 📚 Citations & AcknowledgmentsIf you use **BuildFail-SLM** or the **FixFlow** platform in your research or production systems, please cite:```bibtex@software{buildfail_slm_qwen7b_2026, author = {Krishna Reddy and FixFlow Engineering Team}, title = {BuildFail-SLM: Autonomous CI/CD Failure Localization and Unified Diff Code Repair via QLoRA 7B Coding SLMs}, year = {2026}, publisher = {Hugging Face}, journal = {Hugging Face Model Hub}, howpublished = {\url{https://huggingface.co/krishna1707/buildfail-slm-qwen7b-adapter}}}
Foundation & Data Credits