============================================================
TRAINING
============================================================
  epoch  1  loss=0.267299  softmax_sum=1: yes  worst_err=0.00e+00
  epoch  2  loss=0.264373  softmax_sum=1: yes  worst_err=0.00e+00
  epoch  3  loss=0.261481  softmax_sum=1: yes  worst_err=0.00e+00
  epoch  4  loss=0.258626  softmax_sum=1: yes  worst_err=0.00e+00
  epoch  5  loss=0.255813  softmax_sum=1: yes  worst_err=0.00e+00
  epoch  6  loss=0.253151  softmax_sum=1: yes  worst_err=0.00e+00
  epoch  7  loss=0.250961  softmax_sum=1: yes  worst_err=0.00e+00
  epoch  8  loss=0.248797  softmax_sum=1: yes  worst_err=0.00e+00
  epoch  9  loss=0.246661  softmax_sum=1: yes  worst_err=0.00e+00
  epoch 10  loss=0.244555  softmax_sum=1: yes  worst_err=0.00e+00
  epoch 11  loss=0.242481  softmax_sum=1: yes  worst_err=0.00e+00
  epoch 12  loss=0.240439  softmax_sum=1: yes  worst_err=9.07e-13
  epoch 13  loss=0.238432  softmax_sum=1: yes  worst_err=0.00e+00
  epoch 14  loss=0.236461  softmax_sum=1: yes  worst_err=0.00e+00
  epoch 15  loss=0.234526  softmax_sum=1: yes  worst_err=0.00e+00
  epoch 16  loss=0.232628  softmax_sum=1: yes  worst_err=0.00e+00
  epoch 17  loss=0.230768  softmax_sum=1: yes  worst_err=0.00e+00
  epoch 18  loss=0.228947  softmax_sum=1: yes  worst_err=0.00e+00
  epoch 19  loss=0.227165  softmax_sum=1: yes  worst_err=0.00e+00
  epoch 20  loss=0.225423  softmax_sum=1: yes  worst_err=0.00e+00

============================================================
GENERATION
============================================================

--- Greedy ---
prompt: the cat
strategy: greedy

  step 1: [0.1992, 0.1492, 0.5492, 0.0000, 0.1024] -> sat (0.5492)
  step 2: [0.0846, 0.2748, 0.6391, 0.0015, 0.0000] -> sat (0.6391)
  step 3: [0.2336, 0.1937, 0.5723, 0.0000, 0.0004] -> sat (0.5723)
  step 4: [0.2265, 0.1842, 0.5893, 0.0000, 0.0000] -> sat (0.5893)

result: the cat sat sat sat sat

--- Sampled ---
prompt: the cat
strategy: sample

  step 1: [0.1992, 0.1492, 0.5492, 0.0000, 0.1024] -> sat (0.5492)
  step 2: [0.0846, 0.2748, 0.6391, 0.0015, 0.0000] -> sat (0.6391)
  step 3: [0.2336, 0.1937, 0.5723, 0.0000, 0.0004] -> sat (0.5723)
  step 4: [0.2265, 0.1842, 0.5893, 0.0000, 0.0000] -> sat (0.5893)

result: the cat sat sat sat sat

--- Top-k (k=2) ---
prompt: the cat
strategy: top_k

  step 1: [0.1992, 0.1492, 0.5492, 0.0000, 0.1024] -> sat (0.5492)
  step 2: [0.0846, 0.2748, 0.6391, 0.0015, 0.0000] -> sat (0.6391)
  step 3: [0.2336, 0.1937, 0.5723, 0.0000, 0.0004] -> sat (0.5723)
  step 4: [0.2265, 0.1842, 0.5893, 0.0000, 0.0000] -> sat (0.5893)

result: the cat sat sat sat sat

============================================================
VERIFICATION
============================================================
  softmax_sum                        [PASS] all softmax outputs sum to exactly 1
  attention_weights                  [PASS] all attention weight rows sum to exactly 1
  d_stability                        [PASS] all D = 4294967296
  deterministic                      [PASS] bit-identical across 3 epochs
  forward_backward_roundtrip         [PASS] bit-identical after one training step
  checkpoint_roundtrip               [PASS] checkpoint roundtrip bit-identical
  weight_update                      [PASS] weight update exact: (w_old - w_new) == lr * grad
  loss_monotonicity                  [PASS] loss decreased: 0.267299 -> 0.244555
  gradient_correctness               [PASS] gradient diff = 0.000314 (< 0.1)

