gsarti commited on
Commit
cd7e21b
β€’
1 Parent(s): 7c57fe0

Minor fixes to presets

Browse files
Files changed (2) hide show
  1. app.py +1 -0
  2. presets.py +6 -5
app.py CHANGED
@@ -673,6 +673,7 @@ with gr.Blocks(css=custom_css) as demo:
673
  outputs=[
674
  model_name_or_path,
675
  input_template,
 
676
  contextless_input_template,
677
  special_tokens_to_keep,
678
  generation_kwargs,
 
673
  outputs=[
674
  model_name_or_path,
675
  input_template,
676
+ decoder_input_output_separator,
677
  contextless_input_template,
678
  special_tokens_to_keep,
679
  generation_kwargs,
presets.py CHANGED
@@ -77,17 +77,18 @@ def set_towerinstruct_preset():
77
  def set_gemma_preset():
78
  return (
79
  "google/gemma-2b-it", # model_name_or_path
80
- "<start_of_turn>user\n{context}\n{current}<end_of_turn>\n<start_of_turn>model\n", # input_template
81
- "<start_of_turn>user\n{current}<end_of_turn>\n<start_of_turn>model\n", # input_current_text_template
 
82
  ["<start_of_turn>", "<end_of_turn>"], # special_tokens_to_keep
83
  '{\n\t"max_new_tokens": 50\n}', # generation_kwargs
84
  )
85
 
86
  def set_mistral_instruct_preset():
87
  return (
88
- "mistralai/Mistral-7B-Instruct-v0.2" # model_name_or_path
89
- "[INST]{context}\n{current}[/INST]" # input_template
90
- "[INST]{current}[/INST]" # input_current_text_template
91
  '{\n\t"max_new_tokens": 50\n}', # generation_kwargs
92
  )
93
 
 
77
  def set_gemma_preset():
78
  return (
79
  "google/gemma-2b-it", # model_name_or_path
80
+ "<start_of_turn>user\n{context}\n{current}<end_of_turn>\n<start_of_turn>model", # input_template
81
+ "\n", # decoder_input_output_separator
82
+ "<start_of_turn>user\n{current}<end_of_turn>\n<start_of_turn>model", # input_current_text_template
83
  ["<start_of_turn>", "<end_of_turn>"], # special_tokens_to_keep
84
  '{\n\t"max_new_tokens": 50\n}', # generation_kwargs
85
  )
86
 
87
  def set_mistral_instruct_preset():
88
  return (
89
+ "mistralai/Mistral-7B-Instruct-v0.2", # model_name_or_path
90
+ "[INST]{context}\n{current}[/INST]", # input_template
91
+ "[INST]{current}[/INST]", # input_current_text_template
92
  '{\n\t"max_new_tokens": 50\n}', # generation_kwargs
93
  )
94