CloudHeal CI/CD Repair Adapter

This PEFT LoRA adapter adapts Qwen2.5-Coder-7B-Instruct for CI/CD failure diagnosis and patch-style repair, with a focus on GitHub Actions workflows and related configuration or build issues. It is an adapter, not a standalone model; load it with the original base model.

Model Details

Model Description

CloudHeal is an experimental adapter for generating code patches from software issue and CI/CD context. Training examples use an instruction, structured input context, and a target output. The intended output is a repair patch, such as a unified diff.

  • Model type: PEFT LoRA adapter for causal language modeling
  • Language(s) (NLP): English; code and configuration text
  • License: Apache-2.0, following the base model license. Check the licenses and terms of the training data before reuse.
  • Finetuned from model [optional]: Qwen/Qwen2.5-Coder-7B-Instruct

Uses

Direct Use

Use the adapter with the Qwen2.5-Coder-7B-Instruct base model to generate patch-style suggestions from a CI/CD failure description, relevant logs, and repository configuration context.

Downstream Use [optional]

The adapter is intended for research prototypes that assist with GitHub Actions failure diagnosis and configuration repair. A downstream system should validate proposed patches before applying them, for example by checking patch applicability, reviewing changes, and rerunning relevant tests or workflows.

Out-of-Scope Use

Do not use generated patches as automatic production changes without human review and validation. The adapter is not designed to diagnose every type of infrastructure or application failure, and it should not be treated as a substitute for security review, incident response, or CI testing.

Bias, Risks, and Limitations

The adapter learns from its training data and may reproduce errors, omit relevant context, or generate patches that appear plausible but are incorrect or unsafe. Its evaluation includes code-similarity and output-format checks; these do not establish that generated patches apply cleanly or pass tests. The reported 8-example format check is small, and end-to-end validation through patch application and CI reruns remains necessary.

Recommendations

  • Review every generated patch before use.
  • Apply patches in a controlled branch or disposable environment.
  • Run relevant tests and CI workflows after applying a patch.
  • Do not provide secrets or sensitive logs as model input.
  • Treat outputs as suggestions, especially for permissions, dependency versions, and deployment configuration.

How to Get Started with the Model

import torch
from peft import AutoPeftModelForCausalLM
from transformers import AutoTokenizer

base_model_id = "Qwen/Qwen2.5-Coder-7B-Instruct"
adapter_id = "ramitha2002/cloudheal-cicd-repair-adapter"

tokenizer = AutoTokenizer.from_pretrained(base_model_id, use_fast=True)
if tokenizer.pad_token is None:
    tokenizer.pad_token = tokenizer.eos_token

model = AutoPeftModelForCausalLM.from_pretrained(
    adapter_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)
model.eval()

messages = [
    {"role": "system", "content": "You are a helpful coding assistant."},
    {
        "role": "user",
        "content": (
            "Diagnose the CI failure and return a unified diff patch.\n\n"
            "Context:\n"
            '{"workflow": "...", "error_log": "..."}'
        ),
    },
]

inputs = tokenizer.apply_chat_template(
    messages,
    tokenize=True,
    add_generation_prompt=True,
    return_tensors="pt",
).to(model.device)

with torch.no_grad():
    output = model.generate(
        inputs,
        do_sample=False,
        max_new_tokens=2048,
        pad_token_id=tokenizer.eos_token_id,
    )

new_tokens = output[0][inputs.shape[-1]:]
print(tokenizer.decode(new_tokens, skip_special_tokens=True))

Training Details

Training Data

The training mix contains 18,607 training rows, with 300 validation rows and 200 test rows. The reported sources are:

  • LCA CI Builds Repair, used as the primary training source
  • SWE-bench training data, used as the secondary training source

The sources were mixed at a reported 5:1 ratio, with LCA CI Builds Repair upweighted. Examples were represented as JSONL records with instruction, input, and output fields, alongside identifiers and metadata. The output field is the supervised target and should not be included in inference prompts.

