File size: 8,342 Bytes
53676d5
05733d4
 
53676d5
05733d4
 
 
 
 
 
53676d5
05733d4
 
 
 
 
 
 
 
 
 
 
5421bea
 
 
53676d5
 
05733d4
53676d5
05733d4
53676d5
05733d4
53676d5
05733d4
53676d5
05733d4
53676d5
05733d4
53676d5
05733d4
 
 
 
 
 
 
53676d5
05733d4
53676d5
05733d4
 
 
 
 
 
53676d5
05733d4
 
 
 
 
 
 
53676d5
05733d4
 
 
5421bea
05733d4
53676d5
05733d4
 
53676d5
05733d4
 
 
 
53676d5
05733d4
 
 
 
 
 
53676d5
05733d4
 
 
 
 
 
 
53676d5
05733d4
 
 
53676d5
05733d4
53676d5
05733d4
53676d5
05733d4
 
 
53676d5
05733d4
 
53676d5
05733d4
 
53676d5
05733d4
 
53676d5
05733d4
 
 
53676d5
05733d4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53676d5
 
 
05733d4
 
 
01c6cf4
05733d4
 
01c6cf4
05733d4
 
53676d5
05733d4
53676d5
05733d4
 
 
 
53676d5
05733d4
53676d5
05733d4
 
e015389
53676d5
05733d4
53676d5
05733d4
 
 
53676d5
05733d4
53676d5
05733d4
53676d5
05733d4
53676d5
05733d4
 
 
 
 
53676d5
05733d4
53676d5
05733d4
53676d5
05733d4
53676d5
05733d4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5421bea
05733d4
 
 
 
5421bea
05733d4
 
5421bea
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
---
license: mit
base_model: unsloth/gemma-3-12b-it-qat-bnb-4bit
tags:
- kubernetes
- devops
- infrastructure
- k8s
- turkish
- gemma
- unsloth
- lora
datasets:
- mcipriano/stackoverflow-kubernetes-questions
- Szaid3680/Devops
- ahmedgongi/Devops_LLM
- HelloBoieeee/kubernetes_config
- sidddddddddddd/kubernetes-with-ood
- peterpanpan/stackoverflow-kubernetes-questions
- dereklck/kubernetes_operator_3b_1.5k
- dereklck/kubernetes_cli_dataset_20k
library_name: peft
language:
- en
- tr
---

# Kubernetes AI - Gemma 3 12B LoRA Adapters

Fine-tuned Gemma 3 12B model specialized for answering Kubernetes questions in Turkish.

## Model Description

This model consists of LoRA adapters fine-tuned on `unsloth/gemma-3-12b-it-qat-bnb-4bit` using a comprehensive dataset of Kubernetes documentation, Stack Overflow questions, and DevOps scenarios.

**Primary Purpose:** Answer Kubernetes-related questions in Turkish language.

### Use Cases

- Kubernetes cluster management and troubleshooting
- YAML configuration generation and validation
- kubectl command assistance
- Debugging pod, service, and deployment issues
- Kubernetes best practices and concepts
- DevOps workflow optimization
- **Turkish language Kubernetes Q&A**

## Quick Start

### Loading the Model

```python
from unsloth import FastLanguageModel
from peft import PeftModel
import torch

# Load base Gemma 3 12B model
model, tokenizer = FastLanguageModel.from_pretrained(
    model_name="unsloth/gemma-3-12b-it-qat-bnb-4bit",
    max_seq_length=2048,
    dtype=None,
    load_in_4bit=True,  # Use 4-bit quantization to fit in GPU memory
)

# Load Kubernetes AI LoRA adapters
model = PeftModel.from_pretrained(
    model,
    "aciklab/kubernetes-ai"
)

# Enable inference mode
FastLanguageModel.for_inference(model)

# Example usage (Turkish question)
messages = [
    {"role": "user", "content": "Kubernetes'te 3 replikaya sahip bir deployment nasıl oluştururum?"}
]

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

outputs = model.generate(
    input_ids=inputs,
    max_new_tokens=512,
    temperature=0.7,
    top_p=0.9,
    do_sample=True
)

response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
```

## Example Questions

### Turkish Examples

```python
# Deployment creation
"Node.js uygulaması için 3 replika, sağlık kontrolleri ve kaynak limitleri olan bir Kubernetes deployment oluştur."

# Troubleshooting
"Pod'um CrashLoopBackOff durumunda. Yaygın nedenleri nelerdir ve nasıl debug ederim?"

# kubectl commands
"Production namespace'indeki çalışmayan tüm pod'ları gösteren kubectl komutunu yaz."

# Best practices
"Kubernetes'te container güvenliği için en iyi uygulamalar nelerdir?"

# Service creation
"LoadBalancer tipinde bir Kubernetes servisi nasıl yapılandırılır?"
```

### English Examples

```python
"How do I create a Kubernetes deployment with 3 replicas?"
"What are the common causes of CrashLoopBackOff?"
"Show me kubectl command to get all pods in production namespace."
```

## Training Dataset

The model was trained on **~157,000 examples** from multiple high-quality Kubernetes and DevOps datasets:

