Real-time M4 Max race video + raw timings; Mac speed note; race and eval scripts
Browse files- .gitattributes +2 -0
- README.md +10 -2
- assets/race_base.json +1 -0
- assets/race_dory-beam.json +1 -0
- assets/race_m4max.mp4 +3 -0
- assets/race_m4max_end.png +3 -0
- code/scripts/export_eval_data.py +5 -7
- code/scripts/export_release_data.py +32 -31
- code/scripts/race_record.py +93 -0
- code/scripts/race_render.py +158 -0
.gitattributes
CHANGED
|
@@ -35,3 +35,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
assets/accuracy_vs_tokens.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
assets/accuracy_vs_tokens.png filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
assets/race_m4max.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
assets/race_m4max_end.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -31,6 +31,13 @@ a 40-layer middle block runs 1–4 times per token, so you buy accuracy with com
|
|
| 31 |
teaches Dory Beam's style using 52,660 verified Beam traces, then blends the result back into the base
|
| 32 |
weights so it keeps nearly all of Dory's accuracy. Built for Reflection's Build with Beam challenge.
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
## Results
|
| 35 |
|
| 36 |

|
|
@@ -122,9 +129,10 @@ print(r.choices[0].message.content)
|
|
| 122 |
|
| 123 |
Set `n_recurrent_loops` to 1–4 to trade compute for accuracy.
|
| 124 |
|
| 125 |
-
**On a Mac
|
| 126 |
[ProCreations/Dory-Beam-4B-GGUF](https://huggingface.co/ProCreations/Dory-Beam-4B-GGUF), with run instructions.
|
| 127 |
-
|
|
|
|
| 128 |
|
| 129 |
**See it:** [side-by-side answers from base Dory and Dory-Beam](https://huggingface.co/spaces/ProCreations/Dory-Beam-side-by-side)
|
| 130 |
on randomly sampled evaluation problems.
|
|
|
|
| 31 |
teaches Dory Beam's style using 52,660 verified Beam traces, then blends the result back into the base
|
| 32 |
weights so it keeps nearly all of Dory's accuracy. Built for Reflection's Build with Beam challenge.
|
| 33 |
|
| 34 |
+
<video src="https://huggingface.co/ProCreations/Dory-Beam-4B/resolve/main/assets/race_m4max.mp4" controls muted playsinline width="100%"></video>
|
| 35 |
+
|
| 36 |
+
*Real time on an Apple M4 Max (llama.cpp, Q5_K_M, 2 loops): base Dory and Dory-Beam-4B on the same MATH-500
|
| 37 |
+
problem. Both answer correctly; base Dory writes 2,315 tokens in 51 s, Dory-Beam 1,088 tokens in 25 s. The problem
|
| 38 |
+
was picked before recording as the median-ratio problem from the full eval; one run each, seed 0. Raw timings are
|
| 39 |
+
in `assets/race_*.json`.*
|
| 40 |
+
|
| 41 |
## Results
|
| 42 |
|
| 43 |

|
|
|
|
| 129 |
|
| 130 |
Set `n_recurrent_loops` to 1–4 to trade compute for accuracy.
|
| 131 |
|
| 132 |
+
**On a Mac:** GGUF builds for llama.cpp (Q5_K_M and Q8_0) are in
|
| 133 |
[ProCreations/Dory-Beam-4B-GGUF](https://huggingface.co/ProCreations/Dory-Beam-4B-GGUF), with run instructions.
|
| 134 |
+
On an M4 Max the Q5_K_M decodes at about 45 tokens/s at 2 loops, so a typical MATH-500 answer takes about 30
|
| 135 |
+
seconds. It scored 20/20 on a MATH-500 smoke test.
|
| 136 |
|
| 137 |
**See it:** [side-by-side answers from base Dory and Dory-Beam](https://huggingface.co/spaces/ProCreations/Dory-Beam-side-by-side)
|
| 138 |
on randomly sampled evaluation problems.
|
assets/race_base.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"name": "Dory1.0-4B (base)", "model_file": "NVIDIA-Nemotron-Labs-Dory1.0-4B-Q5_K_M.gguf", "loops": 2, "problem": "math500-436", "prompt": "$n$ fair 6-sided dice are simultaneously rolled. The probability that exactly two of them show a number other than 1 is $\\frac{25}{216}$. Find $n$.\n\nPut your final answer within \\boxed{}.", "gold": "4", "seed": 0, "events": [[0.342, "<think>\nWe"], [0.365, " need"], [0.383, " answer"], [0.403, " user"], [0.423, " math"], [0.443, " problem"], [0.463, "."], [0.482, " Need"], [0.502, " think"], [0.522, " thoroughly"], [0.541, " but"], [0.56, " final"], [0.58, " should"], [0.601, " just"], [0.622, " answer"], [0.643, " with"], [0.664, " box"], [0.685, "ed"], [0.705, " n"], [0.724, "."], [0.743, " Need"], [0.763, " solve"], [0.782, "."], [0.802, " Need"], [0.82, " be"], [0.84, " careful"], [0.86, "."], [0.879, " User"], [0.899, " asks"], [0.918, ":"], [0.937, " n"], [0.956, " fair"], [0.975, " "], [0.995, "6"], [1.013, "-sided"], [1.033, " dice"], [1.052, " simultaneously"], [1.071, " rolled"], [1.09, "."], [1.109, " Prob"], [1.129, "ability"], [1.147, " that"], [1.167, " exactly"], [1.186, " two"], [1.206, " of"], [1.226, " them"], [1.245, " show"], [1.264, " a"], [1.283, " number"], [1.303, " other"], [1.323, " than"], [1.342, " "], [1.361, "1"], [1.38, " is"], [1.401, " "], [1.422, "2"], [1.441, "5"], [1.46, "/"], [1.479, "2"], [1.498, "1"], [1.517, "6"], [1.537, "."], [1.556, " Find"], [1.577, " n"], [1.596, ".\n\n"], [1.617, "Need"], [1.637, " parse"], [1.656, "."], [1.675, " We"], [1.694, " have"], [1.713, " n"], [1.733, " independent"], [1.752, " fair"], [1.771, " dice"], [1.79, "."], [1.81, " Each"], [1.83, " die"], [1.849, " outcome"], [1.869, ":"], [1.888, " probability"], [1.908, " it"], [1.927, " shows"], [1.946, " a"], [1.966, " number"], [1.985, " other"], [2.005, " than"], [2.025, " "], [2.044, "1"], [2.064, " ="], [2.083, " "], [2.103, "5"], [2.123, "/"], [2.142, "6"], [2.162, "?"], [2.181, " There"], [2.2, " are"], [2.219, " "], [2.239, "6"], [2.259, " faces"], [2.278, ","], [2.297, " one"], [2.318, " is"], [2.337, " "], [2.358, "1"], [2.377, ","], [2.399, " other"], [2.418, " "], [2.438, "5"], [2.458, " faces"], [2.478, " show"], [2.499, " number"], [2.52, " other"], [2.541, " than"], [2.562, " "], [2.582, "1"], [2.604, "."], [2.624, " Yes"], [2.644, " p"], [2.664, " ="], [2.684, " "], [2.703, "5"], [2.722, "/"], [2.742, "6"], [2.761, " for"], [2.78, " success"], [2.8, " ("], [2.818, "other"], [2.838, " than"], [2.857, " "], [2.876, "1"], [2.896, ")."], [2.915, " Failure"], [2.935, " ="], [2.954, " shows"], [2.972, " "], [2.992, "1"], [3.011, " with"], [3.031, " p"], [3.05, "="], [3.069, "1"], [3.089, "/"], [3.109, "6"], [3.129, ".\n\n"], [3.148, "We"], [3.167, " need"], [3.186, " exactly"], [3.207, " two"], [3.228, " of"], [3.247, " the"], [3.267, " n"], [3.286, " dice"], [3.305, " show"], [3.324, " a"], [3.344, " number"], [3.363, " other"], [3.382, " than"], [3.402, " "], [3.423, "1"], [3.442, "."], [3.462, " Thus"], [3.481, " number"], [3.5, " of"], [3.519, " successes"], [3.539, " X"], [3.558, " ~"], [3.578, " Bin"], [3.598, "omial"], [3.617, "(n"], [3.637, ","], [3.657, " p"], [3.677, "="], [3.696, "5"], [3.715, "/"], [3.735, "6"], [3.754, ")."], [3.774, " Prob"], [3.794, "ability"], [3.814, " exactly"], [3.834, " two"], [3.854, " successes"], [3.874, ":"], [3.896, " C"], [3.916, "(n"], [3.937, ","], [3.957, "2"], [3.977, ")"], [3.999, " p"], [4.02, "^"], [4.042, "2"], [4.062, " ("], [4.085, "1"], [4.105, "-p"], [4.127, ")^{"], [4.146, "n"], [4.167, "-"], [4.187, "2"], [4.207, "}"], [4.227, " ="], [4.247, " C"], [4.267, "(n"], [4.286, ","], [4.307, "2"], [4.327, ")"], [4.346, " ("], [4.367, "5"], [4.387, "/"], [4.406, "6"], [4.427, ")^"], [4.448, "2"], [4.469, " ("], [4.489, "1"], [4.509, "/"], [4.529, "6"], [4.548, ")^{"], [4.569, "n"], [4.588, "-"], [4.607, "2"], [4.627, "}."], [4.646, " Set"], [4.666, " equal"], [4.685, " to"], [4.705, " "], [4.724, "2"], [4.744, "5"], [4.764, "/"], [4.783, "2"], [4.802, "1"], [4.822, "6"], [4.842, "."], [4.862, " Need"], [4.881, " find"], [4.903, " integer"], [4.923, " n"], [4.942, " likely"], [4.962, "."], [4.981, " Need"], [5.001, " solve"], [5.021, ".\n\n"], [5.041, "Equation"], [5.061, ":"], [5.081, " C"], [5.101, "(n"], [5.122, ","], [5.141, "2"], [5.161, ")"], [5.18, " *"], [5.2, " "], [5.219, "2"], [5.238, "5"], [5.258, "/"], [5.277, "3"], [5.297, "6"], [5.316, " *"], [5.336, " ("], [5.357, "1"], [5.376, "/"], [5.396, "6"], [5.416, ")^{"], [5.436, "n"], [5.455, "-"], [5.474, "2"], [5.495, "}"], [5.514, " ="], [5.534, " "], [5.555, "2"], [5.576, "5"], [5.596, "/"], [5.617, "2"], [5.638, "1"], [5.658, "6"], [5.678, ".\n\n"], [5.698, "Sim"], [5.718, "pl"], [5.739, "ify"], [5.76, ":"], [5.779, " C"], [5.8, "(n"], [5.819, ","], [5.839, "2"], [5.859, ")"], [5.878, " *"], [5.898, " "], [5.917, "2"], [5.937, "5"], [5.957, " *"], [5.976, " ("], [5.996, "1"], [6.015, "/"], [6.035, "6"], [6.055, ")^{"], [6.075, "n"], [6.097, "-"], [6.118, "2"], [6.139, "}"], [6.16, " /"], [6.18, " "], [6.2, "3"], [6.221, "6"], [6.241, " ="], [6.261, " "], [6.28, "2"], [6.3, "5"], [6.321, "/"], [6.341, "2"], [6.36, "1"], [6.379, "6"], [6.399, "."], [6.418, " Cancel"], [6.439, " "], [6.459, "2"], [6.478, "5"], [6.499, "."], [6.518, " C"], [6.538, "(n"], [6.56, ","], [6.58, "2"], [6.6, ")"], [6.619, " /"], [6.638, "3"], [6.658, "6"], [6.677, " *"], [6.697, " ("], [6.716, "1"], [6.736, "/"], [6.755, "6"], [6.775, ")^{"], [6.796, "n"], [6.815, "-"], [6.835, "2"], [6.856, "}"], [6.875, " ="], [6.895, " "], [6.914, "1"], [6.935, "/"], [6.955, "2"], [6.974, "1"], [6.995, "6"], [7.014, "."], [7.034, " Mult"], [7.054, "iply"], [7.075, ":"], [7.095, " C"], [7.114, "(n"], [7.134, ","], [7.153, "2"], [7.173, ")"], [7.193, " ("], [7.212, "1"], [7.232, "/"], [7.251, "6"], [7.272, ")^{"], [7.292, "n"], [7.312, "-"], [7.332, "2"], [7.351, "}"], [7.372, " ="], [7.391, " "], [7.412, "3"], [7.432, "6"], [7.452, "/"], [7.472, "2"], [7.493, "1"], [7.513, "6"], [7.533, " ="], [7.553, " "], [7.574, "1"], [7.595, "/"], [7.614, "6"], [7.635, "."], [7.656, " Wait"], [7.676, " check"], [7.697, ":"], [7.717, " ("], [7.738, "2"], [7.758, "5"], [7.778, "/"], [7.798, "3"], [7.819, "6"], [7.839, ")*("], [7.861, "C"], [7.88, ")*("], [7.9, "1"], [7.922, "/"], [7.941, "6"], [7.961, ")^{"], [7.98, "n"], [8.0, "-"], [8.02, "2"], [8.04, "}="], [8.061, "2"], [8.081, "5"], [8.102, "/"], [8.122, "2"], [8.141, "1"], [8.162, "6"], [8.181, "."], [8.202, " Cancel"], [8.222, " "], [8.242, "2"], [8.262, "5"], [8.283, ":"], [8.304, " C"], [8.325, "*("], [8.345, "1"], [8.367, "/"], [8.387, "6"], [8.408, ")^{"], [8.429, "n"], [8.449, "-"], [8.47, "2"], [8.49, "}/"], [8.509, "3"], [8.529, "6"], [8.549, " ="], [8.57, " "], [8.59, "1"], [8.611, "/"], [8.632, "2"], [8.652, "1"], [8.675, "6"], [8.696, "."], [8.716, " Mult"], [8.737, "iply"], [8.757, " by"], [8.777, " "], [8.797, "3"], [8.817, "6"], [8.838, ":"], [8.859, " C"], [8.879, "*("], [8.9, "1"], [8.92, "/"], [8.94, "6"], [8.959, ")^{"], [8.979, "n"], [9.0, "-"], [9.019, "2"], [9.04, "}"], [9.06, " ="], [9.08, " "], [9.1, "3"], [9.12, "6"], [9.14, "/"], [9.16, "2"], [9.179, "1"], [9.2, "6"], [9.222, " ="], [9.242, " "], [9.263, "1"], [9.284, "/"], [9.304, "6"], [9.326, "."], [9.345, " Yes"], [9.366, ".\n\n"], [9.386, "So"], [9.406, " C"], [9.426, "(n"], [9.447, ","], [9.467, "2"], [9.487, ")"], [9.507, " *"], [9.527, " "], [9.547, "6"], [9.568, "^{-"], [9.589, "("], [9.609, "n"], [9.63, "-"], [9.651, "2"], [9.672, ")}"], [9.694, " ="], [9.715, " "], [9.735, "1"], [9.756, "/"], [9.776, "6"], [9.798, "."], [9.818, " Equ"], [9.838, "ivalent"], [9.858, " C"], [9.879, "(n"], [9.899, ","], [9.919, "2"], [9.939, ")"], [9.96, " ="], [9.979, " "], [10.001, "6"], [10.02, "^{"], [10.042, "n"], [10.063, "-"], [10.083, "3"], [10.104, "}."], [10.125, " Because"], [10.145, " multiply"], [10.166, " both"], [10.186, " sides"], [10.208, " by"], [10.23, " "], [10.25, "6"], [10.271, "^{"], [10.293, "n"], [10.314, "-"], [10.335, "2"], [10.358, "}:"], [10.378, " C"], [10.4, "(n"], [10.421, ","], [10.443, "2"], [10.464, ")"], [10.484, " ="], [10.505, " "], [10.527, "6"], [10.548, "^{"], [10.571, "n"], [10.593, "-"], [10.613, "3"], [10.634, "}"], [10.655, "?"], [10.676, " Let"], [10.696, "'s"], [10.716, " verify"], [10.737, ":"], [10.757, " C"], [10.777, " *"], [10.798, " "], [10.819, "6"], [10.84, "^{-"], [10.859, "("], [10.879, "n"], [10.9, "-"], [10.92, "2"], [10.941, ")}"], [10.962, " ="], [10.982, " "], [11.002, "6"], [11.024, "^{-"], [11.044, "1"], [11.065, "}."], [11.085, " Mult"], [11.107, "iply"], [11.128, " by"], [11.149, " "], [11.17, "6"], [11.193, "^{"], [11.214, "n"], [11.236, "-"], [11.259, "2"], [11.279, "}:"], [11.301, " C"], [11.321, " ="], [11.342, " "], [11.362, "6"], [11.382, "^{"], [11.404, "n"], [11.424, "-"], [11.445, "2"], [11.466, "}"], [11.486, " *"], [11.506, " "], [11.526, "6"], [11.546, "^{-"], [11.567, "1"], [11.588, "}"], [11.608, " ="], [11.628, " "], [11.648, "6"], [11.669, "^{"], [11.689, "n"], [11.709, "-"], [11.73, "3"], [11.749, "}."], [11.77, " Yes"], [11.79, " for"], [11.811, " n"], [11.831, "?"], [11.851, " If"], [11.872, " n"], [11.893, " maybe"], [11.914, " less"], [11.935, " than"], [11.957, "?"], [11.977, " exactly"], [12.0, " two"], [12.021, " successes"], [12.043, " requires"], [12.066, " n"], [12.086, "≥"], [12.107, "2"], [12.128, "."], [12.149, " Equation"], [12.169, " C"], [12.189, "(n"], [12.21, ","], [12.23, "2"], [12.25, ")="], [12.272, "6"], [12.293, "^{"], [12.314, "n"], [12.336, "-"], [12.358, "3"], [12.378, "}."], [12.401, " Need"], [12.423, " solve"], [12.444, " integer"], [12.467, " n"], [12.489, ".\n\n"], [12.51, "Test"], [12.532, " n"], [12.554, " values"], [12.576, "."], [12.598, " n"], [12.619, "="], [12.64, "2"], [12.661, ":"], [12.682, " C"], [12.703, "="], [12.723, "1"], [12.743, ","], [12.764, " R"], [12.784, "HS"], [12.806, "="], [12.827, "6"], [12.846, "^{-"], [12.867, "1"], [12.887, "}="], [12.908, "1"], [12.928, "/"], [12.948, "6"], [12.97, " not"], [12.989, " integer"], [13.01, "?"], [13.031, " Wait"], [13.05, " equation"], [13.07, " after"], [13.09, " cancellation"], [13.111, " C"], [13.132, "="], [13.152, "6"], [13.173, "^{"], [13.194, "n"], [13.214, "-"], [13.235, "3"], [13.256, "}."], [13.276, " For"], [13.296, " n"], [13.316, "="], [13.336, "2"], [13.356, " R"], [13.376, "HS"], [13.397, "="], [13.417, "6"], [13.438, "^{-"], [13.459, "1"], [13.479, "}="], [13.499, "1"], [13.519, "/"], [13.541, "6"], [13.561, ","], [13.582, " not"], [13.602, " equal"], [13.623, "."], [13.643, " Let"], [13.664, "'s"], [13.684, " compute"], [13.705, " original"], [13.727, " for"], [13.748, " n"], [13.769, "="], [13.791, "2"], [13.813, ":"], [13.834, " probability"], [13.854, " exactly"], [13.876, " two"], [13.897, " show"], [13.917, " other"], [13.939, " than"], [13.96, " "], [13.981, "1"], [14.003, " ="], [14.025, " both"], [14.046, " are"], [14.069, " non"], [14.09, "-"], [14.111, "1"], [14.133, " ="], [14.153, " ("], [14.174, "5"], [14.195, "/"], [14.216, "6"], [14.238, ")^"], [14.259, "2"], [14.279, "="], [14.3, "2"], [14.321, "5"], [14.341, "/"], [14.362, "3"], [14.382, "6"], [14.404, " not"], [14.425, " "], [14.446, "2"], [14.467, "5"], [14.487, "/"], [14.508, "2"], [14.529, "1"], [14.552, "6"], [14.573, "."], [14.593, " Not"], [14.613, ".\n\n"], [14.635, "n"], [14.655, "="], [14.676, "3"], [14.697, ":"], [14.719, " C"], [14.74, "="], [14.761, "3"], [14.782, ","], [14.804, " R"], [14.826, "HS"], [14.847, "="], [14.868, "6"], [14.89, "^{"], [14.91, "0"], [14.931, "}="], [14.952, "1"], [14.973, "."], [14.994, " Not"], [15.015, " ("], [15.037, "3"], [15.081, "≠"], [15.103, "1"], [15.126, ")."], [15.148, " Original"], [15.17, " probability"], [15.192, " exactly"], [15.213, " two"], [15.237, " non"], [15.26, "-"], [15.282, "1"], [15.304, " among"], [15.326, " "], [15.348, "3"], [15.37, " ="], [15.391, " C"], [15.412, "3"], [15.433, ","], [15.456, "2"], [15.477, "*("], [15.5, "5"], [15.521, "/"], [15.543, "6"], [15.564, ")^"], [15.585, "2"], [15.606, "*("], [15.628, "1"], [15.648, "/"], [15.67, "6"], [15.692, ")="], [15.713, "3"], [15.737, "*"], [15.758, "2"], [15.781, "5"], [15.803, "/"], [15.825, "3"], [15.847, "6"], [15.869, "*"], [15.89, "1"], [15.912, "/"], [15.933, "6"], [15.954, " ="], [15.974, "7"], [15.997, "5"], [16.018, "/"], [16.039, "2"], [16.06, "1"], [16.081, "6"], [16.102, "?"], [16.124, " ="], [16.144, "2"], [16.167, "5"], [16.188, "/"], [16.21, "7"], [16.235, "2"], [16.258, "?"], [16.281, " Not"], [16.304, " "], [16.328, "2"], [16.35, "5"], [16.373, "/"], [16.397, "2"], [16.419, "1"], [16.442, "6"], [16.465, "."], [16.487, " no"], [16.51, ".\n\n"], [16.534, "n"], [16.557, "="], [16.58, "4"], [16.603, ":"], [16.627, " C"], [16.65, "="], [16.674, "6"], [16.699, ","], [16.722, " R"], [16.745, "HS"], [16.769, "="], [16.79, "6"], [16.812, "^{"], [16.834, "1"], [16.856, "}="], [16.878, "6"], [16.901, "."], [16.924, " Equal"], [16.946, "!"], [16.967, " n"], [16.989, "="], [17.011, "4"], [17.034, " likely"], [17.057, "."], [17.079, " Check"], [17.102, " original"], [17.125, ":"], [17.148, " C"], [17.172, "4"], [17.196, ","], [17.218, "2"], [17.241, "="], [17.263, "6"], [17.284, ";"], [17.307, " ("], [17.329, "5"], [17.351, "/"], [17.373, "6"], [17.395, ")^"], [17.417, "2"], [17.44, "*("], [17.461, "1"], [17.483, "/"], [17.504, "6"], [17.526, ")^"], [17.547, "2"], [17.572, " ="], [17.595, "2"], [17.616, "5"], [17.637, "/"], [17.659, "3"], [17.681, "6"], [17.703, " *"], [17.724, "1"], [17.745, "/"], [17.767, "3"], [17.79, "6"], [17.811, "="], [17.835, "2"], [17.858, "5"], [17.879, "/"], [17.903, "1"], [17.926, "2"], [17.948, "9"], [17.971, "6"], [17.994, ";"], [18.017, " times"], [18.04, " "], [18.064, "6"], [18.088, " ="], [18.111, "1"], [18.135, "5"], [18.159, "0"], [18.182, "/"], [18.206, "1"], [18.229, "2"], [18.251, "9"], [18.275, "6"], [18.299, "="], [18.321, "2"], [18.344, "5"], [18.368, "/"], [18.391, "2"], [18.415, "1"], [18.438, "6"], [18.462, "?"], [18.485, " "], [18.509, "1"], [18.532, "5"], [18.555, "0"], [18.579, "/"], [18.602, "1"], [18.627, "2"], [18.65, "9"], [18.673, "6"], [18.697, " divide"], [18.719, " "], [18.742, "6"], [18.765, " ="], [18.786, "2"], [18.808, "5"], [18.831, "/"], [18.852, "2"], [18.874, "1"], [18.897, "6"], [18.919, " yes"], [18.94, "."], [18.962, " Good"], [18.984, " n"], [19.005, "="], [19.027, "4"], [19.048, ".\n\n"], [19.07, "Need"], [19.093, " provide"], [19.114, " final"], [19.136, " answer"], [19.156, " within"], [19.178, " box"], [19.199, "ed"], [19.22, "{"], [19.241, "}."], [19.262, " The"], [19.283, " user"], [19.304, " specifically"], [19.326, " asks"], [19.347, " \""], [19.369, "Find"], [19.389, " n"], [19.411, "."], [19.432, " Put"], [19.453, " your"], [19.474, " final"], [19.497, " answer"], [19.518, " within"], [19.539, " \\"], [19.561, "box"], [19.583, "ed"], [19.606, "{}"], [19.629, ".\""], [19.652, " Need"], [19.675, " final"], [19.698, " should"], [19.719, " be"], [19.741, " \\"], [19.764, "box"], [19.786, "ed"], [19.809, "{"], [19.832, "4"], [19.855, "}."], [19.878, " Probably"], [19.9, " include"], [19.922, " some"], [19.943, " reasoning"], [19.966, "?"], [19.987, " They"], [20.009, " likely"], [20.032, " want"], [20.054, " final"], [20.077, " answer"], [20.098, " only"], [20.12, "?"], [20.141, " The"], [20.163, " instruction"], [20.185, " says"], [20.207, " Put"], [20.232, " your"], [20.253, " final"], [20.275, " answer"], [20.298, " within"], [20.32, " \\"], [20.343, "box"], [20.366, "ed"], [20.39, "{"], [20.412, "}."], [20.436, " We"], [20.46, " can"], [20.483, " present"], [20.507, " concise"], [20.531, " reasoning"], [20.552, " and"], [20.576, " final"], [20.6, " box"], [20.621, "ed"], [20.644, "?"], [20.667, " It"], [20.689, " says"], [20.711, " final"], [20.734, " answer"], [20.757, " within"], [20.778, " box"], [20.802, "ed"], [20.826, ";"], [20.848, " as"], [20.871, " coding"], [20.893, " assistant"], [20.915, "?"], [20.937, " But"], [20.957, " user"], [20.979, " asks"], [21.001, " math"], [21.024, " problem"], [21.045, "."], [21.066, " Need"], [21.088, " decide"], [21.109, " final"], [21.133, " response"], [21.157, ":"], [21.179, " probably"], [21.203, " include"], [21.227, " brief"], [21.248, " derivation"], [21.271, " and"], [21.292, " final"], [21.314, " answer"], [21.335, " in"], [21.356, " box"], [21.378, "ed"], [21.4, "."], [21.423, " But"], [21.444, " the"], [21.468, " phrase"], [21.492, " \""], [21.514, "Put"], [21.537, " your"], [21.559, " final"], [21.581, " answer"], [21.603, " within"], [21.626, " \\"], [21.646, "box"], [21.668, "ed"], [21.689, "{"], [21.711, "}\""], [21.733, " suggests"], [21.754, " final"], [21.776, " should"], [21.797, " contain"], [21.818, " box"], [21.84, "ed"], [21.861, " answer"], [21.883, ","], [21.906, " maybe"], [21.927, " only"], [21.949, " \\"], [21.97, "box"], [21.992, "ed"], [22.014, "{"], [22.036, "4"], [22.056, "}."], [22.078, " The"], [22.1, " system"], [22.12, " desired"], [22.142, " over"], [22.163, "verb"], [22.184, "osity"], [22.207, " "], [22.229, "5"], [22.252, " but"], [22.273, " user"], [22.296, " wants"], [22.317, " final"], [22.339, " answer"], [22.363, " within"], [22.385, " box"], [22.408, "ed"], [22.432, "."], [22.453, " To"], [22.475, " be"], [22.497, " safe"], [22.519, ","], [22.54, " final"], [22.564, " should"], [22.586, " include"], [22.608, " just"], [22.63, " \\"], [22.651, "box"], [22.672, "ed"], [22.694, "{"], [22.716, "4"], [22.738, "}"], [22.76, "?"], [22.782, " Many"], [22.805, " tasks"], [22.828, " expect"], [22.851, " final"], [22.874, " answer"], [22.898, " only"], [22.92, " in"], [22.943, " box"], [22.965, "ed"], [22.987, "."], [23.009, " However"], [23.032, " as"], [23.054, " assistant"], [23.076, ","], [23.099, " maybe"], [23.121, " include"], [23.144, " minimal"], [23.166, " derivation"], [23.188, " then"], [23.211, " final"], [23.233, " box"], [23.254, "ed"], [23.276, "."], [23.298, " But"], [23.32, " prompt"], [23.344, ":"], [23.367, " \""], [23.39, "S"], [23.412, "olve"], [23.434, " the"], [23.456, " following"], [23.478, " problem"], [23.5, "..."], [23.523, " Put"], [23.546, " your"], [23.568, " final"], [23.59, " answer"], [23.613, " within"], [23.635, " \\"], [23.657, "box"], [23.678, "ed"], [23.701, "{}"], [23.725, ".\""], [23.746, " Usually"], [23.768, " in"], [23.789, " these"], [23.811, " tasks"], [23.833, " they"], [23.854, " want"], [23.877, " final"], [23.9, " answer"], [23.922, " only"], [23.944, "?"], [23.967, " The"], [23.989, " final"], [24.011, " answer"], [24.034, " should"], [24.056, " be"], [24.079, " within"], [24.101, " box"], [24.125, "ed"], [24.148, ";"], [24.173, " we"], [24.198, " can"], [24.221, " include"], [24.244, " reasoning"], [24.267, " before"], [24.29, ","], [24.314, " but"], [24.339, " final"], [24.363, " answer"], [24.385, " must"], [24.41, " be"], [24.434, " in"], [24.457, " box"], [24.479, "ed"], [24.503, "."], [24.526, " The"], [24.548, " evaluation"], [24.571, " may"], [24.594, " parse"], [24.617, " box"], [24.639, "ed"], [24.663, ";"], [24.685, " if"], [24.711, " include"], [24.737, " extra"], [24.76, " text"], [24.783, " maybe"], [24.806, " still"], [24.83, " okay"], [24.853, "?"], [24.876, " To"], [24.9, " be"], [24.923, " safe"], [24.946, " for"], [24.969, " automated"], [24.991, ","], [25.015, " final"], [25.038, " should"], [25.061, " be"], [25.083, " only"], [25.106, " `\\"], [25.128, "box"], [25.151, "ed"], [25.173, "{"], [25.196, "4"], [25.218, "}"], [25.241, "`."], [25.264, " Need"], [25.285, " ensure"], [25.309, " final"], [25.332, " answer"], [25.355, " within"], [25.377, " box"], [25.4, "ed"], [25.423, "."], [25.447, " The"], [25.469, " user"], [25.491, " didn"], [25.514, "'t"], [25.536, " explicitly"], [25.559, " ask"], [25.583, " for"], [25.607, " explanation"], [25.631, ";"], [25.653, " asks"], [25.678, " find"], [25.703, " n"], [25.727, " and"], [25.751, " put"], [25.777, " final"], [25.802, " answer"], [25.826, " within"], [25.85, " box"], [25.875, "ed"], [25.899, "."], [25.922, " In"], [25.946, " these"], [25.971, " math"], [25.994, " prompts"], [26.019, ","], [26.042, " final"], [26.066, " answer"], [26.088, " should"], [26.111, " be"], [26.135, " \\"], [26.16, "box"], [26.182, "ed"], [26.206, "{"], [26.231, "4"], [26.255, "},"], [26.278, " likely"], [26.303, " no"], [26.328, " extra"], [26.351, " prose"], [26.376, "."], [26.4, " Need"], [26.424, " produce"], [26.448, " final"], [26.472, " with"], [26.496, " just"], [26.52, " \\"], [26.544, "box"], [26.569, "ed"], [26.594, "{"], [26.618, "4"], [26.642, "}."], [26.667, " But"], [26.692, " need"], [26.715, " be"], [26.74, " certain"], [26.764, " no"], [26.788, " other"], [26.812, " n"], [26.835, " solutions"], [26.859, "?"], [26.883, " Let"], [26.907, "'s"], [26.93, " prove"], [26.953, " uniqueness"], [26.976, "?"], [26.999, " The"], [27.022, " problem"], [27.044, " says"], [27.067, " find"], [27.09, " n"], [27.112, ";"], [27.135, " assume"], [27.157, " unique"], [27.18, "."], [27.204, " We"], [27.228, " can"], [27.251, " derive"], [27.275, " equation"], [27.3, " and"], [27.323, " maybe"], [27.346, " final"], [27.37, " only"], [27.395, "."], [27.418, " Need"], [27.443, " ensure"], [27.467, " n"], [27.491, "="], [27.515, "4"], [27.54, " only"], [27.564, "."], [27.588, " Let"], [27.612, "'s"], [27.636, " verify"], [27.661, " equation"], [27.685, " C"], [27.709, "(n"], [27.734, ","], [27.759, "2"], [27.782, ")="], [27.806, "6"], [27.832, "^{"], [27.856, "n"], [27.88, "-"], [27.905, "3"], [27.929, "}"], [27.953, " has"], [27.977, " maybe"], [28.002, " n"], [28.026, "=?"], [28.05, " For"], [28.075, " n"], [28.099, "≥"], [28.124, "?"], [28.147, " We"], [28.173, " found"], [28.197, " n"], [28.221, "="], [28.244, "4"], [28.269, "."], [28.293, " Could"], [28.317, " there"], [28.341, " be"], [28.365, " n"], [28.388, "="], [28.412, "5"], [28.435, "?"], [28.458, " C"], [28.482, "="], [28.504, "1"], [28.526, "0"], [28.549, ","], [28.572, " R"], [28.594, "HS"], [28.616, "="], [28.638, "6"], [28.661, "^"], [28.685, "2"], [28.709, "="], [28.732, "3"], [28.755, "6"], [28.777, " no"], [28.799, "."], [28.82, " n"], [28.844, "="], [28.866, "6"], [28.888, ":"], [28.911, " C"], [28.933, "="], [28.956, "1"], [28.978, "5"], [29.001, ","], [29.024, " R"], [29.046, "HS"], [29.069, "="], [29.093, "2"], [29.114, "1"], [29.136, "6"], [29.159, " no"], [29.18, "."], [29.202, " For"], [29.224, " n"], [29.246, ">"], [29.267, "4"], [29.288, ","], [29.31, " R"], [29.331, "HS"], [29.352, " grows"], [29.373, " much"], [29.395, " faster"], [29.416, "?"], [29.438, " Need"], [29.462, " confirm"], [29.484, " no"], [29.507, " other"], [29.53, " n"], [29.551, " >"], [29.573, "4"], [29.595, " satisfies"], [29.618, " C"], [29.641, "(n"], [29.663, ","], [29.686, "2"], [29.708, ")="], [29.73, "6"], [29.752, "^{"], [29.774, "n"], [29.797, "-"], [29.818, "3"], [29.84, "}."], [29.862, " For"], [29.883, " n"], [29.905, "="], [29.926, "5"], [29.948, " L"], [29.97, "HS"], [29.991, "1"], [30.013, "0"], [30.036, " R"], [30.06, "HS"], [30.082, "3"], [30.105, "6"], [30.13, " ("], [30.153, "R"], [30.178, "HS"], [30.2, ">"], [30.222, "L"], [30.245, "HS"], [30.267, ")."], [30.288, " For"], [30.311, " n"], [30.334, "="], [30.357, "4"], [30.379, " equal"], [30.402, "."], [30.427, " For"], [30.449, " n"], [30.473, ">"], [30.497, "4"], [30.519, ","], [30.542, " R"], [30.565, "HS"], [30.589, " likely"], [30.612, " >"], [30.635, " L"], [30.659, "HS"], [30.68, " and"], [30.704, " ratio"], [30.726, " increases"], [30.748, "?"], [30.771, " Check"], [30.793, " n"], [30.815, "="], [30.837, "7"], [30.86, " C"], [30.881, "2"], [30.904, "1"], [30.927, " R"], [30.949, "HS"], [30.971, " "], [30.994, "6"], [31.017, "^"], [31.04, "4"], [31.062, "="], [31.083, "1"], [31.104, "2"], [31.124, "9"], [31.146, "6"], [31.168, " >"], [31.189, "."], [31.212, " Def"], [31.235, "initely"], [31.257, "."], [31.279, " But"], [31.303, " could"], [31.325, " for"], [31.346, " n"], [31.369, "="], [31.392, "3"], [31.415, "?"], [31.439, " C"], [31.462, "3"], [31.484, "="], [31.508, "3"], [31.531, " R"], [31.554, "HS"], [31.577, "1"], [31.601, " L"], [31.624, "HS"], [31.646, ">"], [31.67, "R"], [31.694, "HS"], [31.717, "."], [31.741, " There"], [31.765, " is"], [31.79, " crossing"], [31.812, " between"], [31.836, " n"], [31.86, "="], [31.881, "3"], [31.903, " and"], [31.928, " n"], [31.95, "="], [31.973, "4"], [31.995, ";"], [32.017, " only"], [32.04, " integer"], [32.063, " n"], [32.085, "="], [32.109, "4"], [32.132, "."], [32.154, " Need"], [32.177, " not"], [32.2, " in"], [32.223, " final"], [32.246, " if"], [32.269, " only"], [32.293, " box"], [32.316, "ed"], [32.34, ".\n\n"], [32.363, "Let"], [32.386, "'s"], [32.41, " craft"], [32.435, " final"], [32.459, " answer"], [32.483, " exactly"], [32.507, " `\\"], [32.531, "box"], [32.555, "ed"], [32.579, "{"], [32.603, "4"], [32.627, "}"], [32.65, "`."], [32.675, " The"], [32.699, " system"], [32.721, " says"], [32.743, " final"], [32.768, " answer"], [32.79, " within"], [32.813, " box"], [32.838, "ed"], [32.862, ";"], [32.884, " should"], [32.907, " satisfy"], [32.93, "."], [32.952, " Need"], [32.974, " no"], [32.997, " extra"], [33.019, " text"], [33.042, "?"], [33.064, " The"], [33.086, " user"], [33.108, " specifically"], [33.13, ":"], [33.151, " \""], [33.173, "Put"], [33.195, " your"], [33.216, " final"], [33.238, " answer"], [33.261, " within"], [33.283, " \\"], [33.305, "box"], [33.327, "ed"], [33.349, "{}"], [33.372, ".\""], [33.393, " It"], [33.416, " might"], [33.438, " be"], [33.461, " okay"], [33.482, " to"], [33.505, " include"], [33.528, " a"], [33.549, " short"], [33.571, " explanation"], [33.593, " and"], [33.615, " end"], [33.637, " with"], [33.658, " box"], [33.681, "ed"], [33.703, ","], [33.727, " but"], [33.75, " final"], [33.774, " answer"], [33.797, " should"], [33.82, " be"], [33.844, " within"], [33.866, " box"], [33.887, "ed"], [33.91, "."], [33.933, " In"], [33.955, " final"], [33.978, " channel"], [34.0, ","], [34.023, " we"], [34.045, " can"], [34.068, " just"], [34.09, " output"], [34.112, " `\\"], [34.135, "box"], [34.158, "ed"], [34.182, "{"], [34.207, "4"], [34.229, "}"], [34.251, "`."], [34.274, " The"], [34.296, " instructions"], [34.317, " from"], [34.34, " user"], [34.363, " likely"], [34.384, " require"], [34.407, " final"], [34.43, " answer"], [34.453, " only"], [34.475, " in"], [34.496, " box"], [34.519, "ed"], [34.541, "."], [34.564, " The"], [34.585, " evaluation"], [34.607, " maybe"], [34.63, " expects"], [34.651, " final"], [34.673, " answer"], [34.695, " in"], [34.717, " box"], [34.74, "ed"], [34.762, ";"], [34.783, " extra"], [34.806, " reasoning"], [34.828, " can"], [34.85, " be"], [34.872, " considered"], [34.895, " not"], [34.917, " following"], [34.94, " \""], [34.962, "Put"], [34.983, " your"], [35.006, " final"], [35.028, " answer"], [35.051, " within"], [35.074, " \\"], [35.096, "box"], [35.118, "ed"], [35.141, "{"], [35.164, "}\""], [35.188, "?"], [35.212, " Better"], [35.236, " final"], [35.26, " only"], [35.283, " `\\"], [35.307, "box"], [35.333, "ed"], [35.356, "{"], [35.381, "4"], [35.406, "}"], [35.431, "`."], [35.457, " But"], [35.48, " as"], [35.507, " a"], [35.531, " helpful"], [35.554, " assistant"], [35.579, ","], [35.604, " perhaps"], [35.629, " include"], [35.652, " concise"], [35.677, " derivation"], [35.701, "?"], [35.725, " The"], [35.749, " user"], [35.773, " didn"], [35.797, "'t"], [35.821, " ask"], [35.847, " \""], [35.87, "show"], [35.894, " work"], [35.918, "\";"], [35.943, " problem"], [35.967, " statement"], [35.99, " from"], [36.013, " maybe"], [36.036, " contest"], [36.06, " where"], [36.082, " final"], [36.106, " should"], [36.129, " be"], [36.152, " box"], [36.176, "ed"], [36.2, "."], [36.224, " The"], [36.247, " saf"], [36.271, "est"], [36.296, " for"], [36.319, " tasks"], [36.344, " requiring"], [36.368, " final"], [36.392, " answer"], [36.416, " in"], [36.441, " box"], [36.464, "ed"], [36.487, " is"], [36.512, " to"], [36.536, " provide"], [36.56, " only"], [36.584, " `\\"], [36.609, "box"], [36.633, "ed"], [36.657, "{"], [36.682, "4"], [36.707, "}"], [36.731, "`."], [36.756, " The"], [36.779, " final"], [36.804, " answer"], [36.829, " must"], [36.854, " be"], [36.878, " within"], [36.903, " box"], [36.928, "ed"], [36.951, ","], [36.976, " and"], [36.998, " if"], [37.023, " only"], [37.046, " that"], [37.069, ","], [37.092, " it"], [37.115, " is"], [37.138, "."], [37.162, " Need"], [37.186, " ensure"], [37.209, " La"], [37.233, "Te"], [37.254, "X"], [37.278, " box"], [37.303, " correct"], [37.327, "."], [37.351, " Final"], [37.375, " channel"], [37.4, ":"], [37.425, " `\\"], [37.45, "box"], [37.474, "ed"], [37.498, "{"], [37.522, "4"], [37.545, "}"], [37.569, "`."], [37.591, " No"], [37.614, " period"], [37.638, "?"], [37.661, " Probably"], [37.684, " just"], [37.709, " that"], [37.732, "."], [37.755, " Need"], [37.778, " no"], [37.8, " extra"], [37.822, " explanation"], [37.845, " in"], [37.87, " final"], [37.893, "."], [37.915, " But"], [37.937, " the"], [37.959, " assistant"], [37.982, "'s"], [38.004, " final"], [38.026, " answer"], [38.048, " should"], [38.07, " include"], [38.094, " box"], [38.117, "ed"], [38.141, " only"], [38.165, ";"], [38.189, " yes"], [38.212, ".\n\n"], [38.236, "Let"], [38.26, "'s"], [38.283, " consider"], [38.308, " if"], [38.333, " there"], [38.357, " is"], [38.38, " any"], [38.404, " subt"], [38.428, "let"], [38.452, "y"], [38.476, ":"], [38.5, " \""], [38.525, "ex"], [38.548, "actly"], [38.571, " two"], [38.594, " of"], [38.617, " them"], [38.639, " show"], [38.664, " a"], [38.687, " number"], [38.711, " other"], [38.737, " than"], [38.761, " "], [38.785, "1"], [38.809, "\""], [38.834, " Means"], [38.858, " exactly"], [38.882, " two"], [38.907, " dice"], [38.931, " show"], [38.956, " a"], [38.979, " number"], [39.004, " that"], [39.028, " is"], [39.051, " not"], [39.075, " equal"], [39.097, " to"], [39.12, " "], [39.143, "1"], [39.167, ","], [39.19, " i"], [39.213, ".e"], [39.237, ".,"], [39.261, " at"], [39.284, " least"], [39.309, "?"], [39.333, " No"], [39.357, " exactly"], [39.381, " two"], [39.405, " show"], [39.429, " number"], [39.452, " other"], [39.477, " than"], [39.501, " "], [39.526, "1"], [39.548, "."], [39.571, " A"], [39.597, " die"], [39.619, " can"], [39.643, " show"], [39.667, " "], [39.688, "2"], [39.712, "-"], [39.735, "6"], [39.759, " ("], [39.782, "5"], [39.806, " outcomes"], [39.832, ")."], [39.855, " \""], [39.878, "Other"], [39.902, " than"], [39.927, " "], [39.95, "1"], [39.974, "\""], [39.998, " on"], [40.022, " a"], [40.046, " fair"], [40.07, " "], [40.094, "6"], [40.117, "-sided"], [40.141, " die"], [40.164, " ="], [40.187, " "], [40.21, "5"], [40.234, "/"], [40.259, "6"], [40.283, " chance"], [40.308, "."], [40.333, " Good"], [40.357, ".\n\n"], [40.379, "Let"], [40.403, "'s"], [40.427, " derive"], [40.45, " fully"], [40.472, " to"], [40.496, " be"], [40.518, " certain"], [40.542, ":"], [40.566, " Prob"], [40.59, "ability"], [40.613, " exactly"], [40.637, " two"], [40.662, " dice"], [40.684, " show"], [40.709, " number"], [40.732, " other"], [40.757, " than"], [40.78, " "], [40.804, "1"], [40.828, "."], [40.851, " Each"], [40.875, " die"], [40.899, " independent"], [40.924, "."], [40.946, " Let"], [40.97, " Y"], [40.994, "_i"], [41.017, " ="], [41.041, " "], [41.065, "1"], [41.09, " if"], [41.112, " die"], [41.136, " i"], [41.16, " shows"], [41.183, " not"], [41.205, " "], [41.227, "1"], [41.248, "."], [41.27, " Y"], [41.292, "_i"], [41.313, "~"], [41.336, "Bern"], [41.359, "ou"], [41.381, "lli"], [41.403, "("], [41.426, "5"], [41.449, "/"], [41.472, "6"], [41.495, ")."], [41.516, " Number"], [41.538, " successes"], [41.56, " k"], [41.581, " ~"], [41.603, " Bin"], [41.624, "(n"], [41.645, ","], [41.667, "5"], [41.69, "/"], [41.712, "6"], [41.734, ")."], [41.756, " Want"], [41.777, " P"], [41.799, "(K"], [41.822, "="], [41.844, "2"], [41.866, ")="], [41.886, "binom"], [41.908, "(n"], [41.929, ","], [41.951, "2"], [41.973, ")("], [41.995, "5"], [42.017, "/"], [42.038, "6"], [42.061, ")^"], [42.083, "2"], [42.105, "("], [42.127, "1"], [42.148, "/"], [42.17, "6"], [42.191, ")^{"], [42.213, "n"], [42.234, "-"], [42.256, "2"], [42.278, "}."], [42.302, " Set"], [42.325, " ="], [42.347, "2"], [42.369, "5"], [42.392, "/"], [42.414, "2"], [42.437, "1"], [42.461, "6"], [42.484, ".\n\n"], [42.508, "Sim"], [42.532, "pl"], [42.557, "ify"], [42.579, ":"], [42.603, " bin"], [42.627, "om"], [42.651, "(n"], [42.675, ","], [42.699, "2"], [42.722, ")*"], [42.746, "2"], [42.769, "5"], [42.792, "/"], [42.817, "3"], [42.84, "6"], [42.863, "*"], [42.885, "1"], [42.907, "/"], [42.93, "6"], [42.951, "^{"], [42.974, "n"], [42.996, "-"], [43.019, "2"], [43.041, "}="], [43.062, "2"], [43.084, "5"], [43.106, "/"], [43.128, "2"], [43.15, "1"], [43.173, "6"], [43.195, "."], [43.217, " Cancel"], [43.24, " "], [43.262, "2"], [43.284, "5"], [43.307, "/"], [43.329, "2"], [43.352, "1"], [43.375, "6"], [43.397, ":"], [43.419, " Let"], [43.443, "'s"], [43.465, " do"], [43.488, " exact"], [43.511, " with"], [43.534, " n"], [43.557, "="], [43.581, "4"], [43.603, " gives"], [43.625, " "], [43.648, "2"], [43.67, "5"], [43.693, "/"], [43.715, "2"], [43.737, "1"], [43.762, "6"], [43.827, " as"], [43.849, " checked"], [43.87, "."], [43.892, " Equation"], [43.914, " after"], [43.936, " cancel"], [43.957, ":"], [43.979, " bin"], [44.001, "om"], [44.023, "(n"], [44.045, ","], [44.068, "2"], [44.09, ")*"], [44.112, "2"], [44.135, "5"], [44.158, "*"], [44.18, "6"], [44.203, "^{-"], [44.227, "("], [44.249, "n"], [44.272, "-"], [44.294, "2"], [44.316, ")"], [44.338, "}/"], [44.362, "3"], [44.384, "6"], [44.407, " ="], [44.429, "2"], [44.45, "5"], [44.473, "/"], [44.496, "2"], [44.518, "1"], [44.542, "6"], [44.565, " ->"], [44.588, " bin"], [44.611, "om"], [44.635, "*"], [44.658, "6"], [44.68, "^{-"], [44.703, "("], [44.725, "n"], [44.748, "-"], [44.771, "2"], [44.794, ")"], [44.818, "}/"], [44.842, "3"], [44.867, "6"], [44.892, " ="], [44.916, "1"], [44.94, "/"], [44.966, "2"], [44.991, "1"], [45.013, "6"], [45.037, " ->"], [45.062, " bin"], [45.085, "om"], [45.109, "*"], [45.133, "6"], [45.157, "^{-"], [45.181, "("], [45.204, "n"], [45.229, "-"], [45.251, "2"], [45.275, ")}"], [45.299, " ="], [45.322, "3"], [45.346, "6"], [45.369, "/"], [45.394, "2"], [45.417, "1"], [45.442, "6"], [45.467, "="], [45.49, "1"], [45.514, "/"], [45.539, "6"], [45.563, "."], [45.586, " If"], [45.611, " n"], [45.635, "="], [45.661, "4"], [45.684, ":"], [45.708, " bin"], [45.732, "om"], [45.755, "="], [45.78, "6"], [45.803, ","], [45.827, " "], [45.85, "6"], [45.874, "^{-"], [45.898, "2"], [45.922, "}="], [45.945, "1"], [45.969, "/"], [45.993, "3"], [46.016, "6"], [46.041, ","], [46.066, " product"], [46.089, "="], [46.113, "6"], [46.137, "/"], [46.16, "3"], [46.183, "6"], [46.206, "="], [46.229, "1"], [46.252, "/"], [46.276, "6"], [46.3, " yes"], [46.324, "."], [46.348, " Good"], [46.371, ".\n\n"], [46.395, "Could"], [46.419, " n"], [46.444, "="], [46.469, "0"], [46.494, "?"], [46.519, " No"], [46.544, " exactly"], [46.569, " two"], [46.594, " impossible"], [46.618, "."], [46.643, " n"], [46.667, "="], [46.69, "1"], [46.715, "?"], [46.739, " no"], [46.763, "."], [46.785, " n"], [46.808, "="], [46.832, "2"], [46.855, "?"], [46.879, " no"], [46.904, "."], [46.929, " n"], [46.953, "="], [46.978, "4"], [47.003, " unique"], [47.028, ".\n\n"], [47.053, "Pot"], [47.077, "ential"], [47.103, " issue"], [47.128, ":"], [47.151, " If"], [47.176, " n"], [47.201, " maybe"], [47.224, " ="], [47.249, "?"], [47.274, " "], [47.298, "6"], [47.321, "^{"], [47.345, "n"], [47.369, "-"], [47.394, "3"], [47.417, "}"], [47.441, " for"], [47.465, " n"], [47.49, "="], [47.514, "4"], [47.538, "="], [47.563, "6"], [47.587, ";"], [47.612, " bin"], [47.637, "om"], [47.662, "("], [47.685, "4"], [47.709, ","], [47.733, "2"], [47.756, ")="], [47.78, "6"], [47.803, "."], [47.827, " Good"], [47.849, ".\n\n"], [47.873, "Final"], [47.898, " should"], [47.92, " be"], [47.944, " box"], [47.967, "ed"], [47.99, " only"], [48.013, "."], [48.036, " Need"], [48.06, " include"], [48.083, " La"], [48.108, "Te"], [48.132, "X"], [48.156, "?"], [48.179, " Use"], [48.203, " `\\"], [48.225, "box"], [48.248, "ed"], [48.271, "{"], [48.295, "4"], [48.318, "}"], [48.341, "`."], [48.364, " The"], [48.387, " user"], [48.411, " asked"], [48.435, " \""], [48.459, "Put"], [48.482, " your"], [48.506, " final"], [48.531, " answer"], [48.556, " within"], [48.579, " \\"], [48.603, "box"], [48.628, "ed"], [48.652, "{}"], [48.676, ".\""], [48.702, " So"], [48.726, " final"], [48.749, " message"], [48.772, " should"], [48.796, " be"], [48.819, " `\\"], [48.842, "box"], [48.866, "ed"], [48.89, "{"], [48.912, "4"], [48.936, "}"], [48.959, "`."], [48.983, " Ensure"], [49.006, " no"], [49.028, " trailing"], [49.052, " punct"], [49.076, "uation"], [49.099, "?"], [49.121, " likely"], [49.145, " okay"], [49.168, " to"], [49.192, " output"], [49.214, " exactly"], [49.237, " that"], [49.259, "."], [49.283, " In"], [49.306, " final"], [49.328, " channel"], [49.351, ","], [49.374, " only"], [49.397, " that"], [49.42, "."], [49.443, " Done"], [49.466, "."], [49.489, " Done"], [49.512, "."], [49.535, " Now"], [49.559, " final"], [49.583, " only"], [49.607, ".\n\n"], [49.632, "Let"], [49.655, "'s"], [49.678, " produce"], [49.701, " final"], [49.726, " with"], [49.749, " just"], [49.773, " `\\"], [49.797, "box"], [49.82, "ed"], [49.844, "{"], [49.87, "4"], [49.895, "}"], [49.918, "`."], [49.941, " Ensure"], [49.966, " no"], [49.99, " explanatory"], [50.013, " text"], [50.037, "."], [50.06, " final"], [50.085, " channel"], [50.109, " content"], [50.133, " exactly"], [50.157, " that"], [50.18, "."], [50.202, " Could"], [50.225, " include"], [50.248, " new"], [50.27, "lines"], [50.294, "?"], [50.315, " Better"], [50.338, " no"], [50.361, " extra"], [50.383, "."], [50.406, " Use"], [50.429, " final"], [50.45, " answer"], [50.474, " only"], [50.499, ".\n\n"], [50.521, "Need"], [50.544, " ab"], [50.568, "ide"], [50.59, " by"], [50.613, " \""], [50.636, "Des"], [50.658, "ired"], [50.68, " over"], [50.702, "verb"], [50.725, "osity"], [50.747, " final"], [50.771, " "], [50.793, "5"], [50.815, "\"?"], [50.838, " User"], [50.862, " overrides"], [50.884, " with"], [50.908, " box"], [50.932, "ed"], [50.955, " answer"], [50.98, "."], [51.004, " Keep"], [51.028, " concise"], [51.052, "."], [51.077, " Final"], [51.101, " should"], [51.124, " be"], [51.148, " only"], [51.173, " box"], [51.196, "ed"], [51.222, ".\n\n"], [51.245, "Pro"], [51.27, "ceed"], [51.295, " final"], [51.321, ":"], [51.344, " \\"], [51.369, "box"], [51.394, "ed"], [51.418, "{"], [51.443, "4"], [51.467, "}."], [51.491, "</think>"], [51.514, "\\"], [51.538, "box"], [51.562, "ed"], [51.586, "{"], [51.61, "4"], [51.634, "}"]], "completion_tokens": 2315, "seconds": 51.66, "timings": {"cache_n": 0, "prompt_n": 67, "prompt_ms": 338.263, "prompt_per_token_ms": 5.0487014925373135, "prompt_per_second": 198.07073194526154, "predicted_n": 2315, "predicted_ms": 51317.719, "predicted_per_token_ms": 22.177060933448573, "predicted_per_second": 45.09163784150266}, "text": "<think>\nWe need answer user math problem. Need think thoroughly but final should just answer with boxed n. Need solve. Need be careful. User asks: n fair 6-sided dice simultaneously rolled. Probability that exactly two of them show a number other than 1 is 25/216. Find n.\n\nNeed parse. We have n independent fair dice. Each die outcome: probability it shows a number other than 1 = 5/6? There are 6 faces, one is 1, other 5 faces show number other than 1. Yes p = 5/6 for success (other than 1). Failure = shows 1 with p=1/6.\n\nWe need exactly two of the n dice show a number other than 1. Thus number of successes X ~ Binomial(n, p=5/6). Probability exactly two successes: C(n,2) p^2 (1-p)^{n-2} = C(n,2) (5/6)^2 (1/6)^{n-2}. Set equal to 25/216. Need find integer n likely. Need solve.\n\nEquation: C(n,2) * 25/36 * (1/6)^{n-2} = 25/216.\n\nSimplify: C(n,2) * 25 * (1/6)^{n-2} / 36 = 25/216. Cancel 25. C(n,2) /36 * (1/6)^{n-2} = 1/216. Multiply: C(n,2) (1/6)^{n-2} = 36/216 = 1/6. Wait check: (25/36)*(C)*(1/6)^{n-2}=25/216. Cancel 25: C*(1/6)^{n-2}/36 = 1/216. Multiply by 36: C*(1/6)^{n-2} = 36/216 = 1/6. Yes.\n\nSo C(n,2) * 6^{-(n-2)} = 1/6. Equivalent C(n,2) = 6^{n-3}. Because multiply both sides by 6^{n-2}: C(n,2) = 6^{n-3}? Let's verify: C * 6^{-(n-2)} = 6^{-1}. Multiply by 6^{n-2}: C = 6^{n-2} * 6^{-1} = 6^{n-3}. Yes for n? If n maybe less than? exactly two successes requires n≥2. Equation C(n,2)=6^{n-3}. Need solve integer n.\n\nTest n values. n=2: C=1, RHS=6^{-1}=1/6 not integer? Wait equation after cancellation C=6^{n-3}. For n=2 RHS=6^{-1}=1/6, not equal. Let's compute original for n=2: probability exactly two show other than 1 = both are non-1 = (5/6)^2=25/36 not 25/216. Not.\n\nn=3: C=3, RHS=6^{0}=1. Not (3≠1). Original probability exactly two non-1 among 3 = C3,2*(5/6)^2*(1/6)=3*25/36*1/6 =75/216? =25/72? Not 25/216. no.\n\nn=4: C=6, RHS=6^{1}=6. Equal! n=4 likely. Check original: C4,2=6; (5/6)^2*(1/6)^2 =25/36 *1/36=25/1296; times 6 =150/1296=25/216? 150/1296 divide 6 =25/216 yes. Good n=4.\n\nNeed provide final answer within boxed{}. The user specifically asks \"Find n. Put your final answer within \\boxed{}.\" Need final should be \\boxed{4}. Probably include some reasoning? They likely want final answer only? The instruction says Put your final answer within \\boxed{}. We can present concise reasoning and final boxed? It says final answer within boxed; as coding assistant? But user asks math problem. Need decide final response: probably include brief derivation and final answer in boxed. But the phrase \"Put your final answer within \\boxed{}\" suggests final should contain boxed answer, maybe only \\boxed{4}. The system desired oververbosity 5 but user wants final answer within boxed. To be safe, final should include just \\boxed{4}? Many tasks expect final answer only in boxed. However as assistant, maybe include minimal derivation then final boxed. But prompt: \"Solve the following problem... Put your final answer within \\boxed{}.\" Usually in these tasks they want final answer only? The final answer should be within boxed; we can include reasoning before, but final answer must be in boxed. The evaluation may parse boxed; if include extra text maybe still okay? To be safe for automated, final should be only `\\boxed{4}`. Need ensure final answer within boxed. The user didn't explicitly ask for explanation; asks find n and put final answer within boxed. In these math prompts, final answer should be \\boxed{4}, likely no extra prose. Need produce final with just \\boxed{4}. But need be certain no other n solutions? Let's prove uniqueness? The problem says find n; assume unique. We can derive equation and maybe final only. Need ensure n=4 only. Let's verify equation C(n,2)=6^{n-3} has maybe n=? For n≥? We found n=4. Could there be n=5? C=10, RHS=6^2=36 no. n=6: C=15, RHS=216 no. For n>4, RHS grows much faster? Need confirm no other n >4 satisfies C(n,2)=6^{n-3}. For n=5 LHS10 RHS36 (RHS>LHS). For n=4 equal. For n>4, RHS likely > LHS and ratio increases? Check n=7 C21 RHS 6^4=1296 >. Definitely. But could for n=3? C3=3 RHS1 LHS>RHS. There is crossing between n=3 and n=4; only integer n=4. Need not in final if only boxed.\n\nLet's craft final answer exactly `\\boxed{4}`. The system says final answer within boxed; should satisfy. Need no extra text? The user specifically: \"Put your final answer within \\boxed{}.\" It might be okay to include a short explanation and end with boxed, but final answer should be within boxed. In final channel, we can just output `\\boxed{4}`. The instructions from user likely require final answer only in boxed. The evaluation maybe expects final answer in boxed; extra reasoning can be considered not following \"Put your final answer within \\boxed{}\"? Better final only `\\boxed{4}`. But as a helpful assistant, perhaps include concise derivation? The user didn't ask \"show work\"; problem statement from maybe contest where final should be boxed. The safest for tasks requiring final answer in boxed is to provide only `\\boxed{4}`. The final answer must be within boxed, and if only that, it is. Need ensure LaTeX box correct. Final channel: `\\boxed{4}`. No period? Probably just that. Need no extra explanation in final. But the assistant's final answer should include boxed only; yes.\n\nLet's consider if there is any subtlety: \"exactly two of them show a number other than 1\" Means exactly two dice show a number that is not equal to 1, i.e., at least? No exactly two show number other than 1. A die can show 2-6 (5 outcomes). \"Other than 1\" on a fair 6-sided die = 5/6 chance. Good.\n\nLet's derive fully to be certain: Probability exactly two dice show number other than 1. Each die independent. Let Y_i = 1 if die i shows not 1. Y_i~Bernoulli(5/6). Number successes k ~ Bin(n,5/6). Want P(K=2)=binom(n,2)(5/6)^2(1/6)^{n-2}. Set =25/216.\n\nSimplify: binom(n,2)*25/36*1/6^{n-2}=25/216. Cancel 25/216: Let's do exact with n=4 gives 25/216 as checked. Equation after cancel: binom(n,2)*25*6^{-(n-2)}/36 =25/216 -> binom*6^{-(n-2)}/36 =1/216 -> binom*6^{-(n-2)} =36/216=1/6. If n=4: binom=6, 6^{-2}=1/36, product=6/36=1/6 yes. Good.\n\nCould n=0? No exactly two impossible. n=1? no. n=2? no. n=4 unique.\n\nPotential issue: If n maybe =? 6^{n-3} for n=4=6; binom(4,2)=6. Good.\n\nFinal should be boxed only. Need include LaTeX? Use `\\boxed{4}`. The user asked \"Put your final answer within \\boxed{}.\" So final message should be `\\boxed{4}`. Ensure no trailing punctuation? likely okay to output exactly that. In final channel, only that. Done. Done. Now final only.\n\nLet's produce final with just `\\boxed{4}`. Ensure no explanatory text. final channel content exactly that. Could include newlines? Better no extra. Use final answer only.\n\nNeed abide by \"Desired oververbosity final 5\"? User overrides with boxed answer. Keep concise. Final should be only boxed.\n\nProceed final: \\boxed{4}.</think>\\boxed{4}"}
|
assets/race_dory-beam.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"name": "Dory-Beam-4B", "model_file": "dory-beam-4b-q5_k_m.gguf", "loops": 2, "problem": "math500-436", "prompt": "$n$ fair 6-sided dice are simultaneously rolled. The probability that exactly two of them show a number other than 1 is $\\frac{25}{216}$. Find $n$.\n\nPut your final answer within \\boxed{}.", "gold": "4", "seed": 0, "events": [[0.187, "<think>\nWe"], [0.211, " need"], [0.231, " solve"], [0.252, " math"], [0.271, "."], [0.291, " Need"], [0.311, " final"], [0.332, " box"], [0.353, "ed"], [0.374, "."], [0.394, " Need"], [0.416, " reason"], [0.436, " carefully"], [0.458, "."], [0.478, " Problem"], [0.499, ":"], [0.522, " n"], [0.542, " fair"], [0.564, " "], [0.586, "6"], [0.606, "-sided"], [0.627, " dice"], [0.648, " rolled"], [0.669, " simultaneously"], [0.69, "."], [0.71, " Prob"], [0.731, "ability"], [0.752, " exactly"], [0.772, " two"], [0.794, " of"], [0.814, " them"], [0.835, " show"], [0.857, " a"], [0.877, " number"], [0.899, " other"], [0.92, " than"], [0.94, " "], [0.962, "1"], [0.982, " is"], [1.003, " "], [1.024, "2"], [1.046, "5"], [1.067, "/"], [1.089, "2"], [1.111, "1"], [1.133, "6"], [1.155, "."], [1.176, " Find"], [1.198, " n"], [1.22, ".\n\n"], [1.242, "We"], [1.266, " need"], [1.289, " compute"], [1.31, " probability"], [1.334, "."], [1.357, " For"], [1.378, " each"], [1.399, " die"], [1.421, ","], [1.441, " outcome"], [1.462, " either"], [1.484, " "], [1.505, "1"], [1.526, " or"], [1.547, " other"], [1.568, " ("], [1.592, "not"], [1.612, " "], [1.634, "1"], [1.656, ")"], [1.677, " ("], [1.698, "i"], [1.72, ".e"], [1.741, ".,"], [1.764, " "], [1.786, "2"], [1.807, ","], [1.829, "3"], [1.851, ","], [1.872, "4"], [1.894, ","], [1.916, "5"], [1.938, ","], [1.96, "6"], [1.982, ")"], [2.004, " probability"], [2.026, " p"], [2.046, "?"], [2.068, " \""], [2.09, "show"], [2.111, " a"], [2.133, " number"], [2.155, " other"], [2.176, " than"], [2.199, " "], [2.221, "1"], [2.243, "\""], [2.265, " means"], [2.287, " not"], [2.308, " "], [2.33, "1"], [2.351, "."], [2.372, " Prob"], [2.394, "ability"], [2.415, " per"], [2.438, " die"], [2.46, " other"], [2.481, " than"], [2.503, " "], [2.525, "1"], [2.547, " ="], [2.569, " "], [2.591, "5"], [2.613, "/"], [2.634, "6"], [2.657, "."], [2.679, " Prob"], [2.702, "ability"], [2.725, " not"], [2.746, " other"], [2.768, "?"], [2.79, " i"], [2.812, ".e"], [2.834, "."], [2.857, " equals"], [2.878, " "], [2.9, "1"], [2.922, " ="], [2.944, " "], [2.967, "1"], [2.989, "/"], [3.01, "6"], [3.032, "."], [3.054, " Ex"], [3.075, "actly"], [3.098, " two"], [3.121, " dice"], [3.142, " are"], [3.165, " \""], [3.187, "other"], [3.208, " than"], [3.23, " "], [3.252, "1"], [3.274, "\""], [3.296, " ("], [3.318, "success"], [3.339, ")"], [3.362, " among"], [3.383, " n"], [3.406, ":"], [3.427, " Bin"], [3.449, "omial"], [3.471, "(n"], [3.494, ","], [3.516, " p"], [3.537, "="], [3.56, "5"], [3.584, "/"], [3.606, "6"], [3.629, "):"], [3.652, " C"], [3.674, "(n"], [3.696, ","], [3.717, "2"], [3.739, ")"], [3.761, " ("], [3.784, "5"], [3.807, "/"], [3.829, "6"], [3.851, ")^"], [3.872, "2"], [3.894, " ("], [3.917, "1"], [3.938, "/"], [3.961, "6"], [3.982, ")^{"], [4.005, "n"], [4.027, "-"], [4.05, "2"], [4.071, "}."], [4.094, " Set"], [4.116, " equal"], [4.138, " "], [4.161, "2"], [4.183, "5"], [4.204, "/"], [4.226, "2"], [4.249, "1"], [4.27, "6"], [4.293, "."], [4.317, " Sol"], [4.338, "ve"], [4.361, " for"], [4.382, " n"], [4.404, ".\n\n"], [4.427, "Compute"], [4.448, ":"], [4.47, " C"], [4.492, "(n"], [4.515, ","], [4.537, "2"], [4.559, ")*"], [4.58, "2"], [4.602, "5"], [4.625, "/"], [4.647, "3"], [4.668, "6"], [4.691, " *"], [4.714, " "], [4.735, "1"], [4.759, "/"], [4.781, "6"], [4.803, "^{"], [4.826, "n"], [4.849, "-"], [4.872, "2"], [4.894, "}."], [4.918, " ="], [4.94, " n"], [4.962, "(n"], [4.985, "-"], [5.007, "1"], [5.029, ")/"], [5.051, "2"], [5.074, " *"], [5.097, " "], [5.119, "2"], [5.141, "5"], [5.163, " /"], [5.186, " "], [5.207, "3"], [5.229, "6"], [5.251, " *"], [5.272, " "], [5.295, "1"], [5.317, "/"], [5.338, "6"], [5.361, "^{"], [5.384, "n"], [5.405, "-"], [5.428, "2"], [5.451, "}."], [5.472, " Sim"], [5.495, "pl"], [5.518, "ify"], [5.541, "."], [5.564, " Set"], [5.586, " ="], [5.607, "2"], [5.629, "5"], [5.652, "/"], [5.673, "2"], [5.697, "1"], [5.72, "6"], [5.742, "."], [5.764, " Cancel"], [5.787, " "], [5.809, "2"], [5.831, "5"], [5.854, ":"], [5.877, " ["], [5.899, "n"], [5.922, "(n"], [5.945, "-"], [5.968, "1"], [5.991, ")/"], [6.014, "2"], [6.037, " *"], [6.06, " "], [6.083, "1"], [6.105, "/"], [6.128, "3"], [6.15, "6"], [6.173, " *"], [6.196, " "], [6.218, "1"], [6.241, "/"], [6.265, "6"], [6.288, "^{"], [6.309, "n"], [6.331, "-"], [6.354, "2"], [6.376, "}]"], [6.398, "?"], [6.421, " Wait"], [6.442, " "], [6.465, "2"], [6.488, "5"], [6.512, " canc"], [6.534, "els"], [6.556, ":"], [6.579, " ("], [6.601, "n"], [6.624, "(n"], [6.646, "-"], [6.669, "1"], [6.691, ")/"], [6.713, "2"], [6.735, ")*("], [6.758, "1"], [6.78, "/"], [6.802, "3"], [6.824, "6"], [6.847, ")*("], [6.869, "1"], [6.893, "/"], [6.915, "6"], [6.938, "^{"], [6.96, "n"], [6.983, "-"], [7.004, "2"], [7.027, "})"], [7.05, " ="], [7.072, " "], [7.094, "1"], [7.117, "/"], [7.139, "2"], [7.161, "1"], [7.184, "6"], [7.205, "?"], [7.228, " Let"], [7.249, "'s"], [7.272, " do"], [7.295, ":"], [7.317, " L"], [7.339, "HS"], [7.362, " ="], [7.384, " "], [7.407, "2"], [7.43, "5"], [7.454, " *"], [7.476, " n"], [7.498, "(n"], [7.521, "-"], [7.544, "1"], [7.566, ")/"], [7.589, "2"], [7.611, " *"], [7.634, " ("], [7.657, "5"], [7.68, "/"], [7.702, "6"], [7.725, ")^"], [7.748, "2"], [7.769, "?"], [7.793, " Actually"], [7.815, " p"], [7.836, "^"], [7.86, "2"], [7.882, " q"], [7.906, "^{"], [7.93, "n"], [7.954, "-"], [7.976, "2"], [8.0, "}"], [8.023, " ="], [8.046, " ("], [8.068, "5"], [8.092, "/"], [8.114, "6"], [8.136, ")^"], [8.159, "2"], [8.182, " ("], [8.205, "1"], [8.228, "/"], [8.251, "6"], [8.274, ")^{"], [8.297, "n"], [8.32, "-"], [8.343, "2"], [8.366, "}"], [8.389, " ="], [8.413, " "], [8.436, "2"], [8.46, "5"], [8.484, "/"], [8.506, "3"], [8.53, "6"], [8.552, " *"], [8.576, " "], [8.6, "1"], [8.622, "/"], [8.647, "6"], [8.668, "^{"], [8.691, "n"], [8.713, "-"], [8.736, "2"], [8.759, "}."], [8.782, " Mult"], [8.804, "iply"], [8.828, " by"], [8.85, " C"], [8.872, " ="], [8.895, " n"], [8.918, "(n"], [8.94, "-"], [8.964, "1"], [8.986, ")/"], [9.008, "2"], [9.03, "."], [9.054, " So"], [9.077, " L"], [9.101, "HS"], [9.124, " ="], [9.147, " "], [9.169, "2"], [9.192, "5"], [9.214, " *"], [9.236, " n"], [9.259, "(n"], [9.283, "-"], [9.304, "1"], [9.328, ")/"], [9.352, "2"], [9.375, " *"], [9.398, " "], [9.422, "1"], [9.445, "/"], [9.468, "3"], [9.493, "6"], [9.517, " *"], [9.539, " "], [9.562, "1"], [9.586, "/"], [9.608, "6"], [9.631, "^{"], [9.654, "n"], [9.677, "-"], [9.7, "2"], [9.723, "}"], [9.745, " ="], [9.767, " "], [9.79, "2"], [9.813, "5"], [9.835, " *"], [9.858, " n"], [9.882, "(n"], [9.904, "-"], [9.927, "1"], [9.949, ")"], [9.971, " *"], [9.994, " "], [10.017, "1"], [10.04, "/("], [10.062, "7"], [10.086, "2"], [10.11, " *"], [10.133, " "], [10.157, "6"], [10.18, "^{"], [10.203, "n"], [10.226, "-"], [10.247, "2"], [10.27, "})."], [10.293, " Set"], [10.315, " ="], [10.337, "2"], [10.361, "5"], [10.385, "/"], [10.407, "2"], [10.43, "1"], [10.454, "6"], [10.476, "."], [10.499, " Cancel"], [10.523, " "], [10.545, "2"], [10.567, "5"], [10.59, ":"], [10.612, " n"], [10.635, "(n"], [10.658, "-"], [10.681, "1"], [10.703, ")/("], [10.726, "7"], [10.748, "2"], [10.77, "*"], [10.793, "6"], [10.815, "^{"], [10.838, "n"], [10.861, "-"], [10.883, "2"], [10.905, "})"], [10.928, " ="], [10.951, " "], [10.973, "1"], [10.997, "/"], [11.02, "2"], [11.042, "1"], [11.066, "6"], [11.089, "."], [11.113, " Thus"], [11.136, " n"], [11.16, "(n"], [11.184, "-"], [11.206, "1"], [11.231, ")"], [11.254, " *"], [11.277, " "], [11.301, "2"], [11.325, "1"], [11.349, "6"], [11.372, " ="], [11.396, " "], [11.419, "7"], [11.442, "2"], [11.467, "*"], [11.491, "6"], [11.515, "^{"], [11.538, "n"], [11.562, "-"], [11.585, "2"], [11.608, "}."], [11.631, " Div"], [11.654, "ide"], [11.676, " "], [11.7, "7"], [11.724, "2"], [11.748, ":"], [11.77, " "], [11.794, "3"], [11.819, " n"], [11.841, "(n"], [11.864, "-"], [11.886, "1"], [11.909, ")"], [11.932, " ="], [11.958, " "], [11.981, "6"], [12.003, "^{"], [12.027, "n"], [12.051, "-"], [12.074, "2"], [12.098, "}."], [12.122, " Need"], [12.144, " solve"], [12.167, " integer"], [12.19, " n"], [12.212, ">="], [12.236, "2"], [12.259, ".\n\n"], [12.282, "Equation"], [12.306, " "], [12.33, "3"], [12.354, " n"], [12.377, "(n"], [12.401, "-"], [12.425, "1"], [12.448, ")"], [12.471, " ="], [12.497, " "], [12.521, "6"], [12.544, "^{"], [12.567, "n"], [12.591, "-"], [12.615, "2"], [12.637, "}."], [12.66, " Need"], [12.683, " find"], [12.706, " n"], [12.729, ".\n\n"], [12.753, "Let"], [12.775, "'s"], [12.799, " test"], [12.824, " small"], [12.847, " n"], [12.87, "."], [12.893, " n"], [12.917, "="], [12.941, "2"], [12.964, ":"], [12.988, " L"], [13.011, "HS"], [13.034, " "], [13.058, "3"], [13.081, "*"], [13.106, "2"], [13.129, "*"], [13.151, "1"], [13.175, "="], [13.198, "6"], [13.221, ";"], [13.244, " R"], [13.268, "HS"], [13.291, " "], [13.314, "6"], [13.336, "^"], [13.359, "0"], [13.381, "="], [13.404, "1"], [13.427, "."], [13.451, " no"], [13.475, "."], [13.498, " n"], [13.522, "="], [13.545, "3"], [13.568, ":"], [13.593, " "], [13.616, "3"], [13.639, "*"], [13.664, "3"], [13.687, "*"], [13.709, "2"], [13.733, "="], [13.755, "1"], [13.778, "8"], [13.802, ";"], [13.825, " R"], [13.848, "HS"], [13.871, " "], [13.894, "6"], [13.918, "^"], [13.94, "1"], [13.964, "="], [13.987, "6"], [14.009, "."], [14.032, " no"], [14.055, " ("], [14.077, "L"], [14.101, "HS"], [14.125, " "], [14.15, "3"], [14.173, " times"], [14.198, ")."], [14.219, " n"], [14.243, "="], [14.266, "4"], [14.289, ":"], [14.311, " "], [14.333, "3"], [14.357, "*"], [14.38, "4"], [14.402, "*"], [14.426, "3"], [14.449, "="], [14.472, "3"], [14.495, "6"], [14.518, ";"], [14.54, " R"], [14.564, "HS"], [14.587, " "], [14.61, "6"], [14.634, "^"], [14.658, "2"], [14.682, "="], [14.705, "3"], [14.728, "6"], [14.752, "."], [14.776, " Yes"], [14.799, " n"], [14.822, "="], [14.844, "4"], [14.868, "."], [14.892, " Check"], [14.914, "."], [14.937, " So"], [14.961, " answer"], [14.984, " "], [15.008, "4"], [15.032, ".\n\n"], [15.056, "But"], [15.079, " let"], [15.103, "'s"], [15.126, " ensure"], [15.15, " no"], [15.174, " other"], [15.197, " n"], [15.221, "?"], [15.244, " Problem"], [15.268, " asks"], [15.292, " find"], [15.315, " n"], [15.338, " likely"], [15.36, " unique"], [15.384, "."], [15.407, " Equation"], [15.43, " grows"], [15.453, " exponential"], [15.476, ";"], [15.5, " for"], [15.524, " n"], [15.548, ">"], [15.57, "4"], [15.595, " R"], [15.618, "HS"], [15.642, " grows"], [15.666, " faster"], [15.689, ","], [15.713, " L"], [15.735, "HS"], [15.759, " quadratic"], [15.784, ";"], [15.808, " no"], [15.831, " other"], [15.856, " positive"], [15.88, " integer"], [15.903, " beyond"], [15.927, " maybe"], [15.95, "?"], [15.973, " n"], [15.997, "="], [16.021, "5"], [16.043, ":"], [16.068, " "], [16.092, "3"], [16.116, "*"], [16.139, "5"], [16.163, "*"], [16.186, "4"], [16.209, "="], [16.233, "6"], [16.258, "0"], [16.28, ";"], [16.305, " R"], [16.33, "HS"], [16.353, " "], [16.376, "6"], [16.401, "^"], [16.425, "3"], [16.448, "="], [16.471, "2"], [16.494, "1"], [16.519, "6"], [16.542, ","], [16.566, " R"], [16.59, "HS"], [16.613, " >"], [16.636, " L"], [16.659, "HS"], [16.684, "."], [16.708, " n"], [16.733, "="], [16.756, "4"], [16.779, " equality"], [16.802, "."], [16.825, " n"], [16.847, "="], [16.871, "3"], [16.894, " R"], [16.917, "HS"], [16.94, " "], [16.964, "6"], [16.987, " <"], [17.01, "1"], [17.033, "8"], [17.057, "."], [17.079, " Could"], [17.103, " cross"], [17.128, " again"], [17.151, "?"], [17.173, " Ratio"], [17.197, " R"], [17.221, "HS"], [17.243, "/L"], [17.267, "HS"], [17.29, ":"], [17.314, " n"], [17.336, "="], [17.36, "4"], [17.382, "="], [17.407, "1"], [17.43, ";"], [17.453, " n"], [17.476, "="], [17.5, "5"], [17.525, "="], [17.55, "2"], [17.573, "1"], [17.597, "6"], [17.62, "/"], [17.643, "6"], [17.668, "0"], [17.692, "="], [17.716, "3"], [17.739, "."], [17.764, "6"], [17.788, ";"], [17.813, " increasing"], [17.836, " likely"], [17.859, "."], [17.882, " n"], [17.905, " maybe"], [17.928, " "], [17.95, "0"], [17.975, "?"], [17.999, " dice"], [18.022, " n"], [18.045, " positive"], [18.068, "."], [18.092, " n"], [18.116, "="], [18.138, "1"], [18.161, "?"], [18.185, " exactly"], [18.208, " two"], [18.231, " impossible"], [18.254, " probability"], [18.277, " "], [18.301, "0"], [18.324, " not"], [18.348, "."], [18.372, " So"], [18.395, " n"], [18.419, "="], [18.442, "4"], [18.466, ".\n\n"], [18.49, "Need"], [18.514, " final"], [18.537, " with"], [18.561, " box"], [18.585, "ed"], [18.608, "."], [18.632, " Include"], [18.656, " reasoning"], [18.68, " concise"], [18.702, "."], [18.726, " Ensure"], [18.749, " final"], [18.773, " answer"], [18.795, " within"], [18.818, " \\"], [18.843, "box"], [18.866, "ed"], [18.89, "{"], [18.913, "}."], [18.937, " The"], [18.961, " user"], [18.985, " says"], [19.007, " Put"], [19.031, " final"], [19.054, " answer"], [19.076, " within"], [19.101, " \\"], [19.125, "box"], [19.149, "ed"], [19.171, "{"], [19.195, "}."], [19.219, " We"], [19.241, " can"], [19.265, " include"], [19.29, " explanation"], [19.313, " and"], [19.337, " final"], [19.36, " box"], [19.382, "ed"], [19.406, "."], [19.429, " Final"], [19.451, " should"], [19.475, " have"], [19.498, " \\"], [19.523, "box"], [19.547, "ed"], [19.57, "{"], [19.594, "4"], [19.618, "}."], [19.642, "</think>"], [19.666, "For"], [19.69, " each"], [19.714, " die"], [19.736, ","], [19.761, " the"], [19.783, " probability"], [19.806, " of"], [19.829, " showing"], [19.853, " a"], [19.875, " number"], [19.899, " other"], [19.923, " than"], [19.945, " "], [19.97, "1"], [19.993, " is"], [20.017, " \\(\\"], [20.039, "frac"], [20.063, "5"], [20.086, "6"], [20.109, "\\),"], [20.133, " and"], [20.156, " the"], [20.18, " probability"], [20.203, " of"], [20.226, " showing"], [20.251, " "], [20.274, "1"], [20.298, " is"], [20.323, " \\(\\"], [20.345, "frac"], [20.368, "1"], [20.393, "6"], [20.417, "\\)."], [20.44, " So"], [20.464, " the"], [20.487, " desired"], [20.509, " probability"], [20.532, " is"], [20.556, " binomial"], [20.578, ":\n\n"], [20.602, "\\["], [20.625, "\n"], [20.649, "\\"], [20.672, "binom"], [20.695, "{n"], [20.719, "}{"], [20.741, "2"], [20.765, "}\\"], [20.789, "left"], [20.811, "(\\"], [20.835, "frac"], [20.859, "5"], [20.882, "6"], [20.905, "\\right"], [20.928, ")^"], [20.951, "2"], [20.974, "\\left"], [20.997, "(\\"], [21.021, "frac"], [21.044, "1"], [21.067, "6"], [21.091, "\\right"], [21.116, ")^{"], [21.138, "n"], [21.162, "-"], [21.184, "2"], [21.207, "}.\n"], [21.23, "\\]\n\n"], [21.254, "Set"], [21.277, " this"], [21.3, " equal"], [21.325, " to"], [21.348, " \\(\\"], [21.372, "frac"], [21.395, "{"], [21.419, "2"], [21.442, "5"], [21.466, "}{"], [21.489, "2"], [21.512, "1"], [21.536, "6"], [21.561, "}\\)"], [21.584, ":\n\n"], [21.608, "\\["], [21.632, "\n"], [21.656, "\\"], [21.681, "binom"], [21.704, "{n"], [21.728, "}{"], [21.751, "2"], [21.774, "}\\"], [21.798, "cdot"], [21.822, " \\"], [21.847, "frac"], [21.87, "{"], [21.893, "2"], [21.915, "5"], [21.94, "}{"], [21.964, "3"], [21.988, "6"], [22.013, "}\\"], [22.036, "cdot"], [22.06, " \\"], [22.086, "frac"], [22.109, "{"], [22.132, "1"], [22.156, "}{"], [22.181, "6"], [22.204, "^{"], [22.228, "n"], [22.252, "-"], [22.276, "2"], [22.3, "}}=\\"], [22.325, "frac"], [22.347, "{"], [22.371, "2"], [22.395, "5"], [22.419, "}{"], [22.442, "2"], [22.465, "1"], [22.489, "6"], [22.511, "}.\n"], [22.535, "\\]\n\n"], [22.558, "Cancel"], [22.581, " \\("], [22.604, "2"], [22.628, "5"], [22.651, "\\)"], [22.674, " and"], [22.698, " simplify"], [22.722, ":\n\n"], [22.745, "\\["], [22.77, "\n"], [22.793, "\\frac"], [22.817, "{n"], [22.84, "(n"], [22.863, "-"], [22.886, "1"], [22.91, ")}{"], [22.935, "2"], [22.959, "}\\"], [22.984, "cdot"], [23.006, " \\"], [23.029, "frac"], [23.052, "1"], [23.076, "{"], [23.1, "3"], [23.123, "6"], [23.147, "}\\"], [23.169, "cdot"], [23.193, " \\"], [23.217, "frac"], [23.24, "1"], [23.264, "{"], [23.287, "6"], [23.31, "^{"], [23.334, "n"], [23.358, "-"], [23.383, "2"], [23.408, "}}=\\"], [23.433, "frac"], [23.457, "1"], [23.481, "{"], [23.505, "2"], [23.529, "1"], [23.553, "6"], [23.576, "}.\n"], [23.601, "\\]\n\n"], [23.626, "This"], [23.651, " becomes"], [23.675, "\n\n"], [23.699, "\\["], [23.723, "\n"], [23.747, "3"], [23.77, "n"], [23.794, "(n"], [23.818, "-"], [23.841, "1"], [23.865, ")="], [23.889, "6"], [23.912, "^{"], [23.936, "n"], [23.96, "-"], [23.984, "2"], [24.008, "}.\n"], [24.032, "\\]\n\n"], [24.055, "Testing"], [24.078, " values"], [24.102, ","], [24.125, " \\("], [24.149, "n"], [24.172, "="], [24.196, "4"], [24.219, "\\)"], [24.242, " gives"], [24.266, "\n\n"], [24.29, "\\["], [24.314, "\n"], [24.338, "3"], [24.361, "\\cdot"], [24.385, " "], [24.408, "4"], [24.433, "\\cdot"], [24.457, " "], [24.48, "3"], [24.503, "="], [24.526, "3"], [24.55, "6"], [24.573, "="], [24.597, "6"], [24.621, "^"], [24.644, "2"], [24.667, ",\n"], [24.691, "\\]\n\n"], [24.713, "so"], [24.737, " the"], [24.761, " solution"], [24.784, " is"], [24.808, " \\("], [24.831, "n"], [24.855, "="], [24.878, "4"], [24.902, "\\).\n\n"], [24.926, "\\["], [24.95, "\n"], [24.974, "\\"], [24.999, "box"], [25.023, "ed"], [25.047, "{"], [25.07, "4"], [25.094, "}\n"], [25.118, "\\]"]], "completion_tokens": 1088, "seconds": 25.14, "timings": {"cache_n": 0, "prompt_n": 67, "prompt_ms": 185.412, "prompt_per_token_ms": 2.7673432835820897, "prompt_per_second": 361.3574094449118, "predicted_n": 1088, "predicted_ms": 24954.532, "predicted_per_token_ms": 22.957251149954, "predicted_per_second": 43.55922202828729}, "text": "<think>\nWe need solve math. Need final boxed. Need reason carefully. Problem: n fair 6-sided dice rolled simultaneously. Probability exactly two of them show a number other than 1 is 25/216. Find n.\n\nWe need compute probability. For each die, outcome either 1 or other (not 1) (i.e., 2,3,4,5,6) probability p? \"show a number other than 1\" means not 1. Probability per die other than 1 = 5/6. Probability not other? i.e. equals 1 = 1/6. Exactly two dice are \"other than 1\" (success) among n: Binomial(n, p=5/6): C(n,2) (5/6)^2 (1/6)^{n-2}. Set equal 25/216. Solve for n.\n\nCompute: C(n,2)*25/36 * 1/6^{n-2}. = n(n-1)/2 * 25 / 36 * 1/6^{n-2}. Simplify. Set =25/216. Cancel 25: [n(n-1)/2 * 1/36 * 1/6^{n-2}]? Wait 25 cancels: (n(n-1)/2)*(1/36)*(1/6^{n-2}) = 1/216? Let's do: LHS = 25 * n(n-1)/2 * (5/6)^2? Actually p^2 q^{n-2} = (5/6)^2 (1/6)^{n-2} = 25/36 * 1/6^{n-2}. Multiply by C = n(n-1)/2. So LHS = 25 * n(n-1)/2 * 1/36 * 1/6^{n-2} = 25 * n(n-1) * 1/(72 * 6^{n-2}). Set =25/216. Cancel 25: n(n-1)/(72*6^{n-2}) = 1/216. Thus n(n-1) * 216 = 72*6^{n-2}. Divide 72: 3 n(n-1) = 6^{n-2}. Need solve integer n>=2.\n\nEquation 3 n(n-1) = 6^{n-2}. Need find n.\n\nLet's test small n. n=2: LHS 3*2*1=6; RHS 6^0=1. no. n=3: 3*3*2=18; RHS 6^1=6. no (LHS 3 times). n=4: 3*4*3=36; RHS 6^2=36. Yes n=4. Check. So answer 4.\n\nBut let's ensure no other n? Problem asks find n likely unique. Equation grows exponential; for n>4 RHS grows faster, LHS quadratic; no other positive integer beyond maybe? n=5: 3*5*4=60; RHS 6^3=216, RHS > LHS. n=4 equality. n=3 RHS 6 <18. Could cross again? Ratio RHS/LHS: n=4=1; n=5=216/60=3.6; increasing likely. n maybe 0? dice n positive. n=1? exactly two impossible probability 0 not. So n=4.\n\nNeed final with boxed. Include reasoning concise. Ensure final answer within \\boxed{}. The user says Put final answer within \\boxed{}. We can include explanation and final boxed. Final should have \\boxed{4}.</think>For each die, the probability of showing a number other than 1 is \\(\\frac56\\), and the probability of showing 1 is \\(\\frac16\\). So the desired probability is binomial:\n\n\\[\n\\binom{n}{2}\\left(\\frac56\\right)^2\\left(\\frac16\\right)^{n-2}.\n\\]\n\nSet this equal to \\(\\frac{25}{216}\\):\n\n\\[\n\\binom{n}{2}\\cdot \\frac{25}{36}\\cdot \\frac{1}{6^{n-2}}=\\frac{25}{216}.\n\\]\n\nCancel \\(25\\) and simplify:\n\n\\[\n\\frac{n(n-1)}{2}\\cdot \\frac1{36}\\cdot \\frac1{6^{n-2}}=\\frac1{216}.\n\\]\n\nThis becomes\n\n\\[\n3n(n-1)=6^{n-2}.\n\\]\n\nTesting values, \\(n=4\\) gives\n\n\\[\n3\\cdot 4\\cdot 3=36=6^2,\n\\]\n\nso the solution is \\(n=4\\).\n\n\\[\n\\boxed{4}\n\\]"}
|
assets/race_m4max.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c866afe9c396828d1a0049ae87b42611ca2a411af12c712adb0445d31c357a4b
|
| 3 |
+
size 5825953
|
assets/race_m4max_end.png
ADDED
|
Git LFS Details
|
code/scripts/export_eval_data.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
|
| 5 |
eval/benchmarks/<model>_loops<L>[_efficient].parquet one row per sampled answer (GPQA, MATH-500, AIME, AMC, held-out)
|
| 6 |
eval/ifeval/<model>_loops2.parquet one row per IFEval answer
|
| 7 |
-
eval/problems.
|
| 8 |
|
| 9 |
GPQA's authors ask that its questions not appear online in plain text (to keep them out of training data), so GPQA
|
| 10 |
rows keep their grades, extracted letters and token counts but drop the question and the model's text.
|
|
@@ -66,12 +66,10 @@ def main():
|
|
| 66 |
pq.write_table(pa.Table.from_pylist(rows), OUT / "ifeval" / f"{model}_loops2.parquet", compression="zstd")
|
| 67 |
print(f"ifeval/{model}_loops2.parquet: {len(rows)} rows")
|
| 68 |
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
"reference_answer": p["answer"], "answer_type": p["answer_type"],
|
| 74 |
-
"samples": p["samples"]}, ensure_ascii=False) + "\n")
|
| 75 |
|
| 76 |
|
| 77 |
if __name__ == "__main__":
|
|
|
|
| 4 |
|
| 5 |
eval/benchmarks/<model>_loops<L>[_efficient].parquet one row per sampled answer (GPQA, MATH-500, AIME, AMC, held-out)
|
| 6 |
eval/ifeval/<model>_loops2.parquet one row per IFEval answer
|
| 7 |
+
eval/problems.parquet prompt + reference answer per problem, except GPQA
|
| 8 |
|
| 9 |
GPQA's authors ask that its questions not appear online in plain text (to keep them out of training data), so GPQA
|
| 10 |
rows keep their grades, extracted letters and token counts but drop the question and the model's text.
|
|
|
|
| 66 |
pq.write_table(pa.Table.from_pylist(rows), OUT / "ifeval" / f"{model}_loops2.parquet", compression="zstd")
|
| 67 |
print(f"ifeval/{model}_loops2.parquet: {len(rows)} rows")
|
| 68 |
|
| 69 |
+
rows = [{"bench": p["bench"], "problem_id": p["id"], "prompt": p["prompt"], "reference_answer": p["answer"],
|
| 70 |
+
"answer_type": p["answer_type"], "samples": p["samples"]} for p in problems.values() if p["bench"] != "gpqa"]
|
| 71 |
+
pq.write_table(pa.Table.from_pylist(rows), OUT / "problems.parquet", compression="zstd")
|
| 72 |
+
print(f"problems.parquet: {len(rows)} rows")
|
|
|
|
|
|
|
| 73 |
|
| 74 |
|
| 75 |
if __name__ == "__main__":
|
code/scripts/export_release_data.py
CHANGED
|
@@ -2,8 +2,10 @@
|
|
| 2 |
|
| 3 |
.venv/bin/python -I scripts/export_release_data.py [--run-a data/final_random/sft_verified.jsonl]
|
| 4 |
|
| 5 |
-
sft.
|
| 6 |
-
traces_all.
|
|
|
|
|
|
|
| 7 |
run_a_ids.txt prompt ids in the 52,660-example snapshot Run A was trained on
|
| 8 |
"""
|
| 9 |
|
|
@@ -11,6 +13,9 @@ import argparse
|
|
| 11 |
import json
|
| 12 |
from pathlib import Path
|
| 13 |
|
|
|
|
|
|
|
|
|
|
| 14 |
ROOT = Path(__file__).resolve().parent.parent
|
| 15 |
TEACHER = {"beam-api": "api", "beam-nvfp4-selfhost-sglang": "selfhost-nvfp4", "beam-fp8-selfhost-sglang": "selfhost-fp8"}
|
| 16 |
|
|
@@ -26,36 +31,32 @@ def main():
|
|
| 26 |
out.mkdir(parents=True, exist_ok=True)
|
| 27 |
eval_ids = {l.strip() for l in open(ROOT / "data" / "eval_ids.txt") if l.strip()}
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
}, ensure_ascii=False) + "\n")
|
| 39 |
-
n += 1
|
| 40 |
-
print(f"sft.jsonl: {n}")
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
print(f"traces_all.jsonl: {n}")
|
| 59 |
|
| 60 |
ids = sorted({json.loads(l)["id"] for l in open(args.run_a)})
|
| 61 |
(out.parent / "run_a_ids.txt").write_text("\n".join(ids) + "\n")
|
|
|
|
| 2 |
|
| 3 |
.venv/bin/python -I scripts/export_release_data.py [--run-a data/final_random/sft_verified.jsonl]
|
| 4 |
|
| 5 |
+
sft.parquet one verified-correct Beam trace per prompt (shortest correct), messages form
|
| 6 |
+
traces_all.parquet every generation, correct or not (held-out eval prompts are never included)
|
| 7 |
+
|
| 8 |
+
Everything in the dataset repo is Parquet: the Hub picks one file reader per dataset, so formats can't be mixed.
|
| 9 |
run_a_ids.txt prompt ids in the 52,660-example snapshot Run A was trained on
|
| 10 |
"""
|
| 11 |
|
|
|
|
| 13 |
import json
|
| 14 |
from pathlib import Path
|
| 15 |
|
| 16 |
+
import pyarrow as pa
|
| 17 |
+
import pyarrow.parquet as pq
|
| 18 |
+
|
| 19 |
ROOT = Path(__file__).resolve().parent.parent
|
| 20 |
TEACHER = {"beam-api": "api", "beam-nvfp4-selfhost-sglang": "selfhost-nvfp4", "beam-fp8-selfhost-sglang": "selfhost-fp8"}
|
| 21 |
|
|
|
|
| 31 |
out.mkdir(parents=True, exist_ok=True)
|
| 32 |
eval_ids = {l.strip() for l in open(ROOT / "data" / "eval_ids.txt") if l.strip()}
|
| 33 |
|
| 34 |
+
rows = []
|
| 35 |
+
for line in open(Path(args.final) / "sft_verified.jsonl"):
|
| 36 |
+
r = json.loads(line)
|
| 37 |
+
rows.append({"id": r["id"], "domain": r["domain"], "source": r["source"], "difficulty": r["difficulty"],
|
| 38 |
+
"teacher": TEACHER[r["teacher"]], "reasoning_effort": r["effort"],
|
| 39 |
+
"messages": r["messages"], "gold": r["gold"],
|
| 40 |
+
"n_samples": r["n_samples"], "n_correct": r["n_correct"]})
|
| 41 |
+
pq.write_table(pa.Table.from_pylist(rows), out / "sft.parquet", compression="zstd")
|
| 42 |
+
print(f"sft.parquet: {len(rows)}")
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
+
rows = []
|
| 45 |
+
for line in open(Path(args.final) / "traces_all.jsonl"):
|
| 46 |
+
r = json.loads(line)
|
| 47 |
+
assert r["id"] not in eval_ids, f"held-out eval prompt {r['id']} in traces"
|
| 48 |
+
rows.append({
|
| 49 |
+
"id": r["id"], "domain": r["domain"], "source": r["source"], "topic": r.get("topic"),
|
| 50 |
+
"difficulty": r["difficulty"],
|
| 51 |
+
"teacher": TEACHER[r.get("teacher", "beam-api")], "reasoning_effort": r["effort"],
|
| 52 |
+
"prompt": r["prompt"], "reasoning": r["reasoning"], "content": r["content"],
|
| 53 |
+
"gold": r["gold"], "answer_type": r["answer_type"], "pred": r["pred"], "correct": r["correct"],
|
| 54 |
+
"finish_reason": r["finish_reason"],
|
| 55 |
+
# SGLang n>1 responses report only total usage, so self-hosted counts are per-request estimates
|
| 56 |
+
"completion_tokens": r["usage"].get("completion_tokens"),
|
| 57 |
+
})
|
| 58 |
+
pq.write_table(pa.Table.from_pylist(rows), out / "traces_all.parquet", compression="zstd")
|
| 59 |
+
print(f"traces_all.parquet: {len(rows)}")
|
|
|
|
| 60 |
|
| 61 |
ids = sorted({json.loads(l)["id"] for l in open(args.run_a)})
|
| 62 |
(out.parent / "run_a_ids.txt").write_text("\n".join(ids) + "\n")
|
code/scripts/race_record.py
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Record one model answering one prompt through llama-server, with a timestamp for every streamed chunk.
|
| 2 |
+
|
| 3 |
+
python3 scripts/race_record.py --server BIN --model GGUF --name "Dory-Beam-4B" --loops 2 \
|
| 4 |
+
--problem math500-123 --seed 0 --out race/dory-beam.json [--server-args "..."]
|
| 5 |
+
|
| 6 |
+
Starts llama-server, sends the problem as one user message (temperature 1.0, top_p 0.95, fixed seed), streams the
|
| 7 |
+
reply with raw <think> tags kept in the content, and writes {name, loops, problem, prompt, gold, events: [[t, text]],
|
| 8 |
+
completion_tokens, seconds, timings}. t is seconds since the request was sent. Stops the server afterwards.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
import argparse
|
| 12 |
+
import json
|
| 13 |
+
import shlex
|
| 14 |
+
import subprocess
|
| 15 |
+
import time
|
| 16 |
+
import urllib.request
|
| 17 |
+
from pathlib import Path
|
| 18 |
+
|
| 19 |
+
ROOT = Path(__file__).resolve().parent.parent
|
| 20 |
+
PORT = 8099
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
def wait_ready(proc, timeout=600):
|
| 24 |
+
t0 = time.time()
|
| 25 |
+
while time.time() - t0 < timeout:
|
| 26 |
+
if proc.poll() is not None:
|
| 27 |
+
raise RuntimeError("llama-server exited during startup")
|
| 28 |
+
try:
|
| 29 |
+
with urllib.request.urlopen(f"http://127.0.0.1:{PORT}/health", timeout=2) as r:
|
| 30 |
+
if r.status == 200:
|
| 31 |
+
return
|
| 32 |
+
except Exception:
|
| 33 |
+
pass
|
| 34 |
+
time.sleep(1)
|
| 35 |
+
raise TimeoutError("llama-server did not become ready")
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
def main():
|
| 39 |
+
ap = argparse.ArgumentParser()
|
| 40 |
+
ap.add_argument("--server", required=True)
|
| 41 |
+
ap.add_argument("--model", required=True)
|
| 42 |
+
ap.add_argument("--name", required=True)
|
| 43 |
+
ap.add_argument("--loops", type=int, default=2)
|
| 44 |
+
ap.add_argument("--problem", required=True)
|
| 45 |
+
ap.add_argument("--seed", type=int, default=0)
|
| 46 |
+
ap.add_argument("--max-tokens", type=int, default=16000)
|
| 47 |
+
ap.add_argument("--server-args", default="")
|
| 48 |
+
ap.add_argument("--out", required=True)
|
| 49 |
+
args = ap.parse_args()
|
| 50 |
+
prob = next(json.loads(l) for l in open(ROOT / "data" / "evalsets.jsonl") if json.loads(l)["id"] == args.problem)
|
| 51 |
+
|
| 52 |
+
cmd = [args.server, "-m", args.model, "--host", "127.0.0.1", "--port", str(PORT), "-ngl", "999",
|
| 53 |
+
"--ctx-size", "20480", "--parallel", "1", "--no-context-shift", "--jinja", "--reasoning-format", "none",
|
| 54 |
+
"--override-kv", f"dory.num_loops=int:{args.loops},dory.recurrent_kv_cache_mode=str:per_loop",
|
| 55 |
+
*shlex.split(args.server_args)]
|
| 56 |
+
log = open(Path(args.out).with_suffix(".server.log"), "w")
|
| 57 |
+
proc = subprocess.Popen(cmd, stdout=log, stderr=subprocess.STDOUT)
|
| 58 |
+
try:
|
| 59 |
+
wait_ready(proc)
|
| 60 |
+
body = {"messages": [{"role": "user", "content": prob["prompt"]}], "stream": True, "temperature": 1.0,
|
| 61 |
+
"top_p": 0.95, "top_k": 0, "min_p": 0, "seed": args.seed, "max_tokens": args.max_tokens,
|
| 62 |
+
"cache_prompt": False, "timings_per_token": False}
|
| 63 |
+
req = urllib.request.Request(f"http://127.0.0.1:{PORT}/v1/chat/completions", json.dumps(body).encode(),
|
| 64 |
+
{"Content-Type": "application/json"})
|
| 65 |
+
events, timings, t0 = [], None, time.time()
|
| 66 |
+
with urllib.request.urlopen(req, timeout=7200) as resp:
|
| 67 |
+
for raw in resp:
|
| 68 |
+
line = raw.decode("utf-8", "replace").strip()
|
| 69 |
+
if not line.startswith("data: ") or line == "data: [DONE]":
|
| 70 |
+
continue
|
| 71 |
+
chunk = json.loads(line[6:])
|
| 72 |
+
timings = chunk.get("timings", timings)
|
| 73 |
+
for ch in chunk.get("choices", []):
|
| 74 |
+
text = (ch.get("delta") or {}).get("content")
|
| 75 |
+
if text:
|
| 76 |
+
events.append([round(time.time() - t0, 3), text])
|
| 77 |
+
seconds = time.time() - t0
|
| 78 |
+
finally:
|
| 79 |
+
proc.terminate()
|
| 80 |
+
proc.wait(timeout=60)
|
| 81 |
+
|
| 82 |
+
text = "".join(e[1] for e in events)
|
| 83 |
+
out = {"name": args.name, "model_file": Path(args.model).name, "loops": args.loops, "problem": args.problem,
|
| 84 |
+
"prompt": prob["prompt"], "gold": prob["answer"], "seed": args.seed, "events": events,
|
| 85 |
+
"completion_tokens": (timings or {}).get("predicted_n"), "seconds": round(seconds, 2), "timings": timings,
|
| 86 |
+
"text": text}
|
| 87 |
+
Path(args.out).parent.mkdir(parents=True, exist_ok=True)
|
| 88 |
+
Path(args.out).write_text(json.dumps(out, ensure_ascii=False))
|
| 89 |
+
print(f"{args.name}: {out['completion_tokens']} tokens in {seconds:.1f}s -> {args.out}")
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
if __name__ == "__main__":
|
| 93 |
+
main()
|
code/scripts/race_render.py
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Render two recorded runs (scripts/race_record.py) as a side-by-side race video, replayed on a shared clock.
|
| 2 |
+
|
| 3 |
+
python3 scripts/race_render.py race/base.json race/dory-beam.json --out race/race.mp4 [--speed auto] [--hw "an M4 Max"]
|
| 4 |
+
|
| 5 |
+
Every chunk appears at the moment it was actually streamed (scaled by --speed, which is shown on screen).
|
| 6 |
+
Left panel: the first recording (gray); right: the second (accent). Needs ffmpeg.
|
| 7 |
+
"""
|
| 8 |
+
|
| 9 |
+
import argparse
|
| 10 |
+
import json
|
| 11 |
+
import math
|
| 12 |
+
import re
|
| 13 |
+
import subprocess
|
| 14 |
+
import sys
|
| 15 |
+
import textwrap
|
| 16 |
+
from pathlib import Path
|
| 17 |
+
|
| 18 |
+
from PIL import Image, ImageDraw, ImageFont
|
| 19 |
+
|
| 20 |
+
ROOT = Path(__file__).resolve().parent.parent
|
| 21 |
+
W, H, FPS, HOLD = 1600, 900, 20, 5
|
| 22 |
+
SURFACE, INK, INK2, MUTED, GRID = "#fcfcfb", "#0b0b0b", "#52514e", "#898781", "#e1e0d9"
|
| 23 |
+
GRAY, ACCENT, GOOD, BAD = "#898781", "#2a78d6", "#006300", "#d03b3b"
|
| 24 |
+
SANS, MONO = "/System/Library/Fonts/HelveticaNeue.ttc", "/System/Library/Fonts/SFNSMono.ttf"
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
def font(path, size, index=0):
|
| 28 |
+
return ImageFont.truetype(path, size, index=index)
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
F_TITLE, F_SUB, F_NAME = font(SANS, 34, 1), font(SANS, 19), font(SANS, 25, 1)
|
| 32 |
+
F_STAT, F_MONO, F_CLOCK = font(SANS, 20), font(MONO, 15), font(SANS, 18)
|
| 33 |
+
F_BADGE = font("/System/Library/Fonts/SFNS.ttf", 21) # SF Pro has the ✓/✗ glyphs Helvetica Neue lacks
|
| 34 |
+
try:
|
| 35 |
+
F_BADGE.set_variation_by_name("Semibold")
|
| 36 |
+
except Exception:
|
| 37 |
+
pass
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
def last_boxed(text):
|
| 41 |
+
i = text.rfind("\\boxed{")
|
| 42 |
+
if i < 0:
|
| 43 |
+
return None
|
| 44 |
+
depth, j = 0, i + 7
|
| 45 |
+
for k in range(j, len(text)):
|
| 46 |
+
depth += text[k] == "{"
|
| 47 |
+
if text[k] == "}":
|
| 48 |
+
if depth == 0:
|
| 49 |
+
return text[j:k]
|
| 50 |
+
depth -= 1
|
| 51 |
+
return None
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
def grade(run):
|
| 55 |
+
answer = run["text"].split("</think>")[-1] if "</think>" in run["text"] else ""
|
| 56 |
+
try:
|
| 57 |
+
sys.path.insert(0, str(ROOT / "scripts"))
|
| 58 |
+
from verify import check
|
| 59 |
+
ok, _ = check(answer, run["gold"], "math")
|
| 60 |
+
except Exception:
|
| 61 |
+
ok = (last_boxed(answer) or "").replace(" ", "") == run["gold"].replace(" ", "")
|
| 62 |
+
return bool(ok), last_boxed(answer)
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
def wrap(text, width):
|
| 66 |
+
out = []
|
| 67 |
+
for para in text.split("\n"):
|
| 68 |
+
out += textwrap.wrap(para, width, replace_whitespace=False, drop_whitespace=True) or [""]
|
| 69 |
+
return out
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
def fmt_t(s):
|
| 73 |
+
return f"{int(s // 60)}:{int(s % 60):02d}"
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
def panel(d, x, y, w, h, run, t, color, max_tokens):
|
| 77 |
+
done = t >= run["end"]
|
| 78 |
+
n_ev = sum(1 for e in run["events"] if e[0] <= t)
|
| 79 |
+
text = "".join(e[1] for e in run["events"][:n_ev]).replace("<think>", "").lstrip()
|
| 80 |
+
tokens = round(run["completion_tokens"] * n_ev / max(len(run["events"]), 1))
|
| 81 |
+
# header: identity dot + name; live stats on the right
|
| 82 |
+
d.ellipse((x, y + 9, x + 14, y + 23), fill=color)
|
| 83 |
+
d.text((x + 24, y), run["name"], font=F_NAME, fill=INK)
|
| 84 |
+
stats = f"{tokens:,} tokens · {fmt_t(min(t, run['end']))}"
|
| 85 |
+
d.text((x + w - d.textlength(stats, font=F_STAT), y + 4), stats, font=F_STAT, fill=INK2)
|
| 86 |
+
# progress bar: tokens so far against the longer run's total
|
| 87 |
+
by = y + 44
|
| 88 |
+
d.rounded_rectangle((x, by, x + w, by + 8), radius=4, fill=GRID)
|
| 89 |
+
if tokens:
|
| 90 |
+
d.rounded_rectangle((x, by, x + max(8, w * tokens / max_tokens), by + 8), radius=4, fill=color)
|
| 91 |
+
# streamed text: thinking in secondary ink, the final answer in primary ink
|
| 92 |
+
ty, line_h = by + 26, 20
|
| 93 |
+
cols = int(w / d.textlength("M", font=F_MONO))
|
| 94 |
+
think, sep, answer = text.partition("</think>")
|
| 95 |
+
lines = [(l, INK2) for l in wrap(think, cols)] + ([("", INK2)] + [(l, INK) for l in wrap(answer.strip(), cols)] if sep else [])
|
| 96 |
+
rows = int((h - (ty - y) - (64 if done else 8)) / line_h)
|
| 97 |
+
for i, (l, c) in enumerate(lines[-rows:]):
|
| 98 |
+
d.text((x, ty + i * line_h), l, font=F_MONO, fill=c)
|
| 99 |
+
if done: # finish badge: status icon + label, never color alone
|
| 100 |
+
ok, boxed = run["grade"]
|
| 101 |
+
label = f"{'✓' if ok else '✗'} {'Correct' if ok else 'Wrong'}: {boxed or '(no answer)'} · finished in {fmt_t(run['end'])}"
|
| 102 |
+
bx, bh = y + h - 48, 44
|
| 103 |
+
d.rounded_rectangle((x, bx, x + w, bx + bh), radius=8, fill="#f0efec")
|
| 104 |
+
d.text((x + 16, bx + 10), label, font=F_BADGE, fill=GOOD if ok else BAD)
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
def main():
|
| 108 |
+
ap = argparse.ArgumentParser()
|
| 109 |
+
ap.add_argument("left")
|
| 110 |
+
ap.add_argument("right")
|
| 111 |
+
ap.add_argument("--out", required=True)
|
| 112 |
+
ap.add_argument("--speed", default="auto", help="playback speed multiplier, or auto (fits in ~45 s)")
|
| 113 |
+
ap.add_argument("--hw", default="an Apple M4 Max")
|
| 114 |
+
args = ap.parse_args()
|
| 115 |
+
runs = [json.loads(Path(p).read_text()) for p in (args.left, args.right)]
|
| 116 |
+
for r in runs:
|
| 117 |
+
r["end"] = r["events"][-1][0] if r["events"] else 0
|
| 118 |
+
r["grade"] = grade(r)
|
| 119 |
+
span = max(r["end"] for r in runs)
|
| 120 |
+
speed = max(1, math.ceil(span / 45)) if args.speed == "auto" else float(args.speed)
|
| 121 |
+
max_tokens = max(r["completion_tokens"] for r in runs)
|
| 122 |
+
frames = int(span / speed * FPS) + HOLD * FPS
|
| 123 |
+
prompt = re.sub(r"\s+", " ", runs[0]["prompt"].replace("Put your final answer within \\boxed{}.", "")).strip()
|
| 124 |
+
|
| 125 |
+
ff = subprocess.Popen(["ffmpeg", "-y", "-loglevel", "error", "-f", "rawvideo", "-pix_fmt", "rgb24", "-s", f"{W}x{H}",
|
| 126 |
+
"-r", str(FPS), "-i", "-", "-c:v", "libx264", "-pix_fmt", "yuv420p", "-crf", "23",
|
| 127 |
+
"-movflags", "+faststart", args.out], stdin=subprocess.PIPE)
|
| 128 |
+
for f in range(frames):
|
| 129 |
+
t = min(f / FPS * speed, span)
|
| 130 |
+
img = Image.new("RGB", (W, H), SURFACE)
|
| 131 |
+
d = ImageDraw.Draw(img)
|
| 132 |
+
d.text((48, 32), "Same problem, same laptop: base Dory vs Dory-Beam-4B", font=F_TITLE, fill=INK)
|
| 133 |
+
sp = "real time" if speed == 1 else f"played at {speed:g}× speed"
|
| 134 |
+
d.text((48, 82), f"llama.cpp Q5_K_M on {args.hw}, {runs[0]['loops']} loops, one run each (seed "
|
| 135 |
+
f"{runs[0]['seed']}). Recorded token timings, {sp}.", font=F_SUB, fill=INK2)
|
| 136 |
+
q = textwrap.shorten(prompt, 150, placeholder=" …")
|
| 137 |
+
d.text((48, 116), f"{runs[0]['problem'].split('-')[0].upper().replace('MATH500', 'MATH-500')}: {q}",
|
| 138 |
+
font=F_SUB, fill=INK)
|
| 139 |
+
d.line((48, 154, W - 48, 154), fill=GRID, width=1)
|
| 140 |
+
pw = (W - 48 * 2 - 40) / 2
|
| 141 |
+
for i, (r, c) in enumerate(zip(runs, (GRAY, ACCENT))):
|
| 142 |
+
panel(d, 48 + i * (pw + 40), 176, pw, H - 176 - 56, r, t, c, max_tokens)
|
| 143 |
+
if t >= span: # both finished: one-line result, in text ink
|
| 144 |
+
a, b = runs
|
| 145 |
+
summ = (f"{b['name']}: {a['completion_tokens'] / b['completion_tokens']:.1f}× fewer tokens, "
|
| 146 |
+
f"finished {a['end'] / b['end']:.1f}× sooner than {a['name']}.")
|
| 147 |
+
d.text((48, H - 42), summ, font=F_BADGE, fill=INK)
|
| 148 |
+
clock = f"elapsed {fmt_t(t)}"
|
| 149 |
+
d.text((W - 48 - d.textlength(clock, font=F_CLOCK), H - 40), clock, font=F_CLOCK, fill=MUTED)
|
| 150 |
+
ff.stdin.write(img.tobytes())
|
| 151 |
+
ff.stdin.close()
|
| 152 |
+
ff.wait()
|
| 153 |
+
print(f"wrote {args.out}: {frames / FPS:.0f} s at {speed:g}x; "
|
| 154 |
+
+ "; ".join(f"{r['name']} {r['completion_tokens']} tok in {r['end']:.0f}s ok={r['grade'][0]}" for r in runs))
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
if __name__ == "__main__":
|
| 158 |
+
main()
|