Downloads · 30 days
0
EdwardoSunny/ttt-discover-v3-qwen3-8b-ac1-s2-step39
ttt-discover-v3-qwen3-8b-ac1-s2-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 ac1. Checkpoint saved after training step 38 (0-indexed). Strict upstream eval parity: 1100s hard…
Downloads · 30 days
0
Access
Public
Updated Jul 12, 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 ac1. 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": 616,
"puct/sampled_size": 8,
"puct/T": 19456,
"puct/scale_last": 0.5749831680393642,
"puct/buffer_value/mean": -1.5226972076297771,
"puct/buffer_value/std": 0.08023669635674716,
"puct/buffer_value/min": -2.0797874683482562,
"puct/buffer_value/max": -1.504804300308892,
"puct/buffer_timestep/mean": 18.246753246753247,
"puct/buffer_timestep/std": 11.115866563547502,
"puct/buffer_timestep/min": -1.0,
"puct/buffer_timestep/max": 37.0,
"puct/buffer_construction_len/mean": 1097.3863636363637,
"puct/buffer_construction_len/std": 665.1328082956007,
"puct/buffer_construction_len/min": 1000.0,
"puct/buffer_construction_len/max": 7850.0,
"puct/sampled_value/mean": -1.504809976441158,
"puct/sampled_value/std": 2.5094139150637386e-06,
"puct/sampled_value/min": -1.504812635414709,
"puct/sampled_value/max": -1.504804300308892,
"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": 1000.0,
"puct/sampled_construction_len/std": 0.0,
"puct/sampled_construction_len/min": 1000.0,
"puct/sampled_construction_len/max": 1000.0,
"time/sampling": 6309.181156873703,
"env/all/ac_tokens_per_turn": 7985.318359375,
"env/all/ob_tokens_per_turn": 3925.5,
"env/all/turns_per_episode": 1.0,
"env/all/total_episodes": 512,
"env/all/total_turns": 512,
"env/all/total_ac_tokens": 4088483,
"env/all/total_ob_tokens": 2009856,
"env/all/time/sampling_mean": 292.3565194089897,
"env/all/time/sampling_max": 389.1068871021271,
"env/all/time/env_step_mean": 3009.8101849248633,
"env/all/time/env_step_max": 5937.905849933624,
"env/all/reward/mean": 0.5582087341763786,
"env/all/reward/max": 0.6645444662947063,
"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.5582087341763786,
"env/all/correctness": 0.84765625,
"env/all/correctness/min": 0.0,
"env/all/correctness/max": 1.0,
"env/all/raw_score": 1.5250184524043862,
"env/all/raw_score/min": 1.5047901894815932,
"env/all/raw_score/max": 3.9604006794291813,
"env/all/initial_raw_score": -1.504809976441158,
"env/all/initial_raw_score/min": -1.504812635414709,
"env/all/initial_raw_score/max": -1.504804300308892,
"env/all/msg": "Success; raw_score=1.5047984373490677",
"env/all/parsed_code": "```python\nimport time\nimport numpy as np\nimport cvxpy as cp\nimport copy\nimport random\n\ndef propose_candidate(seed=42, budget_s=1000, **kwargs):\n \"\"\"\n Optimizes a sequence of non-negative coefficients to minimize the evaluation function.\n This approach combines a more efficient LP strategy, gradient-based adjustments, and enhanced initialization.\n \"\"\"\n np.random.seed(seed)\n deadline = time.time() + budget_s - 10\n\n # Initialize from the best known construction\n prev = globals().get(\"height_sequence_1\", None)\n if prev is not None and isinstance(prev, (list, np.ndarray)) and len(prev) > 0:\n best_sequence = list(np.asarray(prev, dtype=float))\n else:\n # Enhanced initialization with more structured sequences\n initial_sequences = []\n for _ in range(15): # More variety but focused exploration\n base_len = np.random.choice([500, 1000])\n base = np.zeros(base_len)\n if np.random.rand() < 0.3: # Gaussian-like decay\n base = np.exp(-np.linspace(0, 1, base_len)**2 * 20) * 0.15 + 0.04\n elif np.random.rand() < 0.3: # Multi-peak structure\n base = np.zeros_like(base)\n num_peaks = np.random.randint(4, 8)\n for i in range(num_peaks):\n x = np.random.uniform(0, 1)\n base += np.exp(-((np.linspace(0, 1, base_len) - x)**2)*10) * 0.1\n base *= 0.2\n elif np.random.rand() < 0.3: # Uniform distribution with peaks\n base = np.random.rand(base_len) * 0.4 + 0.1\n num_peaks = np.random.randint(2, 5)\n for _ in range(num_peaks):\n idx = np.random.randint(0, base_len)\n base[idx] = np.random.uniform(0.2, 0.3)\n else: # Random but with controlled distribution\n base = np.random.rand(base_len) * 0.3 + 0.1\n base = np.array([x if np.random.rand() < 0.9 else 0.0 for x in base])\n sum_base = np.sum(base)\n target_sum = np.sqrt(2 * base_len)\n if sum_base > 0:\n scale_factor = target_sum / sum_base\n else:\n scale_factor = target_sum / 0.5 # default if sum_base is zero\n scaled_base = [max(0.0, min(1000.0, x * scale_factor)) for x in base]\n initial_sequences.append(scaled_base)\n best_sequence = initial_sequences[0].copy()\n for seq in initial_sequences:\n curr_score = evaluate_sequence(seq)\n best_score = evaluate_sequence(best_sequence)\n if curr_score < best_score:\n best_sequence = seq.copy()\n\n current_sequence = best_sequence.copy()\n best_score = float('inf')\n best_sequence = list(current_sequence)\n\n def perturb_sequence(seq):\n \"\"\"Targeted perturbations based on convexity of the evaluation function.\"\"\"\n n = len(seq)\n if n == 0:\n return None\n conv = np.convolve(seq, seq)\n top_indices = np.argsort(conv)[-400:] # Expand top positions for better exploration\n indices = np.random.choice(top_indices, size=min(40, len(top_indices)), replace=False)\n indices = [min(idx, len(seq)-1) for idx in indices]\n scale = 0.03 * np.std(seq) # Reduced perturbation scale\n for idx in indices:\n new_val = max(0.0, seq[idx] - np.random.normal(0, scale))\n seq = [new_val if i == idx else seq[i] for i in range(len(seq))]\n return seq\n\n def random_walk(seq):\n \"\"\"Small, adaptive perturbations with gradient-based direction.\"\"\"\n scale = 0.05 * np.std(seq)\n new_seq = [max(0.0, x + np.random.normal(0, scale)) for x in seq]\n return new_seq\n\n def get_good_direction_to_move_into(sequence):\n \"\"\"Optimizes through dynamic constraint selection and direct blending with refined thresholds.\"\"\"\n n = len(sequence)\n sum_sequence = np.sum(sequence)\n if sum_sequence <= 0.0:\n return None\n conv = np.convolve(sequence, sequence)\n max_b_val = np.max(conv)\n threshold_scale = 0.2 # Reduced for tighter constraints\n threshold = max(0.2 * max_b_val, 0.03 * max_b_val * np.sqrt(n)) if max_b_val > 0 else 0.03\n tight_positions = np.where(conv >= threshold)[0]\n if not tight_positions.size:\n tight_positions = np.arange(2 * n - 1)\n g_fun = solve_convolution_lp(sequence, threshold, tight_positions, threshold_scale=threshold_scale)\n if g_fun is None:\n return None\n sum_g = np.sum(g_fun)\n if sum_g <= 0.0:\n return None\n # Gradient-based optimization of t for better direction\n def objective(t):\n new_seq = [ (1 - t) * x + t * y for x, y in zip(sequence, g_fun) ]\n return evaluate_sequence(new_seq)\n low, high = 0.0, 1.0\n for _ in range(50):\n t1 = low + (high - low) / 3\n t2 = high - (high - low) / 3\n f1 = objective(t1)\n f2 = objective(t2)\n if f1 < f2:\n high = t2\n else:\n low = t1\n best_t = (low + high) / 2\n new_seq = [ (1 - best_t) * x + best_t * y for x, y in zip(sequence, g_fun) ]\n # Normalize\n new_seq = [max(0.0, x) for x in new_seq]\n target_sum = np.sqrt(2 * len(new_seq))\n if np.sum(new_seq) > 0:\n scale_factor = target_sum / np.sum(new_seq)\n else:\n scale_factor = target_sum / 0.5 # default if sum is zero\n new_seq = [x * scale_factor for x in new_seq]\n return new_seq\n\n def solve_convolution_lp(f_sequence, rhs, tight_positions, threshold_scale=0.5):\n n = len(f_sequence)\n if n == 0:\n return None\n g = cp.Variable(n, nonneg=True)\n objective = cp.Minimize(-cp.sum(g))\n constraints = []\n for k in tight_positions:\n coeff = np.zeros(n)\n for j in range(n):\n i = k - j\n if 0 <= i < n:\n coeff[j] = f_sequence[i]\n constraints.append(cp.sum(coeff * g) <= threshold_scale * rhs)\n problem = cp.Problem(objective, constraints)\n try:\n problem.solve(solver=cp.GLPK, verbose=False, eps=1e-6)\n return g.value if problem.status == cp.OPTIMAL else None\n except:\n return None\n\n def expand_sequence(seq):\n \"\"\"Expand sequence with line search to find optimal new element.\"\"\"\n n = len(seq)\n if n >= 1500:\n return seq\n current_sum = np.sum(seq)\n conv = np.convolve(seq, seq)\n max_b = np.max(conv)\n def eval_func(x):\n new_seq = seq + [x]\n new_sum = current_sum + x\n # Normalize\n target_sum = np.sqrt(2 * (n + 1))\n if new_sum > 0:\n scale_factor = target_sum / new_sum\n else:\n scale_factor = target_sum / 0.5\n new_seq_scaled = [y * scale_factor for y in new_seq]\n new_conv = np.convolve(new_seq_scaled, new_seq_scaled)\n new_max_b = np.max(new_conv)\n if new_sum < 0.01:\n return float('inf')\n return 2 * (n + 1) * new_max_b / (new_sum ** 2)\n # Line search around the current last element's value\n initial_x = seq[-1] if n > 0 else 0.01\n best_x = initial_x\n best_score = eval_func(best_x)\n # Try a range of x values around initial_x\n for delta in [ -0.2, -0.15, -0.1, -0.05, 0.0, 0.05, 0.1, 0.15, 0.2 ]:\n x_candidate = initial_x + delta\n x_candidate = max(0.0, x_candidate)\n score = eval_func(x_candidate)\n if score < best_score:\n best_score = score\n best_x = x_candidate\n # Try additional fixed values\n for x_candidate in [0.01, 0.02, 0.05, 0.1, 0.15, 0.2]:\n score = eval_func(x_candidate)\n if score < best_score:\n best_score = score\n best_x = x_candidate\n new_seq = seq + [best_x]\n # Normalize\n new_sum = np.sum(new_seq)\n target_sum = np.sqrt(2 * (n + 1))\n if new_sum > 0:\n scale_factor = target_sum / new_sum\n else:\n scale_factor = target_sum / 0.5\n new_seq = [x * scale_factor for x in new_seq]\n return new_seq\n\n def structured_balancing(seq):\n \"\"\"Targeted adjustments on peak positions and their neighbors.\"\"\"\n seq = [max(0.0, x) for x in seq]\n n = len(seq)\n conv = np.convolve(seq, seq)\n peak_indices = np.argsort(conv)[-20:] # Focus on critical peak positions\n peak_indices = np.array([min(idx, n-1) for idx in peak_indices])\n for idx in peak_indices:\n if seq[idx] > 0.0:\n seq[idx] = max(0.0, seq[idx] * 0.98) # Reduce peak more gently\n for shift in [-1, 0, 1]:\n neighbor_idx = idx + shift\n if 0 <= neighbor_idx < n:\n seq[neighbor_idx] = min(1000.0, seq[neighbor_idx] * 1.05) # Increase neighbors\n return [max(0.0, min(1000.0, x)) for x in seq]\n\n def gradient_step(seq):\n \"\"\"Approximate gradient-based step towards minimizing the evaluation function.\"\"\"\n n = len(seq)\n if n == 0:\n return seq\n # Compute the current score\n current_score = evaluate_sequence(seq)\n # Generate perturbations to estimate gradient\n perturbations = [np.zeros(n) for _ in range(n)]\n for i in range(n):\n perturbations[i][i] = 0.01\n scores = []\n for i in range(n):\n perturbed_seq = [x + (0.01 if j == i else 0) for j, x in enumerate(seq)]\n score = evaluate_sequence(perturbed_seq)\n scores.append(score)\n # Estimate gradient as (score - current_score) / 0.01\n grad = np.array(scores) - current_score\n # Adjust the sequence in the direction of decreasing evaluation\n step_size = 0.001\n new_seq = [max(0.0, x + step_size * grad[i]) for i, x in enumerate(seq)]\n return new_seq\n\n while time.time() < deadline:\n # Try LP-based move\n h_function = get_good_direction_to_move_into(current_sequence)\n if h_function is not None:\n current_sequence = h_function\n else:\n # Expand if not already at limit\n if len(current_sequence) < 1500:\n current_sequence = expand_sequence(current_sequence)\n else:\n current_sequence = perturb_sequence(current_sequence)\n\n # Occasionally try random walk for exploration\n if np.random.rand() < 0.03:\n current_sequence = random_walk(current_sequence)\n\n # Apply structured balancing to refine\n if np.random.rand() < 0.02:\n current_sequence = structured_balancing(current_sequence)\n\n # Occasionally apply gradient-based step\n if np.random.rand() < 0.05:\n current_sequence = gradient_step(current_sequence)\n\n try:\n # Normalize current_sequence\n target_sum = np.sqrt(2 * len(current_sequence))\n if np.sum(current_sequence) > 0:\n scale_factor = target_sum / np.sum(current_sequence)\n else:\n scale_factor = target_sum / 0.5\n current_sequence = [max(0.0, x * scale_factor) for x in current_sequence]\n # Clip to 0-1000\n current_sequence = [min(1000.0, max(0.0, x)) for x in current_sequence]\n curr_score = evaluate_sequence(current_sequence)\n if curr_score < best_score:\n best_score = curr_score\n best_sequence = current_sequence.copy()\n print(f\"New best: {best_score}\")\n except Exception:\n pass\n\n return [float(max(0.0, x)) for x in best_sequence]\n```",
"env/all/time/policy": 292.3565194089897,
"env/all/time/policy/min": 139.4127972126007,
"env/all/time/policy/max": 389.1068871021271,
"env/all/time/env_step": 3009.8101849248633,
"env/all/time/env_step/min": 1.343418836593628,
"env/all/time/env_step/max": 5937.905849933624,
"env/all/time/reward_compute": 5.592592060565948e-07,
"env/all/time/reward_compute/min": 2.2724270820617676e-07,
"env/all/time/reward_compute/max": 1.7397105693817139e-06,
"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.01367393508553505,
"advantage/min": -1.0,
"advantage/max": 4.014148235321045,
"time/assemble_training_data": 5.564905166625977,
"time/kl_vs_base": 88.45530009269714,
"kl_policy_base": 0.0009592759888619184,
"time/train": 569.764083147049,
"time/save_checkpoint": 17.897873163223267,
"time/total": 6992.801751613617
}
[2026-07-09T06:24:18+00:00] job=1812630 node=node-14 ngpu=3 ntrain=1 replicas=2 flash_attn=no
[2026-07-09T09:14:17+00:00] job=1813129 node=node-28 ngpu=3 ntrain=1 replicas=2 flash_attn=yes
[2026-07-09T13:46:36+00:00] job=1813130 node=node-22 ngpu=6 ntrain=2 replicas=4 flash_attn=yes
[2026-07-11T14:04:05+00:00] job=1824338 node=node-1 ngpu=3 ntrain=1 replicas=2 flash_attn=yes
[2026-07-12T06:23:00+00:00] job=1827205 node=node-14 ngpu=6 ntrain=2 replicas=4 flash_attn=yes