| Dataset | Count | Description |
|---------|----------|-------------|
| **Kubernetes Official Documentation** | | |
| - Concepts | 2,700 | Core Kubernetes concepts |
| - Kubectl Reference | 600 | kubectl command documentation |
| - Setup Guides | 430 | Installation and setup |
| - Tasks | 4,300 | Practical task guides |
| - Tutorials | 880 | Step-by-step tutorials |
| **Stack Overflow** | | |
| mcipriano/stackoverflow-kubernetes-questions | 30,000 | Kubernetes Q&A |
| peterpanpan/stackoverflow-kubernetes-questions | 22,000 | Additional Kubernetes Q&A |
| **DevOps Datasets** | | |
| Szaid3680/Devops | 42,000 | General DevOps content |
| ahmedgongi/Devops_LLM | 20,500 | Kubernetes-filtered DevOps (from 140k) |
| **Configuration & Operations** | | |
| HelloBoieeee/kubernetes_config | 10,000 | Kubernetes configurations |
| sidddddddddddd/kubernetes-with-ood | 6,000 | Kubernetes scenarios (incl. Turkish translations) |
| dereklck/kubernetes_cli_dataset_20k | 19,000 | kubectl CLI examples |
| dereklck/kubernetes_operator_3b_1.5k | 1,800 | Kubernetes operator patterns |

**Total Training Examples: ~157,210**

## Training Details

- **Base Model**: unsloth/gemma-3-12b-it-qat-bnb-4bit
- **Method**: LoRA (Low-Rank Adaptation)
- **Framework**: Unsloth
- **LoRA Rank**: 8
- **Target Modules**: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
- **Training Checkpoint**: checkpoint-8175
- **Max Sequence Length**: 1024 tokens
- **Training Time**: 28 hours
- **Hardware**: NVIDIA GeForce RTX 5070 12GB

## Hardware Requirements

- **Minimum VRAM**: 12GB (with 4-bit quantization)
- **Recommended VRAM**: 24GB (for faster inference)
- **CPU RAM**: 32GB+
- **Training Hardware**: RTX 5070 12GB

## Limitations

- May not have information on very recent Kubernetes features released after training
- Primarily trained for **Turkish language** responses, though it can handle English queries
- Best suited for technical Kubernetes questions; general conversation capabilities can be limited

## Performance Notes

- Trained on RTX 5070 12GB in 28 hours
- Works with 12GB VRAM using 4-bit quantization
- Fast startup by loading only adapters without full model reload

## License

This model is released under the **MIT License**. Free to use in commercial and open-source projects.

## Acknowledgments

- Google and Unsloth team for the Gemma 3 base model
- Unsloth team for the efficient training framework
- All dataset contributors
- Kubernetes community for comprehensive documentation
- NVIDIA for RTX 5070 enabling 28-hour training

## Contact

For questions or feedback, please open an issue on the model repository.

---

**Note**: This is a LoRA adapter, not a full model. You must load it on top of `unsloth/gemma-3-12b-it-qat-bnb-4bit` to use it.

## Related Links

- [Unsloth Documentation](https://docs.unsloth.ai/)
- [Gemma Model Card](https://ai.google.dev/gemma)
- [PEFT Documentation](https://huggingface.co/docs/peft)
- [Kubernetes Documentation](https://kubernetes.io/docs/)

## Citations

### Datasets

```bibtex
@misc{stackoverflow-kubernetes-mcipriano,
  author = {mcipriano},
  title = {Stack Overflow Kubernetes Questions},
  year = {2024},
  publisher = {HuggingFace},
  url = {https://huggingface.co/datasets/mcipriano/stackoverflow-kubernetes-questions}
}

@misc{devops-szaid,
  author = {Szaid3680},
  title = {DevOps Dataset},
  year = {2024},
  publisher = {HuggingFace},
  url = {https://huggingface.co/datasets/Szaid3680/Devops}
}

@misc{devops-llm-ahmed,
  author = {ahmedgongi},
  title = {DevOps LLM Dataset},
  year = {2024},
  publisher = {HuggingFace},
  url = {https://huggingface.co/datasets/ahmedgongi/Devops_LLM}
}

@misc{kubernetes-config-hello,
  author = {HelloBoieeee},
  title = {Kubernetes Config Dataset},
  year = {2024},
  publisher = {HuggingFace},
  url = {https://huggingface.co/datasets/HelloBoieeee/kubernetes_config}
}

@misc{kubernetes-ood-sidddddddddddd,
  author = {sidddddddddddd},
  title = {Kubernetes with OOD Dataset},
  year = {2024},
  publisher = {HuggingFace},
  url = {https://huggingface.co/datasets/sidddddddddddd/kubernetes-with-ood}
}

@misc{stackoverflow-kubernetes-peter,
  author = {peterpanpan},
  title = {Stack Overflow Kubernetes Questions},
  year = {2024},
  publisher = {HuggingFace},
  url = {https://huggingface.co/datasets/peterpanpan/stackoverflow-kubernetes-questions}
}

@misc{kubernetes-operator-derek,
  author = {dereklck},
  title = {Kubernetes Operator Dataset},
  year = {2024},
  publisher = {HuggingFace},
  url = {https://huggingface.co/datasets/dereklck/kubernetes_operator_3b_1.5k}
}

@misc{kubernetes-cli-derek,
  author = {dereklck},
  title = {Kubernetes CLI Dataset},
  year = {2024},
  publisher = {HuggingFace},
  url = {https://huggingface.co/datasets/dereklck/kubernetes_cli_dataset_20k}
}
```

### Model

```bibtex
@misc{kubernetes-ai,
  author = {aciklab},
  title = {Kubernetes AI Turkish - Gemma 3 12B LoRA Adapters},
  year = {2025},
  publisher = {HuggingFace},
  url = {https://huggingface.co/aciklab/kubernetes-ai},
  note = {Trained on RTX 5070 12GB in 28 hours}
}
```