ThomasHeim commited on
Commit
eb6227f
·
verified ·
1 Parent(s): f258cdb

Upload 44 files

Browse files
Files changed (45) hide show
  1. .gitattributes +1 -0
  2. sudoku-extreme/shrek-tiny/all_config.yaml +38 -0
  3. sudoku-extreme/shrek-tiny/hrm_act_v1.py +428 -0
  4. sudoku-extreme/shrek-tiny/losses.py +130 -0
  5. sudoku-extreme/shrek-tiny/step_10416 +3 -0
  6. sudoku-extreme/shrek-tiny/step_11718 +3 -0
  7. sudoku-extreme/shrek-tiny/step_1302 +3 -0
  8. sudoku-extreme/shrek-tiny/step_13020 +3 -0
  9. sudoku-extreme/shrek-tiny/step_14322 +3 -0
  10. sudoku-extreme/shrek-tiny/step_15624 +3 -0
  11. sudoku-extreme/shrek-tiny/step_16926 +3 -0
  12. sudoku-extreme/shrek-tiny/step_18228 +3 -0
  13. sudoku-extreme/shrek-tiny/step_19530 +3 -0
  14. sudoku-extreme/shrek-tiny/step_20832 +3 -0
  15. sudoku-extreme/shrek-tiny/step_22134 +3 -0
  16. sudoku-extreme/shrek-tiny/step_23436 +3 -0
  17. sudoku-extreme/shrek-tiny/step_24738 +3 -0
  18. sudoku-extreme/shrek-tiny/step_2604 +3 -0
  19. sudoku-extreme/shrek-tiny/step_26040 +3 -0
  20. sudoku-extreme/shrek-tiny/step_27342 +3 -0
  21. sudoku-extreme/shrek-tiny/step_28644 +3 -0
  22. sudoku-extreme/shrek-tiny/step_29946 +3 -0
  23. sudoku-extreme/shrek-tiny/step_31248 +3 -0
  24. sudoku-extreme/shrek-tiny/step_32550 +3 -0
  25. sudoku-extreme/shrek-tiny/step_33852 +3 -0
  26. sudoku-extreme/shrek-tiny/step_35154 +3 -0
  27. sudoku-extreme/shrek-tiny/step_36456 +3 -0
  28. sudoku-extreme/shrek-tiny/step_37758 +3 -0
  29. sudoku-extreme/shrek-tiny/step_37758_all_preds.0 +3 -0
  30. sudoku-extreme/shrek-tiny/step_3906 +3 -0
  31. sudoku-extreme/shrek-tiny/step_39060 +3 -0
  32. sudoku-extreme/shrek-tiny/step_40362 +3 -0
  33. sudoku-extreme/shrek-tiny/step_41664 +3 -0
  34. sudoku-extreme/shrek-tiny/step_42966 +3 -0
  35. sudoku-extreme/shrek-tiny/step_44268 +3 -0
  36. sudoku-extreme/shrek-tiny/step_45570 +3 -0
  37. sudoku-extreme/shrek-tiny/step_46872 +3 -0
  38. sudoku-extreme/shrek-tiny/step_48174 +3 -0
  39. sudoku-extreme/shrek-tiny/step_49476 +3 -0
  40. sudoku-extreme/shrek-tiny/step_50778 +3 -0
  41. sudoku-extreme/shrek-tiny/step_5208 +3 -0
  42. sudoku-extreme/shrek-tiny/step_52080 +3 -0
  43. sudoku-extreme/shrek-tiny/step_6510 +3 -0
  44. sudoku-extreme/shrek-tiny/step_7812 +3 -0
  45. sudoku-extreme/shrek-tiny/step_9114 +3 -0
.gitattributes CHANGED
@@ -372,3 +372,4 @@ shrek-large/step_6510 filter=lfs diff=lfs merge=lfs -text
372
  shrek-large/step_7812 filter=lfs diff=lfs merge=lfs -text
373
  shrek-large/step_9114 filter=lfs diff=lfs merge=lfs -text
374
  shrek-tiny/step_37758_all_preds.0 filter=lfs diff=lfs merge=lfs -text
 
 
372
  shrek-large/step_7812 filter=lfs diff=lfs merge=lfs -text
373
  shrek-large/step_9114 filter=lfs diff=lfs merge=lfs -text
374
  shrek-tiny/step_37758_all_preds.0 filter=lfs diff=lfs merge=lfs -text
