Views
No views yet
ac2. Checkpoint saved
after training step 42 (0-indexed). Strict upstream eval parity:
1100s hard kill, verbatim prompts/entrypoints, group 64x8, T=1.0, kl 0.1.1{
2 "step": 42,
3 "progress/batch": 42,
4 "optim/lr": 4e-05,
5 "progress/done_frac": 0.86,
6 "puct/buffer_size": 678,
7 "puct/sampled_size": 8,
8 "puct/T": 21504,
9 "puct/scale_last": 0.4405933995865936,
10 "puct/buffer_value/mean": 0.9345864959118343,
11 "puct/buffer_value/std": 0.03783064745232859,
12 "puct/buffer_value/min": 0.5041471954736918,
13 "puct/buffer_value/max": 0.9447405950602854,
14 "puct/buffer_timestep/mean": 20.25221238938053,
15 "puct/buffer_timestep/std": 12.287837937653206,
16 "puct/buffer_timestep/min": -1.0,
17 "puct/buffer_timestep/max": 41.0,
18 "puct/buffer_construction_len/mean": 3149.4365781710912,
19 "puct/buffer_construction_len/std": 2202.501531938187,
20 "puct/buffer_construction_len/min": 1024.0,
21 "puct/buffer_construction_len/max": 32768.0,
22 "puct/sampled_value/mean": 0.9447379098322995,
23 "puct/sampled_value/std": 2.014418457927013e-06,
24 "puct/sampled_value/min": 0.9447340001441719,
25 "puct/sampled_value/max": 0.9447405950602854,
26 "puct/sampled_timestep/mean": 41.0,
27 "puct/sampled_timestep/std": 0.0,
28 "puct/sampled_timestep/min": 41.0,
29 "puct/sampled_timestep/max": 41.0,
30 "puct/sampled_construction_len/mean": 4096.0,
31 "puct/sampled_construction_len/std": 0.0,
32 "puct/sampled_construction_len/min": 4096.0,
33 "puct/sampled_construction_len/max": 4096.0,
34 "time/sampling": 5015.592090129852,
35 "env/all/ac_tokens_per_turn": 10193.41015625,
36 "env/all/ob_tokens_per_turn": 4254.5,
37 "env/all/turns_per_episode": 1.0,
38 "env/all/total_episodes": 512,
39 "env/all/total_turns": 512,
40 "env/all/total_ac_tokens": 5219026,
41 "env/all/total_ob_tokens": 2178304,
42 "env/all/time/sampling_mean": 436.80554293701425,
43 "env/all/time/sampling_max": 557.6717121601105,
44 "env/all/time/env_step_mean": 2256.523292309139,
45 "env/all/time/env_step_max": 4453.112313747406,
46 "env/all/reward/mean": 0.8099936963061822,
47 "env/all/reward/max": 0.9447549673295943,
48 "env/all/reward/min": 0.0,
49 "env/all/format": 1.0,
50 "env/all/format/min": 1.0,
51 "env/all/format/max": 1.0,
52 "env/all/reward": 0.8099936963061822,
53 "env/all/correctness": 0.86328125,
54 "env/all/correctness/min": 0.0,
55 "env/all/correctness/max": 1.0,
56 "env/all/raw_score": 0.9382732409700574,
57 "env/all/raw_score/min": 0.24727092144197158,
58 "env/all/raw_score/max": 0.9447549673295943,
59 "env/all/initial_raw_score": 0.9447379098322994,
60 "env/all/initial_raw_score/min": 0.9447340001441719,
61 "env/all/initial_raw_score/max": 0.9447405950602854,
62 "env/all/msg": "Success; raw_score=0.9447390656831594",
63 "env/all/parsed_code": "```python\nimport numpy as np\nimport time\nfrom typing import Tuple\nimport random\n\ndef _simpson_l2sq(conv: np.ndarray) -> Tuple[float, np.ndarray]:\n m = conv.size\n if m == 0:\n return 0.0, np.zeros_like(conv)\n dx = 1.0 / (m + 1)\n y = np.zeros(m + 2, dtype=conv.dtype)\n y[0] = 0.0\n y[1:-1] = conv\n y[-1] = 0.0\n lhs = y[:-1]\n rhs = y[1:]\n l2_sq = (dx / 3.0) * np.sum(lhs * lhs + lhs * rhs + rhs * rhs)\n grad_y = (dx / 3.0) * (4 * y + np.roll(y, 1) + np.roll(y, -1))\n grad_conv = grad_y[1:-1]\n return float(l2_sq), grad_conv\n\ndef _l1(conv: np.ndarray) -> Tuple[float, np.ndarray]:\n m = conv.size\n dx = 1.0 / (m + 1) if m > 0 else 1.0\n val = dx * float(np.sum(conv)) if m > 0 else 0.0\n grad = np.full_like(conv, dx)\n return val, grad\n\ndef _linf(conv: np.ndarray) -> Tuple[float, np.ndarray]:\n if conv.size == 0:\n return 0.0, np.zeros_like(conv)\n m = float(np.max(conv))\n mask = conv == m\n count = int(mask.sum())\n if count == 0 or m <= 0.0:\n return m, np.zeros_like(conv)\n grad = mask.astype(conv.dtype)\n return m, grad\n\ndef _objective_and_grad_conv(conv: np.ndarray) -> Tuple[float, np.ndarray]:\n l2_sq, g_l2 = _simpson_l2sq(conv)\n l1, g_l1 = _l1(conv)\n linf, g_linf = _linf(conv)\n if l1 <= 0.0 or linf <= 0.0:\n return 0.0, np.zeros_like(conv)\n denom = l1 * linf\n c_value = l2_sq / denom\n num_grad = g_l2 * denom - l2_sq * (g_l1 * linf + l1 * g_linf)\n g_conv = num_grad / (denom * denom)\n return float(c_value), g_conv\n\ndef _grad_h_from_conv_grad(h: np.ndarray, g_conv: np.ndarray) -> np.ndarray:\n h_rev = h[::-1]\n g_h = np.convolve(g_conv, h_rev, mode=\"full\")\n N = len(h)\n gradient = g_h[N-1 : N-1 + N]\n return gradient\n\ndef construct_function():\n \"\"\"Constructs a sequence to maximize the lower bound C using adaptive upscaling, diverse initial sequences, and optimized gradient ascent with constraint maintenance.\"\"\"\n n_start = 128\n target_length = 4096\n max_seconds = 1000\n num_initializations = 32 # Reduced for better exploration\n\n initial_sequences = []\n\n # Load previous best if available\n if 'height_sequence_1' in globals():\n initial_sequences.append(np.array(height_sequence_1, dtype=np.float32))\n else:\n pass # Proceed with generated sequences\n\n # Generate diverse initial sequences with guaranteed sum of 0.01 and max <= 1000\n for _ in range(num_initializations):\n # Gaussian-like\n seq = np.zeros(n_start, dtype=np.float32)\n center = n_start // 2\n std = n_start // 6\n scale = 0.01 / np.sqrt(2 * np.pi * std**2)\n for i in range(n_start):\n seq[i] = np.exp(-((i - center) ** 2) / (2 * std**2)) * scale\n max_seq = np.max(seq)\n if max_seq > 1000.0:\n seq *= 1000.0 / max_seq\n sum_seq = np.sum(seq)\n if sum_seq < 0.01:\n seq *= 0.01 / sum_seq\n initial_sequences.append(seq)\n\n # Random\n seq_rand = np.random.rand(n_start) * 0.1\n max_rand = np.max(seq_rand)\n if max_rand > 1000.0:\n seq_rand *= 1000.0 / max_rand\n sum_rand = np.sum(seq_rand)\n if sum_rand < 0.01:\n seq_rand *= 0.01 / sum_rand\n initial_sequences.append(seq_rand)\n\n # Uniform\n seq_uniform = np.ones(n_start, dtype=np.float32) * 0.01 / n_start\n max_uni = np.max(seq_uniform)\n if max_uni > 1000.0:\n seq_uniform *= 1000.0 / max_uni\n sum_uni = np.sum(seq_uniform)\n if sum_uni < 0.01:\n seq_uniform *= 0.01 / sum_uni\n initial_sequences.append(seq_uniform)\n\n # Multi-peak\n seq_multi = np.zeros(n_start, dtype=np.float32)\n peak_positions = [n_start // 4, n_start // 2, n_start * 3 // 4]\n for pos in peak_positions:\n seq_multi[pos] += 0.01 / len(peak_positions)\n max_multi = np.max(seq_multi)\n if max_multi > 1000.0:\n seq_multi *= 1000.0 / max_multi\n sum_multi = np.sum(seq_multi)\n if sum_multi < 0.01:\n seq_multi *= 0.01 / sum_multi\n initial_sequences.append(seq_multi)\n\n # Single-peak\n seq_single = np.zeros(n_start, dtype=np.float32)\n seq_single[n_start // 2] = 0.01\n max_single = np.max(seq_single)\n if max_single > 1000.0:\n seq_single *= 1000.0 / max_single\n sum_single = np.sum(seq_single)\n if sum_single < 0.01:\n seq_single *= 0.01 / sum_single\n initial_sequences.append(seq_single)\n\n # Find best initial sequence\n best_seq = None\n best_value = -float('inf')\n for seq in initial_sequences:\n try:\n current_value = evaluate_sequence(seq.tolist())\n except Exception as e:\n print(f\"Error evaluating initial sequence: {e}\")\n continue\n if current_value > best_value:\n best_value = current_value\n best_seq = seq.copy()\n\n if best_seq is None:\n seq = np.zeros(n_start, dtype=np.float32)\n center = n_start // 2\n std = n_start // 6\n scale = 0.01 / np.sqrt(2 * np.pi * std**2)\n for i in range(n_start):\n seq[i] = np.exp(-((i - center) ** 2) / (2 * std**2)) * scale\n max_seq = np.max(seq)\n if max_seq > 1000.0:\n seq *= 1000.0 / max_seq\n sum_seq = np.sum(seq)\n if sum_seq < 0.01:\n seq *= 0.01 / sum_seq\n best_seq = seq.copy()\n best_value = evaluate_sequence(best_seq.tolist())\n\n # Upscale with interpolation and constraints\n def upscale_sequence(seq, target_len):\n if len(seq) >= target_len:\n return seq[:target_len]\n n = len(seq)\n new_seq = np.zeros(target_len, dtype=np.float32)\n for i in range(n):\n new_seq[i::n] = seq[i]\n max_new = np.max(new_seq)\n if max_new > 1000.0:\n new_seq *= 1000.0 / max_new\n sum_new = np.sum(new_seq)\n if sum_new < 0.01:\n new_seq *= 0.01 / sum_new\n return new_seq\n\n current_len = len(best_seq)\n while current_len < target_length:\n upsampled_seq = upscale_sequence(best_seq, target_length)\n best_seq = upsampled_seq\n current_len = target_length\n\n # Optimizer with improved learning rate dynamics\n start_time = time.time()\n best_seq = best_seq.copy()\n best_value = evaluate_sequence(best_seq.tolist())\n\n max_iter = 800000\n learning_rate = 0.015\n decay_rate = 0.9995\n min_lr = 1e-5\n decay_steps = 10\n step_counter = 0\n beta1, beta2, epsilon = 0.95, 0.9995, 1e-8\n m = np.zeros_like(best_seq)\n v = np.zeros_like(best_seq)\n t = 0\n\n for _ in range(max_iter):\n step_counter += 1\n try:\n conv = np.convolve(best_seq, best_seq, mode='full')\n l2_sq, g_l2 = _simpson_l2sq(conv)\n l1, g_l1 = _l1(conv)\n linf, g_linf = _linf(conv)\n except Exception as e:\n print(f\"Convolution error: {e}\")\n break\n\n if l1 <= 0.0 or linf <= 0.0:\n break\n\n denom = l1 * linf\n c_value = l2_sq / denom\n g_conv = _objective_and_grad_conv(conv)[1]\n grad_h = _grad_h_from_conv_grad(best_seq, g_conv)\n\n t += 1\n m = beta1 * m + (1 - beta1) * grad_h\n v = beta2 * v + (1 - beta2) * (grad_h ** 2)\n m_hat = m / (1 - beta1 ** t)\n v_hat = v / (1 - beta2 ** t)\n step = learning_rate * m_hat / (np.sqrt(v_hat) + epsilon)\n best_seq += step\n\n # Clip and re-scale with constraint-aware projection\n best_seq = np.clip(best_seq, 0.0, 1000.0)\n sum_seq = np.sum(best_seq)\n max_seq = np.max(best_seq)\n if sum_seq < 0.01:\n scale_needed = 0.01 / sum_seq\n scale_allowable = 1000.0 / max_seq if max_seq > 0 else 1.0\n scale = min(scale_needed, scale_allowable)\n best_seq = best_seq * scale\n sum_seq = np.sum(best_seq)\n max_seq = np.max(best_seq)\n\n if step_counter % 20 == 0:\n current_value = evaluate_sequence(best_seq.tolist())\n if current_value > best_value:\n best_value = current_value\n best_seq = best_seq.copy()\n\n if time.time() - start_time > max_seconds - 5:\n break\n\n if step_counter % decay_steps == 0:\n learning_rate *= decay_rate\n\n final_value = evaluate_sequence(best_seq.tolist())\n print(f\"Final C2 lower bound: {final_value:.6f}\")\n return best_seq.tolist()\n```",
64 "env/all/time/policy": 436.80554293701425,
65 "env/all/time/policy/min": 168.722998380661,
66 "env/all/time/policy/max": 557.6717121601105,
67 "env/all/time/env_step": 2256.523292309139,
68 "env/all/time/env_step/min": 0.006495952606201172,
69 "env/all/time/env_step/max": 4453.112313747406,
70 "env/all/time/reward_compute": 2.658925950527191e-07,
71 "env/all/time/reward_compute/min": 1.9371509552001953e-07,
72 "env/all/time/reward_compute/max": 5.252659320831299e-07,
73 "env/all/by_group/frac_mixed": 1.0,
74 "env/all/by_group/frac_all_good": 0.0,
75 "env/all/by_group/frac_all_bad": 0.0,
76 "advantage/mean": 0.019492004066705704,
77 "advantage/min": -1.0,
78 "advantage/max": 3.019381523132324,
79 "time/assemble_training_data": 12.019615173339844,
80 "time/kl_vs_base": 117.7056131362915,
81 "kl_policy_base": 0.0006066272035241127,
82 "time/train": 721.6563351154327,
83 "time/save_checkpoint": 16.872409343719482,
84 "time/total": 5889.721172571182
85}[2026-07-09T06:38:34+00:00] job=1812632 node=node-30 ngpu=3 ntrain=1 replicas=2 flash_attn=no
[2026-07-09T06:45:52+00:00] job=1812704 node=node-30 ngpu=3 ntrain=1 replicas=2 flash_attn=no
[2026-07-09T07:00:42+00:00] job=1812735 node=node-1 ngpu=3 ntrain=1 replicas=2 flash_attn=no
[2026-07-09T07:26:33+00:00] job=1812827 node=node-14 ngpu=3 ntrain=1 replicas=2 flash_attn=yes
[2026-07-09T09:21:09+00:00] job=1813131 node=node-1 ngpu=3 ntrain=1 replicas=2 flash_attn=yes
[2026-07-09T14:53:48+00:00] job=1813132 node=node-2 ngpu=6 ntrain=2 replicas=4 flash_attn=yes
[2026-07-10T03:31:51+00:00] job=1816627 node=node-14 ngpu=3 ntrain=1 replicas=2 flash_attn=yes
[2026-07-10T03:54:03+00:00] job=1816628 node=node-29 ngpu=6 ntrain=2 replicas=4 flash_attn=yes
[2026-07-10T07:56:44+00:00] job=1817463 node=node-27 ngpu=3 ntrain=1 replicas=2 flash_attn=yes
[2026-07-10T09:10:26+00:00] job=1817464 node=node-7 ngpu=6 ntrain=2 replicas=4 flash_attn=yes