Spaces:
Running
Running
Refactor settings.py: Update Mistral 7B Instruct model configuration for improved performance and documentation
Browse files- config/settings.py +18 -65
config/settings.py
CHANGED
|
@@ -175,9 +175,9 @@ MODELS = {
|
|
| 175 |
}
|
| 176 |
},
|
| 177 |
"mistral-7b": {
|
| 178 |
-
"id": "
|
| 179 |
-
"name": "Mistral 7B Instruct
|
| 180 |
-
"description": "
|
| 181 |
"type": "base",
|
| 182 |
"parameters": {
|
| 183 |
"max_length": 2048,
|
|
@@ -186,8 +186,8 @@ MODELS = {
|
|
| 186 |
"repetition_penalty": 1.1,
|
| 187 |
},
|
| 188 |
"training": {
|
| 189 |
-
"base_model_path": "
|
| 190 |
-
"fine_tuned_path": os.path.join(TRAINING_OUTPUT_DIR, "mistral-7b-instruct-
|
| 191 |
"lora_config": {
|
| 192 |
"r": 16,
|
| 193 |
"lora_alpha": 32,
|
|
@@ -196,27 +196,26 @@ MODELS = {
|
|
| 196 |
}
|
| 197 |
},
|
| 198 |
"details": {
|
| 199 |
-
"full_name": "Mistral 7B Instruct v0.2
|
| 200 |
"capabilities": [
|
| 201 |
"Strong multilingual support",
|
| 202 |
-
"
|
| 203 |
-
"
|
| 204 |
-
"
|
| 205 |
-
"Excellent reasoning capabilities",
|
| 206 |
"Free for commercial use"
|
| 207 |
],
|
| 208 |
"limitations": [
|
| 209 |
-
"
|
| 210 |
-
"
|
| 211 |
-
"Knowledge cutoff before latest
|
| 212 |
],
|
| 213 |
"use_cases": [
|
| 214 |
-
"
|
| 215 |
-
"
|
| 216 |
-
"
|
| 217 |
-
"
|
| 218 |
],
|
| 219 |
-
"documentation": "https://huggingface.co/
|
| 220 |
}
|
| 221 |
},
|
| 222 |
"mixtral-8x7b": {
|
|
@@ -306,53 +305,7 @@ MODELS = {
|
|
| 306 |
"documentation": "https://huggingface.co/openchat/openchat-3.5"
|
| 307 |
}
|
| 308 |
},
|
| 309 |
-
|
| 310 |
-
"id": "google/gemma-7b-it",
|
| 311 |
-
"name": "Gemma 7B Instruct",
|
| 312 |
-
"description": "Google's instruction-tuned 7B model with strong multilingual capabilities",
|
| 313 |
-
"type": "base",
|
| 314 |
-
"parameters": {
|
| 315 |
-
"max_length": 2048,
|
| 316 |
-
"temperature": 0.7,
|
| 317 |
-
"top_p": 0.9,
|
| 318 |
-
"repetition_penalty": 1.1,
|
| 319 |
-
},
|
| 320 |
-
"training": {
|
| 321 |
-
"base_model_path": "google/gemma-7b-it",
|
| 322 |
-
"fine_tuned_path": os.path.join(TRAINING_OUTPUT_DIR, "gemma-7b-instruct-tuned"),
|
| 323 |
-
"lora_config": {
|
| 324 |
-
"r": 16,
|
| 325 |
-
"lora_alpha": 32,
|
| 326 |
-
"lora_dropout": 0.05,
|
| 327 |
-
"target_modules": ["q_proj", "v_proj", "k_proj", "o_proj"]
|
| 328 |
-
}
|
| 329 |
-
},
|
| 330 |
-
"details": {
|
| 331 |
-
"full_name": "Google Gemma 7B Instruct",
|
| 332 |
-
"capabilities": [
|
| 333 |
-
"Strong performance on par with other 7B models",
|
| 334 |
-
"Excellent instruction following",
|
| 335 |
-
"Good multilingual capabilities",
|
| 336 |
-
"Efficient resource usage",
|
| 337 |
-
"Free for commercial use",
|
| 338 |
-
"Official Google release"
|
| 339 |
-
],
|
| 340 |
-
"limitations": [
|
| 341 |
-
"Relatively new model",
|
| 342 |
-
"May need specific prompting for best results",
|
| 343 |
-
"Limited community testing compared to older models"
|
| 344 |
-
],
|
| 345 |
-
"use_cases": [
|
| 346 |
-
"General consultation",
|
| 347 |
-
"Document analysis",
|
| 348 |
-
"Complex reasoning tasks",
|
| 349 |
-
"Educational purposes",
|
| 350 |
-
"Commercial applications"
|
| 351 |
-
],
|
| 352 |
-
"documentation": "https://huggingface.co/google/gemma-7b-it"
|
| 353 |
-
}
|
| 354 |
-
}
|
| 355 |
-
}
|
| 356 |
|
| 357 |
# Update MODELS configuration
|
| 358 |
for model in MODELS.values():
|
|
|
|
| 175 |
}
|
| 176 |
},
|
| 177 |
"mistral-7b": {
|
| 178 |
+
"id": "mistralai/Mistral-7B-Instruct-v0.2", # Меняем на стандартную версию
|
| 179 |
+
"name": "Mistral 7B Instruct",
|
| 180 |
+
"description": "High-performance instruction-tuned 7B model with strong multilingual capabilities",
|
| 181 |
"type": "base",
|
| 182 |
"parameters": {
|
| 183 |
"max_length": 2048,
|
|
|
|
| 186 |
"repetition_penalty": 1.1,
|
| 187 |
},
|
| 188 |
"training": {
|
| 189 |
+
"base_model_path": "mistralai/Mistral-7B-Instruct-v0.2",
|
| 190 |
+
"fine_tuned_path": os.path.join(TRAINING_OUTPUT_DIR, "mistral-7b-instruct-tuned"),
|
| 191 |
"lora_config": {
|
| 192 |
"r": 16,
|
| 193 |
"lora_alpha": 32,
|
|
|
|
| 196 |
}
|
| 197 |
},
|
| 198 |
"details": {
|
| 199 |
+
"full_name": "Mistral 7B Instruct v0.2",
|
| 200 |
"capabilities": [
|
| 201 |
"Strong multilingual support",
|
| 202 |
+
"Excellent instruction following",
|
| 203 |
+
"Advanced reasoning capabilities",
|
| 204 |
+
"High-quality text generation",
|
|
|
|
| 205 |
"Free for commercial use"
|
| 206 |
],
|
| 207 |
"limitations": [
|
| 208 |
+
"Requires more RAM than GGUF version",
|
| 209 |
+
"May need GPU for optimal performance",
|
| 210 |
+
"Knowledge cutoff before latest developments"
|
| 211 |
],
|
| 212 |
"use_cases": [
|
| 213 |
+
"Complex legal analysis",
|
| 214 |
+
"Multilingual consultation",
|
| 215 |
+
"Document processing",
|
| 216 |
+
"General assistance"
|
| 217 |
],
|
| 218 |
+
"documentation": "https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2"
|
| 219 |
}
|
| 220 |
},
|
| 221 |
"mixtral-8x7b": {
|
|
|
|
| 305 |
"documentation": "https://huggingface.co/openchat/openchat-3.5"
|
| 306 |
}
|
| 307 |
},
|
| 308 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 309 |
|
| 310 |
# Update MODELS configuration
|
| 311 |
for model in MODELS.values():
|