OlivierDehaene commited on
Commit
7de6f28
1 Parent(s): 92d16eb

turn oasst back on

Browse files
Files changed (1) hide show
  1. app.py +14 -15
app.py CHANGED
@@ -13,7 +13,7 @@ openchat_preprompt = (
13
 
14
 
15
  def get_client(model: str):
16
- if model == "Rallio67/joi2_20B_instruct_alpha":
17
  return Client(os.getenv("JOI_API_URL"))
18
  if model == "togethercomputer/GPT-NeoXT-Chat-Base-20B":
19
  return Client(os.getenv("OPENCHAT_API_URL"))
@@ -27,8 +27,8 @@ def get_usernames(model: str):
27
  """
28
  if model == "OpenAssistant/oasst-sft-1-pythia-12b":
29
  return "", "<|prompter|", "<|assistant|>", "<|endoftext|>"
30
- if model == "Rallio67/joi2_20B_instruct_alpha":
31
- return "", "User: ", "Joi2: ", "\n\n"
32
  if model == "togethercomputer/GPT-NeoXT-Chat-Base-20B":
33
  return openchat_preprompt, "<human>: ", "<bot>: ", "\n"
34
  return "", "User: ", "Assistant: ", "\n"
@@ -185,11 +185,11 @@ with gr.Blocks(
185
  gr.HTML(title)
186
  with gr.Column(elem_id="col_container"):
187
  model = gr.Radio(
188
- value="Rallio67/joi2_20B_instruct_alpha",
189
  choices=[
190
- # "OpenAssistant/oasst-sft-1-pythia-12b",
191
  # "togethercomputer/GPT-NeoXT-Chat-Base-20B",
192
- "Rallio67/joi2_20B_instruct_alpha",
193
  "google/flan-t5-xxl",
194
  "google/flan-ul2",
195
  "bigscience/bloom",
@@ -216,34 +216,33 @@ with gr.Blocks(
216
  step=0.05,
217
  interactive=True,
218
  label="Typical P mass",
219
- visible=False
220
  )
221
  top_p = gr.Slider(
222
  minimum=-0,
223
  maximum=1.0,
224
- value=0.95,
225
  step=0.05,
226
  interactive=True,
227
  label="Top-p (nucleus sampling)",
228
- visible=True,
229
  )
230
  temperature = gr.Slider(
231
  minimum=-0,
232
  maximum=5.0,
233
- value=0.5,
234
  step=0.1,
235
  interactive=True,
236
  label="Temperature",
237
- visible=True,
238
  )
239
  top_k = gr.Slider(
240
  minimum=1,
241
  maximum=50,
242
- value=4,
243
  step=1,
244
  interactive=True,
245
  label="Top-k",
246
- visible=True,
247
  )
248
  repetition_penalty = gr.Slider(
249
  minimum=0.1,
@@ -252,9 +251,9 @@ with gr.Blocks(
252
  step=0.01,
253
  interactive=True,
254
  label="Repetition Penalty",
255
- visible=True,
256
  )
257
- watermark = gr.Checkbox(value=True, label="Text watermarking")
258
 
259
  model.change(
260
  lambda value: radio_on_change(
 
13
 
14
 
15
  def get_client(model: str):
16
+ if model == "Rallio67/joi2_20Be_instruct_alpha":
17
  return Client(os.getenv("JOI_API_URL"))
18
  if model == "togethercomputer/GPT-NeoXT-Chat-Base-20B":
19
  return Client(os.getenv("OPENCHAT_API_URL"))
 
27
  """
28
  if model == "OpenAssistant/oasst-sft-1-pythia-12b":
29
  return "", "<|prompter|", "<|assistant|>", "<|endoftext|>"
30
+ if model == "Rallio67/joi2_20Be_instruct_alpha":
31
+ return "", "User: ", "Joi: ", "\n\n"
32
  if model == "togethercomputer/GPT-NeoXT-Chat-Base-20B":
33
  return openchat_preprompt, "<human>: ", "<bot>: ", "\n"
34
  return "", "User: ", "Assistant: ", "\n"
 
185
  gr.HTML(title)
186
  with gr.Column(elem_id="col_container"):
187
  model = gr.Radio(
188
+ value="OpenAssistant/oasst-sft-1-pythia-12b",
189
  choices=[
190
+ "OpenAssistant/oasst-sft-1-pythia-12b",
191
  # "togethercomputer/GPT-NeoXT-Chat-Base-20B",
192
+ "Rallio67/joi2_20Be_instruct_alpha",
193
  "google/flan-t5-xxl",
194
  "google/flan-ul2",
195
  "bigscience/bloom",
 
216
  step=0.05,
217
  interactive=True,
218
  label="Typical P mass",
 
219
  )
220
  top_p = gr.Slider(
221
  minimum=-0,
222
  maximum=1.0,
223
+ value=0.25,
224
  step=0.05,
225
  interactive=True,
226
  label="Top-p (nucleus sampling)",
227
+ visible=False,
228
  )
229
  temperature = gr.Slider(
230
  minimum=-0,
231
  maximum=5.0,
232
+ value=0.6,
233
  step=0.1,
234
  interactive=True,
235
  label="Temperature",
236
+ visible=False,
237
  )
238
  top_k = gr.Slider(
239
  minimum=1,
240
  maximum=50,
241
+ value=50,
242
  step=1,
243
  interactive=True,
244
  label="Top-k",
245
+ visible=False,
246
  )
247
  repetition_penalty = gr.Slider(
248
  minimum=0.1,
 
251
  step=0.01,
252
  interactive=True,
253
  label="Repetition Penalty",
254
+ visible=False,
255
  )
256
+ watermark = gr.Checkbox(value=False, label="Text watermarking")
257
 
258
  model.change(
259
  lambda value: radio_on_change(