Spaces:
Runtime error
Runtime error
Ерёменко Иван commited on
Commit ·
08e8abd
1
Parent(s): cb170ae
Try distilgpt2 as lighter alternative and simplify initialization
Browse files- Add distilgpt2 (82MB) as second option - much lighter than DialoGPT
- Remove complex GPT-2 tokenizer configuration that didn't help
- Keep DialoGPT-small as primary option
- Simplify model initialization for all models
app.py
CHANGED
|
@@ -14,8 +14,8 @@ try:
|
|
| 14 |
# Пробуем модели в порядке приоритета (с поддержкой чат-формата)
|
| 15 |
models_to_try = [
|
| 16 |
"microsoft/DialoGPT-small", # Легкая модель для Spaces (351MB)
|
| 17 |
-
"
|
| 18 |
-
"
|
| 19 |
]
|
| 20 |
|
| 21 |
transformers_model = None
|
|
|
|
| 14 |
# Пробуем модели в порядке приоритета (с поддержкой чат-формата)
|
| 15 |
models_to_try = [
|
| 16 |
"microsoft/DialoGPT-small", # Легкая модель для Spaces (351MB)
|
| 17 |
+
"distilgpt2", # Еще более легкая версия GPT-2 (82MB)
|
| 18 |
+
"gpt2" # Fallback
|
| 19 |
]
|
| 20 |
|
| 21 |
transformers_model = None
|