Text Generation
English
sft
jordiclive commited on
Commit
8047f28
1 Parent(s): b15fd96

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -111,13 +111,13 @@ generation_config = GenerationConfig(
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)
 
111
 
112
 
113
  def format_system_prompt(prompt, eos_token="</s>"):
114
+ return "{}{}{}{}".format(
115
  "<|prompter|>",
116
  prompt,
117
  eos_token,
118
+ "<|assistant|>"
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)