Transformers
Safetensors
PEFT
English
text-generation-inference
gemma4
lora
cybersecurity
docker
container-security
devsecops
Run this model with HF Jobs
Run rezaduty/gemma4-e2b-docker-container-security on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/rezaduty/gemma4-e2b-docker-container-security. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/rezaduty/gemma4-e2b-docker-container-security on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use rezaduty/gemma4-e2b-docker-container-security with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rezaduty/gemma4-e2b-docker-container-security with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("rezaduty/gemma4-e2b-docker-container-security", device_map="auto") - PEFT
How to use rezaduty/gemma4-e2b-docker-container-security with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
|
Download README.md from rezaduty/gemma4-e2b-docker-container-security: direct link, hf CLI and curl.
- Browser
- Download file 2.82 kB
-
https://huggingface.co/rezaduty/gemma4-e2b-docker-container-security/resolve/main/README.md
- Command line
-
hf download hf://rezaduty/gemma4-e2b-docker-container-security/README.md
-
curl -L -o README.md https://huggingface.co/rezaduty/gemma4-e2b-docker-container-security/resolve/main/README.md
2.82 kB
metadata
base_model: google/gemma-4-e2b-it
tags:
- text-generation-inference
- transformers
- gemma4
- peft
- lora
- cybersecurity
- docker
- container-security
- devsecops
- cybersecurity
license: apache-2.0
language:
- en
Gemma 4 E2B — Docker & Container Security Expert
A QLoRA fine-tuned version of Gemma 4 E2B Instruct specialized in docker & container security. Specialized in Docker and container security: image hardening, rootless containers, seccomp/AppArmor profiles, runtime threat detection, and container escape techniques and mitigations.
Part of the rezaduty cybersecurity model family.
Expertise
- Docker daemon security and socket exposure risks
- Image scanning, distroless images, and minimal base images
- Rootless containers, user namespaces, and capability dropping
- Runtime security with Falco, seccomp, and AppArmor
- Container escape techniques and kernel exploit mitigations
- Dockerfile best practices and supply-chain integrity
Model Details
| Property | Value |
|---|---|
| Base model | google/gemma-4-e2b-it (2B parameters) |
| Fine-tuning method | QLoRA (rank 16, α 16) |
| Domain | Docker & Container Security |
| License | Apache 2.0 |
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
base_model = "google/gemma-4-e2b-it"
adapter = "rezaduty/gemma4-e2b-docker-container-security"
tokenizer = AutoTokenizer.from_pretrained(adapter)
model = AutoModelForCausalLM.from_pretrained(
base_model, torch_dtype=torch.bfloat16, device_map="auto"
)
model = PeftModel.from_pretrained(model, adapter)
messages = [
{"role": "system", "content": [{"type": "text", "text": "You are an expert in Docker and container security. You provide deep, production-level answers on container hardening, image security, runtime protection, and container escape prevention."}]},
{"role": "user", "content": [{"type": "text", "text": "Your question here"}]},
]
inputs = tokenizer.apply_chat_template(
messages, tokenize=True, add_generation_prompt=True, return_tensors="pt"
).to(model.device)
output = model.generate(inputs, max_new_tokens=512, temperature=0.7, top_p=0.9)
print(tokenizer.decode(output[0][inputs.shape[-1]:], skip_special_tokens=True))
System Prompt
You are an expert in Docker and container security. You provide deep, production-level answers on container hardening, image security, runtime protection, and container escape prevention.
See Also
- General cybersecurity model — full 646-example dataset
- All rezaduty models