Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- terraform
|
| 4 |
+
- aws
|
| 5 |
+
- infrastructure-as-code
|
| 6 |
+
- hcl
|
| 7 |
+
- unsloth
|
| 8 |
+
- deepseek-coder
|
| 9 |
+
- lora
|
| 10 |
+
license: apache-2.0
|
| 11 |
+
language:
|
| 12 |
+
- en
|
| 13 |
+
base_model:
|
| 14 |
+
- deepseek-ai/deepseek-coder-6.7b-instruct
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# 🛡️ AegisNode Validate (6.7B)
|
| 18 |
+
|
| 19 |
+
AegisNode Validate is a specialized code-generation model fine-tuned to write syntactically flawless, zero-yapping AWS Terraform (HCL). It is built on top of `deepseek-coder-6.7b-instruct` using Unsloth and QLoRA.
|
| 20 |
+
|
| 21 |
+
This model is **Phase 1** of a larger Curriculum Learning pipeline. It has been strictly trained to master the "grammar" of Terraform, complex referencing (`depends_on`, `lifecycle`), and strict adherence to the AWS Provider ~> 5.0 format.
|
| 22 |
+
|
| 23 |
+
## 🚨 CRITICAL WARNING: SYNTAX ONLY 🚨
|
| 24 |
+
**This model has ONLY been trained against `terraform validate`.**
|
| 25 |
+
While the output will be structurally and syntactically perfect HCL, **it is not guaranteed to pass `terraform plan` or deploy successfully.** * It may hallucinate AWS region constraints (e.g., placing CloudFront WAFs outside `us-east-1`).
|
| 26 |
+
* It may create logically orphaned resources (e.g., generating a KMS key but forgetting to attach it to a database).
|
| 27 |
+
* It has **not** yet been trained on Checkov/tfsec security policies.
|
| 28 |
+
|
| 29 |
+
**Do not deploy this code to production without human review.** This model is intended to be used as a high-speed bootstrapping tool or a "Teacher Model" for generating training data for more advanced logic pipelines.
|
| 30 |
+
|
| 31 |
+
## 🧠 Model Behavior: The "Zero-Yapping" Guarantee
|
| 32 |
+
Unlike standard conversational LLMs, AegisNode Validate has been trained on a heavily filtered dataset to completely eliminate conversational filler.
|
| 33 |
+
* It will not say "Here is your code."
|
| 34 |
+
* It will not apologize.
|
| 35 |
+
* It will not output markdown wrappers (````hcl````) unless explicitly prompted.
|
| 36 |
+
* **It outputs RAW, executable HCL from the very first token.**
|
| 37 |
+
|
| 38 |
+
## 💻 Usage (Ollama / GGUF)
|
| 39 |
+
|
| 40 |
+
Because this model relies on the native DeepSeek-Coder template, you must use the correct instruction formatting. If you download the `.gguf` file, use the following `Modelfile` to run it in Ollama:
|
| 41 |
+
|
| 42 |
+
```text
|
| 43 |
+
FROM ./aegisnode-validate-6.7b-unsloth.Q4_K_M.gguf
|
| 44 |
+
|
| 45 |
+
TEMPLATE """{{ if .System }}{{ .System }}
|
| 46 |
+
{{ end }}### Instruction:
|
| 47 |
+
{{ .Prompt }}
|
| 48 |
+
### Response:
|
| 49 |
+
"""
|
| 50 |
+
|
| 51 |
+
SYSTEM """You are a Principal AWS Cloud Architect. Write flawless, enterprise-grade Terraform code. Output ONLY valid HCL."""
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
Then create and run the model:
|
| 55 |
+
```bash
|
| 56 |
+
ollama create aegisnode-validate -f Modelfile
|
| 57 |
+
ollama run aegisnode-validate "Create a VPC in us-east-1 with CIDR 10.0.0.0/16 and two public subnets."
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
## 📊 Training Details
|
| 61 |
+
* **Base Model:** `deepseek-ai/deepseek-coder-6.7b-instruct`
|
| 62 |
+
* **Dataset:** 3,470 meticulously refined and augmented Terraform trajectories.
|
| 63 |
+
* **Hardware:** 1x NVIDIA RTX 5070TI (32GB VRAM)
|
| 64 |
+
* **Framework:** [Unsloth](https://github.com/unslothai/unsloth) + Huggingface TRL
|
| 65 |
+
* **Hyperparameters:** Rank 8, Alpha 16, LR 2e-5, Cosine Decay, 1 Epoch. (Trained explicitly on Assistant responses only).
|
| 66 |
+
|
| 67 |
+
## 🚀 The AegisNode Roadmap
|
| 68 |
+
- [x] **Phase 1 (AegisNode Validate):** Master HCL syntax and formatting (`terraform validate`).
|
| 69 |
+
- [ ] **Phase 2 (AegisNode Plan):** Master AWS API logic and state relationships (`terraform plan`).
|
| 70 |
+
- [ ] **Phase 3 (AegisNode Hiraya):** Master enterprise security and compliance (`checkov` / `tfsec`).
|