ikaganacar commited on
Commit
05733d4
·
verified ·
1 Parent(s): 53676d5

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +253 -163
README.md CHANGED
@@ -1,209 +1,299 @@
1
  ---
2
- base_model: gemma3-local
3
- library_name: peft
4
  tags:
5
- - base_model:adapter:gemma3-local
6
- - lora
7
- - sft
8
- - transformers
9
- - trl
 
10
  - unsloth
 
 
 
 
 
 
 
 
 
 
 
11
  ---
12
 
13
- # Model Card for Model ID
14
-
15
- <!-- Provide a quick summary of what the model is/does. -->
16
-
17
-
18
-
19
- ## Model Details
20
 
21
- ### Model Description
22
 
23
- <!-- Provide a longer summary of what this model is. -->
24
 
 
25
 
 
26
 
27
- - **Developed by:** [More Information Needed]
28
- - **Funded by [optional]:** [More Information Needed]
29
- - **Shared by [optional]:** [More Information Needed]
30
- - **Model type:** [More Information Needed]
31
- - **Language(s) (NLP):** [More Information Needed]
32
- - **License:** [More Information Needed]
33
- - **Finetuned from model [optional]:** [More Information Needed]
34
 
35
- ### Model Sources [optional]
 
 
 
 
 
 
36
 
37
- <!-- Provide the basic links for the model. -->
38
 
39
- - **Repository:** [More Information Needed]
40
- - **Paper [optional]:** [More Information Needed]
41
- - **Demo [optional]:** [More Information Needed]
42
 
43
- ## Uses
 
 
 
 
 
 
 
 
 
 
 
44
 
45
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
 
 
 
 
 
 
46
 
47
- ### Direct Use
 
 
 
 
48
 
49
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
 
50
 
51
- [More Information Needed]
 
 
 
52
 
53
- ### Downstream Use [optional]
 
 
 
 
 
54
 
55
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
 
 
 
 
 
 
56
 
57
- [More Information Needed]
 
 
58
 
59
- ### Out-of-Scope Use
60
 
61
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
62
 
63
- [More Information Needed]
 
 
64
 
65
- ## Bias, Risks, and Limitations
 
66
 
67
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
 
68
 
69
- [More Information Needed]
 
70
 
71
- ### Recommendations
 
 
72
 
73
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
74
-
75
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
76
-
77
- ## How to Get Started with the Model
78
-
79
- Use the code below to get started with the model.
80
-
81
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
  ## Training Details
84
 
85
- ### Training Data
86
-
87
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
88
-
89
- [More Information Needed]
90
-
91
- ### Training Procedure
92
-
93
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
94
-
95
- #### Preprocessing [optional]
96
-
97
- [More Information Needed]
98
-
99
-
100
- #### Training Hyperparameters
101
-
102
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
103
-
104
- #### Speeds, Sizes, Times [optional]
105
-
106
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
107
-
108
- [More Information Needed]
109
-
110
- ## Evaluation
111
-
112
- <!-- This section describes the evaluation protocols and provides the results. -->
113
-
114
- ### Testing Data, Factors & Metrics
115
-
116
- #### Testing Data
117
-
118
- <!-- This should link to a Dataset Card if possible. -->
119
-
120
- [More Information Needed]
121
 
122
- #### Factors
123
 
124
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
 
 
 
125
 
126
- [More Information Needed]
127
 
128
- #### Metrics
 
 
 
129
 
130
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
131
 
132
- [More Information Needed]
 
 
 
133
 
134
- ### Results
135
 
136
- [More Information Needed]
137
 
138
- #### Summary
139
 
 
 
 
 
 
140
 
 
141
 
142
- ## Model Examination [optional]
143
 
144
- <!-- Relevant interpretability work for the model goes here -->
145
-
146
- [More Information Needed]
147
-
148
- ## Environmental Impact
149
-
150
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
151
-
152
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
153
-
154
- - **Hardware Type:** [More Information Needed]
155
- - **Hours used:** [More Information Needed]
156
- - **Cloud Provider:** [More Information Needed]
157
- - **Compute Region:** [More Information Needed]
158
- - **Carbon Emitted:** [More Information Needed]
159
-
160
- ## Technical Specifications [optional]
161
-
162
- ### Model Architecture and Objective
163
-
164
- [More Information Needed]
165
-
166
- ### Compute Infrastructure
167
-
168
- [More Information Needed]
169
-
170
- #### Hardware
171
-
172
- [More Information Needed]
173
-
174
- #### Software
175
-
176
- [More Information Needed]
177
-
178
- ## Citation [optional]
179
-
180
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
181
-
182
- **BibTeX:**
183
-
184
- [More Information Needed]
185
-
186
- **APA:**
187
-
188
- [More Information Needed]
189
-
190
- ## Glossary [optional]
191
-
192
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
193
-
194
- [More Information Needed]
195
-
196
- ## More Information [optional]
197
-
198
- [More Information Needed]
199
-
200
- ## Model Card Authors [optional]
201
-
202
- [More Information Needed]
203
-
204
- ## Model Card Contact
205
-
206
- [More Information Needed]
207
- ### Framework versions
208
 
