CoolFace
Modelpublic

Tejas86/iac-coder-1.5b

sourceHugging Faceapache-2.0updated 5mo agoView on Hugging Face
1likes4downloads
Model Card

IaC-Coder 1.5B — Infrastructure as Code Language Model

A small language model fine-tuned for DevOps Infrastructure as Code (IaC) tasks. Built on Qwen2.5-Coder-1.5B with LoRA SFT on real-world IaC commits.

Supported IaC Languages

LanguageUse CaseTraining Data
Terraform HCLCloud infrastructure provisioning421 commit pairs
YAML (Ansible/K8s)Configuration management, container orchestration30,000 commit pairs (capped from 114K)
DockerfileContainer image definitions39 commit pairs
Shell/BashCI/CD pipelines, automation scripts15,000 commit pairs (capped from 31K)
NixReproducible builds1,593 commit pairs
MakefileBuild automation960 commit pairs
SaltStackConfiguration management617 commit pairs
TOMLApplication configuration3,424 commit pairs

Quick Start

python
from transformers import pipeline
import torch

pipe = pipeline(
    "text-generation",
    model="Tejas86/iac-coder-1.5b",
    torch_dtype=torch.bfloat16,
    device_map="auto",
)

messages = [
    {"role": "system", "content": "You are an expert DevOps engineer. Generate clean, production-ready Terraform HCL code."},
    {"role": "user", "content": "Task: Create an AWS S3 bucket with versioning enabled and server-side encryption\n\nGenerate the Terraform HCL code."},
]

output = pipe(messages, max_new_tokens=512, temperature=0.2, do_sample=True, top_p=0.9)
print(output[0]["generated_text"][-1]["content"])

Prompt Format

The model was trained with this conversational format:

System: You are an expert DevOps engineer specializing in Infrastructure as Code. Generate clean, production-ready {language} code.

User: Task: {natural language description}

Modify the following {language} file:

{existing code}