rezaduty commited on
Commit
ec8b72a
·
verified ·
1 Parent(s): 38aa8d5

Add specialized README for Kubernetes Security

Browse files
Files changed (1) hide show
  1. README.md +79 -9
README.md CHANGED
@@ -1,22 +1,92 @@
1
  ---
2
- base_model: unsloth/gemma-4-e2b-it-unsloth-bnb-4bit
3
  tags:
4
  - text-generation-inference
5
  - transformers
6
- - unsloth
7
  - gemma4
8
- - trl
 
 
 
 
 
 
 
9
  license: apache-2.0
10
  language:
11
  - en
12
  ---
13
 
14
- # Uploaded model
15
 
16
- - **Developed by:** rezaduty
17
- - **License:** apache-2.0
18
- - **Finetuned from model :** unsloth/gemma-4-e2b-it-unsloth-bnb-4bit
19
 
20
- This gemma4 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth)
21
 
22
- [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ base_model: google/gemma-4-e2b-it
3
  tags:
4
  - text-generation-inference
5
  - transformers
 
6
  - gemma4
7
+ - peft
8
+ - lora
9
+ - cybersecurity
10
+ - kubernetes
11
+ - k8s
12
+ - container-security
13
+ - devsecops
14
+ - cybersecurity
15
  license: apache-2.0
16
  language:
17
  - en
18
  ---
19
 
20
+ # Gemma 4 E2B — Kubernetes Security Expert
21
 
22
+ A QLoRA fine-tuned version of [Gemma 4 E2B Instruct](https://huggingface.co/google/gemma-4-e2b-it) specialized in **kubernetes security**.
23
+ Specialized in **Kubernetes security**: RBAC design, Pod Security Standards, network policies, admission controllers, etcd encryption, and multi-tenant cluster hardening.
 
24
 
25
+ Part of the [rezaduty cybersecurity model family](https://huggingface.co/rezaduty).
26
 
27
+ ---
28
+
29
+ ## Expertise
30
+
31
+ - RBAC least-privilege design and audit logging
32
+ - Pod Security Standards (Restricted, Baseline, Privileged)
33
+ - Network policies and service mesh security (Istio/Linkerd)
34
+ - Admission controllers: OPA Gatekeeper, Kyverno, Falco
35
+ - Secrets encryption at rest and external secrets management
36
+ - Supply-chain security: image signing, SBOM, admission control
37
+
38
+ ---
39
+
40
+ ## Model Details
41
+
42
+ | Property | Value |
43
+ |---|---|
44
+ | **Base model** | google/gemma-4-e2b-it (2B parameters) |
45
+ | **Fine-tuning method** | QLoRA (rank 16, α 16) |
46
+ | **Domain** | Kubernetes Security |
47
+ | **License** | Apache 2.0 |
48
+
49
+ ---
50
+
51
+ ## Usage
52
+
53
+ ```python
54
+ from transformers import AutoTokenizer, AutoModelForCausalLM
55
+ from peft import PeftModel
56
+ import torch
57
+
58
+ base_model = "google/gemma-4-e2b-it"
59
+ adapter = "rezaduty/gemma4-e2b-kubernetes-security"
60
+
61
+ tokenizer = AutoTokenizer.from_pretrained(adapter)
62
+ model = AutoModelForCausalLM.from_pretrained(
63
+ base_model, torch_dtype=torch.bfloat16, device_map="auto"
64
+ )
65
+ model = PeftModel.from_pretrained(model, adapter)
66
+
67
+ messages = [
68
+ {"role": "system", "content": [{"type": "text", "text": "You are an expert in Kubernetes security. You provide deep answers on RBAC, Pod Security, network policies, admission controllers, secrets management, and cluster hardening."}]},
69
+ {"role": "user", "content": [{"type": "text", "text": "Your question here"}]},
70
+ ]
71
+ inputs = tokenizer.apply_chat_template(
72
+ messages, tokenize=True, add_generation_prompt=True, return_tensors="pt"
73
+ ).to(model.device)
74
+ output = model.generate(inputs, max_new_tokens=512, temperature=0.7, top_p=0.9)
75
+ print(tokenizer.decode(output[0][inputs.shape[-1]:], skip_special_tokens=True))
76
+ ```
77
+
78
+ ---
79
+
80
+ ## System Prompt
81
+
82
+ ```
83
+ You are an expert in Kubernetes security. You provide deep answers on RBAC, Pod Security, network policies, admission controllers, secrets management, and cluster hardening.
84
+ ```
85
+
86
+ ---
87
+
88
+ ## See Also
89
+
90
+ - [General cybersecurity model](https://huggingface.co/rezaduty/gemma4-e2b-cybersecurity-interview) — full 646-example dataset
91
+ - [Docker & Container Security](https://huggingface.co/rezaduty/gemma4-e2b-docker-container-security)
92
+ - [All rezaduty models](https://huggingface.co/rezaduty)