Downloads · 30 days
0
EdwardoSunny/ttt-discover-v3-qwen3-8b-ac2-step21
ttt-discover-v3-qwen3-8b-ac2-step21 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 20 (0-indexed). Strict upstream eval parity: 1100s hard…
Downloads · 30 days
0
Access
Public
Updated Jul 10, 2026
Repo size
354 MB
Likes
0
Public
Click a slice to open those files.
.safetensors349 MB · 99%
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 20 (0-indexed). Strict upstream eval parity:
1100s hard kill, verbatim prompts/entrypoints, group 64x8, T=1.0, kl 0.1.
{
"step": 20,
"progress/batch": 20,
"optim/lr": 4e-05,
"progress/done_frac": 0.42,
"puct/buffer_size": 327,
"puct/sampled_size": 8,
"puct/T": 10240,
"puct/scale_last": 0.4389054073175138,
"puct/buffer_value/mean": 0.9252487858151119,
"puct/buffer_value/std": 0.05130914137147404,
"puct/buffer_value/min": 0.5041471954736918,
"puct/buffer_value/max": 0.9430526027912056,
"puct/buffer_timestep/mean": 9.220183486238533,
"puct/buffer_timestep/std": 5.91482530393914,
"puct/buffer_timestep/min": -1.0,
"puct/buffer_timestep/max": 19.0,
"puct/buffer_construction_len/mean": 2687.6758409785934,
"puct/buffer_construction_len/std": 2938.3186446694413,
"puct/buffer_construction_len/min": 1024.0,
"puct/buffer_construction_len/max": 32768.0,
"puct/sampled_value/mean": 0.9429686335025276,
"puct/sampled_value/std": 3.5496820770612805e-05,
"puct/sampled_value/min": 0.9429371653462107,
"puct/sampled_value/max": 0.9430526027912056,
"puct/sampled_timestep/mean": 19.0,
"puct/sampled_timestep/std": 0.0,
"puct/sampled_timestep/min": 19.0,
"puct/sampled_timestep/max": 19.0,
"puct/sampled_construction_len/mean": 6144.0,
"puct/sampled_construction_len/std": 10085.23038903921,
"puct/sampled_construction_len/min": 2048.0,
"puct/sampled_construction_len/max": 32768.0,
"time/sampling": 3654.566154718399,
"env/all/ac_tokens_per_turn": 9226.607421875,
"env/all/ob_tokens_per_turn": 3341.75,
"env/all/turns_per_episode": 1.0,
"env/all/total_episodes": 512,
"env/all/total_turns": 512,
"env/all/total_ac_tokens": 4724023,
"env/all/total_ob_tokens": 1710976,
"env/all/time/sampling_mean": 345.91621573409066,
"env/all/time/sampling_max": 473.1044511795044,
"env/all/time/env_step_mean": 1361.0896084499545,
"env/all/time/env_step_max": 3213.4996967315674,
"env/all/reward/mean": 0.49693786142556723,
"env/all/reward/max": 0.9430599031150637,
"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.49693786142556723,
"env/all/correctness": 0.55859375,
"env/all/correctness/min": 0.0,
"env/all/correctness/max": 1.0,
"env/all/raw_score": 0.8896230246499665,
"env/all/raw_score/min": 0.194088960902928,
"env/all/raw_score/max": 0.9430599031150637,
"env/all/initial_raw_score": 0.9429686335025276,
"env/all/initial_raw_score/min": 0.9429371653462107,
"env/all/initial_raw_score/max": 0.9430526027912056,
"env/all/msg": "Evaluation timed out after 1100 seconds.",
"env/all/parsed_code": "```python\nimport numpy as np\nimport time\nimport random\nfrom typing import Tuple\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 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=\"valid\")\n return 2.0 * g_h\n\ndef construct_function():\n \"\"\"\n Optimizes a step function sequence using a multi-scale approach with adaptive initialization,\n gradient-based refinement, and random perturbations to escape local minima.\n \"\"\"\n n_start = 64\n max_seconds = 1000\n \n # Global variable for sequence carryover\n if 'height_sequence_1' in globals():\n initial_heights = np.array(height_sequence_1, dtype=np.float32)\n else:\n x = np.linspace(-1, 1, n_start)\n initial_heights = np.zeros(n_start, dtype=np.float32)\n for i in range(8): # 8 evenly spaced peaks\n idx = int((i + 1) * n_start / 9)\n initial_heights[idx] += 0.001\n # Normalize to maintain sum constraint\n initial_heights = np.clip(initial_heights, 0.0, 1000.0)\n initial_heights = initial_heights * (0.01 / np.sum(initial_heights))\n\n best_seq = initial_heights.copy()\n best_value = evaluate_sequence(best_seq.tolist())\n\n start_time = time.time()\n\n max_iter = 100000\n learning_rate = 0.5 # Higher initial learning rate\n decay_rate = 0.9995 # Regular decay\n min_lr = 1e-5\n decay_steps = 2 # More frequent decay\n step_counter = 0\n beta1 = 0.9\n beta2 = 0.999\n epsilon = 1e-8\n\n # Adam parameters\n m = np.zeros_like(best_seq)\n v = np.zeros_like(best_seq)\n t = 0\n\n # Multi-scale refinement with increased scale count\n for scale in range(1, 6): # Now upscale up to 5 times\n n_current = n_start * (2 ** scale)\n best_seq = np.repeat(best_seq, 2) # Up-sample by repeating\n best_seq = np.clip(best_seq, 0.0, 1000.0)\n\n # Reinitialize Adam for new scale\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\n # Compute gradient\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\n if l1 <= 0.0 or linf <= 0.0:\n break # Avoid division by zero\n\n denom = l1 * linf\n c_value = l2_sq / denom\n\n # Compute gradient of C with respect to conv\n g_conv = _objective_and_grad_conv(conv)[1]\n\n # Compute gradient of C with respect to h\n h_clamped = np.clip(best_seq, 0.0, 1000.0)\n grad_h = _grad_h_from_conv_grad(h_clamped, g_conv)\n\n # Adam update\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 = best_seq + step\n\n # Clip parameters and maintain sum constraint\n best_seq = np.clip(best_seq, 0.0, 1000.0)\n sum_seq = np.sum(best_seq)\n if sum_seq < 0.01:\n factor = 0.01 / sum_seq\n best_seq *= factor # Scale to ensure sum is exactly 0.01\n\n # Random perturbation for exploration\n if random.random() < 0.05:\n perturbation = np.random.normal(0, 0.001, best_seq.shape)\n best_seq += perturbation\n best_seq = np.clip(best_seq, 0.0, 1000.0)\n\n # Track best value\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 # Check time limit\n if time.time() - start_time > max_seconds - 5:\n break\n\n # Decay learning rate\n if step_counter % decay_steps == 0:\n learning_rate *= decay_rate\n\n # After each upscale, save the current best\n final_heights = best_seq.tolist()\n final_value = evaluate_sequence(final_heights)\n print(f\"Scale {scale} C2 lower bound: {final_value:.6f}\")\n if final_value > best_value:\n best_value = final_value\n best_seq = best_seq.copy()\n\n # Final evaluation\n final_heights = best_seq.tolist()\n final_value = evaluate_sequence(final_heights)\n print(f\"Final C2 lower bound: {final_value:.6f}\")\n return final_heights\n```",
"env/all/time/policy": 345.91621573409066,
"env/all/time/policy/min": 186.6383786201477,
"env/all/time/policy/max": 473.1044511795044,
"env/all/time/env_step": 1361.0896084499545,
"env/all/time/env_step/min": 0.005799770355224609,
"env/all/time/env_step/max": 3213.4996967315674,
"env/all/time/reward_compute": 2.7101486921310425e-07,
"env/all/time/reward_compute/min": 1.862645149230957e-07,
"env/all/time/reward_compute/max": 4.917383193969727e-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.03193547949194908,
"advantage/min": -1.0,
"advantage/max": 27.78571891784668,
"time/assemble_training_data": 9.93730640411377,
"time/kl_vs_base": 96.50335693359375,
"kl_policy_base": 0.0007508511189371347,
"time/train": 606.908353805542,
"time/save_checkpoint": 10.213999271392822,
"time/total": 4383.103084087372
}
[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