Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,43 +1,15 @@
|
|
| 1 |
import os
|
| 2 |
import tempfile
|
| 3 |
import subprocess
|
| 4 |
-
import
|
| 5 |
-
from huggingface_hub import login, HfApi, hf_hub_download
|
| 6 |
|
| 7 |
REPO_NAME = "Andrewstivan/AURA"
|
| 8 |
|
| 9 |
-
# ========== ИСПРАВЛЯЕМ КОНФИГ SAIGA ==========
|
| 10 |
-
print("🔧 Fixing Saiga config...")
|
| 11 |
-
try:
|
| 12 |
-
# Скачиваем config.json Saiga
|
| 13 |
-
saiga_config_path = hf_hub_download(
|
| 14 |
-
repo_id="IlyaGusev/saiga_mistral_7b",
|
| 15 |
-
filename="config.json",
|
| 16 |
-
cache_dir="/tmp/saiga_fixed"
|
| 17 |
-
)
|
| 18 |
-
|
| 19 |
-
# Читаем и исправляем
|
| 20 |
-
with open(saiga_config_path, 'r') as f:
|
| 21 |
-
saiga_config = json.load(f)
|
| 22 |
-
|
| 23 |
-
if saiga_config.get("architectures") is None:
|
| 24 |
-
saiga_config["architectures"] = ["MistralForCausalLM"]
|
| 25 |
-
with open(saiga_config_path, 'w') as f:
|
| 26 |
-
json.dump(saiga_config, f, indent=2)
|
| 27 |
-
print("✅ Fixed Saiga config: added architectures field")
|
| 28 |
-
else:
|
| 29 |
-
print("Saiga config already has architectures")
|
| 30 |
-
|
| 31 |
-
except Exception as e:
|
| 32 |
-
print(f"⚠️ Error fixing Saiga config: {e}")
|
| 33 |
-
print("Will try to continue anyway...")
|
| 34 |
-
|
| 35 |
-
# ========== КОНФИГ СЛИЯНИЯ ==========
|
| 36 |
YAML_CONFIG = """slices:
|
| 37 |
- sources:
|
| 38 |
- model: ResplendentAI/Aura_v3_7B
|
| 39 |
layer_range: [0, 32]
|
| 40 |
-
- model: IlyaGusev/
|
| 41 |
layer_range: [0, 32]
|
| 42 |
merge_method: slerp
|
| 43 |
base_model: ResplendentAI/Aura_v3_7B
|
|
|
|
| 1 |
import os
|
| 2 |
import tempfile
|
| 3 |
import subprocess
|
| 4 |
+
from huggingface_hub import login, HfApi
|
|
|
|
| 5 |
|
| 6 |
REPO_NAME = "Andrewstivan/AURA"
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
YAML_CONFIG = """slices:
|
| 9 |
- sources:
|
| 10 |
- model: ResplendentAI/Aura_v3_7B
|
| 11 |
layer_range: [0, 32]
|
| 12 |
+
- model: IlyaGusev/saiga_mistral_7b_merged
|
| 13 |
layer_range: [0, 32]
|
| 14 |
merge_method: slerp
|
| 15 |
base_model: ResplendentAI/Aura_v3_7B
|