Skip to content

Commit 795722c

Browse files
committed
Merge remote-tracking branch 'origin/main' into fb_improve-dataset-generation
2 parents d4cc46a + f32b6c6 commit 795722c

File tree

8 files changed

+321
-72
lines changed

8 files changed

+321
-72
lines changed

Frontend/src/pages/DetectHardwarePage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ const HardwareDetection = ({ currentSettings, updateSettings }) => {
303303

304304
<div className="mt-4">
305305
<label className="block text-sm font-medium text-gray-400 mb-1">Recommended Model</label>
306-
<div className="p-3 bg-gray-900 rounded-lg text-white font-medium text-orange-500">
306+
<div className="p-3 bg-gray-900 rounded-lg font-medium text-orange-500">
307307
{hardwareData.model_recommendation}
308308
</div>
309309
</div>

ModelForge/model_configs/README.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Model Configuration Directory
2+
3+
This directory contains modular configuration files for model recommendations based on hardware profiles and tasks.
4+
5+
## Schema
6+
7+
Each configuration file represents a hardware profile (e.g., `low_end.json`, `mid_range.json`, `high_end.json`) and contains recommended models for various tasks.
8+
9+
### File Structure
10+
11+
```json
12+
{
13+
"profile": "profile_name",
14+
"tasks": {
15+
"task_name": {
16+
"primary": "best_recommended_model",
17+
"alternatives": ["model1", "model2", "model3"]
18+
}
19+
}
20+
}
21+
```
22+
23+
### Fields
24+
25+
- **profile**: The hardware profile name (low_end, mid_range, high_end)
26+
- **tasks**: Object containing task configurations
27+
- **primary**: The best/default recommended model for this task and profile
28+
- **alternatives**: Array of additional recommended models for this task and profile
29+
30+
### Supported Tasks
31+
32+
- `text-generation`: Generate text based on input prompts
33+
- `summarization`: Summarize long text into shorter summaries
34+
- `extractive-question-answering`: Extract answers from text passages
35+
36+
### Example Configuration File
37+
38+
```json
39+
{
40+
"profile": "mid_range",
41+
"tasks": {
42+
"text-generation": {
43+
"primary": "mistralai/Mistral-7B-Instruct-v0.3",
44+
"alternatives": [
45+
"mistralai/Mistral-7B-Instruct-v0.3",
46+
"meta-llama/Llama-3.2-1B"
47+
]
48+
},
49+
"summarization": {
50+
"primary": "facebook/bart-base",
51+
"alternatives": [
52+
"facebook/bart-base",
53+
"google-t5/t5-small"
54+
]
55+
}
56+
}
57+
}
58+
```
59+
60+
## Contributing
61+
62+
### Adding a New Hardware Profile
63+
64+
1. Create a new JSON file named `{profile_name}.json` in this directory
65+
2. Follow the schema above
66+
3. Ensure the `profile` field matches the filename (without .json extension)
67+
4. Add appropriate models for each supported task
68+
69+
### Adding Models to Existing Profiles
70+
71+
1. Open the relevant profile file (e.g., `low_end.json`)
72+
2. Add models to the `alternatives` array for the relevant task
73+
3. Optionally, change the `primary` model if you believe a better default exists
74+
4. Ensure all model names are valid HuggingFace repository names
75+
76+
### Guidelines
77+
78+
- **Primary Model**: Should be the best performing model for the given hardware profile and task
79+
- **Alternatives**: Should be ordered by preference (best alternatives first)
80+
- **Model Names**: Must be valid HuggingFace repository names (format: `organization/model-name`)
81+
- **Hardware Compatibility**: Ensure models can run on the target hardware profile
82+
- **License Compliance**: Only include models with appropriate licenses for the intended use
83+
84+
### Validation
85+
86+
All configuration files are automatically validated on startup. Ensure your JSON is properly formatted and follows the schema.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"profile": "high_end",
3+
"tasks": {
4+
"text-generation": {
5+
"primary": "meta-llama/Llama-4-Maverick-17B-128E-Instruct",
6+
"alternatives": [
7+
"meta-llama/Llama-4-Maverick-17B-128E-Instruct",
8+
"openai/gpt-oss-120b",
9+
"tiiuae/falcon-mamba-7b",
10+
"qwen/Qwen2.5-32B",
11+
"Changgil/google-gemma-3-27b-it-text"
12+
]
13+
},
14+
"summarization": {
15+
"primary": "meta-llama/Llama-4-Maverick-17B-128E-Instruct",
16+
"alternatives": [
17+
"meta-llama/Llama-4-Maverick-17B-128E-Instruct",
18+
"openai/gpt-oss-120b",
19+
"qwen/Qwen2.5-32B",
20+
"bigscience/bloom-176b",
21+
"Changgil/google-gemma-3-27b-it-text"
22+
]
23+
},
24+
"extractive-question-answering": {
25+
"primary": "meta-llama/Llama-4-Maverick-17B-128E-Instruct",
26+
"alternatives": [
27+
"meta-llama/Llama-4-Maverick-17B-128E-Instruct",
28+
"openai/gpt-oss-120b",
29+
"qwen/Qwen2.5-32B",
30+
"tiiuae/falcon-mamba-7b",
31+
"bigscience/bloom"
32+
]
33+
}
34+
}
35+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"profile": "low_end",
3+
"tasks": {
4+
"text-generation": {
5+
"primary": "qwen/Qwen2.5-3B",
6+
"alternatives": [
7+
"qwen/Qwen2.5-3B",
8+
"HuggingFaceTB/SmolLM3-3B",
9+
"cerebras/btlm-3b-8k-base",
10+
"TinyLlama/TinyLlama_v1.1",
11+
"EleutherAI/gpt-j-6B"
12+
]
13+
},
14+
"summarization": {
15+
"primary": "google/flan-t5-large",
16+
"alternatives": [
17+
"google/flan-t5-large",
18+
"sshleifer/distilbart-cnn-12-6",
19+
"google-t5/t5-small",
20+
"facebook/bart-base",
21+
"google/flan-t5-base"
22+
]
23+
},
24+
"extractive-question-answering": {
25+
"primary": "deepset/roberta-base-squad2",
26+
"alternatives": [
27+
"deepset/roberta-base-squad2",
28+
"facebook/bart-base",
29+
"sshleifer/distilbart-cnn-12-6",
30+
"google/flan-t5-large",
31+
"meta-llama/Llama-3.2-1B"
32+
]
33+
}
34+
}
35+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"profile": "mid_range",
3+
"tasks": {
4+
"text-generation": {
5+
"primary": "mistralai/Mistral-Small-3.1-24B-Base-2503",
6+
"alternatives": [
7+
"mistralai/Mistral-Small-3.1-24B-Base-2503",
8+
"openai/gpt-oss-20b",
9+
"tiiuae/falcon-mamba-7b",
10+
"meta-llama/Llama-3.1-8B-Instruct",
11+
"qwen/Qwen2.5-7B"
12+
]
13+
},
14+
"summarization": {
15+
"primary": "google/flan-t5-large",
16+
"alternatives": [
17+
"google/flan-t5-large",
18+
"facebook/bart-base",
19+
"sshleifer/distilbart-cnn-12-6",
20+
"google-t5/t5-small",
21+
"mistralai/Mistral-Small-3.1-24B-Base-2503"
22+
]
23+
},
24+
"extractive-question-answering": {
25+
"primary": "meta-llama/Llama-3.1-8B-Instruct",
26+
"alternatives": [
27+
"meta-llama/Llama-3.1-8B-Instruct",
28+
"facebook/bart-base",
29+
"mistralai/Mistral-Small-3.1-24B-Base-2503",
30+
"deepset/roberta-base-squad2",
31+
"google/flan-t5-large"
32+
]
33+
}
34+
}
35+
}

ModelForge/utilities/configs/models.json

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)