ALL TESTS PASSED

============================================================
INSPECTION
============================================================
=== Parameters ===
  Wq.weight            0.7532, 0.9984, -0.0006, -0.9997
  Wq.bias              0.0035, -0.0007, -0.0011, -0.0000
  Wk.weight            0.5011, -0.2498, 1.0022, 0.7499
  Wk.bias              -0.0002, -0.0005, 0.0005, 0.0005
  Wv.weight            0.2650, -0.2670, -0.0056, -0.0032
  Wv.bias              0.0148, -0.0148, -0.0030, -0.0048
  Wo.weight            -0.2436, 0.7463, -0.2485, 0.4917
  Wo.bias              -0.0080, 0.0068, -0.0022, 0.0145
  ffn_l1.weight        0.5000, 1.0000, 0.2500, 0.7489...
  ffn_l1.bias          0.0000, 0.0000, 0.0000, -0.0045...
  ffn_l2.weight        0.7500, 0.2500, 0.0000, 0.7500
  ffn_l2.bias          -0.0092, 0.0025, -0.0130, 0.0034
  output.weight        0.7500, 0.5027, 0.5060, 0.0003...
  output.bias          0.0000, 0.0061, -0.0110, 0.0023...

=== Token Embeddings ===
  [0] the    -1.000, 1.000, 1.000, 0.750
  [1] cat    -0.750, -1.000, 1.000, 0.500
  [2] sat    1.000, -0.500, 0.250, 0.500
  [3] on     0.250, 0.750, -0.250, 0.250
  [4] mat    -0.500, -0.500, 0.500, 0.000

=== Positional Embeddings ===
  [0] 0.750, -0.250, -0.500, 0.750
  [1] 1.000, 1.000, -0.500, -0.250
  [2] 0.750, 1.000, -1.000, 0.500
  [3] 1.000, 0.000, 0.250, -0.500

=== Denominator Report ===
  all 181 parameters have D = 4294967296  [OK]

=== Attention Map ===
      the     cat     sat     on
  the  1.000   0.000   0.000   0.000
  cat  0.500   0.500   0.000   0.000
  sat  0.333   0.335   0.332   0.000
  on   0.283   0.527   0.000   0.190

=== Logits & Probs ===
  the    logit=0.0167  prob=0.0000
  cat    logit=1.6293  prob=0.2573
  sat    logit=2.5525  prob=0.6362
  on     logit=0.4970  prob=0.0228
  mat    logit=0.9362  prob=0.0837
  sum(probs) = 1.0000000000

=== Gradient Magnitudes ===
  Wq.weight            total_abs_grad = 0.071552
  Wk.weight            total_abs_grad = 0.094983
  Wv.weight            total_abs_grad = 0.132358
  Wo.weight            total_abs_grad = 0.080886
  ffn_l1.weight        total_abs_grad = 0.250609
  ffn_l2.weight        total_abs_grad = 0.277948
  output.weight        total_abs_grad = 0.467355
  loss = 0.295700

=== Loss Trajectory ===
  epoch  1  0.267299  #############
  epoch  2  0.264373  #############
  epoch  3  0.261481  #############
  epoch  4  0.258626  ############
  epoch  5  0.255813  ############
  epoch  6  0.253151  ############
  epoch  7  0.250961  ############
  epoch  8  0.248797  ############
  epoch  9  0.246661  ############
  epoch 10  0.244555  ############
  epoch 11  0.242481  ############
  epoch 12  0.240439  ############
  epoch 13  0.238432  ###########
  epoch 14  0.236461  ###########
  epoch 15  0.234526  ###########
  epoch 16  0.232628  ###########
  epoch 17  0.230768  ###########
  epoch 18  0.228947  ###########
  epoch 19  0.227165  ###########
  epoch 20  0.225423  ###########


============================================================
ALL COMPLETE — ALL TESTS PASSED