209
- - PEFT 0.17.1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: mit
3
+ base_model: unsloth/gemma-3-12b-it-qat-bnb-4bit
4
  tags:
5
+ - kubernetes
6
+ - devops
7
+ - infrastructure
8
+ - k8s
9
+ - turkish
10
+ - gemma
11
  - unsloth
12
+ - lora
13
+ datasets:
14
+ - mcipriano/stackoverflow-kubernetes-questions
15
+ - Szaid3680/Devops
16
+ - ahmedgongi/Devops_LLM
17
+ - HelloBoieeee/kubernetes_config
18
+ - sidddddddddddd/kubernetes-with-ood
19
+ - peterpanpan/stackoverflow-kubernetes-questions
20
+ - dereklck/kubernetes_operator_3b_1.5k
21
+ - dereklck/kubernetes_cli_dataset_20k
22
+ library_name: peft
23
  ---
24
 
25
+ # Kubernetes AI - Gemma 3 12B LoRA Adapters
 
 
 
 
 
 
26
 
27
+ Fine-tuned Gemma 3 12B model specialized for answering Kubernetes questions in Turkish.
28
 
29
+ ## Model Description
30
 
31
+ 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.
32
 
33
+ **Primary Purpose:** Answer Kubernetes-related questions in Turkish language.
34
 
35
+ ### Use Cases
 
 
 
 
 
 
36
 
37
+ - Kubernetes cluster management and troubleshooting
38
+ - YAML configuration generation and validation
39
+ - kubectl command assistance
40
+ - Debugging pod, service, and deployment issues
41
+ - Kubernetes best practices and concepts
42
+ - DevOps workflow optimization
43
+ - **Turkish language Kubernetes Q&A**
44
 
45
+ ## Quick Start
46
 
47
+ ### Installation
 
 
48
 
49
+ ```bash
50
+ pip install unsloth
51
+ pip install "transformers>=4.40.0"
52
+ pip install peft
53
+ ```
54
+
55
+ ### Loading the Model
56
+
57
+ ```python
58
+ from unsloth import FastLanguageModel
59
+ from peft import PeftModel
60
+ import torch
61
 
62
+ # Load base Gemma 3 12B model
63
+ model, tokenizer = FastLanguageModel.from_pretrained(
64
+ model_name="unsloth/gemma-3-12b-it-qat-bnb-4bit",
65
+ max_seq_length=2048,
66
+ dtype=None,
67
+ load_in_4bit=True, # Use 4-bit quantization to fit in GPU memory
68
+ )
69
 
70
+ # Load Kubernetes AI LoRA adapters
71
+ model = PeftModel.from_pretrained(
72
+ model,
73
+ "aciklab/kubernetes-ai-lora"
74
+ )
75
 
76
+ # Enable inference mode
77
+ FastLanguageModel.for_inference(model)
78
 
79
+ # Example usage (Turkish question)
80
+ messages = [
81
+ {"role": "user", "content": "Kubernetes'te 3 replikaya sahip bir deployment nasıl oluştururum?"}
82
+ ]
83
 
84
+ inputs = tokenizer.apply_chat_template(
85
+ messages,
86
+ tokenize=True,
87
+ add_generation_prompt=True,
88
+ return_tensors="pt"
89
+ ).to("cuda")
90
 
91
+ outputs = model.generate(
92
+ input_ids=inputs,
93
+ max_new_tokens=512,
94
+ temperature=0.7,
95
+ top_p=0.9,
96
+ do_sample=True
97
+ )
98
 
99
+ response = tokenizer.decode(outputs[0], skip_special_tokens=True)
100
+ print(response)
101
+ ```
102
 
103
+ ## Example Questions
104
 
