-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.yaml
More file actions
69 lines (63 loc) · 3.26 KB
/
Copy pathconfig.yaml
File metadata and controls
69 lines (63 loc) · 3.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# MUD World Model — runtime and training config
# MUD connection
mud:
silence_timeout_sec: 10
reconnect_delay_sec: 2
max_reconnect_attempts: 5
# Paths (relative to project root or absolute)
paths:
data_dir: data
memory_dir: data # commands.md, spells.md, current_location.md, mobs.md, session_summary.md, goals.md, inventory.md, equipment.md, statbar.md
logs_dir: data/logs
traces_file: data/logs/traces.jsonl
training_data_dir: data/training_data # archived traces and orchestrator logs (flat timestamps); training uses trace_glob over these
checkpoints_dir: data/checkpoints/wm
# wm_checkpoint_run: run_20260203_120000 # optional: pin WM to this run for rollback; if unset, latest run_* is used
prompts_dir: prompts
# API agents (OpenAI)
openai:
model: gpt-5-nano # default fallback
model_ph: gpt-4o-mini # PH: faster runtime
model_mh: gpt-4o-mini # MH: faster, sufficient for memory parsing
model_dh: gpt-4o-mini # DH: faster, sufficient for choosing from options
model_vh: gpt-4o-mini # VH: faster; can compensate with prompting/memory
temperature: 1 # gpt-5-nano only supports 1; omit or set lower for models that allow it (e.g. gpt-4o-mini)
# World model (local Mistral-7B)
wm:
model_name: mistralai/Mistral-7B-v0.1
use_4bit: false # set true if low VRAM
max_new_tokens: 256
temperature: 0.3
# Orchestrator
orchestrator:
monitor_interval: 10 # every N turns, monitor agent checks if player is stuck and may teleport
kickoff_commands:
- look
- score
- inventory
- equipment
- practice # when not at guildmaster, shows known spells/skills
max_steps: null # null = run until stopped
game_buffer_max_lines: 50 # DH sees this many lines; PH uses ph_buffer_lines for its call
ph_buffer_lines: 25 # PH sees this many lines of game buffer (reduces PH input size)
wm_buffer_lines: 25 # WM sees this many lines of game buffer for next-line context (local model)
# Training
training:
trace_glob: data/training_data/traces_*.jsonl # cumulative archived runs; each main.py run appends traces_YYYYMMDD_HHMMSS.jsonl
vh_score_min: 1 # keep all traces; vh_score rates prediction quality, not outcome (see train.build_dataset)
weight_by_vh_score: true
mode: outcome_summary # "next_line" or "outcome_summary"
lora_r: 8
lora_alpha: 16
max_length: 2048 # max sequence length (context + target). Fit composed context + 25-line buffer + action + target; Mistral supports 8192.
per_device_train_batch_size: 2 # 512-token seqs: 24GB VRAM ~2–4; 16GB ~1–2. Use --batch-size 1 if OOM.
gradient_accumulation_steps: 4 # effective batch = per_device * this (default 8)
num_epochs: 25
learning_rate: 2.0e-5
early_stopping_patience: 2 # stop after this many epochs with no improvement on eval loss
eval_fraction: 0.1 # fraction of data used for validation (0 = no early stopping)
# Semantic loss (Option A): match WM representation to VH summary in embedding space (trains meaning, not wording)
use_semantic_loss: true
semantic_encoder: sentence-transformers/all-MiniLM-L6-v2
semantic_loss_weight: 0.5 # L = L_ce + this * L_sem (hybrid). Set semantic_only: true to use only L_sem.
semantic_only: false