Text Generation
English
sft
jordiclive commited on
Commit
13443d6
1 Parent(s): 6c62f3c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -1
README.md CHANGED
@@ -110,14 +110,17 @@ generation_config = GenerationConfig(
110
  )
111
 
112
 
 
113
  def format_system_prompt(prompt, eos_token="</s>"):
114
- return "{}{}{}".format(
115
  "<|prompter|>",
116
  prompt,
117
  eos_token,
 
118
  )
119
 
120
 
 
121
  def generate(prompt, generation_config=generation_config, max_new_tokens=2048, device=device):
122
  prompt = format_system_prompt(prompt) # OpenAssistant Prompt Format expected
123
  input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(device)
 
110
  )
111
 
112
 
113
+
114
  def format_system_prompt(prompt, eos_token="</s>"):
115
+ return "{}{}{}{}".format(
116
  "<|prompter|>",
117
  prompt,
118
  eos_token,
119
+ "<|assistant|>"
120
  )
121
 
122
 
123
+
124
  def generate(prompt, generation_config=generation_config, max_new_tokens=2048, device=device):
125
  prompt = format_system_prompt(prompt) # OpenAssistant Prompt Format expected
126
  input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(device)