Adrien Banse
commited on
Commit
·
5d2d2fe
1
Parent(s):
cf1a94c
fix: tokens
Browse files
app.py
CHANGED
@@ -279,7 +279,7 @@ with gr.Blocks(css=custom_css) as demo:
|
|
279 |
input_model_active_params.input(fn=custom, outputs=[model])
|
280 |
input_model_total_params.input(fn=custom, outputs=[model])
|
281 |
|
282 |
-
|
283 |
label="Output tokens",
|
284 |
value=100
|
285 |
)
|
@@ -318,7 +318,7 @@ with gr.Blocks(css=custom_css) as demo:
|
|
318 |
@gr.render(inputs=[
|
319 |
input_model_active_params,
|
320 |
input_model_total_params,
|
321 |
-
|
322 |
input_mix_gwp,
|
323 |
input_mix_adpe,
|
324 |
input_mix_pe
|
@@ -326,7 +326,7 @@ with gr.Blocks(css=custom_css) as demo:
|
|
326 |
def render_expert(
|
327 |
model_active_params,
|
328 |
model_total_params,
|
329 |
-
|
330 |
mix_gwp,
|
331 |
mix_adpe,
|
332 |
mix_pe
|
@@ -334,7 +334,7 @@ with gr.Blocks(css=custom_css) as demo:
|
|
334 |
impacts = compute_llm_impacts_expert(
|
335 |
model_active_parameter_count=model_active_params,
|
336 |
model_total_parameter_count=model_total_params,
|
337 |
-
output_token_count=
|
338 |
request_latency=100000,
|
339 |
if_electricity_mix_gwp=mix_gwp,
|
340 |
if_electricity_mix_adpe=mix_adpe,
|
|
|
279 |
input_model_active_params.input(fn=custom, outputs=[model])
|
280 |
input_model_total_params.input(fn=custom, outputs=[model])
|
281 |
|
282 |
+
input_tokens = gr.Number(
|
283 |
label="Output tokens",
|
284 |
value=100
|
285 |
)
|
|
|
318 |
@gr.render(inputs=[
|
319 |
input_model_active_params,
|
320 |
input_model_total_params,
|
321 |
+
input_tokens,
|
322 |
input_mix_gwp,
|
323 |
input_mix_adpe,
|
324 |
input_mix_pe
|
|
|
326 |
def render_expert(
|
327 |
model_active_params,
|
328 |
model_total_params,
|
329 |
+
tokens,
|
330 |
mix_gwp,
|
331 |
mix_adpe,
|
332 |
mix_pe
|
|
|
334 |
impacts = compute_llm_impacts_expert(
|
335 |
model_active_parameter_count=model_active_params,
|
336 |
model_total_parameter_count=model_total_params,
|
337 |
+
output_token_count=tokens,
|
338 |
request_latency=100000,
|
339 |
if_electricity_mix_gwp=mix_gwp,
|
340 |
if_electricity_mix_adpe=mix_adpe,
|