Views
No views yet
ac2. Checkpoint saved
after training step 8 (0-indexed). Strict upstream eval parity:
1100s hard kill, verbatim prompts/entrypoints, group 64x8, T=1.0, kl 0.1.1{
2 "step": 8,
3 "progress/batch": 8,
4 "optim/lr": 4e-05,
5 "progress/done_frac": 0.18,
6 "puct/buffer_size": 133,
7 "puct/sampled_size": 8,
8 "puct/T": 4096,
9 "puct/scale_last": 0.18699770853475672,
10 "puct/buffer_value/mean": 0.9058391306793634,
11 "puct/buffer_value/std": 0.06695508300003475,
12 "puct/buffer_value/min": 0.6666666666666636,
13 "puct/buffer_value/max": 0.9434535687747478,
14 "puct/buffer_timestep/mean": 3.2406015037593985,
15 "puct/buffer_timestep/std": 2.480451013863848,
16 "puct/buffer_timestep/min": -1.0,
17 "puct/buffer_timestep/max": 7.0,
18 "puct/buffer_construction_len/mean": 3139.902255639098,
19 "puct/buffer_construction_len/std": 3003.2272262352917,
20 "puct/buffer_construction_len/min": 1024.0,
21 "puct/buffer_construction_len/max": 32768.0,
22 "puct/sampled_value/mean": 0.9412014066692138,
23 "puct/sampled_value/std": 0.0014794183510295677,
24 "puct/sampled_value/min": 0.9386281880862456,
25 "puct/sampled_value/max": 0.9434535687747478,
26 "puct/sampled_timestep/mean": 7.0,
27 "puct/sampled_timestep/std": 0.0,
28 "puct/sampled_timestep/min": 7.0,
29 "puct/sampled_timestep/max": 7.0,
30 "puct/sampled_construction_len/mean": 2560.0,
31 "puct/sampled_construction_len/std": 886.8100134752651,
32 "puct/sampled_construction_len/min": 2048.0,
33 "puct/sampled_construction_len/max": 4096.0,
34 "time/sampling": 4974.592812776566,
35 "env/all/ac_tokens_per_turn": 8165.791015625,
36 "env/all/ob_tokens_per_turn": 4278.625,
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": 4180885,
41 "env/all/total_ob_tokens": 2190656,
42 "env/all/time/sampling_mean": 305.664975439664,
43 "env/all/time/sampling_max": 399.7285375595093,
44 "env/all/time/env_step_mean": 2174.8224193323404,
45 "env/all/time/env_step_max": 4573.075776815414,
46 "env/all/reward/mean": 0.20292151246423723,
47 "env/all/reward/max": 0.9450164523182797,
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.20292151246423723,
53 "env/all/correctness": 0.2265625,
54 "env/all/correctness/min": 0.0,
55 "env/all/correctness/max": 1.0,
56 "env/all/raw_score": 0.8956535722559434,
57 "env/all/raw_score/min": 0.03220291225228406,
58 "env/all/raw_score/max": 0.9450164523182797,
59 "env/all/initial_raw_score": 0.9412014066692138,
60 "env/all/initial_raw_score/min": 0.9386281880862456,
61 "env/all/initial_raw_score/max": 0.9434535687747478,
62 "env/all/msg": "Evaluation timed out after 1100 seconds.",
63 "env/all/parsed_code": "```python\nimport numpy as np\nfrom typing import Tuple, List\nimport random\nimport time\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.0 * 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 if m <= 0.0:\n return m, np.zeros_like(conv)\n mask = conv == m\n count = int(mask.sum())\n if count == 0:\n return m, np.zeros_like(conv)\n grad = mask.astype(conv.dtype) / count\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=\"valid\")\n return 2.0 * g_h\n\ndef _upsample_1d(h: np.ndarray) -> np.ndarray:\n n = h.shape[0]\n x_old = np.linspace(-0.5, 0.5, n)\n x_new = np.linspace(-0.5, 0.5, 2 * n)\n return np.interp(x_new, x_old, h)\n\ndef _single_candidate_finetune(h0: np.ndarray, lr=3e-3, steps=60000) -> Tuple[np.ndarray, float]:\n h = h0.astype(np.float32).copy()\n opt = _Adam(h.shape, lr=lr, dtype=h.dtype)\n last_c = 0.0\n for _ in range(steps):\n h_clip = np.clip(h, 0.0, None)\n conv = np.convolve(h_clip, h_clip, mode=\"full\")\n c_val, g_conv = _objective_and_grad_conv(conv)\n g_h = _grad_h_from_conv_grad(h_clip, g_conv)\n h = np.clip(opt.step(h, g_h.astype(h.dtype)), 0.0, None)\n last_c = c_val\n return h, float(last_c)\n\nclass _Adam:\n def __init__(self, shape, lr=3e-2, beta1=0.9, beta2=0.999, eps=1e-8, dtype=np.float32):\n self.m = np.zeros(shape, dtype=dtype)\n self.v = np.zeros(shape, dtype=dtype)\n self.t = 0\n self.lr = lr\n self.b1 = beta1\n self.b2 = beta2\n self.eps = eps\n\n def step(self, params, grad):\n self.t += 1\n self.m = self.b1 * self.m + (1 - self.b1) * grad\n self.v = self.b2 * self.v + (1 - self.b2) * (grad * grad)\n m_hat = self.m / (1 - self.b1 ** self.t)\n v_hat = self.v / (1 - self.b2 ** self.t)\n return params + self.lr * m_hat / (np.sqrt(v_hat) + self.eps)\n\ndef construct_function():\n \"\"\"\n Optimizes a non-negative step function sequence to maximize the lower bound C_lower_bound.\n This implementation uses a hybrid approach of gradient ascent with adaptive noise, \n multiple upscale-refine cycles, and careful learning rate scheduling.\n \"\"\"\n np.random.seed(42)\n \n # Load previous best sequence\n height_sequence_1 = globals().get(\"height_sequence_1\", None)\n base_initial_n = 2048 # Base sequence length\n initial_n = base_initial_n\n \n if height_sequence_1 is not None:\n # Use the previous best and upscale\n initial_h = np.array(height_sequence_1, dtype=np.float32)\n initial_n = min(len(initial_h), 2 * base_initial_n)\n # Resample to initial_n\n x_old = np.linspace(-0.5, 0.5, len(initial_h))\n x_new = np.linspace(-0.5, 0.5, initial_n)\n h = np.interp(x_new, x_old, initial_h)\n else:\n # Initialize with a spike for better exploration\n spike_pos = initial_n // 2\n h = np.zeros(initial_n, dtype=np.float32)\n h[spike_pos] = 0.01\n \n # Ensure sum is above 0.01\n h_sum = np.sum(h)\n if h_sum < 0.01:\n h = np.clip(h + (0.01 - h_sum) / initial_n, 0.0, 1000.0)\n \n # Parameters\n max_steps = 500000 # More steps for exploration\n upscale_steps = 100000\n refine_steps = 200000\n initial_learn_rate = 0.1\n final_learn_rate = 0.001\n noise_scale = 0.1 # Higher initial noise for exploration\n \n start_time = time.time()\n \n # Gradient ascent with adaptive noise and learning rate\n for step in range(max_steps):\n # Clip to non-negative\n clipped_h = np.clip(h, 0.0, None)\n \n # Compute convolution\n conv = np.convolve(clipped_h, clipped_h, mode='full')\n \n # Compute objective and gradient of conv\n obj_val, grad_conv = _objective_and_grad_conv(conv)\n \n # Compute gradient with respect to h\n grad_h = _grad_h_from_conv_grad(clipped_h, grad_conv)\n \n # Adapt learning rate and noise scale\n learn_rate = initial_learn_rate * (final_learn_rate / initial_learn_rate) ** (step / max_steps)\n noise_scale = noise_scale * (final_learn_rate / initial_learn_rate) ** (step / max_steps)\n \n # Add noise\n noise = noise_scale * np.random.normal(size=h.shape)\n \n # Update h\n h = np.clip(h + learn_rate * grad_h + noise, 0.0, 1000.0)\n \n # Ensure sum is above 0.01\n h_sum = np.sum(h)\n if h_sum < 0.01:\n h = np.clip(h + (0.01 - h_sum) / h.shape[0], 0.0, 1000.0)\n \n # Check time\n if time.time() - start_time > 900:\n print(\"Time remaining: 100 seconds. Refining best candidate.\")\n break\n \n # Multi-stage upsampling and refinement\n h_up = _upsample_1d(h)\n \n # First refinement\n h_up, _ = _single_candidate_finetune(h_up, lr=3e-3, steps=refine_steps)\n \n # Second refinement at higher resolution\n h_up2 = _upsample_1d(h_up)\n h_up2, _ = _single_candidate_finetune(h_up2, lr=1e-3, steps=refine_steps)\n \n # Final check\n h_final = np.clip(h_up2, 0.0, 1000.0)\n heights = h_final.tolist()\n r_value = evaluate_sequence(heights)\n print(f\"Final C2 lower bound: {r_value}\")\n return heights\n```",
64 "env/all/time/policy": 305.664975439664,
65 "env/all/time/policy/min": 131.64292073249817,
66 "env/all/time/policy/max": 399.7285375595093,
67 "env/all/time/env_step": 2174.8224193323404,
68 "env/all/time/env_step/min": 0.005379438400268555,
69 "env/all/time/env_step/max": 4573.075776815414,
70 "env/all/time/reward_compute": 3.939494490623474e-07,
71 "env/all/time/reward_compute/min": 2.123415470123291e-07,
72 "env/all/time/reward_compute/max": 1.0691583156585693e-06,
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.031528979539871216,
77 "advantage/min": -0.9608367085456848,
78 "advantage/max": 6.112491607666016,
79 "time/assemble_training_data": 8.605415344238281,
80 "time/kl_vs_base": 89.73863887786865,
81 "kl_policy_base": 0.0005685752257704735,
82 "time/train": 604.9867551326752,
83 "time/save_checkpoint": 10.918505668640137,
84 "time/total": 5691.170869350433
85}[2026-07-09T06:42:12+00:00] job=1812634 node=node-30 ngpu=3 ntrain=1 replicas=2 flash_attn=no
[2026-07-09T07:26:33+00:00] job=1812736 node=node-12 ngpu=3 ntrain=1 replicas=2 flash_attn=yes
[2026-07-09T09:27:32+00:00] job=1813133 node=node-14 ngpu=3 ntrain=1 replicas=2 flash_attn=yes
[2026-07-09T16:26:04+00:00] job=1813134 node=node-4 ngpu=6 ntrain=2 replicas=4 flash_attn=yes