375
+ sudoku-extreme/shrek-tiny/step_37758_all_preds.0 filter=lfs diff=lfs merge=lfs -text
sudoku-extreme/shrek-tiny/all_config.yaml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ arch:
2
+ H_cycles: 2
3
+ H_layers: 2
4
+ L_cycles: 2
5
+ L_layers: 2
6
+ enable_error_injection: true
7
+ enable_stagnation_delta: true
8
+ expansion: 4
9
+ halt_exploration_prob: 0.1
10
+ halt_max_steps: 16
11
+ hidden_size: 512
12
+ loss:
13
+ loss_type: stablemax_cross_entropy
14
+ name: losses@ACTLossHead
15
+ name: hrm.hrm_act_v1@HierarchicalReasoningModel_ACTV1
16
+ num_heads: 8
17
+ pos_encodings: rope
18
+ puzzle_emb_ndim: 512
19
+ beta1: 0.9
20
+ beta2: 0.95
21
+ checkpoint_every_eval: true
22
+ checkpoint_path: checkpoints/SHREK_Ablation_Sudoku/SHREK_Tiny_Vanilla_Sudoku
23
+ data_path: ../../dataset/data/sudoku-extreme-1k-aug-1000
24
+ ema: true
25
+ ema_rate: 0.999
26
+ epochs: 40000
27
+ eval_interval: 1000
28
+ eval_save_outputs: []
29
+ global_batch_size: 768
30
+ lr: 0.0001
31
+ lr_min_ratio: 1.0
32
+ lr_warmup_steps: 2000
33
+ project_name: SHREK_Ablation_Sudoku
34
+ puzzle_emb_lr: 0.0001
35
+ puzzle_emb_weight_decay: 1.0
36
+ run_name: SHREK_Tiny_Vanilla_Sudoku
37
+ seed: 0
38
+ weight_decay: 1.0
sudoku-extreme/shrek-tiny/hrm_act_v1.py ADDED
@@ -0,0 +1,428 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import Tuple, List, Dict, Optional
2
+ from dataclasses import dataclass
3
+ import math
4
+
5
+ import torch
6
+ import torch.nn.functional as F
7
+ from torch import nn
8
+ from pydantic import BaseModel
9
+
10
+ from models.common import trunc_normal_init_
11
+ from models.layers import rms_norm, SwiGLU, Attention, RotaryEmbedding, CosSin, CastedEmbedding, CastedLinear
12
+ from models.sparse_embedding import CastedSparseEmbedding
13
+ from models.hrm.error_singals import get_error_signal # SHREK: error signal module
14
+
15
+
16
+ @dataclass
17
+ class HierarchicalReasoningModel_ACTV1InnerCarry:
18
+ z_H: torch.Tensor
19
+ z_L: torch.Tensor
20
+ # SHREK: prev_pred stores last step's argmax predictions for flip rate computation.
21
+ # zeros = fresh start (first step after init or reset gives flip_rate ≈ 1.0)
22
+ prev_pred: torch.Tensor # (B, seq_len) int32
23
+ # SHREK: Q-values cached in carry — no longer used for Q-targets (see Bug 4),
24
+ # but kept because removing them causes torch.compile regression.
25
+ prev_q_halt: torch.Tensor # (B,) float32
26
+ prev_q_continue: torch.Tensor # (B,) float32
27
+
28
+
29
+ @dataclass
30
+ class HierarchicalReasoningModel_ACTV1Carry:
31
+ inner_carry: HierarchicalReasoningModel_ACTV1InnerCarry
32
+
33
+ steps: torch.Tensor
34
+ halted: torch.Tensor
35
+
36
+ current_data: Dict[str, torch.Tensor]
37
+
38
+
39
+ class HierarchicalReasoningModel_ACTV1Config(BaseModel):
40
+ batch_size: int
41
+ seq_len: int
42
+ puzzle_emb_ndim: int = 0
43
+ num_puzzle_identifiers: int
44
+ vocab_size: int
45
+
46
+ H_cycles: int
47
+ L_cycles: int
48
+
49
+ H_layers: int
50
+ L_layers: int
51
+
52
+ # Transformer config
53
+ hidden_size: int
54
+ expansion: float
55
+ num_heads: int
56
+ pos_encodings: str
57
+
58
+ rms_norm_eps: float = 1e-5
59
+ rope_theta: float = 10000.0
60
+
61
+ # Halting Q-learning config
62
+ halt_max_steps: int
63
+ halt_exploration_prob: float
64
+
65
+ # SHREK: error injection warmup — ramps alpha from 0 to alpha_max over warmup steps.
66
+ # Prevents small models from collapsing before the error estimator is accurate.
67
+ alpha_max: float = 0.01
68
+ alpha_warmup_steps: int = 5000
69
+
70
+ # SHREK ablation flags — disable components from training scripts
71
+ enable_error_injection: bool = True # Error-Conditioned Injection (flip rate + learned estimator)
72
+ enable_stagnation_delta: bool = True # Stagnation-Aware Q-head (delta fed to Q-head)
73
+
74
+ forward_dtype: str = "bfloat16"
75
+
76
+
77
+ class HierarchicalReasoningModel_ACTV1Block(nn.Module):
78
+ def __init__(self, config: HierarchicalReasoningModel_ACTV1Config) -> None:
79
+ super().__init__()
80
+
81
+ self.self_attn = Attention(
82
+ hidden_size=config.hidden_size,
83
+ head_dim=config.hidden_size // config.num_heads,
84
+ num_heads=config.num_heads,
85
+ num_key_value_heads=config.num_heads,
86
+ causal=False
87
+ )
88
+ self.mlp = SwiGLU(
89
+ hidden_size=config.hidden_size,
90
+ expansion=config.expansion,
91
+ )
92
+ self.norm_eps = config.rms_norm_eps
93
+
94
+ def forward(self, cos_sin: CosSin, hidden_states: torch.Tensor) -> torch.Tensor:
95
+ # Post Norm
96
+ # Self Attention
97
+ hidden_states = rms_norm(hidden_states + self.self_attn(cos_sin=cos_sin, hidden_states=hidden_states), variance_epsilon=self.norm_eps)
98
+ # Fully Connected
99
+ hidden_states = rms_norm(hidden_states + self.mlp(hidden_states), variance_epsilon=self.norm_eps)
100
+ return hidden_states
101
+
102
+
103
+ class HierarchicalReasoningModel_ACTV1ReasoningModule(nn.Module):
104
+ def __init__(self, layers: List[HierarchicalReasoningModel_ACTV1Block]):
105
+ super().__init__()
106
+
107
+ self.layers = torch.nn.ModuleList(layers)
108
+
109
+ def forward(self, hidden_states: torch.Tensor, input_injection: torch.Tensor, **kwargs) -> torch.Tensor:
110
+ # Input injection (add)
111
+ hidden_states = hidden_states + input_injection
112
+ # Layers
113
+ for layer in self.layers:
114
+ hidden_states = layer(hidden_states=hidden_states, **kwargs)
115
+
116
+ return hidden_states
117
+
118
+
119
+ class HierarchicalReasoningModel_ACTV1_Inner(nn.Module):
120
+ def __init__(self, config: HierarchicalReasoningModel_ACTV1Config) -> None:
121
+ super().__init__()
122
+ self.config = config
123
+ self.forward_dtype = getattr(torch, self.config.forward_dtype)
124
+
125
+ # I/O
126
+ self.embed_scale = math.sqrt(self.config.hidden_size)
127
+ embed_init_std = 1.0 / self.embed_scale
128
+
129
+ self.embed_tokens = CastedEmbedding(self.config.vocab_size, self.config.hidden_size, init_std=embed_init_std, cast_to=self.forward_dtype)
130
+ self.lm_head = CastedLinear(self.config.hidden_size, self.config.vocab_size, bias=False)
131
+ # SHREK: Q-head input size depends on stagnation delta flag
132
+ q_head_input_size = self.config.hidden_size + (1 if self.config.enable_stagnation_delta else 0)
133
+ self.q_head = CastedLinear(q_head_input_size, 2, bias=True)
134
+
135
+ # SHREK: error_encoder maps the scalar error score -> hidden_size vector for injection into z_H
136
+ # alpha follows a linear warmup schedule (0 → alpha_max over warmup steps).
137
+ # This lets the error estimator train before its signal affects z_H.
138
+ self.error_encoder = nn.Linear(1, self.config.hidden_size)
139
+ # SHREK: step counter for alpha warmup (not a learned parameter)
140
+ self.register_buffer('_alpha_step', torch.tensor(0, dtype=torch.long))
141
+ # SHREK: error_estimator reads z_H and predicts how wrong the model is.
142
+ # trained via auxiliary loss in pretrain.py using the real lm_loss as target.
143
+ # catches "stuck but wrong" — a model confidently on the wrong answer.
144
+ # flip rate catches oscillation; estimator catches confident-but-wrong.
145
+ self.error_estimator = nn.Linear(self.config.hidden_size, 1)
146
+
147
+ self.puzzle_emb_len = -(self.config.puzzle_emb_ndim // -self.config.hidden_size) # ceil div
148
+ if self.config.puzzle_emb_ndim > 0:
149
+ # Zero init puzzle embeddings
150
+ self.puzzle_emb = CastedSparseEmbedding(self.config.num_puzzle_identifiers, self.config.puzzle_emb_ndim,
151
+ batch_size=self.config.batch_size, init_std=0, cast_to=self.forward_dtype)
152
+
153
+ # LM Blocks
154
+ if self.config.pos_encodings == "rope":
155
+ self.rotary_emb = RotaryEmbedding(dim=self.config.hidden_size // self.config.num_heads,
156
+ max_position_embeddings=self.config.seq_len + self.puzzle_emb_len,
157
+ base=self.config.rope_theta)
158
+ elif self.config.pos_encodings == "learned":
159
+ self.embed_pos = CastedEmbedding(self.config.seq_len + self.puzzle_emb_len, self.config.hidden_size, init_std=embed_init_std, cast_to=self.forward_dtype)
160
+ else:
161
+ raise NotImplementedError()
162
+
163
+ # Reasoning Layers
164
+ self.H_level = HierarchicalReasoningModel_ACTV1ReasoningModule(layers=[HierarchicalReasoningModel_ACTV1Block(self.config) for _i in range(self.config.H_layers)])
165
+ self.L_level = HierarchicalReasoningModel_ACTV1ReasoningModule(layers=[HierarchicalReasoningModel_ACTV1Block(self.config) for _i in range(self.config.L_layers)])
166
+
167
+ # Initial states
168
+ self.H_init = nn.Buffer(trunc_normal_init_(torch.empty(self.config.hidden_size, dtype=self.forward_dtype), std=1), persistent=True)
169
+ self.L_init = nn.Buffer(trunc_normal_init_(torch.empty(self.config.hidden_size, dtype=self.forward_dtype), std=1), persistent=True)
170
+
171
+ # Q head special init
172
+ # Init Q to (almost) zero for faster learning during bootstrapping
173
+ with torch.no_grad():
174
+ self.q_head.weight.zero_()
175
+ self.q_head.bias.fill_(-5) # type: ignore
176
+
177
+ def _input_embeddings(self, input: torch.Tensor, puzzle_identifiers: torch.Tensor):
178
+ # Token embedding
179
+ embedding = self.embed_tokens(input.to(torch.int32))
180
+
181
+ # Puzzle embeddings
182
+ if self.config.puzzle_emb_ndim > 0:
183
+ puzzle_embedding = self.puzzle_emb(puzzle_identifiers)
184
+
185
+ pad_count = self.puzzle_emb_len * self.config.hidden_size - puzzle_embedding.shape[-1]
186
+ if pad_count > 0:
187
+ puzzle_embedding = F.pad(puzzle_embedding, (0, pad_count))
188
+
189
+ embedding = torch.cat((puzzle_embedding.view(-1, self.puzzle_emb_len, self.config.hidden_size), embedding), dim=-2)
190
+
191
+ # Position embeddings
192
+ if self.config.pos_encodings == "learned":
193
+ # scale by 1/sqrt(2) to maintain forward variance
194
+ embedding = 0.707106781 * (embedding + self.embed_pos.embedding_weight.to(self.forward_dtype))
195
+
196
+ # Scale
197
+ return self.embed_scale * embedding
198
+
199
+ def empty_carry(self, batch_size: int):
200
+ return HierarchicalReasoningModel_ACTV1InnerCarry(
201
+ z_H=torch.empty(batch_size, self.config.seq_len + self.puzzle_emb_len, self.config.hidden_size, dtype=self.forward_dtype),
202
+ z_L=torch.empty(batch_size, self.config.seq_len + self.puzzle_emb_len, self.config.hidden_size, dtype=self.forward_dtype),
203
+ # SHREK: zeros = no previous prediction — first step gives flip_rate ≈ 1.0
204
+ # device=H_init.device ensures prev_pred is on CUDA, matching z_H and logits
205
+ prev_pred=torch.zeros(batch_size, self.config.seq_len, dtype=torch.int32, device=self.H_init.device),
206
+ prev_q_halt=torch.full((batch_size,), -5.0, device=self.H_init.device),
207
+ prev_q_continue=torch.full((batch_size,), -5.0, device=self.H_init.device),
208
+ )
209
+
210
+ def reset_carry(self, reset_flag: torch.Tensor, carry: HierarchicalReasoningModel_ACTV1InnerCarry):
211
+ # SHREK: zero out prev_pred for reset sequences so they start fresh.
212
+ # a reset sequence is one that just halted — it will solve a new puzzle next.
213
+ # zeroing prev_pred means first step gives flip_rate ≈ 1.0 (maximum uncertainty).
214
+ new_prev_pred = torch.where(
215
+ reset_flag.view(-1, 1),
216
+ torch.zeros_like(carry.prev_pred),
217
+ carry.prev_pred
218
+ )
219
+ new_prev_q_halt = torch.where(reset_flag, torch.full_like(carry.prev_q_halt, -5.0), carry.prev_q_halt)
220
+ new_prev_q_continue = torch.where(reset_flag, torch.full_like(carry.prev_q_continue, -5.0), carry.prev_q_continue)
221
+
222
+ return HierarchicalReasoningModel_ACTV1InnerCarry(
223
+ z_H=torch.where(reset_flag.view(-1, 1, 1), self.H_init, carry.z_H),
224
+ z_L=torch.where(reset_flag.view(-1, 1, 1), self.L_init, carry.z_L),
225
+ prev_pred=new_prev_pred,
226
+ prev_q_halt=new_prev_q_halt,
227
+ prev_q_continue=new_prev_q_continue,
228
+ )
229
+
230
+
231
+ # SHREK: removed task_type parameter — error signal is now universal (no task rules needed)
232
+ def forward(self, carry: HierarchicalReasoningModel_ACTV1InnerCarry, batch: Dict[str, torch.Tensor], require_trace=False):
233
+ # -> Tuple[HierarchicalReasoningModel_ACTV1InnerCarry, torch.Tensor, Tuple[torch.Tensor, torch.Tensor], torch.Tensor]:
234
+ seq_info = dict(
235
+ cos_sin=self.rotary_emb() if hasattr(self, "rotary_emb") else None,
236
+ )
237
+
238
+ # Input encoding
239
+ input_embeddings = self._input_embeddings(batch["inputs"], batch["puzzle_identifiers"])
240
+
241
+ z_H_trace = []
242
+
243
+ # Forward iterations
244
+ with torch.no_grad():
245
+ z_H, z_L = carry.z_H, carry.z_L
246
+
247
+ for _H_step in range(self.config.H_cycles):
248
+ for _L_step in range(self.config.L_cycles):
249
+ if not ((_H_step == self.config.H_cycles - 1) and (_L_step == self.config.L_cycles - 1)):
250
+ z_L = self.L_level(z_L, z_H + input_embeddings, **seq_info)
251
+
252
+ if not (_H_step == self.config.H_cycles - 1):
253
+ z_H = self.H_level(z_H, z_L, **seq_info)
254
+ if require_trace:
255
+ z_H_trace.append(z_H.detach().cpu().clone())
256
+
257
+ assert not z_H.requires_grad and not z_L.requires_grad
258
+
259
+ # 1-step grad
260
+ z_L = self.L_level(z_L, z_H + input_embeddings, **seq_info)
261
+ z_H = self.H_level(z_H, z_L, **seq_info)
262
+
263
+ if require_trace:
264
+ z_H_trace.append(z_H.detach().cpu().clone())
265
+
266
+ # LM Outputs — decode z_H into token predictions
267
+ output = self.lm_head(z_H)[:, self.puzzle_emb_len:] # (B, seq_len, vocab_size)
268
+
269
+ # SHREK Component 1: Combined Error Signal
270
+ # Signal A — flip rate: what fraction of tokens changed from last step?
271
+ # catches oscillation (model changing its mind between wrong options)
272
+ flip_err, current_pred = get_error_signal(output, carry.prev_pred) # (B,), (B, seq_len)
273
+
274
+ # Signal B — learned estimator: reads z_H and predicts how wrong the model is.
275
+ # catches stuck-but-wrong (model confidently on wrong answer without oscillating)
276
+ # average over content positions (skip puzzle embedding prefix positions)
277
+ # CRITICAL: detach z_H_mean so aux_loss only trains error_estimator weights,
278
+ # NOT the main reasoning layers. Without detach, aux_loss sends parasitic
279
+ # gradients through z_H → H_level/L_level that conflict with lm_loss.
280
+ z_H_mean = z_H[:, self.puzzle_emb_len:].mean(dim=1).detach() # (B, hidden_size)
281
+ learned_err = torch.sigmoid(self.error_estimator(z_H_mean.float())) # (B, 1)
282
+ learned_err = learned_err.squeeze(-1) # (B,)
283
+
284
+ # SHREK: combined error = 50/50 blend of both signals
285
+ # flip_err works immediately from step 1 (no learning needed)
286
+ # learned_err becomes accurate over training and takes over as the stronger signal
287
+ error = 0.5 * flip_err + 0.5 * learned_err # (B,)
288
+
289
+ # SHREK Component 2: Stagnation-Aware Q-head
290
+ # Ablation: can be disabled via config.enable_stagnation_delta=False
291
+ if self.config.enable_stagnation_delta:
292
+ # Compute how much z_H changed during this reasoning step.
293
+ # CRITICAL: detach so Q-head gradients don't flow through all positions of z_H.
294
+ # Without detach, Q-head loss would route gradients through all 82 positions,
295
+ # drowning out lm_loss. With detach, Q-head gradients only flow through position 0.
296
+ z_H_f = z_H.detach().float()
297
+ z_H_start = carry.z_H.detach().float()
298
+ delta = torch.norm(z_H_f - z_H_start, dim=(1, 2)) / (torch.norm(z_H_start, dim=(1, 2)) + 1e-6) # (B,)
299
+ # Q-head reads CLS token + stagnation delta
300
+ q_input = torch.cat([z_H[:, 0].to(torch.float32), delta.unsqueeze(-1)], dim=-1) # (B, hidden_size+1)
301
+ else:
302
+ # Fallback: same as original HRM — Q-head reads CLS token only
303
+ q_input = z_H[:, 0].to(torch.float32) # (B, hidden_size)
304
+ q_logits = self.q_head(q_input).to(torch.float32) # (B, 2)
305
+
306
+ # SHREK: inject combined error into z_H (AFTER Q-head, only affects carry for next step)
307
+ # Ablation: can be disabled via config.enable_error_injection=False
308
+ if self.config.enable_error_injection:
309
+ # error_encoder maps scalar -> hidden_size vector
310
+ # alpha follows linear warmup: 0 → alpha_max over warmup steps
311
+ # scaled by 1/sqrt(hidden_size) so injection is proportional to model size
312
+ error_emb = self.error_encoder(error.unsqueeze(-1)) # (B, hidden_size)
313
+ # SHREK: compute alpha from warmup schedule (not learned)
314
+ # During warmup, alpha ramps linearly from 0 to alpha_max.
315
+ # After warmup, alpha stays at alpha_max.
316
+ # Uses torch.clamp instead of Python min() to stay compatible with torch.compile.
317
+ with torch.no_grad():
318
+ if self.training:
319
+ self._alpha_step += 1
320
+ alpha = self.config.alpha_max * torch.clamp(self._alpha_step / self.config.alpha_warmup_steps, max=1.0)
321
+ scale = math.sqrt(self.config.hidden_size)
322
+ z_H = z_H + (alpha * error_emb.unsqueeze(1) / scale).to(z_H.dtype) # (B, seq_len, hidden_size)
323
+
324
+ # New carry: store error-injected z_H so next ACT step starts from it
325
+ new_carry = HierarchicalReasoningModel_ACTV1InnerCarry(
326
+ z_H=z_H.detach(),
327
+ z_L=z_L.detach(),
328
+ # SHREK: store current predictions — next step compares against these for flip rate
329
+ prev_pred=current_pred.detach(),
330
+ # SHREK: Q-values written to carry for torch.compile compatibility (not read for Q-targets)
331
+ prev_q_halt=q_logits[..., 0].detach(),
332
+ prev_q_continue=q_logits[..., 1].detach(),
333
+ )
334
+
335
+ # SHREK: also return learned_err so pretrain.py can compute auxiliary loss
336
+ # auxiliary loss trains the estimator: predicted error should match real lm_loss
337
+ if require_trace:
338
+ return z_H_trace, new_carry, output, (q_logits[..., 0], q_logits[..., 1]), learned_err
339
+ else:
340
+ return new_carry, output, (q_logits[..., 0], q_logits[..., 1]), learned_err
341
+
342
+
343
+ class HierarchicalReasoningModel_ACTV1(nn.Module):
344
+ """ACT wrapper."""
345
+
346
+ def __init__(self, config_dict: dict):
347
+ super().__init__()
348
+ self.config = HierarchicalReasoningModel_ACTV1Config(**config_dict)
349
+ self.inner = HierarchicalReasoningModel_ACTV1_Inner(self.config)
350
+
351
+ @property
352
+ def puzzle_emb(self):
353
+ return self.inner.puzzle_emb
354
+
355
+ def initial_carry(self, batch: Dict[str, torch.Tensor]):
356
+ batch_size = batch["inputs"].shape[0]
357
+
358
+ return HierarchicalReasoningModel_ACTV1Carry(
359
+ inner_carry=self.inner.empty_carry(batch_size), # Empty is expected, it will be reseted in first pass as all sequences are halted.
360
+
361
+ steps=torch.zeros((batch_size, ), dtype=torch.int32),
362
+ halted=torch.ones((batch_size, ), dtype=torch.bool), # Default to halted
363
+
364
+ current_data={k: torch.empty_like(v) for k, v in batch.items()}
365
+ )
366
+
367
+ # SHREK: removed task_type parameter — error signal is universal, no task rules needed
368
+ def forward(self, carry: HierarchicalReasoningModel_ACTV1Carry, batch: Dict[str, torch.Tensor], require_trace=False):
369
+ # -> Tuple[HierarchicalReasoningModel_ACTV1Carry, Dict[str, torch.Tensor], torch.Tensor]:
370
+ # Update data, carry (removing halted sequences)
371
+ new_inner_carry = self.inner.reset_carry(carry.halted, carry.inner_carry)
372
+
373
+ new_steps = torch.where(carry.halted, 0, carry.steps)
374
+
375
+ new_current_data = {k: torch.where(carry.halted.view((-1, ) + (1, ) * (batch[k].ndim - 1)), batch[k], v) for k, v in carry.current_data.items()}
376
+
377
+ # SHREK: run inner forward — unpack learned_err for auxiliary loss in pretrain.py
378
+ if require_trace:
379
+ z_H_trace, new_inner_carry, logits, (q_halt_logits, q_continue_logits), learned_err = self.inner(new_inner_carry, new_current_data, require_trace=require_trace)
380
+ else:
381
+ new_inner_carry, logits, (q_halt_logits, q_continue_logits), learned_err = self.inner(new_inner_carry, new_current_data)
382
+
383
+ outputs = {
384
+ "logits": logits,
385
+ "q_halt_logits": q_halt_logits,
386
+ "q_continue_logits": q_continue_logits,
387
+ "learned_err": learned_err, # SHREK: for auxiliary loss in pretrain.py
388
+ }
389
+
390
+ with torch.no_grad():
391
+ # Step
392
+ new_steps = new_steps + 1
393
+ is_last_step = new_steps >= self.config.halt_max_steps
394
+
395
+ halted = is_last_step
396
+
397
+ # if training, and ACT is enabled
398
+ if self.training and (self.config.halt_max_steps > 1):
399
+ # Halt signal
400
+ # NOTE: During evaluation, always use max steps, this is to guarantee the same halting steps inside a batch for batching purposes
401
+ halted = halted | (q_halt_logits > q_continue_logits)
402
+
403
+ # Exploration
404
+ min_halt_steps = (torch.rand_like(q_halt_logits) < self.config.halt_exploration_prob) * torch.randint_like(new_steps, low=2, high=self.config.halt_max_steps + 1)
405
+
406
+ halted = halted & (new_steps >= min_halt_steps)
407
+
408
+ # SHREK: Q-target via double forward pass (same as original HRM).
409
+ # Run inner() a second time to get NEXT step's Q-values (step T+1).
410
+ # Save/restore _alpha_step so the second call doesn't double-count
411
+ # the warmup — without this, alpha reaches full strength at step ~2500
412
+ # instead of 5000, destabilizing early training.
413
+ # NOTE: prev_q fields in carry are not read here — they must stay
414
+ # in the dataclass for torch.compile compatibility.
415
+ saved_alpha_step = self.inner._alpha_step.clone()
416
+ next_q_halt_logits, next_q_continue_logits = self.inner(new_inner_carry, new_current_data)[-2]
417
+ self.inner._alpha_step.copy_(saved_alpha_step)
418
+
419
+ outputs["target_q_continue"] = torch.sigmoid(
420
+ torch.where(is_last_step,
421
+ next_q_halt_logits,
422
+ torch.maximum(next_q_halt_logits, next_q_continue_logits))
423
+ )
424
+
425
+ if require_trace:
426
+ return HierarchicalReasoningModel_ACTV1Carry(new_inner_carry, new_steps, halted, new_current_data), outputs, new_steps, (q_halt_logits > q_continue_logits), z_H_trace
427
+ else:
428
+ return HierarchicalReasoningModel_ACTV1Carry(new_inner_carry, new_steps, halted, new_current_data), outputs, new_steps, (q_halt_logits > q_continue_logits)
sudoku-extreme/shrek-tiny/losses.py ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import Any, Tuple, Dict, Sequence, Optional
2
+
3
+ import torch
4
+ import torch.nn.functional as F
5
+ from torch import nn
6
+
7
+
8
+ IGNORE_LABEL_ID = -100
9
+
10
+
11
+ def s(x, epsilon=1e-30):
12
+ return torch.where(
13
+ x<0,
14
+ 1/(1-x+ epsilon),
15
+ x + 1
16
+ )
17
+
18
+
19
+ def log_stablemax(x, dim=-1):
20
+ s_x = s(x)
21
+ return torch.log(s_x/torch.sum(s_x, dim=dim, keepdim=True))
22
+
23
+
24
+ def stablemax_cross_entropy(logits, labels, ignore_index: int = -100):
25
+ logprobs = log_stablemax(logits.to(torch.float64), dim=-1)
26
+
27
+ valid_mask = labels != ignore_index
28
+ transformed_labels = torch.where(valid_mask, labels, 0)
29
+ prediction_logprobs = torch.gather(logprobs, index=transformed_labels.to(torch.long).unsqueeze(-1), dim=-1).squeeze(-1)
30
+
31
+ return -torch.where(valid_mask, prediction_logprobs, 0)
32
+
33
+
34
+ def softmax_cross_entropy(logits, labels, ignore_index: int = -100):
35
+ # Cast logits to f32
36
+ # Flatten logits
37
+ return F.cross_entropy(logits.to(torch.float32).view(-1, logits.shape[-1]), labels.to(torch.long).view(-1), ignore_index=ignore_index, reduction="none").view(labels.shape)
38
+
39
+
40
+ class ACTLossHead(nn.Module):
41
+ def __init__(self, model: nn.Module, loss_type: str):
42
+ super().__init__()
43
+ self.model = model
44
+ self.loss_fn = globals()[loss_type]
45
+
46
+ def initial_carry(self, *args, **kwargs):
47
+ return self.model.initial_carry(*args, **kwargs) # type: ignore
48
+
49
+ def forward(
50
+ self,
51
+ return_keys: Sequence[str],
52
+ require_trace=False,
53
+ # Model args
54
+ **model_kwargs,
55
+ ) -> Tuple[Any, torch.Tensor, Dict[str, torch.Tensor], Optional[Dict[str, torch.Tensor]], torch.Tensor]:
56
+ # Model logits
57
+ # B x SeqLen x D
58
+ if require_trace:
59
+ new_carry, outputs, steps, act_halt, z_H_trace = self.model(**model_kwargs, require_trace=require_trace)
60
+ else:
61
+ new_carry, outputs, steps, act_halt = self.model(**model_kwargs)
62
+ labels = new_carry.current_data["labels"]
63
+ alpha = 1.0
64
+ ds_mask = (alpha ** (16-steps.detach())).unsqueeze(dim=1)
65
+ # print(ds_mask.shape)
66
+
67
+ # Correctness
68
+ with torch.no_grad():
69
+ mask = labels != IGNORE_LABEL_ID
70
+ loss_counts = mask.sum(-1)
71
+ loss_divisor = loss_counts.clamp_min(1).unsqueeze(-1) # Avoid NaNs in division
72
+
73
+ is_correct = mask & (torch.argmax(outputs["logits"], dim=-1) == labels)
74
+ seq_is_correct = is_correct.sum(-1) == loss_counts
75
+
76
+ # # Metrics (halted)
77
+ # valid_metrics = new_carry.halted & (loss_counts > 0)
78
+ valid_metrics = (loss_counts > 0)
79
+
80
+ metrics = {
81
+ "count": valid_metrics.sum(),
82
+
83
+ "accuracy": torch.where(valid_metrics, (is_correct.to(torch.float32) / loss_divisor).sum(-1), 0).sum(),
84
+ "exact_accuracy": (valid_metrics & seq_is_correct).sum(),
85
+
86
+ "q_halt_accuracy": (valid_metrics & ((outputs["q_halt_logits"] >= 0) == seq_is_correct)).sum(),
87
+ "steps": torch.where(valid_metrics, new_carry.steps, 0).sum(),
88
+ }
89
+
90
+ # Losses
91
+ # FIXME: Assuming the batch is always full
92
+ loss = self.loss_fn(outputs["logits"], labels, ignore_index=IGNORE_LABEL_ID)
93
+ # print(loss.shape)
94
+ lm_loss = (ds_mask * loss / loss_divisor).sum()
95
+ q_halt_loss = F.binary_cross_entropy_with_logits(outputs["q_halt_logits"], seq_is_correct.to(outputs["q_halt_logits"].dtype), reduction="sum")
96
+
97
+ metrics.update({
98
+ "lm_loss": lm_loss.detach(),
99
+ "q_halt_loss": q_halt_loss.detach(),
100
+ })
101
+
102
+ # Q continue (bootstrapping target loss)
103
+ q_continue_loss = 0
104
+ if "target_q_continue" in outputs:
105
+ q_continue_loss = F.binary_cross_entropy_with_logits(outputs["q_continue_logits"], outputs["target_q_continue"], reduction="sum")
106
+
107
+ metrics["q_continue_loss"] = q_continue_loss.detach()
108
+
109
+ # SHREK: auxiliary loss — trains error_estimator to predict per-sample lm_loss.
110
+ # Computed here (not in pretrain.py) so learned_err still has gradients.
111
+ # per_sample_lm_loss is detached so only error_estimator weights get updated by aux_loss.
112
+ aux_loss = 0
113
+ if "learned_err" in outputs:
114
+ per_sample_lm_loss = (ds_mask * loss / loss_divisor).sum(dim=1).detach() # (B,)
115
+ # SHREK: min-max normalize target to 0-1 so it matches sigmoid output range.
116
+ # When all losses are equal (early training), target = 0 (no distinguishable error).
117
+ # When losses vary, target spreads across 0-1 giving the estimator a useful signal.
118
+ lm_min = per_sample_lm_loss.min()
119
+ lm_max = per_sample_lm_loss.max()
120
+ target = (per_sample_lm_loss - lm_min) / (lm_max - lm_min + 1e-6) # (B,) in [0, 1]
121
+ aux_loss = F.mse_loss(outputs["learned_err"], target, reduction="sum")
122
+ metrics["aux_loss"] = aux_loss.detach()
123
+
124
+ # Filter outputs for return
125
+ detached_outputs = {k: outputs[k].detach() for k in return_keys if k in outputs}
126
+
127
+ if require_trace:
128
+ return z_H_trace, new_carry, lm_loss + 0.5 * (q_halt_loss + q_continue_loss) + 0.1 * aux_loss, metrics, detached_outputs, new_carry.halted.all(), new_carry.halted & act_halt
129
+ else:
130
+ return new_carry, lm_loss + 0.5 * (q_halt_loss + q_continue_loss) + 0.1 * aux_loss, metrics, detached_outputs, new_carry.halted.all(), new_carry.halted & act_halt
sudoku-extreme/shrek-tiny/step_10416 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f7a9b87f3c1736f07844356e56f16a81f097f5b66d4dcaa24b0a465c7b55dc30
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_11718 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b79a29f9494f6cb0d96e889eda427029b53669c02e3c5e1966fdcb73dd35f85
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_1302 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d4c324d3cce0b23a822d4dcec4f92acf7efc837d868179842bff282b5fb021e
3
+ size 54598483
sudoku-extreme/shrek-tiny/step_13020 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5a500c15a465e806f8167f00548fe27a98116b40d1f8b6badab15e7bb330cd45
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_14322 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:674eba287ffc5b434065d82a9949595b56fa6d970128db62ce82456c8235012c
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_15624 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:56717a02415f060c374bc6b944f3a277e7a794c4b20f7f012e3d2182bc97f9e8
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_16926 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c4a66ee19c4b5cc832db9348557711086ea6e8388af8292f41cc947fc9b7f2b5
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_18228 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d13ade3a56642ffcff2d8ccf3e98cb4cf0bead1d02abcf186608d0af27670eb
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_19530 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:884efd1672ae1e942cad2e2afe0ea175babee5890869f08f2e9e01652349783f
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_20832 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37b32d3e9fef7ef49525019dc270e3e49ec2fad229304397e38067bfc5c7d2e5
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_22134 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a0e74df690b60c7b83eddf3de2a8851d6faffd52ff73afd03f8dd89939b5eeb9
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_23436 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f77d1dd7a3fc14f6e7fe2ea3af70cb636cce5fe7063e392ada4ccd52802bbcb8
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_24738 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e81f5eade0b0ca6ea43399bc0a6d3106e6b8ed9f9f9cbe6b4d63aa6805e8b76c
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_2604 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bebb441ecdf5fcbcce3043451382c3351e2f2ff6babeae408bf65ddf34ffd1a8
3
+ size 54598483
sudoku-extreme/shrek-tiny/step_26040 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c8c7f4337650caf5b9691c3cb1773ab39eec11d23a29a80fa094226512a80de
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_27342 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c9caa7822e6db807cbb90a022eb22eb9f177671c457a5e224ce0403cb99e2ed
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_28644 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b20b27a5c01420bd424788f4150109ffbd02e5b120192dc3a29a65ed66f4e5b
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_29946 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:af8468106a2c5d22677e1eaf3c6c28106680efc19999169fd39ca185959a5a20
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_31248 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c132a5392ceae910c20c8183eeccf16d4ab6c4f2a0c183576558cd3aa49063b6
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_32550 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:08e19ad87f3890577bbcc2d144a59f72d9d9d3170e941c658f6ffdacd8725c45
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_33852 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:141ae2f139b928feb4776acf1970694c795dfc8a7d32e48339eecf3b19888a2a
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_35154 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4d0be9e4e7e011aeafb1bf8297d2069c474631192b7b643fdefb851aa1f42dc8
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_36456 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6962ea1a05e33cef44b4a1cba0f2a3a7265ec675265712a252e50702ed1de47d
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_37758 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0837a3d63e0b84b98b8eaddfc8a67bb96f3a8c26377fbd4d3f04f960ec654fc3
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_37758_all_preds.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:93543b6f9821425ca72da9e5fcd966ae60528b8f423e3f4872cc1d4a8a38bb20
3
+ size 1033379377
sudoku-extreme/shrek-tiny/step_3906 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:255ef492d8d77bb3f8d828f9adeafafb7d71efe29d623f1f7a70b599007207d7
3
+ size 54598483
sudoku-extreme/shrek-tiny/step_39060 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8500994e181ac6e1347d0d1aa644f44110e75d88764b275496cae0bc3e5f7087
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_40362 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:583a24e7d74d0b2f2253e95c14661aad1a00ed597680842aeca760b6543b4b69
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_41664 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b09be0d8af7ca33b14709752f26318ea0ab0a59f0ef94c8e437804cdfd212b5e
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_42966 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c2fc33a697eb461c49d4627a80129d7c4b1af5077986b0f27d180b13252a893
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_44268 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c1907fc6e2a3433cc87c82e874054485453f340bae67ec05945d43ffdcd6b868
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_45570 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:86fd6adf26bb571d55cdc52f638d15866487eed7b09cec1d464b37cd8c25a7c5
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_46872 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0aaaa7d1c8040553db710d5027875380edc6675a90c1b074f635f69d23f89b9
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_48174 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48794e8438aa40d7053ca0204d02ada22e5e74098d80039e3f7cf3158b061a45
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_49476 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe7030727a222d3451f7b143f477b498b06f2ed2050b1f2b156d2100912f6ca6
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_50778 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0cb76ae9942dc09f964508a64766189b5d7c5263a10c67bd960035ac9a68e26f
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_5208 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa53481158d956c5240552968e6ad19a31ba55758daa1e180079af9a5f8faf9d
3
+ size 54598483
sudoku-extreme/shrek-tiny/step_52080 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ae1e1035991097d9d09958d0b366a21b10d00cd4e02cefaac8cb47fdc663e3dd
3
+ size 54598517
sudoku-extreme/shrek-tiny/step_6510 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bb056827cf216f10bca7b5855c490a9702c164402e489abfe14b6ee82e393514
3
+ size 54598483
sudoku-extreme/shrek-tiny/step_7812 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a803fd6913179026762f281155adb767e7486a03e5078f52e667835ebffd58db
3
+ size 54598483
sudoku-extreme/shrek-tiny/step_9114 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a06f3a6b7a17e779d43ba63e7671c97d15ea2f6d9e251f136a03b7340266b1f
3
+ size 54598483