fywalter commited on
Commit
81bed86
1 Parent(s): 8c82e12

change layout and readme

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. constant.py +1 -1
app.py CHANGED
@@ -105,8 +105,8 @@ with gr.Blocks(gr.themes.Soft(), js=js_code_label, css=custom_css) as demo:
105
  stop_btn = gr.Button("Stop")
106
  clear_btn = gr.Button("Clear")
107
  with gr.Row():
108
- chat_a = gr.Chatbot(height=500, label="Nudging Answer", elem_id="chatbot")
109
  chat_b = gr.Chatbot(height=500, label="Base Answer")
 
110
 
111
  base_model_choice.value = "Llama-2-70B"
112
  nudging_model_choice.value = "Llama-2-13B-chat"
 
105
  stop_btn = gr.Button("Stop")
106
  clear_btn = gr.Button("Clear")
107
  with gr.Row():
 
108
  chat_b = gr.Chatbot(height=500, label="Base Answer")
109
+ chat_a = gr.Chatbot(height=500, label="Nudging Answer", elem_id="chatbot")
110
 
111
  base_model_choice.value = "Llama-2-70B"
112
  nudging_model_choice.value = "Llama-2-13B-chat"
constant.py CHANGED
@@ -4,7 +4,7 @@ HEADER_MD = """# Inference-time Alignment with Nudging.
4
  **By injecting a few nudging tokens at inference time, we can make base models able to follow user instructions helpfully and safely.**
5
  - Our demo is powered by the [Together AI API](https://api.together.ai/). However, since only three base models are currently still available in the serverless API, we only choose three base models and nudging models for demonstration.
6
  - The daily limit is 50 requests per IP address. If you need more, please contact us.
7
-
8
  """
9
 
10
  js_code_label = """
 
4
  **By injecting a few nudging tokens at inference time, we can make base models able to follow user instructions helpfully and safely.**
5
  - Our demo is powered by the [Together AI API](https://api.together.ai/). However, since only three base models are currently still available in the serverless API, we only choose three base models and nudging models for demonstration.
6
  - The daily limit is 50 requests per IP address. If you need more, please contact us.
7
+ - This demo uses an API-based implementation of the nudging, which can be slow due to multiple API calls for each question. With a proper speculative decoding type implementation, the inference speed of nudging can be significantly improved.
8
  """
9
 
10
  js_code_label = """