Views
No views yet
| Property | Value |
|---|---|
| Base model | google/gemma-4-e2b-it (2B parameters) |
| Fine-tuning method | QLoRA (rank 16, α 16) |
| Domain | macOS Privilege Escalation |
| Dataset | rezaduty/cybersecurity-qa-v2 |
| License | Apache 2.0 |
1from transformers import AutoTokenizer, AutoModelForCausalLM
2from peft import PeftModel
3import torch
4
5base_model = "google/gemma-4-e2b-it"
6adapter = "rezaduty/gemma4-e2b-privesc-macos"
7
8tokenizer = AutoTokenizer.from_pretrained(adapter)
9model = AutoModelForCausalLM.from_pretrained(
10 base_model, torch_dtype=torch.bfloat16, device_map="auto"
11)
12model = PeftModel.from_pretrained(model, adapter)
13
14messages = [
15 {"role": "system", "content": [{"type": "text", "text": "You are an expert in macOS privilege escalation and security. Provide deep technical answers on macOS privesc techniques, TCC bypass, SIP, macOS security internals, and hardening with specific commands, tool names, and CVE references."}]},
16 {"role": "user", "content": [{"type": "text", "text": "Your question here"}]},
17]
18inputs = tokenizer.apply_chat_template(
19 messages, tokenize=True, add_generation_prompt=True, return_tensors="pt"
20).to(model.device)
21output = model.generate(inputs, max_new_tokens=512, temperature=0.7, top_p=0.9)
22print(tokenizer.decode(output[0][inputs.shape[-1]:], skip_special_tokens=True))You are an expert in macOS privilege escalation and security. Provide deep technical answers on macOS privesc techniques, TCC bypass, SIP, macOS security internals, and hardening with specific commands, tool names, and CVE references.