105
+ ### Turkish Examples
106
 
107
+ ```python
108
+ # Deployment creation
109
+ "Node.js uygulaması için 3 replika, sağlık kontrolleri ve kaynak limitleri olan bir Kubernetes deployment oluştur."
110
 
111
+ # Troubleshooting
112
+ "Pod'um CrashLoopBackOff durumunda. Yaygın nedenleri nelerdir ve nasıl debug ederim?"
113
 
114
+ # kubectl commands
115
+ "Production namespace'indeki çalışmayan tüm pod'ları gösteren kubectl komutunu yaz."
116
 
117
+ # Best practices
118
+ "Kubernetes'te container güvenliği için en iyi uygulamalar nelerdir?"
119
 
120
+ # Service creation
121
+ "LoadBalancer tipinde bir Kubernetes servisi nasıl yapılandırılır?"
122
+ ```
123
 
124
+ ### English Examples
125
+
126
+ ```python
127
+ "How do I create a Kubernetes deployment with 3 replicas?"
128
+ "What are the common causes of CrashLoopBackOff?"
129
+ "Show me kubectl command to get all pods in production namespace."
130
+ ```
131
+
132
+ ## Training Dataset
133
+
134
+ The model was trained on **~157,000 examples** from multiple high-quality Kubernetes and DevOps datasets:
135
+
136
+ | Dataset | Count | Description |
137
+ |---------|----------|-------------|
138
+ | **Kubernetes Official Documentation** | | |
139
+ | - Concepts | 2,700 | Core Kubernetes concepts |
140
+ | - Kubectl Reference | 600 | kubectl command documentation |
141
+ | - Setup Guides | 430 | Installation and setup |
142
+ | - Tasks | 4,300 | Practical task guides |
143
+ | - Tutorials | 880 | Step-by-step tutorials |
144
+ | **Stack Overflow** | | |
145
+ | mcipriano/stackoverflow-kubernetes-questions | 30,000 | Kubernetes Q&A |
146
+ | peterpanpan/stackoverflow-kubernetes-questions | 22,000 | Additional Kubernetes Q&A |
147
+ | **DevOps Datasets** | | |
148
+ | Szaid3680/Devops | 42,000 | General DevOps content |
149
+ | ahmedgongi/Devops_LLM | 20,500 | Kubernetes-filtered DevOps (from 140k) |
150
+ | **Configuration & Operations** | | |
151
+ | HelloBoieeee/kubernetes_config | 10,000 | Kubernetes configurations |
152
+ | sidddddddddddd/kubernetes-with-ood | 6,000 | Kubernetes scenarios (incl. Turkish translations) |
153
+ | dereklck/kubernetes_cli_dataset_20k | 19,000 | kubectl CLI examples |
154
+ | dereklck/kubernetes_operator_3b_1.5k | 1,800 | Kubernetes operator patterns |
155
+
156
+ **Total Training Examples: ~157,210**
157
 
158
  ## Training Details
159
 
160
+ - **Base Model**: unsloth/gemma-3-12b-it-qat-bnb-4bit
161
+ - **Method**: LoRA (Low-Rank Adaptation)
162
+ - **Framework**: Unsloth
163
+ - **LoRA Rank**: 16
164
+ - **Target Modules**: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
165
+ - **Training Checkpoint**: checkpoint-8175
166
+ - **Max Sequence Length**: 2048 tokens
167
+ - **Training Time**: 28 hours
168
+ - **Hardware**: NVIDIA GeForce RTX 5070 12GB
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
 
170
+ ## Hardware Requirements
171
 
172
+ - **Minimum VRAM**: 12GB (with 4-bit quantization)
173
+ - **Recommended VRAM**: 24GB (for faster inference)
174
+ - **CPU RAM**: 32GB+
175
+ - **Training Hardware**: RTX 5070 12GB
176
 
177
+ ## Limitations
178
 
179
+ - Model is specialized for Kubernetes v1.24+ (training data reflects recent versions)
180
+ - May not have information on very recent Kubernetes features released after training
181
+ - Primarily trained for **Turkish language** responses, though it can handle English queries
182
+ - Best suited for technical Kubernetes questions; general conversation capabilities are limited
183
 
184
+ ## Performance Notes
185
 
186
+ - Trained on RTX 5070 12GB in 28 hours
187
+ - Works with 12GB VRAM using 4-bit quantization
188
+ - LoRA adapters are only ~130MB in size
189
+ - Fast startup by loading only adapters without full model reload
190
 
