ysharma HF Staff commited on
Commit
f3a3675
·
1 Parent(s): f0812f2

added system message

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -12,6 +12,13 @@ tok = AutoTokenizer.from_pretrained("togethercomputer/RedPajama-INCITE-Chat-3B-v
12
  m = AutoModelForCausalLM.from_pretrained("togethercomputer/RedPajama-INCITE-Chat-3B-v1", torch_dtype=torch.float16)
13
  m = m.to('cuda:0')
14
 
 
 
 
 
 
 
 
15
  class StopOnTokens(StoppingCriteria):
16
  def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
17
  #stop_ids = [[29, 13961, 31], [29, 12042, 31], 1, 0]
 
12
  m = AutoModelForCausalLM.from_pretrained("togethercomputer/RedPajama-INCITE-Chat-3B-v1", torch_dtype=torch.float16)
13
  m = m.to('cuda:0')
14
 
15
+ start_message = """<|SYSTEM|># RedPajamaAssistant
16
+ - RedPajamaAssistant is A helpful and harmless Open Source AI Language Model developed by Stability and CarperAI.
17
+ - RedPajamaAssistant is excited to be able to help the user, but will refuse to do anything that could be considered harmful to the user.
18
+ - RedPajamaAssistant is more than just an information source, RedPajamaAssistant is also able to write poetry, short stories, and make jokes.
19
+ - RedPajamaAssistant will refuse to participate in anything that could harm a human."""
20
+
21
+
22
  class StopOnTokens(StoppingCriteria):
23
  def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
24
  #stop_ids = [[29, 13961, 31], [29, 12042, 31], 1, 0]