Downloads · 30 days
0
EdwardoSunny/ttt-discover-v3-qwen3-8b-ac2-step27
ttt-discover-v3-qwen3-8b-ac2-step27 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 26 (0-indexed). Strict upstream eval parity: 1100s hard…
Downloads · 30 days
0
Access
Public
Updated Jul 11, 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 26 (0-indexed). Strict upstream eval parity:
1100s hard kill, verbatim prompts/entrypoints, group 64x8, T=1.0, kl 0.1.
{
"step": 26,
"progress/batch": 26,
"optim/lr": 4e-05,
"progress/done_frac": 0.54,
"puct/buffer_size": 422,
"puct/sampled_size": 8,
"puct/T": 13312,
"puct/scale_last": 0.4395082667981748,
"puct/buffer_value/mean": 0.9287213099436814,
"puct/buffer_value/std": 0.04699105516370507,
"puct/buffer_value/min": 0.5041471954736918,
"puct/buffer_value/max": 0.9436554622718666,
"puct/buffer_timestep/mean": 12.21563981042654,
"puct/buffer_timestep/std": 7.657876528899825,
"puct/buffer_timestep/min": -1.0,
"puct/buffer_timestep/max": 25.0,
"puct/buffer_construction_len/mean": 2614.042654028436,
"puct/buffer_construction_len/std": 2637.7289039422685,
"puct/buffer_construction_len/min": 1024.0,
"puct/buffer_construction_len/max": 32768.0,
"puct/sampled_value/mean": 0.9434265487075855,
"puct/sampled_value/std": 0.00020155982747504042,
"puct/sampled_value/min": 0.9432238365446723,
"puct/sampled_value/max": 0.9436554622718666,
"puct/sampled_timestep/mean": 25.0,
"puct/sampled_timestep/std": 0.0,
"puct/sampled_timestep/min": 25.0,
"puct/sampled_timestep/max": 25.0,
"puct/sampled_construction_len/mean": 3072.0,
"puct/sampled_construction_len/std": 1024.0,
"puct/sampled_construction_len/min": 2048.0,
"puct/sampled_construction_len/max": 4096.0,
"time/sampling": 3403.374013185501,
"env/all/ac_tokens_per_turn": 9495.2109375,
"env/all/ob_tokens_per_turn": 4132.375,
"env/all/turns_per_episode": 1.0,
"env/all/total_episodes": 512,
"env/all/total_turns": 512,
"env/all/total_ac_tokens": 4861548,
"env/all/total_ob_tokens": 2115776,
"env/all/time/sampling_mean": 386.4178304695524,
"env/all/time/sampling_max": 499.67364859580994,
"env/all/time/env_step_mean": 1290.3009732440114,
"env/all/time/env_step_max": 2951.2271852493286,
"env/all/reward/mean": 0.5890935724808039,
"env/all/reward/max": 0.9437556776710564,
"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.5890935724808039,
"env/all/correctness": 0.666015625,
"env/all/correctness/min": 0.0,
"env/all/correctness/max": 1.0,
"env/all/raw_score": 0.8845041322878932,
"env/all/raw_score/min": 0.02358327552707035,
"env/all/raw_score/max": 0.9437556776710564,
"env/all/initial_raw_score": 0.9434265487075854,
"env/all/initial_raw_score/min": 0.9432238365446723,
"env/all/initial_raw_score/max": 0.9436554622718666,
"env/all/msg": "Success; raw_score=0.9436568005224363",
"env/all/parsed_code": "```python\nimport numpy as np\nimport scipy.optimize as opt\nimport time\nfrom typing import Tuple\nimport random\n\ndef _simpson_l2sq(conv: np.ndarray) -> Tuple[float, np.ndarray]:\n \"\"\"Compute ||f*f||_2^2 via Simpson's rule with endpoint zeros and gradient.\"\"\"\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 \"\"\"Compute ||f*f||_1 and its gradient.\"\"\"\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 \"\"\"Compute ||f*f||_inf and its subgradient.\"\"\"\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 \"\"\"Compute C = l2_sq / (l1 * linf) and its gradient.\"\"\"\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 \"\"\"Compute gradient of C w.r.t h from gradient of C w.r.t conv.\"\"\"\n h_rev = h[::-1]\n g_h = np.convolve(g_conv, h_rev, mode=\"full\")\n N = len(h)\n # Extract the central N elements for the gradient\n gradient = g_h[N-1 : N-1 + N]\n return 2.0 * gradient\n\ndef construct_function():\n \"\"\"Optimizes step function sequence using a refined L-BFGS-based approach with improved gradients and hyperparameters.\"\"\"\n # Starting parameters with multi-scale approach\n n_start = 64 # Start with small resolution\n max_seconds = 1000 # 1000 seconds time limit\n num_initializations = 8 # Fewer initial sequences for efficiency\n \n # Initialize from previous best if available\n if 'height_sequence_1' in globals():\n initial_sequences = [np.array(height_sequence_1, dtype=np.float32)]\n else:\n initial_sequences = []\n\n # Generate diverse structured initial sequences with guaranteed sum of 0.01\n for _ in range(num_initializations):\n # Flat sequence with sum 0.01 + 1e-5\n seq = np.full(n_start, (0.01 + 1e-5) / n_start, dtype=np.float32)\n # Ensure sum >= 0.01\n sum_seq = np.sum(seq)\n if sum_seq < 0.01:\n needed = 0.01 - sum_seq\n seq += needed / len(seq)\n initial_sequences.append(seq)\n\n # Random peaks with sum 0.01 + 1e-5\n seq = np.zeros(n_start, dtype=np.float32)\n num_random_peaks = 8\n peak_height = (0.01 + 1e-5) / num_random_peaks\n indices = np.random.choice(n_start, num_random_peaks, replace=False)\n seq[indices] = peak_height\n # Ensure sum >= 0.01\n sum_seq = np.sum(seq)\n if sum_seq < 0.01:\n needed = 0.01 - sum_seq\n seq += needed / len(seq)\n initial_sequences.append(seq)\n\n # Evaluate initial sequences to find the best one\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 # Fallback to random initialization with sum 0.01 + 1e-5\n best_seq = np.random.rand(n_start) * 1000.0\n best_seq = np.clip(best_seq, 0.0, 1000.0)\n best_seq = best_seq * ((0.01 + 1e-5) / np.sum(best_seq))\n best_value = evaluate_sequence(best_seq.tolist())\n\n # Final optimization with L-BFGS\n start_time = time.time()\n best_seq = best_seq.copy()\n best_value = evaluate_sequence(best_seq.tolist())\n\n # Run L-BFGS optimization\n def objective(h_flat):\n h = h_flat.reshape(-1)\n conv = np.convolve(h, h, mode='full')\n l2_sq, _ = _simpson_l2sq(conv)\n l1, _ = _l1(conv)\n linf, _ = _linf(conv)\n if l1 <= 0.0 or linf <= 0.0:\n return float('inf') # Penalize invalid sequences\n c_value = l2_sq / (l1 * linf)\n return -c_value # Minimize -c_value\n\n def grad(h_flat):\n h = h_flat.reshape(-1)\n conv = np.convolve(h, h, mode='full')\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 np.zeros_like(h)\n denom = l1 * linf\n c_value = l2_sq / denom\n # Compute gradient of C with respect to conv\n g_conv = _objective_and_grad_conv(conv)[1]\n # Compute gradient of C with respect to h\n grad_h = _grad_h_from_conv_grad(h, g_conv)\n return -grad_h # Since we are minimizing -c_value\n\n bounds = [(0.0, 1000.0) for _ in range(len(best_seq))]\n result = opt.minimize(\n objective,\n best_seq,\n method='L-BFGS-B',\n jac=grad,\n bounds=bounds,\n options={ \n 'maxiter': 500, # Adjust number of iterations to balance speed and accuracy\n 'ftol': 1e-9,\n 'gtol': 1e-9,\n 'eps': 1e-8,\n 'disp': False,\n }\n )\n\n if result.success:\n optimized_seq = result.x\n # Ensure sum is at least 0.01\n sum_seq = np.sum(optimized_seq)\n if sum_seq < 0.01:\n needed = 0.01 - sum_seq\n optimized_seq += needed / len(optimized_seq)\n current_value = evaluate_sequence(optimized_seq.tolist())\n if current_value > best_value:\n best_value = current_value\n best_seq = optimized_seq.copy()\n else:\n print(\"Optimization failed; using original best sequence.\")\n \n # Apply a final check for sum constraint\n sum_seq = np.sum(best_seq)\n if sum_seq < 0.01:\n needed = 0.01 - sum_seq\n best_seq += needed / len(best_seq)\n\n # Final evaluation\n final_value = evaluate_sequence(best_seq.tolist())\n print(f\"Final C2 lower bound: {final_value:.6f}\")\n return best_seq.tolist()\n```",
"env/all/time/policy": 386.4178304695524,
"env/all/time/policy/min": 106.14245796203613,
"env/all/time/policy/max": 499.67364859580994,
"env/all/time/env_step": 1290.3009732440114,
"env/all/time/env_step/min": 0.005580425262451172,
"env/all/time/env_step/max": 2951.2271852493286,
"env/all/time/reward_compute": 2.6402994990348816e-07,
"env/all/time/reward_compute/min": 1.7881393432617188e-07,
"env/all/time/reward_compute/max": 5.997717380523682e-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.01910652406513691,
"advantage/min": -1.0,
"advantage/max": 3.0140233039855957,
"time/assemble_training_data": 6.436135768890381,
"time/kl_vs_base": 98.6494152545929,
"kl_policy_base": 0.0007043504156172276,
"time/train": 672.167459487915,
"time/save_checkpoint": 22.919800281524658,
"time/total": 4206.164970397949
}
[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