191
+ ## License
192
 
193
+ This model is released under the **MIT License**. Free to use in commercial and open-source projects.
194
 
195
+ ## Acknowledgments
196
 
197
+ - Google and Unsloth team for the Gemma 3 base model
198
+ - Unsloth team for the efficient training framework
199
+ - All dataset contributors
200
+ - Kubernetes community for comprehensive documentation
201
+ - NVIDIA for RTX 5070 enabling 28-hour training
202
 
203
+ ## Contact
204
 
205
+ For questions or feedback, please open an issue on the model repository.
206
 
207
+ ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
 
209
+ **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.
210
+
211
+ ## Related Links
212
+
213
+ - [Unsloth Documentation](https://docs.unsloth.ai/)
214
+ - [Gemma Model Card](https://ai.google.dev/gemma)
215
+ - [PEFT Documentation](https://huggingface.co/docs/peft)
216
+ - [Kubernetes Documentation](https://kubernetes.io/docs/)
217
+
218
+ ## Citations
219
+
220
+ ### Datasets
221
+
222
+ ```bibtex
223
+ @misc{stackoverflow-kubernetes-mcipriano,
224
+ author = {mcipriano},
225
+ title = {Stack Overflow Kubernetes Questions},
226
+ year = {2024},
227
+ publisher = {HuggingFace},
228
+ url = {https://huggingface.co/datasets/mcipriano/stackoverflow-kubernetes-questions}
229
+ }
230
+
231
+ @misc{devops-szaid,
232
+ author = {Szaid3680},
233
+ title = {DevOps Dataset},
234
+ year = {2024},
235
+ publisher = {HuggingFace},
236
+ url = {https://huggingface.co/datasets/Szaid3680/Devops}
237
+ }
238
+
239
+ @misc{devops-llm-ahmed,
240
+ author = {ahmedgongi},
241
+ title = {DevOps LLM Dataset},
242
+ year = {2024},
243
+ publisher = {HuggingFace},
244
+ url = {https://huggingface.co/datasets/ahmedgongi/Devops_LLM}
245
+ }
246
+
247
+ @misc{kubernetes-config-hello,
248
+ author = {HelloBoieeee},
249
+ title = {Kubernetes Config Dataset},
250
+ year = {2024},
251
+ publisher = {HuggingFace},
252
+ url = {https://huggingface.co/datasets/HelloBoieeee/kubernetes_config}
253
+ }
254
+
255
+ @misc{kubernetes-ood-sidddddddddddd,
256
+ author = {sidddddddddddd},
257
+ title = {Kubernetes with OOD Dataset},
258
+ year = {2024},
259
+ publisher = {HuggingFace},
260
+ url = {https://huggingface.co/datasets/sidddddddddddd/kubernetes-with-ood}
261
+ }
262
+
263
+ @misc{stackoverflow-kubernetes-peter,
264
+ author = {peterpanpan},
265
+ title = {Stack Overflow Kubernetes Questions},
266
+ year = {2024},
267
+ publisher = {HuggingFace},
268
+ url = {https://huggingface.co/datasets/peterpanpan/stackoverflow-kubernetes-questions}
269
+ }
270
+
271
+ @misc{kubernetes-operator-derek,
272
+ author = {dereklck},
273
+ title = {Kubernetes Operator Dataset},
274
+ year = {2024},
275
+ publisher = {HuggingFace},
276
+ url = {https://huggingface.co/datasets/dereklck/kubernetes_operator_3b_1.5k}
277
+ }
278
+
279
+ @misc{kubernetes-cli-derek,
280
+ author = {dereklck},
281
+ title = {Kubernetes CLI Dataset},
282
+ year = {2024},
283
+ publisher = {HuggingFace},
284
+ url = {https://huggingface.co/datasets/dereklck/kubernetes_cli_dataset_20k}
285
+ }
286
+ ```
287
+
288
+ ### Model
289
+
290
+ ```bibtex
291
+ @misc{kubernetes-ai-turkish-gemma3,
292
+ author = {aciklab},
293
+ title = {Kubernetes AI Turkish - Gemma 3 12B LoRA Adapters},
294
+ year = {2025},
295
+ publisher = {HuggingFace},
296
+ url = {https://huggingface.co/aciklab/kubernetes-ai-lora},
297
+ note = {Trained on RTX 5070 12GB in 28 hours}
298
+ }
299
+ ```