Spaces:
Sleeping
Sleeping
Update config.py
Browse files
config.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
"""Configuration for Veda Programming Assistant"""
|
| 2 |
|
| 3 |
import os
|
| 4 |
|
|
@@ -11,6 +11,7 @@ os.makedirs(MODEL_DIR, exist_ok=True)
|
|
| 11 |
|
| 12 |
DATABASE_PATH = os.path.join(DATA_DIR, "conversations.db")
|
| 13 |
|
|
|
|
| 14 |
VOCAB_SIZE = 8000
|
| 15 |
MAX_LENGTH = 512
|
| 16 |
D_MODEL = 256
|
|
@@ -19,5 +20,28 @@ NUM_LAYERS = 4
|
|
| 19 |
FF_DIM = 512
|
| 20 |
BATCH_SIZE = 4
|
| 21 |
|
|
|
|
| 22 |
DEFAULT_TEMPERATURE = 0.7
|
| 23 |
-
DEFAULT_MAX_TOKENS = 200
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Configuration for Veda Programming Assistant with Distillation"""
|
| 2 |
|
| 3 |
import os
|
| 4 |
|
|
|
|
| 11 |
|
| 12 |
DATABASE_PATH = os.path.join(DATA_DIR, "conversations.db")
|
| 13 |
|
| 14 |
+
# Model settings
|
| 15 |
VOCAB_SIZE = 8000
|
| 16 |
MAX_LENGTH = 512
|
| 17 |
D_MODEL = 256
|
|
|
|
| 20 |
FF_DIM = 512
|
| 21 |
BATCH_SIZE = 4
|
| 22 |
|
| 23 |
+
# Generation defaults
|
| 24 |
DEFAULT_TEMPERATURE = 0.7
|
| 25 |
+
DEFAULT_MAX_TOKENS = 200
|
| 26 |
+
|
| 27 |
+
# ====== DISTILLATION SETTINGS ======
|
| 28 |
+
# OpenRouter API
|
| 29 |
+
OPENROUTER_API_KEY = os.environ.get(
|
| 30 |
+
"OPENROUTER_API_KEY",
|
| 31 |
+
"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"
|
| 32 |
+
)
|
| 33 |
+
OPENROUTER_BASE_URL = "https://openrouter.ai/api/v1/chat/completions"
|
| 34 |
+
|
| 35 |
+
# Teacher model (free tier)
|
| 36 |
+
TEACHER_MODEL = "cognitivecomputations/dolphin-mistral-24b-venice-edition:free"
|
| 37 |
+
|
| 38 |
+
# Distillation settings
|
| 39 |
+
DISTILLATION_ENABLED = True
|
| 40 |
+
AUTO_LEARN_FROM_TEACHER = True # Automatically save teacher responses for training
|
| 41 |
+
MIN_SAMPLES_FOR_DISTILL_TRAINING = 20 # Minimum teacher samples before retraining
|
| 42 |
+
TEACHER_TEMPERATURE = 0.7
|
| 43 |
+
TEACHER_MAX_TOKENS = 500
|
| 44 |
+
|
| 45 |
+
# When to ask teacher (confidence threshold)
|
| 46 |
+
# If student response is too short or seems low quality, ask teacher
|
| 47 |
+
MIN_RESPONSE_LENGTH = 20 # If response shorter than this, ask teacher
|