Upload app.py
Browse files
app.py
CHANGED
|
@@ -12,51 +12,13 @@ import shutil
|
|
| 12 |
import requests
|
| 13 |
import glob
|
| 14 |
|
| 15 |
-
# Free models from OpenRouter
|
| 16 |
FREE_MODELS = [
|
| 17 |
-
# Top-tier (heavily rate-limited)
|
| 18 |
-
"meta-llama/llama-3.1-405b-instruct:free", # 405B - Top-tier reasoning, multilingual
|
| 19 |
-
"nousresearch/hermes-3-llama-3.1-405b:free", # 405B - Creative/roleplay fine-tune
|
| 20 |
-
|
| 21 |
-
# High-capability (rate-limited)
|
| 22 |
"qwen/qwen2.5-72b-instruct:free", # 72B - Strong in coding/math/multilingual
|
| 23 |
"meta-llama/llama-3.1-70b-instruct:free", # 70B - Advanced reasoning
|
| 24 |
"mistralai/mixtral-8x7b-instruct:free", # 46.7B equiv - MoE efficient
|
| 25 |
-
"deepseek/deepseek-chat:free", # 67B - Conversational focus
|
| 26 |
-
"deepseek/deepseek-coder:free", # 33B - Coding specialist
|
| 27 |
-
|
| 28 |
-
# Mid-tier (good balance)
|
| 29 |
-
"qwen/qwen2.5-32b-instruct:free", # 32B - Detailed responses, math/coding
|
| 30 |
"google/gemma-2-27b-it:free", # 27B - Strong instruction-tuned
|
| 31 |
-
"
|
| 32 |
-
"microsoft/phi-3-medium-128k-instruct:free", # 14B - Long context
|
| 33 |
-
"mistralai/pixtral-12b-2409:free", # 12B - Multimodal (text+image)
|
| 34 |
-
|
| 35 |
-
# Efficient (7-9B)
|
| 36 |
-
"qwen/qwen2.5-7b-instruct:free", # 7B - Balanced instruct
|
| 37 |
-
"meta-llama/llama-3-8b-instruct:free", # 8B - General-purpose
|
| 38 |
-
"meta-llama/llama-3.1-8b-instruct:free", # 8B - Improved multilingual
|
| 39 |
-
"google/gemma-2-9b-it:free", # 9B - Quick capable responses
|
| 40 |
-
"microsoft/phi-3-small-128k-instruct:free", # 7B - Extended context
|
| 41 |
-
"mistralai/mistral-7b-instruct:free", # 7B - Reliable baseline
|
| 42 |
-
"nousresearch/nous-hermes-2-mixtral-8x7b-dpo:free", # 46.7B equiv - Helpful aligned
|
| 43 |
-
"cognitivecomputations/dolphin-2.9-llama3-8b:free", # 8B - Uncensored
|
| 44 |
-
"huggingfaceh4/zephyr-7b-beta:free", # 7B - Basic assistance
|
| 45 |
-
"teknium/openhermes-2.5-mistral-7b:free", # 7B - Creative
|
| 46 |
-
|
| 47 |
-
# Lightweight (3-4B)
|
| 48 |
-
"openai/gpt-4o-mini:free", # ~8B equiv - Fast, capable mini
|
| 49 |
-
"undi95/replit-code-v1.5-3b-instruct:free", # 3B - Code-focused
|
| 50 |
-
"meta-llama/llama-3.2-3b-instruct:free", # 3B - Compact text gen
|
| 51 |
-
"qwen/qwen2.5-3b-instruct:free", # 3B - Quick responses
|
| 52 |
-
"sophosympatheia/nemotron-mini-4b-instruct:free", # 4B - Entry-level
|
| 53 |
-
"microsoft/phi-3-mini-128k-instruct:free", # 3.8B - Long context
|
| 54 |
-
"microsoft/phi-3-mini-4k-instruct:free", # 3.8B - Standard
|
| 55 |
-
|
| 56 |
-
# Ultra-light (0.5-1.5B)
|
| 57 |
-
"qwen/qwen2.5-1.5b-instruct:free", # 1.5B - Lightweight apps
|
| 58 |
-
"meta-llama/llama-3.2-1b-instruct:free", # 1B - Ultra-light multimodal
|
| 59 |
-
"qwen/qwen2.5-0.5b-instruct:free", # 0.5B - Minimalist
|
| 60 |
]
|
| 61 |
|
| 62 |
|
|
@@ -661,7 +623,7 @@ with gr.Blocks(title="OpenEvolve Prompt Optimizer", theme=gr.themes.Soft()) as d
|
|
| 661 |
choices=FREE_MODELS,
|
| 662 |
value=FREE_MODELS[0],
|
| 663 |
label="Select Model",
|
| 664 |
-
info="Choose from
|
| 665 |
)
|
| 666 |
|
| 667 |
dataset_name = gr.Textbox(
|
|
@@ -749,7 +711,7 @@ with gr.Blocks(title="OpenEvolve Prompt Optimizer", theme=gr.themes.Soft()) as d
|
|
| 749 |
3. **Configure Your Optimization**:
|
| 750 |
- Dataset: Use full name format (e.g., `stanfordnlp/imdb` or `openai/gsm8k`)
|
| 751 |
- Fields: Specify exact field names from the dataset schema
|
| 752 |
-
- Model: Choose from
|
| 753 |
4. **Run & Monitor**:
|
| 754 |
- All inputs are validated before starting
|
| 755 |
- Evolution takes 5-15 minutes (10 iterations, 100 samples per evaluation)
|
|
|
|
| 12 |
import requests
|
| 13 |
import glob
|
| 14 |
|
| 15 |
+
# Free models from OpenRouter - Curated selection
|
| 16 |
FREE_MODELS = [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
"qwen/qwen2.5-72b-instruct:free", # 72B - Strong in coding/math/multilingual
|
| 18 |
"meta-llama/llama-3.1-70b-instruct:free", # 70B - Advanced reasoning
|
| 19 |
"mistralai/mixtral-8x7b-instruct:free", # 46.7B equiv - MoE efficient
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
"google/gemma-2-27b-it:free", # 27B - Strong instruction-tuned
|
| 21 |
+
"deepseek/deepseek-coder:free", # 33B - Coding specialist
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
]
|
| 23 |
|
| 24 |
|
|
|
|
| 623 |
choices=FREE_MODELS,
|
| 624 |
value=FREE_MODELS[0],
|
| 625 |
label="Select Model",
|
| 626 |
+
info="Choose from 5 curated free models on OpenRouter (27B to 72B parameters)"
|
| 627 |
)
|
| 628 |
|
| 629 |
dataset_name = gr.Textbox(
|
|
|
|
| 711 |
3. **Configure Your Optimization**:
|
| 712 |
- Dataset: Use full name format (e.g., `stanfordnlp/imdb` or `openai/gsm8k`)
|
| 713 |
- Fields: Specify exact field names from the dataset schema
|
| 714 |
+
- Model: Choose from 5 curated free models (larger models = better results but slower/rate-limited)
|
| 715 |
4. **Run & Monitor**:
|
| 716 |
- All inputs are validated before starting
|
| 717 |
- Evolution takes 5-15 minutes (10 iterations, 100 samples per evaluation)
|