File size: 1,724 Bytes
23c39b5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
name: baselines.loop_cot@LoopedCoTTransformer
head: lm_head@LMHead

# Looped transformer with a soft-CoT channel, v2. Differences vs loop_cot.yaml
# (which is frozen so the loop-cot / -b1 / -a011 runs stay reproducible):
#
#  1. Readout goes through lm_head, not the input embedding. Upstream loop-cot
#     ties lm_head to the embedding, so its decode logits are the model's real
#     next-token distribution; HRM-Text keeps the two matrices separate, so
#     reading out through the input embedding (v1) produced a distribution the
#     model was never trained to emit. logits = h @ W_out^T, write-back is
#     still probs @ (scale * W_in) — a genuine "predict a token, feed its
#     expected embedding back" loop.
#  2. Alpha is held at 0 for every cycle until BP warmup finishes, then the
#     learned gates switch on at cot_alpha_init (they are untouched before
#     that, so this is exactly a re-initialization at the activation step).
#  3. Cycle 0 keeps alpha == 0 forever (decoding the random zL_init is
#     meaningless) and skips its decode; cycles 1..3 each get their OWN gate
#     vector.
#  4. beta fixed at 1.0 => UT-style hard input injection, so alpha * decoded
#     is the only incremental channel (alpha -> 0 degenerates exactly to UT).
cycles: 4

cot_decode_readout: lm_head
cot_gate_mode: dynamic
cot_decode_topk: 128
cot_decode_topk_chunk_size: 8192
cot_decode_temperature: 1.0
cot_detach_decode_embedding: false

cot_alpha_init: 0.5
cot_alpha_fixed_per_cycle: [0.0, null, null, null]
cot_alpha_per_cycle_params: true
cot_alpha_activate_after_warmup: true

cot_beta_fixed: 1.0

# BP warmup: 2 -> 4 cycles over the first 20% of steps (matches ut.yaml).
bp_warmup_ratio: 0.2
bp_min_cycles: 2