pseudotensor commited on
Commit
c3931e9
1 Parent(s): 9aa08b9

Update with h2oGPT hash 2cf0e36c0a86f41add0929b2c9217bfe480ffb58

Browse files
Files changed (3) hide show
  1. generate.py +2 -2
  2. gradio_runner.py +12 -10
  3. utils.py +2 -0
generate.py CHANGED
@@ -110,7 +110,7 @@ def main(
110
  :param temperature: generation temperature
111
  :param top_p: generation top_p
112
  :param top_k: generation top_k
113
- :param num_beams: generatino number of beams
114
  :param repetition_penalty: generation repetition penalty
115
  :param num_return_sequences: generation number of sequences (1 forced for chat)
116
  :param do_sample: generation sample
@@ -146,7 +146,7 @@ def main(
146
  :param sanitize_user_prompt: whether to remove profanity from user input
147
  :param sanitize_bot_response: whether to remove profanity and repeat lines from bot output
148
  :param extra_model_options: extra models to show in list in gradio
149
- :param extra_lora_options: extra LORAA to show in list in gradio
150
  :param score_model: which model to score responses (None means no scoring)
151
  :param auto_score: whether to automatically score responses
152
  :param eval_sharegpt_prompts_only: for no gradio benchmark, if using ShareGPT prompts for eval
 
110
  :param temperature: generation temperature
111
  :param top_p: generation top_p
112
  :param top_k: generation top_k
113
+ :param num_beams: generation number of beams
114
  :param repetition_penalty: generation repetition penalty
115
  :param num_return_sequences: generation number of sequences (1 forced for chat)
116
  :param do_sample: generation sample
 
146
  :param sanitize_user_prompt: whether to remove profanity from user input
147
  :param sanitize_bot_response: whether to remove profanity and repeat lines from bot output
148
  :param extra_model_options: extra models to show in list in gradio
149
+ :param extra_lora_options: extra LORA to show in list in gradio
150
  :param score_model: which model to score responses (None means no scoring)
151
  :param auto_score: whether to automatically score responses
152
  :param eval_sharegpt_prompts_only: for no gradio benchmark, if using ShareGPT prompts for eval
gradio_runner.py CHANGED
@@ -48,16 +48,8 @@ def go_gradio(**kwargs):
48
  Hash: {get_githash()}
49
  """
50
  else:
51
- description = "For more information, visit our GitHub pages: [h2oGPT](https://github.com/h2oai/h2ogpt) and [H2O LLM Studio](https://github.com/h2oai/h2o-llmstudio).<br>"
52
- if is_public:
53
- description += "If this host is busy, try [gpt.h2o.ai 20B](https://gpt.h2o.ai) and [HF Spaces1 12B](https://huggingface.co/spaces/h2oai/h2ogpt-chatbot) and [HF Spaces2 12B](https://huggingface.co/spaces/h2oai/h2ogpt-chatbot2)<br>"
54
- description += """<p><b> DISCLAIMERS: </b><ul><i><li>The model was trained on The Pile and other data, which may contain objectionable content. Use at own risk.</i></li>"""
55
- if kwargs['load_8bit']:
56
- description += """<i><li> Model is loaded in 8-bit and has other restrictions on this host. UX can be worse than non-hosted version.</i></li>"""
57
- description += """<i><li>Conversations may be used to improve h2oGPT. Do not share sensitive information.</i></li>"""
58
- if 'h2ogpt-research' in kwargs['base_model']:
59
- description += """<i><li>Research demonstration only, not used for commercial purposes.</i></li>"""
60
- description += """<i><li>By using h2oGPT, you accept our [Terms of Service](https://github.com/h2oai/h2ogpt/blob/main/tos.md).</i></li></ul></p>"""
61
 
62
  if kwargs['verbose']:
63
  task_info_md = f"""
@@ -371,6 +363,16 @@ def go_gradio(**kwargs):
371
  with gr.Row():
372
  s3up_btn = gr.Button("S3UP")
373
  s3up_text = gr.Textbox(label='S3UP result', interactive=False)
 
 
 
 
 
 
 
 
 
 
374
 
375
  # Get flagged data
376
  zip_data1 = functools.partial(zip_data, root_dirs=['flagged_data_points', kwargs['save_dir']])
 
48
  Hash: {get_githash()}
49
  """
50
  else:
51
+ description = "For more information, visit our GitHub pages: [h2oGPT](https://github.com/h2oai/h2ogpt) and [H2O LLM Studio](https://github.com/h2oai/h2o-llmstudio)<br>"
52
+ description += """<p>By using h2oGPT, you accept our [Terms of Service](https://github.com/h2oai/h2ogpt/blob/main/tos.md)</p>"""
 
 
 
 
 
 
 
 
53
 
54
  if kwargs['verbose']:
55
  task_info_md = f"""
 
363
  with gr.Row():
364
  s3up_btn = gr.Button("S3UP")
365
  s3up_text = gr.Textbox(label='S3UP result', interactive=False)
366
+ with gr.TabItem("Disclaimers"):
367
+ description = ""
368
+ description += """<p><b> DISCLAIMERS: </b><ul><i><li>The model was trained on The Pile and other data, which may contain objectionable content. Use at own risk.</i></li>"""
369
+ if kwargs['load_8bit']:
370
+ description += """<i><li> Model is loaded in 8-bit and has other restrictions on this host. UX can be worse than non-hosted version.</i></li>"""
371
+ description += """<i><li>Conversations may be used to improve h2oGPT. Do not share sensitive information.</i></li>"""
372
+ if 'h2ogpt-research' in kwargs['base_model']:
373
+ description += """<i><li>Research demonstration only, not used for commercial purposes.</i></li>"""
374
+ description += """<i><li>By using h2oGPT, you accept our <a href="https://github.com/h2oai/h2ogpt/blob/main/tos.md">Terms of Service</a></i></li></ul></p>"""
375
+ gr.Markdown(value=description, show_label=False, interactive=False)
376
 
377
  # Get flagged data
378
  zip_data1 = functools.partial(zip_data, root_dirs=['flagged_data_points', kwargs['save_dir']])
utils.py CHANGED
@@ -96,6 +96,8 @@ def system_info():
96
  for k, v in gpu_memory_frac_dict.items():
97
  system[f'GPU_M/%s' % k] = v
98
 
 
 
99
  return system
100
 
101
 
 
96
  for k, v in gpu_memory_frac_dict.items():
97
  system[f'GPU_M/%s' % k] = v
98
 
99
+ system['hash'] = get_githash()
100
+
101
  return system
102
 
103