Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
support together
Browse files- app.py +77 -0
- requirements.txt +2 -1
app.py
CHANGED
@@ -10,6 +10,7 @@ import mistral_gradio
|
|
10 |
import fireworks_gradio
|
11 |
import cerebras_gradio
|
12 |
import groq_gradio
|
|
|
13 |
|
14 |
|
15 |
|
@@ -425,6 +426,82 @@ with gr.Blocks(fill_height=True) as demo:
|
|
425 |
accept_token=True, # Added token acceptance
|
426 |
fill_height=True
|
427 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
428 |
|
429 |
demo.launch(ssr_mode=False)
|
430 |
|
|
|
10 |
import fireworks_gradio
|
11 |
import cerebras_gradio
|
12 |
import groq_gradio
|
13 |
+
import together_gradio
|
14 |
|
15 |
|
16 |
|
|
|
426 |
accept_token=True, # Added token acceptance
|
427 |
fill_height=True
|
428 |
)
|
429 |
+
with gr.Tab("Together"):
|
430 |
+
with gr.Row():
|
431 |
+
together_model = gr.Dropdown(
|
432 |
+
choices=[
|
433 |
+
# Vision Models
|
434 |
+
'meta-llama/Llama-Vision-Free', # 131k context (Free)
|
435 |
+
'meta-llama/Llama-3.2-11B-Vision-Instruct-Turbo', # 131k context
|
436 |
+
'meta-llama/Llama-3.2-90B-Vision-Instruct-Turbo', # 131k context
|
437 |
+
# Meta Llama 3.x Models
|
438 |
+
'meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo', # 131k context
|
439 |
+
'meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo', # 131k context
|
440 |
+
'meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo', # 130k context
|
441 |
+
'meta-llama/Meta-Llama-3-8B-Instruct-Turbo', # 8k context
|
442 |
+
'meta-llama/Meta-Llama-3-70B-Instruct-Turbo', # 8k context
|
443 |
+
'meta-llama/Llama-3.2-3B-Instruct-Turbo', # 131k context
|
444 |
+
'meta-llama/Meta-Llama-3-8B-Instruct-Lite', # 8k context, INT4
|
445 |
+
'meta-llama/Meta-Llama-3-70B-Instruct-Lite', # 8k context, INT4
|
446 |
+
'meta-llama/Llama-3-8b-chat-hf', # 8k context
|
447 |
+
'meta-llama/Llama-3-70b-chat-hf', # 8k context
|
448 |
+
# Other Large Models
|
449 |
+
'nvidia/Llama-3.1-Nemotron-70B-Instruct-HF', # 32k context
|
450 |
+
'Qwen/Qwen2.5-Coder-32B-Instruct', # 32k context
|
451 |
+
'microsoft/WizardLM-2-8x22B', # 65k context
|
452 |
+
'google/gemma-2-27b-it', # 8k context
|
453 |
+
'google/gemma-2-9b-it', # 8k context
|
454 |
+
'databricks/dbrx-instruct', # 32k context
|
455 |
+
# Mixtral Models
|
456 |
+
'mistralai/Mixtral-8x7B-Instruct-v0.1', # 32k context
|
457 |
+
'mistralai/Mixtral-8x22B-Instruct-v0.1', # 65k context
|
458 |
+
# Qwen Models
|
459 |
+
'Qwen/Qwen2.5-7B-Instruct-Turbo', # 32k context
|
460 |
+
'Qwen/Qwen2.5-72B-Instruct-Turbo', # 32k context
|
461 |
+
'Qwen/Qwen2-72B-Instruct', # 32k context
|
462 |
+
# Other Models
|
463 |
+
'deepseek-ai/deepseek-llm-67b-chat', # 4k context
|
464 |
+
'google/gemma-2b-it', # 8k context
|
465 |
+
'Gryphe/MythoMax-L2-13b', # 4k context
|
466 |
+
'meta-llama/Llama-2-13b-chat-hf', # 4k context
|
467 |
+
'mistralai/Mistral-7B-Instruct-v0.1', # 8k context
|
468 |
+
'mistralai/Mistral-7B-Instruct-v0.2', # 32k context
|
469 |
+
'mistralai/Mistral-7B-Instruct-v0.3', # 32k context
|
470 |
+
'NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO', # 32k context
|
471 |
+
'togethercomputer/StripedHyena-Nous-7B', # 32k context
|
472 |
+
'upstage/SOLAR-10.7B-Instruct-v1.0' # 4k context
|
473 |
+
],
|
474 |
+
value='meta-llama/Llama-3.2-11B-Vision-Instruct-Turbo', # Default to recommended vision model
|
475 |
+
label="Select Together Model",
|
476 |
+
interactive=True
|
477 |
+
)
|
478 |
+
|
479 |
+
together_interface = gr.load(
|
480 |
+
name=together_model.value,
|
481 |
+
src=together_gradio.registry,
|
482 |
+
accept_token=True,
|
483 |
+
multimodal=True, # Added multimodal support
|
484 |
+
fill_height=True
|
485 |
+
)
|
486 |
+
|
487 |
+
def update_together_model(new_model):
|
488 |
+
return gr.load(
|
489 |
+
name=new_model,
|
490 |
+
src=together_gradio.registry,
|
491 |
+
accept_token=True,
|
492 |
+
multimodal=True, # Added multimodal support
|
493 |
+
fill_height=True
|
494 |
+
)
|
495 |
+
|
496 |
+
together_model.change(
|
497 |
+
fn=update_together_model,
|
498 |
+
inputs=[together_model],
|
499 |
+
outputs=[together_interface]
|
500 |
+
)
|
501 |
+
|
502 |
+
gr.Markdown("""
|
503 |
+
**Note:** You need a Together AI API key to use these models. Get one at [Together AI](https://www.together.ai/).
|
504 |
+
""")
|
505 |
|
506 |
demo.launch(ssr_mode=False)
|
507 |
|
requirements.txt
CHANGED
@@ -8,4 +8,5 @@ perplexity-gradio
|
|
8 |
mistral-gradio
|
9 |
git+https://github.com/AK391/fireworks-ai-gradio.git
|
10 |
git+https://github.com/gradio-app/cerebras_gradio.git
|
11 |
-
groq-gradio
|
|
|
|
8 |
mistral-gradio
|
9 |
git+https://github.com/AK391/fireworks-ai-gradio.git
|
10 |
git+https://github.com/gradio-app/cerebras_gradio.git
|
11 |
+
groq-gradio
|
12 |
+
git+https://github.com/AK391/together-gradio.git
|