Downloads · 30 days
0
EdwardoSunny/ttt-discover-v3-qwen3-8b-ac2-s2-step50
ttt-discover-v3-qwen3-8b-ac2-s2-step50 is a machine learning model from EdwardoSunny. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
LoRA adapter (rank 32, all-linear) from the upstream-faithful local reproduction of TTT-Discover on autoresearch-bench ac2. Checkpoint saved after training step 49 (0-indexed). Strict upstream eval parity: 1100s hard…
Downloads · 30 days
0
Access
Public
Updated Jul 13, 2026
Repo size
349 MB
Likes
0
Public
Click a slice to open those files.
.safetensors349 MB · 100%
From the Hugging Face model README
LoRA adapter (rank 32, all-linear) from the upstream-faithful local
reproduction of TTT-Discover on autoresearch-bench ac2. Checkpoint saved
after training step 49 (0-indexed). Strict upstream eval parity:
1100s hard kill, verbatim prompts/entrypoints, group 64x8, T=1.0, kl 0.1.
{
"step": 49,
"progress/batch": 49,
"optim/lr": 4e-05,
"progress/done_frac": 1.0,
"puct/buffer_size": 789,
"puct/sampled_size": 8,
"puct/T": 25088,
"puct/scale_last": 0.2814957806995668,
"puct/buffer_value/mean": 0.939399385720078,
"puct/buffer_value/std": 0.03327100097670482,
"puct/buffer_value/min": 0.6666666666666636,
"puct/buffer_value/max": 0.9481624473662335,
"puct/buffer_timestep/mean": 23.826362484157162,
"puct/buffer_timestep/std": 14.260264648963068,
"puct/buffer_timestep/min": -1.0,
"puct/buffer_timestep/max": 48.0,
"puct/buffer_construction_len/mean": 3919.25855513308,
"puct/buffer_construction_len/std": 1445.6044013631454,
"puct/buffer_construction_len/min": 1024.0,
"puct/buffer_construction_len/max": 32768.0,
"puct/sampled_value/mean": 0.9481614012390057,
"puct/sampled_value/std": 4.780361673182375e-07,
"puct/sampled_value/min": 0.9481608398139151,
"puct/sampled_value/max": 0.9481624473662335,
"puct/sampled_timestep/mean": 48.0,
"puct/sampled_timestep/std": 0.0,
"puct/sampled_timestep/min": 48.0,
"puct/sampled_timestep/max": 48.0,
"puct/sampled_construction_len/mean": 4096.0,
"puct/sampled_construction_len/std": 0.0,
"puct/sampled_construction_len/min": 4096.0,
"puct/sampled_construction_len/max": 4096.0,
"time/sampling": 6216.747389793396,
"env/all/ac_tokens_per_turn": 8380.416015625,
"env/all/ob_tokens_per_turn": 4467.5,
"env/all/turns_per_episode": 1.0,
"env/all/total_episodes": 512,
"env/all/total_turns": 512,
"env/all/total_ac_tokens": 4290773,
"env/all/total_ob_tokens": 2287360,
"env/all/time/sampling_mean": 332.7049873508513,
"env/all/time/sampling_max": 433.2075159549713,
"env/all/time/env_step_mean": 2909.5105771091767,
"env/all/time/env_step_max": 5774.946194410324,
"env/all/reward/mean": 0.8410423309284463,
"env/all/reward/max": 0.9481637266296885,
"env/all/reward/min": 0.0,
"env/all/format": 1.0,
"env/all/format/min": 1.0,
"env/all/format/max": 1.0,
"env/all/reward": 0.8410423309284463,
"env/all/correctness": 0.912109375,
"env/all/correctness/min": 0.0,
"env/all/correctness/max": 1.0,
"env/all/raw_score": 0.9220849538230503,
"env/all/raw_score/min": 0.027654646827670964,
"env/all/raw_score/max": 0.9481637266296885,
"env/all/initial_raw_score": 0.9481614012390058,
"env/all/initial_raw_score/min": 0.9481608398139151,
"env/all/initial_raw_score/max": 0.9481624473662335,
"env/all/msg": "Success; raw_score=0.948163286265809",
"env/all/parsed_code": "```python\nimport numpy as np\nimport time\nfrom typing import List, 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.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 ** 2)\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 new_h = np.zeros(2 * n, dtype=np.float32)\n new_h[::2] = h\n return new_h\n\ndef construct_function():\n \"\"\"\n This function constructs a sequence of non-negative heights to maximize the evaluation function.\n It uses a hybrid approach of global exploration with adaptive noise, dynamic learning rates, \n and targeted refinement to escape local minima and increase convergence speed.\n \"\"\"\n np.random.seed(42)\n height_sequence_1 = globals().get(\"height_sequence_1\", None)\n target_length = 4096\n initial_n = 8\n\n # Generate diverse initial sequences\n candidates = []\n if height_sequence_1 is not None:\n initial_h = np.array(height_sequence_1, dtype=np.float32)\n initial_n = min(len(initial_h), target_length)\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 candidates.append(h)\n else:\n # Multi-peak structured candidates\n seq1 = np.zeros(target_length)\n seq1[target_length // 2] = 0.1\n seq1[::32] += 0.05\n seq1 = np.clip(seq1, 0.0, 1000.0)\n candidates.append(seq1)\n\n seq2 = np.zeros(target_length)\n seq2[::4] = 0.1\n seq2 = np.clip(seq2 / np.sum(seq2) * 0.1, 0.0, 1000.0)\n candidates.append(seq2)\n\n seq3 = 0.05 * np.sum([np.exp(-((np.linspace(-0.5, 0.5, target_length) - pos) / 0.15)**2) for pos in np.linspace(-0.3, 0.4, 8)])\n seq3 = np.clip(seq3 / np.sum(seq3) * 0.1, 0.0, 1000.0)\n candidates.append(seq3)\n\n seq4 = 0.05 * np.sin(2 * np.pi * np.linspace(-0.5, 0.5, target_length) * 3) + \\\n 0.05 * np.sin(2 * np.pi * np.linspace(-0.5, 0.5, target_length) * 5) + \\\n 0.05 * np.sin(2 * np.pi * np.linspace(-0.5, 0.5, target_length) * 7)\n seq4 = np.clip(seq4 / np.sum(seq4) * 0.1, 0.0, 1000.0)\n candidates.append(seq4)\n\n seq5 = np.random.rand(target_length) * 0.3\n seq5 = np.clip(seq5 / np.sum(seq5) * 0.1, 0.0, 1000.0)\n candidates.append(seq5)\n\n seq6 = np.zeros(target_length)\n for i in range(0, target_length, 16):\n seq6[i] = 0.1 / 64\n seq6 = np.clip(seq6, 0.0, 1000.0)\n candidates.append(seq6)\n\n seq7 = np.zeros(target_length)\n seq7[0] = 0.1\n seq7[-1] = 0.1\n seq7 = np.clip(seq7, 0.0, 1000.0)\n candidates.append(seq7)\n\n seq8 = np.exp(-np.abs(np.linspace(-0.5, 0.5, target_length)) / 0.15)\n seq8 = np.clip(seq8 / np.sum(seq8) * 0.1, 0.0, 1000.0)\n candidates.append(seq8)\n\n # Select the best initial candidate\n best_c = -1.0\n best_h = candidates[0]\n for h_candidate in candidates:\n try:\n c = evaluate_sequence(h_candidate.tolist())\n if c > best_c:\n best_c = c\n best_h = h_candidate\n except:\n pass\n h = best_h\n\n # Parameters for hybrid optimization\n learning_rate_base = 50.0\n noise_scale_base = 100.0\n noise_decay = 0.9998\n learning_rate_decay = 0.99995\n max_steps = 500000\n upscale_steps = 300000\n refine_steps = 200000\n momentum = 0.95\n initial_momentum = 0.95\n final_momentum = 0.99\n momentum_decay = (final_momentum - initial_momentum) / max_steps\n\n start_time = time.time()\n\n # Multi-scale optimization with hybrid exploration\n current_length = initial_n\n scale_factor = 2\n\n for _ in range(5): # Increased to 5 instead of 4\n if current_length < target_length:\n h = _upsample_1d(h)\n current_length *= 2\n h_sum = np.sum(h)\n if h_sum < 0.01:\n scale_factor = 1.0 / h_sum\n h = np.clip(h * scale_factor, 0.0, 1000.0)\n\n # Initial optimization with dynamic noise and learning rate\n h_opt = np.copy(h)\n h_best = np.copy(h)\n best_c = -1.0\n prev_update = np.zeros_like(h_opt)\n\n # Increase the number of steps for better exploration\n for step in range(upscale_steps):\n clipped_h = np.clip(h_opt, 0.0, None)\n conv = np.convolve(clipped_h, clipped_h, mode='full')\n obj_val, grad_conv = _objective_and_grad_conv(conv)\n grad_h = _grad_h_from_conv_grad(clipped_h, grad_conv)\n\n noise_scale = noise_scale_base * (noise_decay ** step)\n learning_rate_current = learning_rate_base * (learning_rate_decay ** step)\n momentum_current = initial_momentum + momentum_decay * step\n\n # Higher noise probability and adaptive updates\n if np.random.rand() < 0.6:\n noise = noise_scale * np.random.normal(size=h_opt.shape)\n update = learning_rate_current * grad_h + (1 - momentum_current) * prev_update + noise\n else:\n update = learning_rate_current * grad_h + (1 - momentum_current) * prev_update\n\n h_opt = np.clip(h_opt + update, 0.0, 1000.0)\n prev_update = update\n\n if step % 100 == 0:\n try:\n current_c = evaluate_sequence(h_opt.tolist())\n if current_c > best_c:\n best_c = current_c\n h_best = h_opt.copy()\n except:\n pass\n\n remaining_time = 1000 - (time.time() - start_time)\n if remaining_time < 5:\n print(f\"Time remaining: {remaining_time} seconds. Performing final refinement.\")\n break\n h = h_best\n else:\n break\n\n # Final refined optimization with adaptive steps\n h_refined = np.copy(h)\n prev_update_refine = np.zeros_like(h_refined)\n momentum_refine = momentum\n\n for step in range(refine_steps):\n clipped_h = np.clip(h_refined, 0.0, None)\n conv = np.convolve(clipped_h, clipped_h, mode='full')\n obj_val, grad_conv = _objective_and_grad_conv(conv)\n grad_h = _grad_h_from_conv_grad(clipped_h, grad_conv)\n\n learning_rate_current = learning_rate_base * (learning_rate_decay ** step)\n momentum_current = initial_momentum + momentum_decay * step * 2 # Faster momentum ramp-up\n\n update = learning_rate_current * grad_h + (1 - momentum_current) * prev_update_refine\n h_refined = np.clip(h_refined + update, 0.0, 1000.0)\n prev_update_refine = update\n\n remaining_time = 1000 - (time.time() - start_time)\n if remaining_time < 5:\n print(f\"Time remaining: {remaining_time} seconds. Final step.\")\n break\n\n h_final = np.clip(h_refined, 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```",
"env/all/time/policy": 332.7049873508513,
"env/all/time/policy/min": 173.82263445854187,
"env/all/time/policy/max": 433.2075159549713,
"env/all/time/env_step": 2909.5105771091767,
"env/all/time/env_step/min": 0.007574319839477539,
"env/all/time/env_step/max": 5774.946194410324,
"env/all/time/reward_compute": 2.9383227229118347e-07,
"env/all/time/reward_compute/min": 2.0116567611694336e-07,
"env/all/time/reward_compute/max": 7.301568984985352e-07,
"env/all/by_group/frac_mixed": 1.0,
"env/all/by_group/frac_all_good": 0.0,
"env/all/by_group/frac_all_bad": 0.0,
"advantage/mean": 0.01856636069715023,
"advantage/min": -1.0,
"advantage/max": 5.160895347595215,
"time/assemble_training_data": 6.037163257598877,
"time/kl_vs_base": 95.86101603507996,
"kl_policy_base": 0.0007989405421540141,
"time/train": 621.4326732158661,
"time/save_checkpoint": 25.584145545959473,
"time/total": 6970.489911317825
}
[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
[2026-07-11T01:56:04+00:00] job=1821290 node=node-4 ngpu=3 ntrain=1 replicas=2 flash_attn=yes
[2026-07-11T21:10:54+00:00] job=1825946 node=node-20 ngpu=3 ntrain=1 replicas=2 flash_attn=yes
[2026-07-12T11:05:51+00:00] job=1827208 node=node-11 ngpu=6 ntrain=2 replicas=4 flash_attn=yes