--- base_model: Qwen/Qwen2.5-Coder-1.5B tags: - infrastructure-as-code - terraform - ansible - kubernetes - docker - devops - code-generation - lora - sft - trl license: apache-2.0 datasets: - bigcode/commitpackft language: - en pipeline_tag: text-generation library_name: peft --- # 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](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B) with LoRA SFT on real-world IaC commits. ## Supported IaC Languages | Language | Use Case | Training Data | |----------|----------|---------------| | **Terraform HCL** | Cloud infrastructure provisioning | 421 commit pairs | | **YAML (Ansible/K8s)** | Configuration management, container orchestration | 30,000 commit pairs (capped from 114K) | | **Dockerfile** | Container image definitions | 39 commit pairs | | **Shell/Bash** | CI/CD pipelines, automation scripts | 15,000 commit pairs (capped from 31K) | | **Nix** | Reproducible builds | 1,593 commit pairs | | **Makefile** | Build automation | 960 commit pairs | | **SaltStack** | Configuration management | 617 commit pairs | | **TOML** | Application configuration | 3,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} ```