vedaco commited on
Commit
9f753c3
·
verified ·
1 Parent(s): 5e1076e

Update config.py

Browse files
Files changed (1) hide show
  1. config.py +11 -24
config.py CHANGED
@@ -1,5 +1,3 @@
1
- """Configuration for Veda Programming Assistant with Distillation"""
2
-
3
  import os
4
 
5
  BASE_DIR = os.path.dirname(os.path.abspath(__file__))
@@ -11,7 +9,7 @@ os.makedirs(MODEL_DIR, exist_ok=True)
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,28 +18,17 @@ NUM_LAYERS = 4
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
 
 
 
1
  import os
2
 
3
  BASE_DIR = os.path.dirname(os.path.abspath(__file__))
 
9
 
10
  DATABASE_PATH = os.path.join(DATA_DIR, "conversations.db")
11
 
12
+ # Student model settings
13
  VOCAB_SIZE = 8000
14
  MAX_LENGTH = 512
15
  D_MODEL = 256
 
18
  FF_DIM = 512
19
  BATCH_SIZE = 4
20
 
21
+ # OpenRouter Teacher
22
+ OPENROUTER_API_KEY = os.environ.get("OPENROUTER_API_KEY", "").strip()
 
 
 
 
 
 
 
 
23
  OPENROUTER_BASE_URL = "https://openrouter.ai/api/v1/chat/completions"
24
 
25
+ # Teacher model (confirmed working)
26
+ TEACHER_MODEL = "mistralai/mistral-7b-instruct:free"
27
 
28
+ # Optional fallback if that model ever fails
29
+ TEACHER_FALLBACK_MODELS = [
30
+ "openrouter/auto"
31
+ ]
 
 
32
 
33
+ TEACHER_TEMPERATURE = 0.7
34
+ TEACHER_MAX_TOKENS = 400