K8s-Operator (Fine-tuned LLaMA)
Author: Nir Adler
Model Type: Fine-tuned LLaMA / Unsloth-based Model
Domain: Kubernetes (kubectl commands)
License: Apache 2.0
Repository: Model Page
π Overview
This model is a fine-tuned LLaMA/Unsloth-based model designed to generate accurate and efficient kubectl
commands for managing Kubernetes clusters. It understands Kubernetes concepts, CLI usage, and best practices, making it a valuable assistant for DevOps engineers, SREs, and platform teams.
It can help with:
β
Constructing kubectl
commands based on natural language queries.
β
Explaining Kubernetes commands and best practices.
β
Providing structured responses with safe and efficient command execution.
π Model Details
- Base Model: llama-3.2-3b-instruct-unsloth-bnb-4bit
- Fine-tuned on:
ComponentSoft/k8s-kubectl
(General k8s commands)ComponentSoft/k8s-kubectl-35k
(Expanded dataset)ComponentSoft/k8s-kubectl-cot-20k
(Chain of Thought explanations)
- Training Framework: Unsloth (optimized for efficient training)
- Format: ShareGPT-style chat template
- Dataset Size: ~55K Kubernetes-related command pairs
π§ Usage
1οΈβ£ Load the Model from Hugging Face
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "niradler/k8s_operator"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
3οΈβ£ Example Output
## **πΉ Instruction:**
Retrieve logs from a running pod named `web-server`.
## **πΉ Recommended `kubectl` Command:**
```sh
kubectl logs web-server
π Limitations & Considerations
πΉ The model is not aware of Kubernetes cluster states, so verify command outputs.
πΉ It may generate destructive commandsβalways review before running.
πΉ Fine-tuning with specific Kubernetes versions might be necessary for up-to-date command compatibility.
π Resources & Links
- π€ Hugging Face Model Page: Hugging Face Link
- π Training Dataset:
- π Official Kubernetes Docs: https://kubernetes.io/docs/
- π οΈ Fine-tuning with Unsloth: https://unsloth.ai/
- Downloads last month
- 55
4-bit
8-bit