No public dataset card or dataset repository was specified in the supplied materials.

Training Procedure

Preprocessing [optional]

The data pipeline converted source records to JSONL, normalized their schema and text, removed duplicates, and combined the two training sources using weighted mixing. The evaluation data was kept separate from the training mix.

Training Hyperparameters

  • Training regime: BF16
  • Epochs: 2
  • Global steps: 4,652
  • Train batch size: 8
  • Maximum sequence length: 2,048
  • Learning rate: 0.0001
  • Warmup steps: 140
  • Scheduler: Cosine
  • Weight decay: 0.01
  • Maximum gradient norm: 1.0
  • Random seed: 42
  • LoRA rank: 32
  • LoRA alpha: 64
  • LoRA dropout: 0.05
  • LoRA target modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
  • PEFT version in adapter config: 0.19.1

Speeds, Sizes, Times [optional]

The adapter weights file is 323,014,168 bytes (about 323 MB). Training duration and throughput were not reported.

Evaluation

Testing Data, Factors & Metrics

Testing Data

The supplied research report describes a CodeBLEU comparison on 50 Python samples from the JetBrains Research diff-xyz test split, run over three trials. It also reports a separate, small 8-example format check. These are distinct evaluations.

Factors

The CodeBLEU evaluation compared the base Qwen model with the same model plus this adapter, using the same samples and prompts within each trial. Prompts included the task description, commit message, and original source code.

Metrics

CodeBLEU and its BLEU, weighted BLEU, AST match, and data-flow match components were used for the 50-sample comparison. The 8-example check reported exact match, inclusion match, and whether outputs followed a patch-like format.

Results

Metric Base model Adapter model
Mean CodeBLEU 0.5272 0.6251
BLEU 0.2440 0.2485
Weighted BLEU 0.3831 0.4058
AST match 0.5323 0.6042
Data-flow match 0.6289 0.7970

In the separate 8-example format check, the adapter produced patch-like outputs in 8/8 cases and the base model in 0/8. Exact match was 0/8 for both models. These results indicate improved output-format alignment and CodeBLEU similarity in the reported evaluations; they do not demonstrate functional patch correctness.

Summary

The reported CodeBLEU mean increased from 0.5272 for the base model to 0.6251 for the adapter model across three trials. Functional validation—such as applying patches and running tests—was not established by these metrics.

Environmental Impact

Carbon emissions were not measured or reported.

  • Hardware Type: AMD Instinct MI300X, 1 GPU, 192 GB VRAM
  • Hours used: Not reported
  • Cloud Provider: Not reported
  • Compute Region: Not reported
  • Carbon Emitted: Not reported

Technical Specifications [optional]

Model Architecture and Objective

The adapter uses LoRA with a causal language modeling objective on the Qwen2.5-Coder-7B-Instruct base model. It targets attention and MLP projection modules. The adapter must be loaded on top of the base model.

Compute Infrastructure

Hardware

  • AMD Instinct MI300X GPU, 192 GB VRAM
  • 20 vCPU
  • 240 GB RAM
  • ROCm 7.2

Software

The supplied report identifies Transformers, PEFT, and bitsandbytes among the training tools. The exact versions for Transformers and bitsandbytes were not reported. The adapter config records PEFT 0.19.1.

Glossary [optional]

  • CI/CD: Continuous integration and continuous deployment.
  • LoRA: Low-Rank Adaptation, a parameter-efficient fine-tuning method.
  • CodeBLEU: A code-generation similarity metric that combines lexical and structural signals.
  • Adapter: A set of learned weights loaded alongside a base model.

More Information [optional]

The best observed validation loss was 0.6870 at step 2,100. Final validation loss was 0.7071. The best validation checkpoint was not retained in the uploaded adapter folder.

Downloads last month
31
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ramitha2002/cloudheal-cicd-repair-adapter

Base model

Qwen/Qwen2.5-7B
Adapter
(689)
this model