Downloads · 30 days
0
EdwardoSunny/ttt-discover-v3-qwen3-8b-ac2-step39
ttt-discover-v3-qwen3-8b-ac2-step39 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 38 (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 38 (0-indexed). Strict upstream eval parity:
1100s hard kill, verbatim prompts/entrypoints, group 64x8, T=1.0, kl 0.1.
{
"step": 38,
"progress/batch": 38,
"optim/lr": 4e-05,
"progress/done_frac": 0.78,
"puct/buffer_size": 614,
"puct/sampled_size": 8,
"puct/T": 19456,
"puct/scale_last": 0.44040747267131897,
"puct/buffer_value/mean": 0.9335340454682678,
"puct/buffer_value/std": 0.039605549668866216,
"puct/buffer_value/min": 0.5041471954736918,
"puct/buffer_value/max": 0.9445546681450108,
"puct/buffer_timestep/mean": 18.245928338762216,
"puct/buffer_timestep/std": 11.133617317010671,
"puct/buffer_timestep/min": -1.0,
"puct/buffer_timestep/max": 37.0,
"puct/buffer_construction_len/mean": 3050.771986970684,
"puct/buffer_construction_len/std": 2292.057820440965,
"puct/buffer_construction_len/min": 1024.0,
"puct/buffer_construction_len/max": 32768.0,
"puct/sampled_value/mean": 0.9445503009434186,
"puct/sampled_value/std": 2.5276718591269466e-06,
"puct/sampled_value/min": 0.9445473968688054,
"puct/sampled_value/max": 0.9445546681450108,
"puct/sampled_timestep/mean": 37.0,
"puct/sampled_timestep/std": 0.0,
"puct/sampled_timestep/min": 37.0,
"puct/sampled_timestep/max": 37.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": 4432.434718132019,
"env/all/ac_tokens_per_turn": 9717.07421875,
"env/all/ob_tokens_per_turn": 3976.5,
"env/all/turns_per_episode": 1.0,
"env/all/total_episodes": 512,
"env/all/total_turns": 512,
"env/all/total_ac_tokens": 4975142,
"env/all/total_ob_tokens": 2035968,
"env/all/time/sampling_mean": 394.45433557825163,
"env/all/time/sampling_max": 508.9467885494232,
"env/all/time/env_step_mean": 1954.3277566209435,
"env/all/time/env_step_max": 3925.9297173023224,
"env/all/reward/mean": 0.7663733847630396,
"env/all/reward/max": 0.9446423063871888,
"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.7663733847630396,
"env/all/correctness": 0.822265625,
"env/all/correctness/min": 0.0,
"env/all/correctness/max": 1.0,
"env/all/raw_score": 0.9320265391892548,
"env/all/raw_score/min": 0.03040886327108361,
"env/all/raw_score/max": 0.9446423063871888,
"env/all/initial_raw_score": 0.9445503009434187,
"env/all/initial_raw_score/min": 0.9445473968688054,
"env/all/initial_raw_score/max": 0.9445546681450108,
"env/all/msg": "RuntimeError: Program execution failed: ValueError: Sum of sequence is too close to zero.",
"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 \"\"\"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 gradient\n\ndef construct_function():\n \"\"\"Construct a sequence to maximize the lower bound C using projected gradient ascent with constraint handling.\"\"\"\n import numpy as np\n import time\n from typing import Tuple\n import random\n\n # Parameters\n n_start = 256 # Smaller initial length to generate\n target_length = 4096\n max_seconds = 1000\n num_initializations = 4 # Generate fewer but more diverse initial sequences\n\n # Initialize from previous best if available\n initial_sequences = []\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 initial sequences\n for _ in range(num_initializations):\n # Single peak\n seq = np.zeros(n_start, dtype=np.float32)\n seq[0] = 0.01\n initial_sequences.append(seq)\n\n # Multiple peaks\n seq = np.zeros(n_start, dtype=np.float32)\n num_peaks = random.randint(2, 6)\n idxs = np.random.choice(n_start, num_peaks, replace=False)\n for i in idxs:\n seq[i] = 0.01 / num_peaks\n initial_sequences.append(seq)\n\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 initial_sequences.append(seq)\n\n # Decaying exponential\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)\n for i in range(n_start):\n seq[i] = np.exp(-((i - center) ** 2) / (2 * std**2)) * scale\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 # Ensure sum is exactly 0.01\n total = np.sum(seq)\n if total == 0:\n seq = np.full(seq.shape, 0.01 / seq.shape[0])\n else:\n seq = seq * (0.01 / total)\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 a random sequence\n seq = np.random.uniform(low=0.0, high=1000.0, size=n_start)\n total = np.sum(seq)\n best_seq = seq * (0.01 / total)\n best_value = evaluate_sequence(best_seq.tolist())\n\n # Gradually upscale the sequence length\n current_len = len(best_seq)\n while current_len < target_length:\n upsampling_factor = max(2, (target_length + current_len - 1) // current_len)\n upsampled_seq = np.repeat(best_seq, upsampling_factor)\n best_seq = upsampled_seq[:target_length]\n current_len = len(best_seq)\n\n # Optimization loop\n start_time = time.time()\n best_seq = best_seq.copy()\n best_value = evaluate_sequence(best_seq.tolist())\n\n # Parameters for optimization\n max_iter = 1000000 # More iterations\n learning_rate = 0.1 # Larger initial learning rate\n decay_rate = 0.999 # Decay learning rate over time\n min_lr = 1e-6\n decay_steps = 100\n step_counter = 0\n epsilon = 1e-8\n\n # Gradient computation\n def compute_gradient(seq):\n conv = np.convolve(seq, seq, mode='full')\n l2_sq, g_l2 = _simpson_l2sq(conv)\n l1, g_l1 = _l1(conv)\n linf, g_linf = _linf(conv)\n denom = l1 * linf\n if denom <= 0:\n return np.zeros_like(seq)\n grad_conv = _objective_and_grad_conv(conv)[1]\n grad_h = _grad_h_from_conv_grad(seq, grad_conv)\n return grad_h\n\n # Line search function\n def line_search(seq, grad_seq, max_step=0.1):\n # Find the best step size alpha\n def objective(alpha):\n step = alpha * grad_seq\n new_seq = seq + step\n new_seq = np.clip(new_seq, 0.0, 1000.0)\n total = np.sum(new_seq)\n if total == 0:\n return -float('inf')\n new_seq = new_seq * (0.01 / total)\n return evaluate_sequence(new_seq.tolist())\n \n # Binary search for alpha\n low = 0.0\n high = max_step\n best_alpha = 0.0\n best_value = objective(0.0)\n for _ in range(30):\n mid = (low + high) / 2\n val = objective(mid)\n if val > best_value:\n best_value = val\n best_alpha = mid\n low = mid\n else:\n high = mid\n return best_alpha\n\n while time.time() - start_time < max_seconds - 5:\n # Compute gradient\n grad_seq = compute_gradient(best_seq)\n # Perform line search\n alpha = line_search(best_seq, grad_seq)\n # Update sequence\n step = alpha * grad_seq\n new_seq = best_seq + step\n # Clip to [0, 1000] and scale sum to 0.01\n new_seq = np.clip(new_seq, 0.0, 1000.0)\n total = np.sum(new_seq)\n if total == 0:\n new_seq = np.full(new_seq.shape, 0.01 / new_seq.shape[0])\n else:\n new_seq = new_seq * (0.01 / total)\n best_seq = new_seq\n # Evaluate\n current_value = evaluate_sequence(best_seq.tolist())\n if current_value > best_value:\n best_value = current_value\n # Decay learning rate\n if step_counter % decay_steps == 0:\n learning_rate *= decay_rate\n step_counter += 1\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": 394.45433557825163,
"env/all/time/policy/min": 158.76542377471924,
"env/all/time/policy/max": 508.9467885494232,
"env/all/time/env_step": 1954.3277566209435,
"env/all/time/env_step/min": 0.008505105972290039,
"env/all/time/env_step/max": 3925.9297173023224,
"env/all/time/reward_compute": 2.2258609533309937e-07,
"env/all/time/reward_compute/min": 1.862645149230957e-07,
"env/all/time/reward_compute/max": 3.91155481338501e-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.02153867855668068,
"advantage/min": -1.0,
"advantage/max": 5.232245922088623,
"time/assemble_training_data": 12.063254117965698,
"time/kl_vs_base": 109.51562690734863,
"kl_policy_base": 0.000645773543510586,
"time/train": 673.8152112960815,
"time/save_checkpoint": 17.02898120880127,
"time/total": 5248.506253242493
}
[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