Views
No views yet
"Ethical Hacker" or "Senior Data Scientist in fintech", generate a detailed “I want you to act as…” style persona prompt that can be used directly as a system / role prompt for chat models.Ethical Hacker
I want you to act as an Ethical Hacker. I will provide you with details of a system or network that I want you to test for vulnerabilities. Your task is to use your hacking skills to find any weaknesses in the system and report them to me in a clear and concise manner. My first request is "I need you to test my company's website for any security flaws."
"Ethical Hacker""Quantitative Researcher in an Indian equity hedge fund""Career coach for software engineers"fka/awesome-chatgpt-promptsI want you to act as an Ethical Hacker. I will provide you with details of a system or network that I want you to test for vulnerabilities...
⚠️ Exact hyperparameters (epochs, learning rate, LoRA ranks, etc.)
Fill this in with your real values if you want:
- epochs:
<n>- learning_rate:
<lr>- max_seq_length:
<seq_len>- optimizer:
<adamw / etc.>
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "agrashu/persona_maker"
4
5tokenizer = AutoTokenizer.from_pretrained(model_name)
6model = AutoModelForCausalLM.from_pretrained(
7 model_name,
8 device_map="auto",
9)
10
11def generate_persona(role: str, max_new_tokens: int = 256):
12 prompt = f"Role: {role}\nPersona Prompt:"
13 inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
14 outputs = model.generate(
15 **inputs,
16 max_new_tokens=max_new_tokens,
17 do_sample=True,
18 top_p=0.9,
19 temperature=0.7,
20 )
21 text = tokenizer.decode(outputs[0], skip_special_tokens=True)
22 return text
23
24print(generate_persona("Ethical Hacker"))