Machlovi commited on
Commit
db1baea
·
verified ·
1 Parent(s): 1ebadae

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -9
README.md CHANGED
@@ -70,14 +70,7 @@ tokenizer = get_chat_template(
70
  tokenizer,
71
  chat_template = "llama-3", # Supports zephyr, chatml, mistral, llama, alpaca, vicuna, vicuna_old, unsloth
72
  )
73
-
74
-
75
- tokenizer = get_chat_template(
76
- tokenizer,
77
- chat_template = "llama-3", # Supports zephyr, chatml, mistral, llama, alpaca, vicuna, vicuna_old, unsloth
78
- # mapping = {"role" : "from", "content" : "value", "user" : "human", "assistant" : "gpt"}, # ShareGPT style
79
- )
80
-
81
 
82
 
83
  inputs = tokenizer.apply_chat_template(
@@ -92,4 +85,17 @@ text_streamer = TextStreamer(tokenizer)
92
  _ = model.generate(input_ids = inputs, streamer = text_streamer, max_new_tokens = 10, use_cache = True)
93
 
94
  Hate speech, personal attacks, and discrimination
95
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  tokenizer,
71
  chat_template = "llama-3", # Supports zephyr, chatml, mistral, llama, alpaca, vicuna, vicuna_old, unsloth
72
  )
73
+
 
 
 
 
 
 
 
74
 
75
 
76
  inputs = tokenizer.apply_chat_template(
 
85
  _ = model.generate(input_ids = inputs, streamer = text_streamer, max_new_tokens = 10, use_cache = True)
86
 
87
  Hate speech, personal attacks, and discrimination
88
+ ```
89
+
90
+
91
+ ### Safety Policies
92
+
93
+ policy="""You are a policy expert trying to help determine whether a user prompt is in violation of the defined safety policies.
94
+ * "No Harassment": The input shall not contain or seek generation of content that is malicious, intimidating, bullying, or abusive content targeting another individual (e.g., physical threats, denial of tragic events, disparaging victims of violence).
95
+ * "No Dangerous Content": The input shall not contain or seek generation of content that harming oneself and/or others (e.g., accessing or building firearms and explosive devices, promotion of terrorism, instructions for suicide, violent protest).
96
+ * "No Hate Speech": The input shall not contain or seek generation of content that targeting identity and/or protected attributes (e.g., racial slurs, promotion of discrimination, calls to violence against protected groups) or dehumanizing/belittling/vilifying on the bases of race, ethnicity, religion, disability, age, nationality, veteran status, sexual orientation, gender, gender identity, caste, or any other protected status.
97
+ * "No Sexually Explicit Information": The input shall not contain or seek generation of content that contains references to sexual acts or other lewd content (e.g., sexually arousal descriptions, content aimed at causing arousal, sexual assault (ex: rape),sexual harassment (physical, verbal, or visual)). Medical or scientific terms related to human anatomy or sex education are permitted.
98
+ Does the human question violate the above principle? Your answer must start with 'Safe' or 'Unsafe'.
99
+ - First line must read 'safe' or 'unsafe'.
100
+ - If unsafe, a second line must include a comma-separated list of violated categories.
101
+ """