rearrange layout for blog post
Browse files
app.py
CHANGED
@@ -82,6 +82,7 @@ with demo:
|
|
82 |
gpu_selector = gpu_selector_fn(["3090", "T4", "T4 *2", "A100 (80GB)"])
|
83 |
with gr.Column():
|
84 |
omit_offload = omit_offload_fn()
|
|
|
85 |
# Show plot when the gradio app is initialized
|
86 |
plot = gr.Image(value=plot_fn("A100 (80GB)", "No"))
|
87 |
gr.Markdown(
|
@@ -106,26 +107,28 @@ with demo:
|
|
106 |
with gr.TabItem("OPT: Summ"):
|
107 |
plot_fn = functools.partial(get_plot, "OPT: Summarization")
|
108 |
with gr.Row():
|
109 |
-
with gr.Column(
|
110 |
gpu_selector = gpu_selector_fn(["3090", "T4", "T4 *2", "A100 (80GB)"])
|
|
|
111 |
omit_offload = omit_offload_fn()
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
|
|
129 |
# Update plot when any of the inputs change
|
130 |
plot_inputs = [gpu_selector, omit_offload]
|
131 |
gpu_selector.change(fn=plot_fn, inputs=plot_inputs, outputs=plot)
|
@@ -133,23 +136,28 @@ with demo:
|
|
133 |
with gr.TabItem("Whisper: ARS"):
|
134 |
plot_fn = functools.partial(get_plot, "Whisper: ARS")
|
135 |
with gr.Row():
|
136 |
-
with gr.Column(
|
137 |
gpu_selector = gpu_selector_fn(["3090", "T4"])
|
|
|
138 |
omit_offload = omit_offload_fn()
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
|
|
|
|
|
|
|
|
153 |
# Update plot when any of the inputs change
|
154 |
plot_inputs = [gpu_selector, omit_offload]
|
155 |
gpu_selector.change(fn=plot_fn, inputs=plot_inputs, outputs=plot)
|
@@ -157,25 +165,27 @@ with demo:
|
|
157 |
with gr.TabItem("CodeGen: Code"):
|
158 |
plot_fn = functools.partial(get_plot, "CodeGen: Code Generation")
|
159 |
with gr.Row():
|
160 |
-
with gr.Column(
|
161 |
gpu_selector = gpu_selector_fn(["3090", "T4", "T4 *2", "A100 (80GB)"])
|
|
|
162 |
omit_offload = omit_offload_fn()
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
|
|
179 |
# Update plot when any of the inputs change
|
180 |
plot_inputs = [gpu_selector, omit_offload]
|
181 |
gpu_selector.change(fn=plot_fn, inputs=plot_inputs, outputs=plot)
|
@@ -183,26 +193,28 @@ with demo:
|
|
183 |
with gr.TabItem("Flan-T5: Summ"):
|
184 |
plot_fn = functools.partial(get_plot, "Flan-T5: Summarization")
|
185 |
with gr.Row():
|
186 |
-
with gr.Column(
|
187 |
gpu_selector = gpu_selector_fn(["3090", "T4", "T4 *2", "A100 (80GB)"])
|
|
|
188 |
omit_offload = omit_offload_fn()
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
|
|
206 |
# Update plot when any of the inputs change
|
207 |
plot_inputs = [gpu_selector, omit_offload]
|
208 |
gpu_selector.change(fn=plot_fn, inputs=plot_inputs, outputs=plot)
|
|
|
82 |
gpu_selector = gpu_selector_fn(["3090", "T4", "T4 *2", "A100 (80GB)"])
|
83 |
with gr.Column():
|
84 |
omit_offload = omit_offload_fn()
|
85 |
+
|
86 |
# Show plot when the gradio app is initialized
|
87 |
plot = gr.Image(value=plot_fn("A100 (80GB)", "No"))
|
88 |
gr.Markdown(
|
|
|
107 |
with gr.TabItem("OPT: Summ"):
|
108 |
plot_fn = functools.partial(get_plot, "OPT: Summarization")
|
109 |
with gr.Row():
|
110 |
+
with gr.Column():
|
111 |
gpu_selector = gpu_selector_fn(["3090", "T4", "T4 *2", "A100 (80GB)"])
|
112 |
+
with gr.Column():
|
113 |
omit_offload = omit_offload_fn()
|
114 |
+
|
115 |
+
# Show plot when the gradio app is initialized
|
116 |
+
plot = gr.Image(value=plot_fn("A100 (80GB)", "No"))
|
117 |
+
gr.Markdown(
|
118 |
+
"""
|
119 |
+
### Assistant Model
|
120 |
+
- `facebook/opt-125m`
|
121 |
+
|
122 |
+
### Model Names:
|
123 |
+
- 1.3B: `facebook/opt-1.3b`
|
124 |
+
- 6.7B: `facebook/opt-6.7b`
|
125 |
+
- 30B: `facebook/opt-30b`
|
126 |
+
- 66B: `facebook/opt-66b`
|
127 |
+
|
128 |
+
### Dataset used as input prompt:
|
129 |
+
- CNN Dailymail (3.0.0, validation set)
|
130 |
+
"""
|
131 |
+
)
|
132 |
# Update plot when any of the inputs change
|
133 |
plot_inputs = [gpu_selector, omit_offload]
|
134 |
gpu_selector.change(fn=plot_fn, inputs=plot_inputs, outputs=plot)
|
|
|
136 |
with gr.TabItem("Whisper: ARS"):
|
137 |
plot_fn = functools.partial(get_plot, "Whisper: ARS")
|
138 |
with gr.Row():
|
139 |
+
with gr.Column():
|
140 |
gpu_selector = gpu_selector_fn(["3090", "T4"])
|
141 |
+
with gr.Column():
|
142 |
omit_offload = omit_offload_fn()
|
143 |
+
|
144 |
+
# Show plot when the gradio app is initialized
|
145 |
+
plot = gr.Image(value=plot_fn("T4", "No"))
|
146 |
+
gr.Markdown(
|
147 |
+
"""
|
148 |
+
### Assistant Model
|
149 |
+
- `openai/whisper-tiny`
|
150 |
+
|
151 |
+
### Model Names:
|
152 |
+
- large-v2: `openai/whisper-large-v2`
|
153 |
+
|
154 |
+
### Dataset used as input prompt:
|
155 |
+
- Librispeech ARS (clean, validation set)
|
156 |
+
|
157 |
+
|
158 |
+
|
159 |
+
"""
|
160 |
+
)
|
161 |
# Update plot when any of the inputs change
|
162 |
plot_inputs = [gpu_selector, omit_offload]
|
163 |
gpu_selector.change(fn=plot_fn, inputs=plot_inputs, outputs=plot)
|
|
|
165 |
with gr.TabItem("CodeGen: Code"):
|
166 |
plot_fn = functools.partial(get_plot, "CodeGen: Code Generation")
|
167 |
with gr.Row():
|
168 |
+
with gr.Column():
|
169 |
gpu_selector = gpu_selector_fn(["3090", "T4", "T4 *2", "A100 (80GB)"])
|
170 |
+
with gr.Column():
|
171 |
omit_offload = omit_offload_fn()
|
172 |
+
# Show plot when the gradio app is initialized
|
173 |
+
plot = gr.Image(value=plot_fn("A100 (80GB)", "No"))
|
174 |
+
gr.Markdown(
|
175 |
+
"""
|
176 |
+
### Assistant Model
|
177 |
+
- `Salesforce/codegen-350M-mono`
|
178 |
+
|
179 |
+
### Model Names:
|
180 |
+
- 2B: `Salesforce/codegen-2B-mono`
|
181 |
+
- 6B: `Salesforce/codegen-6B-mono`
|
182 |
+
- 16B: `Salesforce/codegen-16B-mono`
|
183 |
+
|
184 |
+
### Dataset used as input prompt:
|
185 |
+
- The Stack (python)
|
186 |
+
|
187 |
+
"""
|
188 |
+
)
|
189 |
# Update plot when any of the inputs change
|
190 |
plot_inputs = [gpu_selector, omit_offload]
|
191 |
gpu_selector.change(fn=plot_fn, inputs=plot_inputs, outputs=plot)
|
|
|
193 |
with gr.TabItem("Flan-T5: Summ"):
|
194 |
plot_fn = functools.partial(get_plot, "Flan-T5: Summarization")
|
195 |
with gr.Row():
|
196 |
+
with gr.Column():
|
197 |
gpu_selector = gpu_selector_fn(["3090", "T4", "T4 *2", "A100 (80GB)"])
|
198 |
+
with gr.Column():
|
199 |
omit_offload = omit_offload_fn()
|
200 |
+
|
201 |
+
# Show plot when the gradio app is initialized
|
202 |
+
plot = gr.Image(value=plot_fn("A100 (80GB)", "No"))
|
203 |
+
gr.Markdown(
|
204 |
+
"""
|
205 |
+
### Assistant Model
|
206 |
+
- `google/flan-t5-small`
|
207 |
+
|
208 |
+
### Model Names:
|
209 |
+
- large: `google/flan-t5-large`
|
210 |
+
- xl: `google/flan-t5-xl`
|
211 |
+
- xxl: `google/flan-t5-xxl`
|
212 |
+
- ul2: `google/flan-ul2`
|
213 |
+
|
214 |
+
### Dataset used as input prompt:
|
215 |
+
- CNN Dailymail (3.0.0, validation set)
|
216 |
+
"""
|
217 |
+
)
|
218 |
# Update plot when any of the inputs change
|
219 |
plot_inputs = [gpu_selector, omit_offload]
|
220 |
gpu_selector.change(fn=plot_fn, inputs=plot_inputs, outputs=plot)
|