Record development results for abstracts-pilot-s00-third-r03-fp64
Browse filesFiles changed (31)
- research/README.md+3-2
- research/docs/explorer.js+10-1
- research/docs/figures/curves.png
- research/docs/runbook.md+1-1
- research/docs/study.json
- research/docs/third-derivative-penalty.mdAdded+154
- research/reports/amendments/adapter-precision.md+2
- research/reports/experiments/abstracts-pilot-s00-third-r03-fp64/experiment.mdAdded+69
- research/reports/experiments/abstracts-pilot-s00-third-r03-fp64/learnings.mdAdded+5
- research/reports/experiments/experiments.md+1
- research/reports/experiments/learnings.md+2
- research/reports/paper.pdf
- research/reports/progress.md+3-3
- research/reports/summary.md+2-1
- research/results/abstracts-pilot-s00-third-r03-fp64/config.jsonAdded+18
- research/results/abstracts-pilot-s00-third-r03-fp64/evaluation.jsonlAdded+12
- research/results/abstracts-pilot-s00-third-r03-fp64/events.jsonlAdded+22
- research/results/abstracts-pilot-s00-third-r03-fp64/samples.jsonlAdded+3
- research/results/abstracts-pilot-s00-third-r03-fp64/summary.jsonAdded+43
- research/results/calibration/abstracts-third-fp64.jsonAdded+155
- research/results/verification/pythia-scoring-batches.jsonAdded+49
- research/results/verification/tests.json+42-27
- research/src/thirdloss/analysis.py+14-9
- research/src/thirdloss/cli.py+14-2
- research/src/thirdloss/report_paper.py+21-7
- research/src/thirdloss/report_records.py+4-1
- research/src/thirdloss/reporting.py+8
- research/src/thirdloss/study.py+24-9
- research/src/thirdloss/train.py+19-3
- research/tests/test_analysis.py+13
- research/tests/test_training.py+20
14 unmodified lines151617181920212 unmodified lines242526272829306 unmodified lines37383940414214 unmodified linesThese papers motivate a distinct experiment here: putting the squared norm of the **third derivative of next-token loss with respect to trainable weights** directly in the training objective. The reviewed studies leave its effect on held-out next-token loss open.The third-order term measures how the Hessian changes as weights move. Two independent random sign vectors estimate its squared Frobenius norm. Differentiating the estimate gives the optimizer a fourth-derivative contribution. This combines an order-three roughness density with matrix-free norm estimation. [Duchon](https://doi.org/10.1007/BFb0086566) · [Bujanović and Kressner](https://arxiv.org/pdf/2004.06433) · [Hessian comparator](https://arxiv.org/pdf/2208.05924)The protocol and run matrix were published before model execution. The scores, comparisons and continuations below are regenerated from each run’s raw records. [Preregistration](reports/preregistration.md) · [Run matrix](reports/planned-runs.md) · [Literature](reports/literature-review.md) · [State of the art](reports/state-of-the-art-review.md) · [Progress](reports/progress.md)2 unmodified lines<!-- RESULTS:START -->[Explore the results](https://burnycoder.github.io/llm-training-with-penalizing-rapid-changes-of-curvature-of-its-loss/) · [Paper](reports/paper.pdf) · [Run ledger](reports/experiments/experiments.md)Recorded 14 runs, including 13 with a completed summary.**TinyStories.** Awaiting paired test results (0 of 8 full-horizon training triplets).6 unmodified lines| Stage | Phase | Method | Ratio | Tokens/run | Runs | Median dev NLL | Median test NLL || --- | --- | --- | --- | --- | --- | --- | --- || Research abstracts | diagnostic | Third derivative | 0.030 | 65,536 | 1 | 3.1168 | — || TinyStories | control | Initial checkpoint | 0.000 | 0 | 1 | 8.3437 | — || TinyStories | control | Unigram | 0.000 | 0 | 1 | 6.0036 | — || TinyStories | pilot | Ordinary AdamW | 0.000 | 2,097,152 | 1 | 3.8770 | — |14 unmodified lines151617181920212 unmodified lines242526272829306 unmodified lines3738394041424314 unmodified linesThese papers motivate a distinct experiment here: putting the squared norm of the **third derivative of next-token loss with respect to trainable weights** directly in the training objective. The reviewed studies leave its effect on held-out next-token loss open.The third-order term measures how the Hessian changes as weights move. Two independent random sign vectors estimate its squared Frobenius norm. Differentiating the estimate gives the optimizer a fourth-derivative contribution. This combines an order-three roughness density with matrix-free norm estimation. [Worked examples and the training implementation](docs/third-derivative-penalty.md) · [Duchon](https://doi.org/10.1007/BFb0086566) · [Bujanović and Kressner](https://arxiv.org/pdf/2004.06433) · [Hessian comparator](https://arxiv.org/pdf/2208.05924)The protocol and run matrix were published before model execution. The scores, comparisons and continuations below are regenerated from each run’s raw records. [Preregistration](reports/preregistration.md) · [Run matrix](reports/planned-runs.md) · [Literature](reports/literature-review.md) · [State of the art](reports/state-of-the-art-review.md) · [Progress](reports/progress.md)2 unmodified lines<!-- RESULTS:START -->[Explore the results](https://burnycoder.github.io/llm-training-with-penalizing-rapid-changes-of-curvature-of-its-loss/) · [Paper](reports/paper.pdf) · [Run ledger](reports/experiments/experiments.md)Recorded 15 runs, including 14 with a completed summary.**TinyStories.** Awaiting paired test results (0 of 8 full-horizon training triplets).6 unmodified lines| Stage | Phase | Method | Ratio | Tokens/run | Runs | Median dev NLL | Median test NLL || --- | --- | --- | --- | --- | --- | --- | --- || Research abstracts | diagnostic | Third derivative | 0.030 | 65,536 | 1 | 3.1168 | — || Research abstracts | pilot | Third derivative | 0.030 | 65,536 | 1 | 3.1149 | — || TinyStories | control | Initial checkpoint | 0.000 | 0 | 1 | 8.3437 | — || TinyStories | control | Unigram | 0.000 | 0 | 1 | 6.0036 | — || TinyStories | pilot | Ordinary AdamW | 0.000 | 2,097,152 | 1 | 3.8770 | — |
82 unmodified lines83848586878889178 unmodified lines26826927027127227382 unmodified linestr.append(first);const evaluation = run.evaluation_progress;const status = evaluation?.targets_to_score > 0? `${run.status} (${number(100 * evaluation.targets_scored / evaluation.targets_to_score, 1)}%)`: run.status;for (const value of [methodName(run.method), run.seed ?? "—", number(run.ratio, 3),number(run.tokens, 0), number(run.dev_nll, 4), number(run.test_nll, 4),178 unmodified linesnumber(m.train_seconds, 1), number(m.tokens, 0), number(m.dev_nll, 5)]))));target.append(details);}}function showSample() {82 unmodified lines83848586878889178 unmodified lines26826927027127227327427527627727827928028128282 unmodified linestr.append(first);const evaluation = run.evaluation_progress;const status = evaluation?.targets_to_score > 0? `${evaluation.split === "test" ? "scoring test" : run.status} (${number(100 * evaluation.targets_scored / evaluation.targets_to_score, 1)}%)`: run.status;for (const value of [methodName(run.method), run.seed ?? "—", number(run.ratio, 3),number(run.tokens, 0), number(run.dev_nll, 4), number(run.test_nll, 4),178 unmodified linesnumber(m.train_seconds, 1), number(m.tokens, 0), number(m.dev_nll, 5)]))));target.append(details);}if ((outcome.matched_nonhost_time || []).length) {const details = node("details");details.append(node("summary", "Development loss after subtracting host derivative calls"));details.append(table(["Seed", "Cutoff (s)", "Method", "Checkpoint (s)", "Training tokens", "Dev NLL"],outcome.matched_nonhost_time.flatMap(t => Object.entries(t.by_method).map(([name, m]) =>[t.seed, number(t.cutoff_seconds, 1), methodName(name), number(m.clock_seconds, 1),number(m.tokens, 0), number(m.dev_nll, 5)]))));target.append(details);}}function showSample() {
123456# Reproducing the studyInstall Python 3.12 and [uv](https://docs.astral.sh/uv/). The lock targets Windows AMD64 and Linux x86_64 with an NVIDIA driver supporting the CUDA 13.2 PyTorch wheel. The default scratch model and adapter math use float32. Make a project-local environment and install all locked dependencies with `uv sync --locked`. Copy `.env.example` to `.env` and optionally set `THIRDLOSS_STORAGE` to a directory with room for corpora, CUDA checkpoints and Hub downloads. Use the existing GitHub CLI and Hugging Face login for publication.```shuv run thirdloss verify123456# Reproducing the studyInstall Python 3.12 and [uv](https://docs.astral.sh/uv/). The lock targets Windows AMD64 and Linux x86_64 with an NVIDIA driver supporting the CUDA 13.2 PyTorch wheel. Scratch training and ordinary adapter updates use float32. Adapter derivatives use float64. Make a project-local environment and install all locked dependencies with `uv sync --locked`. Copy `.env.example` to `.env` and optionally set `THIRDLOSS_STORAGE` to a directory with room for corpora, CUDA checkpoints and Hub downloads. Use the existing GitHub CLI and Hugging Face login for publication.```shuv run thirdloss verify
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154# How the project computes the third-derivative penalty
The model assigns a probability to each possible next token. Its **loss** is the mean negative log probability it assigns to the tokens that actually follow. The project differentiates this number **with respect to the trainable weights**. The first derivative gives the slope of the loss, the second gives its curvature, and the third tells us how that curvature changes as a weight moves. The training penalty adds up the **squares** of those changes. [Token loss](../src/thirdloss/models.py) · [Preregistered objective](../reports/preregistration.md)
With one weight $w$, you can just differentiate three times. For $\ell(w)=w^4$, the successive derivatives are $4w^3$, $12w^2$ and $24w$. The penalty is $(24w)^2$. With many weights you also choose **which weight** to differentiate at each step. PyTorch directly differentiates the minibatch loss along the chosen directions by applying the chain rule at the current weights. The estimate enters when one pair of directions stands in for the sum of squares over **all** weight triples. [Project’s scalar derivative check](../tests/test_derivatives.py) · [Penalty code](../src/thirdloss/penalties.py)
## What gets differentiated?
Let $\theta=(\theta_1,\ldots,\theta_d)$ be the $d$ trainable numbers. Let $B$ be the fixed **minibatch**, the training examples whose mean loss is $\ell_B(\theta)$. Write $\partial_i$ for the rate of change as weight $\theta_i$ moves with all other weights held fixed.
| Quantity | Meaning ||---|---|| $g_k=\partial_k\ell_B$ | The slope along weight $k$. The **gradient** $g=\nabla_\theta\ell_B$ lists these slopes for all weights. || $H_{jk}=\partial_j g_k$ | How the slope along $k$ changes when $j$ moves. The **Hessian** $H_B$ is the table of all such second derivatives. || $T_{ijk}=\partial_i H_{jk}$ | How that curvature changes when $i$ moves. The **third-derivative tensor** $T=\nabla_\theta^3\ell_B$ is the array of all ordered triples. || $P_B=\sum_{i,j,k}T_{ijk}^2$ | The **squared Frobenius norm**. Square each entry and add over all three indices to get one training penalty. |
A **pure** third derivative uses the same weight three times, as in $T_{xxx}$. A **mixed** derivative uses several weights, as in $T_{xxy}$. For a smooth loss, permuting these indices gives the same derivative value. Each ordered position still counts in the squared norm. Squaring lets increases and decreases both contribute. Two entries $+2$ and $-2$ would sum to zero, while their squares contribute $8$.
## A direct calculation beside an all-plus probe
Take two weights, $x=1$ and $y=2$. Set $s=x+y$ and $\ell(x,y)=s^3/3$. In the table, differentiate the expressions in $x,y$ before substituting the values. Both $\partial_xs$ and $\partial_ys$ equal $1$.
A **probe** is a vector used to take a weighted sum. Suppose the four independent sign draws for our two probes all happen to be $+1$. Then $u=v=(1,1)$ for this draw. Every weighted sum in the right column is ordinary addition.
| Step | Direct derivatives, entry by entry | One probe pair, adding along the way ||---|---|---|| First derivative | $\partial_x\ell=(3s^2/3)\cdot1=s^2$. Likewise $\partial_y\ell=s^2$. The gradient is $(s^2,s^2)=(9,9)$. | Start with the same gradient. Use $u$ to add its two entries, giving $a=s^2+s^2=2s^2$. || Second derivative | Each gradient entry has derivative $2s$ in $x$ and $2s$ in $y$. The Hessian has four entries, each $2s=6$. | Differentiate $a$ to get $(4s,4s)=(12,12)$. Use $v$ to add again, giving $b=4s+4s=8s$. || Third derivative | Differentiate each of those four Hessian entries in both $x$ and $y$. Each derivative is $2\cdot1=2$. There are eight entries equal to $2$. | Differentiate $b$ to get $r=(\partial_x(8s),\partial_y(8s))=(8,8)$. || Square and add | $8\times 2^2=\mathbf{32}$. | $8^2+8^2=\mathbf{128}$. |
**Where did the extra contribution come from?** For the $x$ component alone, the direct calculation gives $2^2+2^2+2^2+2^2=16$. The probe gives $(2+2+2+2)^2=64$. The same thing happens for $y$. For the **raw sum**, the two routes agree exactly because the eight entries sum to $16$ and $r_x+r_y=8+8=16$. Keeping just the **pure** entries would give a squared sum of $2^2+2^2=8$. The full squared norm includes six mixed entries as well.
**What happens with random signs?** For this Hessian, $u^\top H_Bv=2s(u_1+u_2)(v_1+v_2)$. If either vector has opposite entries, its sum is zero, so $r=(0,0)$. If the two entries within each vector match, both sums have magnitude $2$ and both entries of $r$ have magnitude $8$. Each vector has matching entries with probability $1/2$, independently of the other vector. Across the 16 equally likely probe pairs, 12 give $0$ and four give $128$. Their average is the exact $32$.
## Why two independent sign vectors work for any smooth loss
Draw each entry of $u$ and $v$ independently, equally likely to be $+1$ or $-1$. These are **Rademacher** signs, with no division by the vector length. Hold them fixed while differentiating. The transpose in $u^\top H_Bv$ turns $u$ into a row. A dot product multiplies matching entries and adds them. In the following expansion, multiplying $H_B$ by $v$ sums along each row, and dotting with $u$ sums across rows.
$$(H_Bv)_j=\sum_k H_{jk} v_k,\qquadu^\top H_Bv=\sum_j u_j(H_Bv)_j=\sum_{j,k}u_jv_k H_{jk}.$$
Taking the gradient gives one number for each $i$. A derivative of a finite sum is the sum of its derivatives. The signs factor out as constants, so
$$r_i=\partial_i(u^\top H_Bv)=\sum_{j,k}u_jv_k\,\partial_i H_{jk}=\sum_{j,k}u_jv_k\,T_{ijk}.$$
This is the exact **contraction** for the chosen signs, meaning that two indices of the tensor have been summed and one is still free. The random estimate is the scalar $\widehat P_B=\lVert r\rVert_2^2=\sum_i r_i^2$, the squared **Euclidean length** of that vector.
Squaring one component multiplies its sum by a second copy. Label the indices in the second copy $a,b$ so we can see which entries get paired.
$$r_i^2=\left(\sum_{j,k}T_{ijk}u_jv_k\right)\left(\sum_{a,b}T_{iab}u_av_b\right)=\sum_{j,k,a,b}T_{ijk}T_{iab}\,u_j u_a v_k v_b.$$
**Expectation** $\mathbb E$ means average over the signs at the same weights and on the same minibatch. If $j=a$, then $u_j u_a=1$. If $j\ne a$, the product is equally likely to be $+1$ or $-1$ and averages to zero. The same holds for $v_k v_b$. Independence between the vectors lets us multiply these two averages. Only $j=a$ **and** $k=b$ survive, giving
$$\mathbb E_{u,v}[r_i^2]=\sum_{j,k}T_{ijk}^2,\qquad\mathbb E_{u,v}[\widehat P_B]=\sum_i\mathbb E_{u,v}[r_i^2]=\sum_{i,j,k}T_{ijk}^2=\lVert T\rVert_F^2 .$$
One probe supplies signs for $j$, the other for $k$. The gradient already returns every $i$. The word **unbiased** refers to the equality after averaging. The example above shows how far a single draw can be from that average. The same identity follows from treating $(j,k)$ as a single column index in the matrix version of the result. [Bujanović and Kressner, Lemma 2.1](https://arxiv.org/pdf/2004.06433#page=3)
### What breaks if we reuse one vector?
Take $\ell(x,y)=x^2y/2$. Its gradient is $(xy,x^2/2)$, so its Hessian and the two slices of its third derivative are
$$H=\begin{pmatrix}y&x\\x&0\end{pmatrix},\qquad\partial_x H=\begin{pmatrix}0&1\\1&0\end{pmatrix},\qquad\partial_y H=\begin{pmatrix}1&0\\0&0\end{pmatrix}.$$
Both pure third derivatives are zero. The three ones come from mixed derivatives, so the exact penalty is $3$. Multiply the Hessian by the two probes to get $u^\top H v=y u_1v_1+x(u_1v_2+u_2v_1)$. Differentiating in $x,y$ gives $r=(u_1v_2+u_2v_1,\ u_1v_1)$.
| How the signs are drawn | What gets squared | Result ||---|---|---|| Independent $u,v$ | The two signs in $r_x$ reinforce half the time and cancel half the time. The square of $r_y$ is always $1$. | The estimate is $5$ or $1$ with equal probability. Its mean is $3$. || Set $v=u$ on every draw | $r_x=u_1u_2+u_2u_1=2u_1u_2$ and $r_y=u_1^2=1$. | Every draw gives $4+1=5$. Its mean is $5$. |
## Why the project computes a vector instead of listing every derivative
The ordinary training gradient already contains one exact automatic derivative per trainable coordinate, up to floating-point rounding. A third derivative has three coordinate slots. With $d$ weights the dense array has $d^3$ ordered entries. The counts below use the recorded trainable coordinates. The storage estimates count just one dense array at the arithmetic precision used by the corresponding derivative path. An exabyte (EB) is $10^{18}$ bytes. [Weight and loss definitions](../src/thirdloss/models.py) · [Adapter precision amendment](../reports/amendments/adapter-precision.md)
| Trainable coordinates in this project | $d$ | Dense third-derivative entries, $d^3$ | Storage for those entries ||---|---:|---:|---:|| TinyStories decoder trained from scratch, including its shared input/output embedding | 2,557,632 | $1.67\times10^{19}$ | about 66.9 EB at 4 bytes per entry || Research abstracts, rank-eight LoRA factors in Pythia-410M’s query/key/value projections. The pretrained base weights are frozen. | 786,432 | $4.86\times10^{17}$ | about 3.89 EB at 8 bytes per entry |
To reproduce either row, read `trainable_parameters` from the linked record, cube it, and multiply by the bytes per entry. Symmetry can reduce storage to one entry per distinct unordered triple, $d(d+1)(d+2)/6$, which still grows cubically. [TinyStories parameter count](../results/stories-pilot-s00-third-r03/summary.json) · [Adapter parameter count](../results/abstracts-pilot-s00-third-r03/summary.json)
You *can* compute the exact sum without storing all $d^3$ entries. For example, take $u=e_j$ and $v=e_k$, where $e_j$ has a one only at position $j$. Then $u^\top H_Bv=H_{jk}$ and $r_i=T_{ijk}$. Square and sum this vector and repeat for every ordered pair $(j,k)$. That direct scheme needs $d^2$ such vectors. The project takes one random pair on an active update. It trades an exact scalar for a noisy estimate while still differentiating the loss directly along the chosen directions. The small-model reference test explicitly builds the tensor and compares the two computations for the **same** signs. [Dense reference and derivative tests](../tests/test_derivatives.py) · [PyTorch’s Hessian–vector product tutorial](https://docs.pytorch.org/tutorials/intermediate/jacobians_hessians.html#computing-hessian-vector-products)
## The actual training update
1. **Compute the ordinary loss gradient.** Each update uses the mean next-token loss on the full training batch, 32 windows for TinyStories or eight for abstracts. In code, $\theta$ consists of the tensors with `requires_grad` enabled. [Training loop](../src/thirdloss/train.py) · [Registered batches and model configurations](../reports/planned-runs.md)2. **Choose the derivative minibatch.** In the third-order arm, a random gate opens with probability $1/8$ per update. On an active update the code chooses two distinct windows from that batch, each with 128 target tokens. Their mean **unregularized** token loss is $\ell_B$. Averaging over signs gives the exact squared norm for those windows. Averaging over window selection as well targets $\mathbb E_B[\lVert\nabla_\theta^3\ell_B\rVert_F^2]$, the mean of the minibatch squared norms. [Window and gate sampling](../src/thirdloss/windows.py) · [Preregistration](../reports/preregistration.md)3. **Differentiate with fixed probes.** `random_signs` draws $u,v$ separately. `hessian_vector` computes $Hu=\nabla_\theta(g^\top u)$. `third_contraction` takes $\nabla_\theta(v^\top Hu)$, and `estimate(..., "third")` computes `inner(r, r)`. For a smooth scalar loss the Hessian is symmetric, so the code’s $v^\top Hu$ equals $u^\top Hv$ in the proof. PyTorch differentiates the dot products directly and keeps their computation graph for the next derivative. [Penalty implementation](../src/thirdloss/penalties.py) · [PyTorch automatic differentiation](https://docs.pytorch.org/docs/2.15/generated/torch.autograd.grad.html)4. **Apply the penalty gradient.** The penalty value uses third derivatives. To move the weights, the optimizer needs the derivative of that value, $\partial_m\widehat P_B=2\sum_i r_i\,\partial_m r_i$. Differentiating $r_i$ introduces **fourth** derivatives. The code adds $8\lambda\nabla_\theta\widehat P_B$ to the ordinary loss gradient on active updates, where $\lambda$ is the calibrated penalty coefficient. The factor eight compensates for the gate probability before gradient clipping and the AdamW update. For the one-weight example, differentiating the penalty $(24w)^2$ gives $1152w$. [Training objectives](../src/thirdloss/objectives.py) · [Training loop](../src/thirdloss/train.py) · [Quartic gradient check](../tests/test_derivatives.py)
The amended adapter path computes derivatives in double precision on a copy with the current adapter weights. On the study laptop these calculations run on the CPU, and ordinary training uses the GPU. The code processes the two windows sequentially with the **same pair** of probes across windows. If their contractions are $r_1,r_2$, linearity gives $r_B=(r_1+r_2)/2$ for the mean loss. The code squares that mean, preserving the cross-window terms in the registered penalty. The row and column probes **within** the pair are independent. [Two-window implementation](../src/thirdloss/objectives.py) · [Precision and device choices](../reports/amendments/adapter-precision.md)
The ordinary AdamW baseline passes the first gradient straight to clipping and the optimizer. The Hessian-trace arm uses one probe twice in $u^\top Hu$ because its target is the **trace**, the sum of the Hessian’s diagonal entries. The squared-Hessian arm uses $\lVert Hu\rVert_2^2$. The combined arm adds trace and third-order penalties. The sign-randomized control uses additional signs on the **finished penalty gradient**, a separate operation from choosing $u,v$ to measure the third derivative. [Comparator implementations](../src/thirdloss/penalties.py) · [Control and combined updates](../src/thirdloss/objectives.py) · [Planned comparisons](../reports/planned-runs.md)
<details><summary>Reproduce the worked examples and the dense storage estimates</summary>
Run this Python block from the repository root in the project’s locked environment. It differentiates both polynomials, enumerates every probe pair and reads the real models’ coordinate counts from their archived summaries. [SymPy differentiation](https://docs.sympy.org/latest/tutorials/intro-tutorial/calculus.html#derivatives)
~~~pythonfrom collections import Counterfrom itertools import productimport jsonfrom pathlib import Pathfrom sympy import Matrix, diff, hessian, symbols
x, y = symbols("x y")weights = (x, y)probes = [Matrix(pair) for pair in product((-1, 1), repeat=2)]
for loss in ((x + y)**3 / 3, x**2 * y / 2): entries = [diff(loss, *triple) for triple in product(weights, repeat=3)] exact = sum(entry**2 for entry in entries) H = hessian(loss, weights) counts = Counter() for u, v in product(probes, repeat=2): curvature = u.dot(H * v) r = [diff(curvature, weight) for weight in weights] counts[sum(entry**2 for entry in r)] += 1 mean = sum(value * count for value, count in counts.items()) / counts.total() assert mean == exact print(loss, "exact", exact, "frequencies", sorted(counts.items()), "mean", mean)
for run, bytes_per_entry in (("stories-pilot-s00-third-r03", 4), ("abstracts-pilot-s00-third-r03", 8)): summary = Path("results", run, "summary.json") d = json.loads(summary.read_text(encoding="utf-8"))["trainable_parameters"] entries = d**3 print(run, f"{d:,} weights", f"{entries:.3g} entries", f"{entries * bytes_per_entry / 10**18:.3g} EB")~~~
</details>9 unmodified lines101112139 unmodified linesThe primary computational comparison uses elapsed training time while one GPU is reserved. The raw training records separately measure the time spent in host probe calls. Subtracting these calls gives a supplementary time-accounting estimate that also excludes their transfers. It does not measure individual CUDA kernel durations. Host and dedicated-GPU memory have separate units and accounting. [Time accounting](../../src/thirdloss/train.py)Before rerunning the adapter pilot, benchmark inference batches of 2, 8, 16 and 32 windows on 256 fixed training windows. Retain the original batch of two unless a candidate is at least 10% faster, agrees within 0.000002 nats per target and one top-one prediction with the reference, and uses at most 7 GiB of allocated CUDA memory. Select the fastest eligible batch and use it for all amended-stage development and test scoring. Training batch sizes, evaluation targets and contexts are fixed. [Scoring benchmark](../../src/thirdloss/probe_check.py)9 unmodified lines1011121314159 unmodified linesThe primary computational comparison uses elapsed training time while one GPU is reserved. The raw training records separately measure the time spent in host probe calls. Subtracting these calls gives a supplementary time-accounting estimate that also excludes their transfers. It does not measure individual CUDA kernel durations. Host and dedicated-GPU memory have separate units and accounting. [Time accounting](../../src/thirdloss/train.py)Before any confirmatory training, the first FP64 pilot showed that individual host derivative calls could take about a minute. To resolve the early part of the matched-time comparison, record the same fixed development windows at initialization and at every fourth update through the first routine diagnostic interval in all three adapter confirmatory arms. Evaluation runs outside both training clocks. Each reported matched score still uses the latest actual measurement at or before the shortest final time. [Timestamped FP64 pilot updates](../../results/abstracts-pilot-s00-third-r03-fp64/events.jsonl) · [Validation schedule](../../src/thirdloss/train.py)Before rerunning the adapter pilot, benchmark inference batches of 2, 8, 16 and 32 windows on 256 fixed training windows. Retain the original batch of two unless a candidate is at least 10% faster, agrees within 0.000002 nats per target and one top-one prediction with the reference, and uses at most 7 GiB of allocated CUDA memory. Select the fastest eligible batch and use it for all amended-stage development and test scoring. Training batch sizes, evaluation targets and contexts are fixed. [Scoring benchmark](../../src/thirdloss/probe_check.py)
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869# Research abstracts · Third derivative
Run `abstracts-pilot-s00-third-r03-fp64` · [raw records](../../../results/abstracts-pilot-s00-third-r03-fp64/) · [registered design](../../preregistration.md)
| Stage | Method | Phase | Seed | Ratio | Train tokens | Dev NLL | Test NLL | Tokens/s | Status || --- | --- | --- | --- | --- | --- | --- | --- | --- | --- || Research abstracts | Third derivative | pilot | 0 | 0.030 | 65,536 | 3.1149 | — | 188 | complete |
Training time is 349.3 seconds. Peak allocated GPU memory is 2,346.3 MiB. Development token accuracy is 0.4131. Test token accuracy is —.
[Design and hyperparameter rationale](../../planned-runs.md) · [Saved configuration](../../../results/abstracts-pilot-s00-third-r03-fp64/config.json)
The process working-set high-water mark was 15,321.1 MiB. This OS measure includes earlier work in the same interpreter.
## Fixed-prompt generations
**Prompt**
One of the central objectives of contemporary neuroimaging research is to create predictive models
**Reference continuation**
that can disentangle the connection between patterns of functional connectivity across the entire brain and various behavioral traits. Previous studies have shown that models trained to predict behavioral features from the individual's functional
**Model continuation**
that will accurately predict the behavior of patient-specific neurological disorders such as epilepsy. In this paper, we present a novel dataset of EEG data recorded from children with focal subcortical epilepsy
**Prompt**
In the evolving landscape of computer vision, foundation models have emerged as pivotal tools
**Reference continuation**
, exhibiting exceptional adaptability to a myriad of tasks. Among these, the Segment Anything Model (SAM) by Meta AI has distinguished itself in image segmentation. However, SAM, like
**Model continuation**
to study the behavior of computer vision systems. These widely adopted modeling approaches tend to be associated with a small number of identified object classes. On the one hand, they are often effective to
**Prompt**
We investigate the connection between the turnover frequency in the radio spectrum, $\nu
**Reference continuation**
_{\rm TO}$, and the rate of ionising ultra-violet photons, $Q_{\rm HI}$, in extragalactic sources. From a large, optically selected, sample we
**Model continuation**
_{\rm{break}}$, and the spectral index of the underlying spectral index $s_{\rm{break}}$, and reveal that there is a universal relationship between both quantities that can be used to12345# Run learnings
Development NLL changed by -0.1165 nats per target token from 4,096 to 65,536 training targets. Attribution to the regularizer uses matched comparisons across seeds.
[Experiment and source records](experiment.md)7 unmodified lines89101112137 unmodified lines| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- || [abstracts-control-s00-initial-r00](./abstracts-control-s00-initial-r00/experiment.md) | Research abstracts | Initial checkpoint | control | 0 | 0.000 | — | — | — | — | configured || [abstracts-pilot-s00-third-r03](./abstracts-pilot-s00-third-r03/experiment.md) | Research abstracts | Third derivative | diagnostic | 0 | 0.030 | 65,536 | 3.1168 | — | 907 | complete || [stories-control-s00-initial-r00](./stories-control-s00-initial-r00/experiment.md) | TinyStories | Initial checkpoint | control | 0 | 0.000 | 0 | 8.3437 | — | 0 | complete || [stories-control-s00-unigram-r00](./stories-control-s00-unigram-r00/experiment.md) | TinyStories | Unigram | control | 0 | 0.000 | 0 | 6.0036 | — | 0 | complete || [stories-pilot-s00-ce-r00](./stories-pilot-s00-ce-r00/experiment.md) | TinyStories | Ordinary AdamW | pilot | 0 | 0.000 | 2,097,152 | 3.8770 | — | 123,871 | complete |7 unmodified lines8910111213147 unmodified lines| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- || [abstracts-control-s00-initial-r00](./abstracts-control-s00-initial-r00/experiment.md) | Research abstracts | Initial checkpoint | control | 0 | 0.000 | — | — | — | — | configured || [abstracts-pilot-s00-third-r03](./abstracts-pilot-s00-third-r03/experiment.md) | Research abstracts | Third derivative | diagnostic | 0 | 0.030 | 65,536 | 3.1168 | — | 907 | complete || [abstracts-pilot-s00-third-r03-fp64](./abstracts-pilot-s00-third-r03-fp64/experiment.md) | Research abstracts | Third derivative | pilot | 0 | 0.030 | 65,536 | 3.1149 | — | 188 | complete || [stories-control-s00-initial-r00](./stories-control-s00-initial-r00/experiment.md) | TinyStories | Initial checkpoint | control | 0 | 0.000 | 0 | 8.3437 | — | 0 | complete || [stories-control-s00-unigram-r00](./stories-control-s00-unigram-r00/experiment.md) | TinyStories | Unigram | control | 0 | 0.000 | 0 | 6.0036 | — | 0 | complete || [stories-pilot-s00-ce-r00](./stories-pilot-s00-ce-r00/experiment.md) | TinyStories | Ordinary AdamW | pilot | 0 | 0.000 | 2,097,152 | 3.8770 | — | 123,871 | complete |
9 unmodified lines1011121314159 unmodified lines- [abstracts-pilot-s00-third-r03](./abstracts-pilot-s00-third-r03/experiment.md) — This original FP32 adapter run is preserved as a numerical diagnostic. The same-probe full-checkpoint audit found substantial rounding error in both the penalty and its training gradient. Strength selection and confirmatory inference use separately named FP64 derivative runs. The run ledger records 1 interrupted attempt(s).- [stories-control-s00-initial-r00](./stories-control-s00-initial-r00/experiment.md) — The observed development NLL is 8.3437 nats per target token.- [stories-control-s00-unigram-r00](./stories-control-s00-unigram-r00/experiment.md) — The observed development NLL is 6.0036 nats per target token.9 unmodified lines10111213141516179 unmodified lines- [abstracts-pilot-s00-third-r03](./abstracts-pilot-s00-third-r03/experiment.md) — This original FP32 adapter run is preserved as a numerical diagnostic. The same-probe full-checkpoint audit found substantial rounding error in both the penalty and its training gradient. Strength selection and confirmatory inference use separately named FP64 derivative runs. The run ledger records 1 interrupted attempt(s).- [abstracts-pilot-s00-third-r03-fp64](./abstracts-pilot-s00-third-r03-fp64/experiment.md) — Development NLL changed by -0.1165 nats per target token from 4,096 to 65,536 training targets. Attribution to the regularizer uses matched comparisons across seeds.- [stories-control-s00-initial-r00](./stories-control-s00-initial-r00/experiment.md) — The observed development NLL is 8.3437 nats per target token.- [stories-control-s00-unigram-r00](./stories-control-s00-unigram-r00/experiment.md) — The observed development NLL is 6.0036 nats per target token.
123456783 unmodified lines12131415161718# Study progressUpdated 2026-11-25T07:56:00+00:00.12 training/control records and 0 final evaluations are complete. This is 10.0% of 120 planned model milestones.## Current record3 unmodified linesStatistical status: pending. Awaiting confirmatory runs.**abstracts** has 0 completed runs. Current records: abstracts-control-s00-initial-r00 (configured, 0 targets).Statistical status: pending. Awaiting confirmatory runs.123456783 unmodified lines12131415161718# Study progressUpdated 2026-11-25T08:31:27+00:00.13 training/control records and 0 final evaluations are complete. This is 10.8% of 120 planned model milestones.## Current record3 unmodified linesStatistical status: pending. Awaiting confirmatory runs.**abstracts** has 1 completed runs. Current records: abstracts-control-s00-initial-r00 (configured, 0 targets).Statistical status: pending. Awaiting confirmatory runs.
12345610 unmodified lines171819202122# Study summaryRecorded 14 runs, including 13 with a completed summary.**TinyStories.** Awaiting paired test results (0 of 8 full-horizon training triplets).10 unmodified lines| Stage | Phase | Method | Ratio | Tokens/run | Runs | Median dev NLL | Median test NLL || --- | --- | --- | --- | --- | --- | --- | --- || Research abstracts | diagnostic | Third derivative | 0.030 | 65,536 | 1 | 3.1168 | — || TinyStories | control | Initial checkpoint | 0.000 | 0 | 1 | 8.3437 | — || TinyStories | control | Unigram | 0.000 | 0 | 1 | 6.0036 | — || TinyStories | pilot | Ordinary AdamW | 0.000 | 2,097,152 | 1 | 3.8770 | — |12345610 unmodified lines17181920212223# Study summaryRecorded 15 runs, including 14 with a completed summary.**TinyStories.** Awaiting paired test results (0 of 8 full-horizon training triplets).10 unmodified lines| Stage | Phase | Method | Ratio | Tokens/run | Runs | Median dev NLL | Median test NLL || --- | --- | --- | --- | --- | --- | --- | --- || Research abstracts | diagnostic | Third derivative | 0.030 | 65,536 | 1 | 3.1168 | — || Research abstracts | pilot | Third derivative | 0.030 | 65,536 | 1 | 3.1149 | — || TinyStories | control | Initial checkpoint | 0.000 | 0 | 1 | 8.3437 | — || TinyStories | control | Unigram | 0.000 | 0 | 1 | 6.0036 | — || TinyStories | pilot | Ordinary AdamW | 0.000 | 2,097,152 | 1 | 3.8770 | — |
123456789101112131415161718{
"id": "abstracts-pilot-s00-third-r03-fp64",
"stage": "abstracts",
"method": "third",
"phase": "pilot",
"seed": 0,
"ratio": 0.03,
"token_budget": 65536,
"batch_windows": 8,
"context": 128,
"data_manifest_sha256": "0638bd23a7d1dc3ecb9138074ecd922211df2637f60736ddfab7e9aec0b3ccb9",
"microbatch": 2,
"derivative_dtype": "float64",
"derivative_device": "cpu",
"coefficients": {
"third": 1.8177534873097565e-16
}
}123456789101112{"timestamp": "2026-11-25T08:20:39+00:00", "split": "dev", "targets_scored": 466944, "targets_to_score": 5124071, "nll_so_far": 3.1088260477000293, "accuracy_so_far": 0.41273685923793857, "score_seconds": 60.07268810000096}
{"timestamp": "2026-11-25T08:21:39+00:00", "split": "dev", "targets_scored": 925696, "targets_to_score": 5124071, "nll_so_far": 3.1037195404750437, "accuracy_so_far": 0.41355261338495575, "score_seconds": 120.31516709999778}
{"timestamp": "2026-11-25T08:22:40+00:00", "split": "dev", "targets_scored": 1353728, "targets_to_score": 5124071, "nll_so_far": 3.1033672920460624, "accuracy_so_far": 0.41359194756996975, "score_seconds": 180.52763439999762}
{"timestamp": "2026-11-25T08:23:40+00:00", "split": "dev", "targets_scored": 1810432, "targets_to_score": 5124071, "nll_so_far": 3.107115674487629, "accuracy_so_far": 0.4134543578549208, "score_seconds": 240.65438119999817}
{"timestamp": "2026-11-25T08:24:40+00:00", "split": "dev", "targets_scored": 2199552, "targets_to_score": 5124071, "nll_so_far": 3.103493530255763, "accuracy_so_far": 0.4138829179760242, "score_seconds": 300.8205721999984}
{"timestamp": "2026-11-25T08:25:41+00:00", "split": "dev", "targets_scored": 2633728, "targets_to_score": 5124071, "nll_so_far": 3.103459329177223, "accuracy_so_far": 0.4140503499222395, "score_seconds": 362.3933545}
{"timestamp": "2026-11-25T08:26:42+00:00", "split": "dev", "targets_scored": 3082240, "targets_to_score": 5124071, "nll_so_far": 3.1019827696466913, "accuracy_so_far": 0.41433827346345514, "score_seconds": 422.642445999998}
{"timestamp": "2026-11-25T08:27:42+00:00", "split": "dev", "targets_scored": 3534848, "targets_to_score": 5124071, "nll_so_far": 3.105719434134236, "accuracy_so_far": 0.4139979993482039, "score_seconds": 482.86223529999916}
{"timestamp": "2026-11-25T08:28:42+00:00", "split": "dev", "targets_scored": 3966976, "targets_to_score": 5124071, "nll_so_far": 3.1073454599289025, "accuracy_so_far": 0.413889572308983, "score_seconds": 543.0346836000026}
{"timestamp": "2026-11-25T08:29:42+00:00", "split": "dev", "targets_scored": 4415488, "targets_to_score": 5124071, "nll_so_far": 3.109312734825594, "accuracy_so_far": 0.4136915330762987, "score_seconds": 603.1816443999996}
{"timestamp": "2026-11-25T08:30:42+00:00", "split": "dev", "targets_scored": 4866048, "targets_to_score": 5124071, "nll_so_far": 3.111963312678009, "accuracy_so_far": 0.41345543652672556, "score_seconds": 663.3964372999981}
{"timestamp": "2026-11-25T08:31:17+00:00", "split": "dev", "targets_scored": 5124071, "targets_to_score": 5124071, "nll_so_far": 3.1148602603458824, "accuracy_so_far": 0.4130924415372074, "score_seconds": 697.9214215000029}12345678910111213141516171819202122{"timestamp": "2026-11-25T08:13:31+00:00", "step": 1, "tokens": 1024, "train_seconds": 0.962927699998545, "loss": 3.3628768920898438, "accuracy": 0.38671875, "lr": 3.3333333333333335e-05, "gradient_norm": 1.1452151536941528, "derivatives": {}, "host_probe_seconds": 0, "training_seconds_excluding_host_probes": 0.962927699998545}
{"timestamp": "2026-11-25T08:14:29+00:00", "step": 2, "tokens": 2048, "train_seconds": 59.588642899998376, "loss": 3.4265871047973633, "accuracy": 0.3720703125, "lr": 6.666666666666667e-05, "gradient_norm": 2.477825164794922, "derivatives": {"third": {"estimate": 687644208669.4894, "raw_grad_norm": 1361448063580871.2, "lambda": 1.8177534873097565e-16, "probe_seconds": 57.878220300000976}}, "host_probe_seconds": 57.878220300000976, "training_seconds_excluding_host_probes": 1.7104225999974005, "penalty": 0.0009999741266698578}
{"timestamp": "2026-11-25T08:14:36+00:00", "step": 4, "tokens": 4096, "train_seconds": 64.748265299997, "loss": 3.3355765342712402, "accuracy": 0.3671875, "lr": 9.994033404481737e-05, "gradient_norm": 1.1430377960205078, "derivatives": {}, "host_probe_seconds": 0, "training_seconds_excluding_host_probes": 6.870044999996026, "dev_nll": 3.205850869708229, "dev_accuracy": 0.4027099609375}
{"timestamp": "2026-11-25T08:14:40+00:00", "step": 8, "tokens": 8192, "train_seconds": 67.7308524, "loss": 3.1542978286743164, "accuracy": 0.41015625, "lr": 9.851624761560943e-05, "gradient_norm": 1.3654953241348267, "derivatives": {}, "host_probe_seconds": 0, "training_seconds_excluding_host_probes": 9.852632099999028, "dev_nll": 3.185838397825137, "dev_accuracy": 0.406494140625}
{"timestamp": "2026-11-25T08:15:38+00:00", "step": 11, "tokens": 11264, "train_seconds": 125.70181410000441, "loss": 3.222909927368164, "accuracy": 0.412109375, "lr": 9.623426070191522e-05, "gradient_norm": 4.982945442199707, "derivatives": {"third": {"estimate": 305501104666.5071, "raw_grad_norm": 3591553778733335.5, "lambda": 1.8177534873097565e-16, "probe_seconds": 55.88409010000032}}, "host_probe_seconds": 55.88409010000032, "training_seconds_excluding_host_probes": 11.939503700003115, "penalty": 0.00044426055870762094}
{"timestamp": "2026-11-25T08:15:44+00:00", "step": 12, "tokens": 12288, "train_seconds": 130.09385470000416, "loss": 3.226421594619751, "accuracy": 0.4208984375, "lr": 9.525191870029581e-05, "gradient_norm": 1.1676359176635742, "derivatives": {}, "host_probe_seconds": 0, "training_seconds_excluding_host_probes": 16.33154430000286, "dev_nll": 3.1688174732844345, "dev_accuracy": 0.40673828125}
{"timestamp": "2026-11-25T08:15:48+00:00", "step": 16, "tokens": 16384, "train_seconds": 132.96146440000302, "loss": 3.176070213317871, "accuracy": 0.404296875, "lr": 9.028539129595197e-05, "gradient_norm": 1.3013406991958618, "derivatives": {}, "host_probe_seconds": 0, "training_seconds_excluding_host_probes": 19.199154000001727, "dev_nll": 3.155030827212613, "dev_accuracy": 0.40869140625}
{"timestamp": "2026-11-25T08:15:52+00:00", "step": 20, "tokens": 20480, "train_seconds": 135.62548290000996, "loss": 3.365168571472168, "accuracy": 0.3818359375, "lr": 8.38266930414179e-05, "gradient_norm": 1.2591444253921509, "derivatives": {}, "host_probe_seconds": 0, "training_seconds_excluding_host_probes": 21.86317250000866, "dev_nll": 3.14251070341561, "dev_accuracy": 0.40771484375}
{"timestamp": "2026-11-25T08:16:52+00:00", "step": 22, "tokens": 22528, "train_seconds": 195.6454539000115, "loss": 3.1007277965545654, "accuracy": 0.4013671875, "lr": 8.01209674912089e-05, "gradient_norm": 1.1925373077392578, "derivatives": {"third": {"estimate": 171513315730.0954, "raw_grad_norm": 105524567385533.45, "lambda": 1.8177534873097565e-16, "probe_seconds": 58.4897392999992}}, "host_probe_seconds": 58.4897392999992, "training_seconds_excluding_host_probes": 23.39340420001099, "penalty": 0.0002494151422307522}
{"timestamp": "2026-11-25T08:16:58+00:00", "step": 24, "tokens": 24576, "train_seconds": 200.80499380000765, "loss": 3.1658759117126465, "accuracy": 0.4140625, "lr": 7.614895343622941e-05, "gradient_norm": 1.4459034204483032, "derivatives": {}, "host_probe_seconds": 0, "training_seconds_excluding_host_probes": 28.552944100007153, "dev_nll": 3.131769879197236, "dev_accuracy": 0.4073486328125}
{"timestamp": "2026-11-25T08:17:55+00:00", "step": 25, "tokens": 25600, "train_seconds": 257.6465824000079, "loss": 3.161825180053711, "accuracy": 0.400390625, "lr": 7.407614758194375e-05, "gradient_norm": 1.5947465896606445, "derivatives": {"third": {"estimate": 918015450216.7732, "raw_grad_norm": 821309261872224.1, "lambda": 1.8177534873097565e-16, "probe_seconds": 56.20942120000109}}, "host_probe_seconds": 56.20942120000109, "training_seconds_excluding_host_probes": 29.185111500006315, "penalty": 0.0013349806288286204}
{"timestamp": "2026-11-25T08:18:02+00:00", "step": 28, "tokens": 28672, "train_seconds": 263.6649002000049, "loss": 3.242283582687378, "accuracy": 0.3974609375, "lr": 6.757685356832243e-05, "gradient_norm": 1.1834553480148315, "derivatives": {}, "host_probe_seconds": 0, "training_seconds_excluding_host_probes": 35.203429300003336, "dev_nll": 3.1222981341998093, "dev_accuracy": 0.407958984375}
{"timestamp": "2026-11-25T08:18:06+00:00", "step": 32, "tokens": 32768, "train_seconds": 266.4159822000038, "loss": 3.47184419631958, "accuracy": 0.3759765625, "lr": 5.84728957956991e-05, "gradient_norm": 1.3780546188354492, "derivatives": {}, "host_probe_seconds": 0, "training_seconds_excluding_host_probes": 37.954511300002196, "dev_nll": 3.1137536005699076, "dev_accuracy": 0.4097900390625}
{"timestamp": "2026-11-25T08:18:10+00:00", "step": 36, "tokens": 36864, "train_seconds": 269.1472620000095, "loss": 3.13436222076416, "accuracy": 0.3994140625, "lr": 4.9222074018405206e-05, "gradient_norm": 1.27980637550354, "derivatives": {}, "host_probe_seconds": 0, "training_seconds_excluding_host_probes": 40.68579110000792, "dev_nll": 3.1068799886270426, "dev_accuracy": 0.41162109375}
{"timestamp": "2026-11-25T08:18:14+00:00", "step": 40, "tokens": 40960, "train_seconds": 271.90369160000773, "loss": 3.0670571327209473, "accuracy": 0.4267578125, "lr": 4.021559281401244e-05, "gradient_norm": 1.2274017333984375, "derivatives": {}, "host_probe_seconds": 0, "training_seconds_excluding_host_probes": 43.442220700006146, "dev_nll": 3.101782739860937, "dev_accuracy": 0.4114990234375}
{"timestamp": "2026-11-25T08:18:18+00:00", "step": 44, "tokens": 45056, "train_seconds": 274.78990590000467, "loss": 3.3899011611938477, "accuracy": 0.3681640625, "lr": 3.183432393205763e-05, "gradient_norm": 1.2034586668014526, "derivatives": {}, "host_probe_seconds": 0, "training_seconds_excluding_host_probes": 46.32843500000308, "dev_nll": 3.098028525535483, "dev_accuracy": 0.4119873046875}
{"timestamp": "2026-11-25T08:18:22+00:00", "step": 48, "tokens": 49152, "train_seconds": 277.2874240000019, "loss": 3.2332143783569336, "accuracy": 0.376953125, "lr": 2.443269974962181e-05, "gradient_norm": 1.29664945602417, "derivatives": {}, "host_probe_seconds": 0, "training_seconds_excluding_host_probes": 48.82595310000033, "dev_nll": 3.095082105253823, "dev_accuracy": 0.411865234375}
{"timestamp": "2026-11-25T08:19:21+00:00", "step": 50, "tokens": 51200, "train_seconds": 336.416138200002, "loss": 3.0864548683166504, "accuracy": 0.4052734375, "lr": 2.1199063110826618e-05, "gradient_norm": 2.964020013809204, "derivatives": {"third": {"estimate": 757294136851.5509, "raw_grad_norm": 1853270582350327.2, "lambda": 1.8177534873097565e-16, "probe_seconds": 57.830706500000815}}, "host_probe_seconds": 57.830706500000815, "training_seconds_excluding_host_probes": 50.12396079999962, "penalty": 0.0011012592465449108}
{"timestamp": "2026-11-25T08:19:28+00:00", "step": 52, "tokens": 53248, "train_seconds": 341.5731149000021, "loss": 3.066990852355957, "accuracy": 0.41015625, "lr": 1.8323724811743496e-05, "gradient_norm": 1.1498953104019165, "derivatives": {}, "host_probe_seconds": 0, "training_seconds_excluding_host_probes": 55.28093749999971, "dev_nll": 3.093058333382942, "dev_accuracy": 0.4130859375}
{"timestamp": "2026-11-25T08:19:31+00:00", "step": 56, "tokens": 57344, "train_seconds": 344.05631189999986, "loss": 3.2474496364593506, "accuracy": 0.4033203125, "lr": 1.3765739298084793e-05, "gradient_norm": 1.1399725675582886, "derivatives": {}, "host_probe_seconds": 0, "training_seconds_excluding_host_probes": 57.76413449999745, "dev_nll": 3.091498479945585, "dev_accuracy": 0.4139404296875}
{"timestamp": "2026-11-25T08:19:35+00:00", "step": 60, "tokens": 61440, "train_seconds": 346.7057458999989, "loss": 3.1669363975524902, "accuracy": 0.40625, "lr": 1.09514941707089e-05, "gradient_norm": 1.1765968799591064, "derivatives": {}, "host_probe_seconds": 0, "training_seconds_excluding_host_probes": 60.41356849999647, "dev_nll": 3.0903065995080397, "dev_accuracy": 0.414306640625}
{"timestamp": "2026-11-25T08:19:39+00:00", "step": 64, "tokens": 65536, "train_seconds": 349.2530617000011, "loss": 3.1704280376434326, "accuracy": 0.40234375, "lr": 1e-05, "gradient_norm": 1.135949730873108, "derivatives": {}, "host_probe_seconds": 0, "training_seconds_excluding_host_probes": 62.960884299998725, "dev_nll": 3.089313570468221, "dev_accuracy": 0.4146728515625}123{"timestamp": "2026-11-25T08:31:20+00:00", "split": "dev", "prompt": "One of the central objectives of contemporary neuroimaging research is to\ncreate predictive models", "reference": " that can disentangle the connection between patterns\nof functional connectivity across the entire brain and various behavioral\ntraits. Previous studies have shown that models trained to predict behavioral\nfeatures from the individual's functional", "continuation": " that will accurately predict the behavior of\npatient-specific neurological disorders such as epilepsy. In this paper, we\npresent a novel dataset of EEG data recorded from children with focal\nsubcortical epilepsy", "prompt_ids": [4041, 273, 253, 4275, 16566, 273, 13399, 6551, 40270, 2561, 310, 281, 187, 6953, 15970, 3210], "generated_ids": [326, 588, 13613, 3283, 253, 3879, 273, 187, 15325, 14, 6160, 20967, 9360, 824, 347, 29931, 15, 496, 436, 2929, 13, 359, 187, 15068, 247, 4460, 10895, 273, 29253, 941, 5950, 432, 2151, 342, 18560, 187, 2377, 68, 35149, 29931], "tokens": 40, "sampling_seed": 7401, "temperature": 0.8}
{"timestamp": "2026-11-25T08:31:22+00:00", "split": "dev", "prompt": "In the evolving landscape of computer vision, foundation models have emerged\nas pivotal tools", "reference": ", exhibiting exceptional adaptability to a myriad of tasks.\nAmong these, the Segment Anything Model (SAM) by Meta AI has distinguished\nitself in image segmentation. However, SAM, like", "continuation": " to study the behavior of computer vision systems.\nThese widely adopted modeling approaches tend to be associated with\na small number of identified object classes. On the one hand, they\nare often effective to", "prompt_ids": [688, 253, 25537, 13016, 273, 4382, 8113, 13, 12153, 3210, 452, 13082, 187, 284, 30847, 5657], "generated_ids": [281, 1263, 253, 3879, 273, 4382, 8113, 2718, 15, 187, 6872, 7561, 8671, 14053, 7274, 5257, 281, 320, 2330, 342, 187, 66, 1355, 1180, 273, 3636, 1789, 5971, 15, 1623, 253, 581, 1133, 13, 597, 187, 609, 2223, 3576, 281], "tokens": 40, "sampling_seed": 7402, "temperature": 0.8}
{"timestamp": "2026-11-25T08:31:25+00:00", "split": "dev", "prompt": "We investigate the connection between the turnover frequency in the radio\nspectrum, $\\nu", "reference": "_{\\rm TO}$, and the rate of ionising ultra-violet photons,\n$Q_{\\rm HI}$, in extragalactic sources. From a large, optically selected,\nsample we", "continuation": "_{\\rm{break}}$, and the spectral index of the underlying\nspectral index $s_{\\rm{break}}$, and reveal that there is a universal\nrelationship between both quantities that can be used to", "prompt_ids": [1231, 7409, 253, 4602, 875, 253, 25759, 4294, 275, 253, 5553, 187, 39862, 13, 669, 3023], "generated_ids": [1126, 1109, 92, 7054, 12460, 285, 253, 9879, 3605, 273, 253, 6944, 187, 18181, 1544, 3605, 370, 84, 1126, 1109, 92, 7054, 12460, 285, 10313, 326, 627, 310, 247, 10898, 187, 46397, 875, 1097, 13483, 326, 476, 320, 908, 281], "tokens": 40, "sampling_seed": 7403, "temperature": 0.8}12345678910111213141516171819202122232425262728293031323334353637383940414243{
"id": "abstracts-pilot-s00-third-r03-fp64",
"stage": "abstracts",
"method": "third",
"phase": "pilot",
"seed": 0,
"ratio": 0.03,
"token_budget": 65536,
"batch_windows": 8,
"context": 128,
"data_manifest_sha256": "0638bd23a7d1dc3ecb9138074ecd922211df2637f60736ddfab7e9aec0b3ccb9",
"microbatch": 2,
"derivative_dtype": "float64",
"derivative_device": "cpu",
"coefficients": {
"third": 1.8177534873097565e-16
},
"device": "cuda",
"torch": "2.15.0+cu132",
"platform": "Windows-11-10.0.26200-SP0",
"gpu": "NVIDIA GeForce RTX 5070 Laptop GPU",
"initial_trainable_sha256": "1c45ca4d5b3a6cd1b53eadaa7df8af15e21a040a8a61aa7f0e91d1b6f019320b",
"cpu_threads": 6,
"evaluation_batch_windows": 16,
"git_revision": "a1ba0fc2e322c16968bbce4e3dc5b9ac67037374",
"trainable_parameters": 786432,
"host_probe_seconds": 286.2921774000024,
"training_seconds_excluding_host_probes": 62.960884299998725,
"weights_sha256": "ba783a138db5dcb60db9075e12ef04ab5251e8591e5f580fd48b4418f8e2e1e0",
"weights_name": "adapter_model.safetensors",
"matched_dev_nll": 3.089313570468221,
"tokens": 65536,
"steps": 64,
"train_seconds": 349.2530617000011,
"tokens_per_sec": 187.64617175008087,
"process_peak_rss_mib": 15321.11328125,
"peak_vram_mb": 2346.30029296875,
"dev_nll": 3.1148602603458824,
"dev_accuracy": 0.4130924415372074,
"dev_tokens": 5124071,
"finished_at": "2026-11-25T08:31:25+00:00",
"status": "complete"
}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155{
"stage": "abstracts",
"kind": "third",
"data_manifest_sha256": "0638bd23a7d1dc3ecb9138074ecd922211df2637f60736ddfab7e9aec0b3ccb9",
"unit_lambda": 6.059178291032522e-15,
"draws": [
{
"draw": 0,
"ce_grad_norm": 1.1272474527359009,
"penalty_grad_norm": 910729436494438.9,
"value": 834685395129.9045,
"norm_ratio": 1.2377413176353218e-15,
"probe_seconds": 60.33973419999893,
"peak_allocated_mib": 1552.23583984375
},
{
"draw": 1,
"ce_grad_norm": 1.1757105588912964,
"penalty_grad_norm": 186194126220231.7,
"value": 159812556631.67688,
"norm_ratio": 6.3144342024015186e-15,
"probe_seconds": 55.740933799999766,
"peak_allocated_mib": 1552.23583984375
},
{
"draw": 2,
"ce_grad_norm": 1.2021815776824951,
"penalty_grad_norm": 108966576920843.86,
"value": 153088393491.90155,
"norm_ratio": 1.1032571744965348e-14,
"probe_seconds": 55.759018200002174,
"peak_allocated_mib": 1552.23583984375
},
{
"draw": 3,
"ce_grad_norm": 1.0702996253967285,
"penalty_grad_norm": 3.9919238583350056e+16,
"value": 6953712848913.515,
"norm_ratio": 2.6811624253853893e-17,
"probe_seconds": 54.50471869999819,
"peak_allocated_mib": 1552.23583984375
},
{
"draw": 4,
"ce_grad_norm": 1.181842565536499,
"penalty_grad_norm": 105071420078010.61,
"value": 219610434477.3632,
"norm_ratio": 1.1247992695435507e-14,
"probe_seconds": 54.978216199997405,
"peak_allocated_mib": 1552.23583984375
},
{
"draw": 5,
"ce_grad_norm": 1.2219445705413818,
"penalty_grad_norm": 250434198480525.06,
"value": 282150956586.81854,
"norm_ratio": 4.87930393674411e-15,
"probe_seconds": 56.60531099999935,
"peak_allocated_mib": 1552.23583984375
},
{
"draw": 6,
"ce_grad_norm": 1.1192132234573364,
"penalty_grad_norm": 632518813384390.5,
"value": 197389403517.5067,
"norm_ratio": 1.7694544411553732e-15,
"probe_seconds": 56.84666650000145,
"peak_allocated_mib": 1552.23583984375
},
{
"draw": 7,
"ce_grad_norm": 1.0118643045425415,
"penalty_grad_norm": 174341460541931.47,
"value": 153537460935.50665,
"norm_ratio": 5.803922379663525e-15,
"probe_seconds": 53.74921510000058,
"peak_allocated_mib": 1552.23583984375
},
{
"draw": 8,
"ce_grad_norm": 1.225813627243042,
"penalty_grad_norm": 83586087695599.7,
"value": 129242221450.65302,
"norm_ratio": 1.4665282956024434e-14,
"probe_seconds": 56.13168239999868,
"peak_allocated_mib": 1552.23583984375
},
{
"draw": 9,
"ce_grad_norm": 1.167998194694519,
"penalty_grad_norm": 114416639410859.17,
"value": 175741652819.1452,
"norm_ratio": 1.020828963958948e-14,
"probe_seconds": 57.82997389999946,
"peak_allocated_mib": 1552.23583984375
},
{
"draw": 10,
"ce_grad_norm": 1.1549506187438965,
"penalty_grad_norm": 441687750783840.4,
"value": 612261541935.509,
"norm_ratio": 2.6148577059116208e-15,
"probe_seconds": 57.42297689999759,
"peak_allocated_mib": 1552.23583984375
},
{
"draw": 11,
"ce_grad_norm": 1.0679398775100708,
"penalty_grad_norm": 94314795672815.34,
"value": 158101082366.27707,
"norm_ratio": 1.1323142566250467e-14,
"probe_seconds": 58.35683330000029,
"peak_allocated_mib": 1552.23583984375
},
{
"draw": 12,
"ce_grad_norm": 1.2423405647277832,
"penalty_grad_norm": 287315887794136.56,
"value": 94744715880.54042,
"norm_ratio": 4.323953590822402e-15,
"probe_seconds": 59.645345000000816,
"peak_allocated_mib": 1552.23583984375
},
{
"draw": 13,
"ce_grad_norm": 1.177032709121704,
"penalty_grad_norm": 385676112557798.44,
"value": 482594580708.791,
"norm_ratio": 3.0518683185111985e-15,
"probe_seconds": 58.16326520000075,
"peak_allocated_mib": 1552.23583984375
},
{
"draw": 14,
"ce_grad_norm": 1.1937261819839478,
"penalty_grad_norm": 102328970961512.16,
"value": 120579032529.80841,
"norm_ratio": 1.1665573989138721e-14,
"probe_seconds": 59.03697579999789,
"peak_allocated_mib": 1552.23583984375
},
{
"draw": 15,
"ce_grad_norm": 1.1019200086593628,
"penalty_grad_norm": 116499166026949.25,
"value": 111835215128.08981,
"norm_ratio": 9.45860855694418e-15,
"probe_seconds": 57.153079499999876,
"peak_allocated_mib": 1552.23583984375
}
],
"derivative_device": "cpu",
"derivative_dtype": "float64",
"initial_trainable_sha256": "1c45ca4d5b3a6cd1b53eadaa7df8af15e21a040a8a61aa7f0e91d1b6f019320b"
}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849{
"timestamp": "2026-11-25T07:57:00+00:00",
"split": "train",
"device": "cuda",
"initial_trainable_sha256": "1c45ca4d5b3a6cd1b53eadaa7df8af15e21a040a8a61aa7f0e91d1b6f019320b",
"records": [
{
"batch": 2,
"seconds": 7.977122499996767,
"targets_per_second": 4107.7468723857855,
"peak_allocated_mib": 1649.23291015625,
"nll": 3.2559770708321594,
"accuracy": 0.402374267578125,
"tokens": 32768,
"perplexity": 25.944952209677197
},
{
"batch": 8,
"seconds": 4.270318099999713,
"targets_per_second": 7673.433040035637,
"peak_allocated_mib": 1942.24755859375,
"nll": 3.255976888554869,
"accuracy": 0.40234375,
"tokens": 32768,
"perplexity": 25.944947480502044
},
{
"batch": 16,
"seconds": 4.224423999999999,
"targets_per_second": 7756.797139681056,
"peak_allocated_mib": 2337.26708984375,
"nll": 3.255976888554869,
"accuracy": 0.40234375,
"tokens": 32768,
"perplexity": 25.944947480502044
},
{
"batch": 32,
"seconds": 4.2637074000012944,
"targets_per_second": 7685.330377030575,
"peak_allocated_mib": 3121.30615234375,
"nll": 3.255976888554869,
"accuracy": 0.40234375,
"tokens": 32768,
"perplexity": 25.944947480502044
}
],
"selected_batch": 16
}1234567891011121314151666 unmodified lines8384858687888990913 unmodified lines95969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751762 unmodified lines179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210{"checked_at": "2026-11-25T07:54:35+00:00","git_revision": "7412d483aa852eef3bba78ecf33912c8be8a3eb0","exit_code": 0,"cases": [{"test": "tests.test_analysis.test_wins_require_both_registered_exact_sign_tests","seconds": 0.002,"outcome": "passed"},{"test": "tests.test_analysis.test_second_comparator_failure_and_ties_count_separately","seconds": 0.002,"outcome": "passed"},{66 unmodified lines"seconds": 0.001,"outcome": "passed"},{"test": "tests.test_analysis.test_time_matched_comparison_uses_one_validation_population_across_methods","seconds": 0.002,"outcome": "passed"},{3 unmodified lines},{"test": "tests.test_data.test_prefix_candidates_match_exhaustive_jaccard_including_boundary","seconds": 0.058,"outcome": "passed"},{"test": "tests.test_data.test_abstract_submission_month_and_base_id_grouping","seconds": 0.053,"outcome": "passed"},{"test": "tests.test_data.test_prepare_from_parquet_proves_train_only_fit_packing_and_repair","seconds": 0.451,"outcome": "passed"},{"test": "tests.test_derivatives.test_gpu_production_decoder_third_order_update_matches_cpu","seconds": 2.731,"outcome": "passed"},{"test": "tests.test_derivatives.test_quartic_penalty_retains_fourth_derivative","seconds": 0.006,"outcome": "passed"},{"test": "tests.test_derivatives.test_mixed_cubic_exactly_averages_to_tensor_norm","seconds": 0.044,"outcome": "passed"},{"test": "tests.test_derivatives.test_random_probe_generator_gives_independent_directions","seconds": 0.172,"outcome": "passed"},{"test": "tests.test_derivatives.test_penalty_supports_linear_loss_and_unused_coordinates[third]","seconds": 0.003,"outcome": "passed"},{"test": "tests.test_derivatives.test_penalty_supports_linear_loss_and_unused_coordinates[trace]","seconds": 0.002,"outcome": "passed"},{"test": "tests.test_derivatives.test_penalty_supports_linear_loss_and_unused_coordinates[hessian_norm]","seconds": 0.002,"outcome": "passed"},{"test": "tests.test_derivatives.test_quadratic_has_curvature_and_zero_third_derivative","seconds": 0.001,"outcome": "passed"},{"test": "tests.test_derivatives.test_signed_hessian_trace_and_squared_norm_have_correct_gradients","seconds": 0.005,"outcome": "passed"},{"test": "tests.test_derivatives.test_tiny_transformer_against_dense_tensor_and_finite_differences","seconds": 2.44,"outcome": "passed"},{"test": "tests.test_derivatives.test_actual_adamw_update_responds_to_the_third_order_term","seconds": 0.019,"outcome": "passed"},{"test": "tests.test_derivatives.test_production_story_model_exposes_full_weight_penalty_gradient","seconds": 0.046,"outcome": "passed"},{"test": "tests.test_derivatives.test_pythia_adapter_fourth_derivative_and_portable_checkpoint","seconds": 4.959,"outcome": "passed","measurements": {"adapter_directional_autograd": "9035.374247002468",2 unmodified lines},{"test": "tests.test_derivatives.test_large_finite_gradient_norm_survives_squaring","seconds": 0.003,"outcome": "passed"},{"test": "tests.test_derivatives.test_sequential_windows_reproduce_joint_penalty_and_training_gradient","seconds": 0.109,"outcome": "passed"},{"test": "tests.test_reporting.test_snapshot_keeps_full_score_and_trace_semantics","seconds": 0.014,"outcome": "passed"},{"test": "tests.test_reporting.test_report_before_first_run_keeps_readme_and_emits_protocol_paper","seconds": 0.586,"outcome": "passed"},{"test": "tests.test_training.test_randomized_control_preserves_coordinate_magnitudes_and_zero_is_noop","seconds": 0.134,"outcome": "passed"},{"test": "tests.test_training.test_step_recovery_matches_uninterrupted_weights","seconds": 2.016,"outcome": "passed"}]1234567891011121314151666 unmodified lines83848586878889909192939495963 unmodified lines1001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801812 unmodified lines184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225{"checked_at": "2026-11-25T08:30:11+00:00","git_revision": "021264128e1fc7eb7dd7b03db922ca576dc144af","exit_code": 0,"cases": [{"test": "tests.test_analysis.test_wins_require_both_registered_exact_sign_tests","seconds": 0.001,"outcome": "passed"},{"test": "tests.test_analysis.test_second_comparator_failure_and_ties_count_separately","seconds": 0.001,"outcome": "passed"},{66 unmodified lines"seconds": 0.001,"outcome": "passed"},{"test": "tests.test_analysis.test_adapter_time_comparisons_keep_allocated_device_and_host_excluded_clocks_distinct","seconds": 0.001,"outcome": "passed"},{"test": "tests.test_analysis.test_time_matched_comparison_uses_one_validation_population_across_methods","seconds": 0.001,"outcome": "passed"},{3 unmodified lines},{"test": "tests.test_data.test_prefix_candidates_match_exhaustive_jaccard_including_boundary","seconds": 0.054,"outcome": "passed"},{"test": "tests.test_data.test_abstract_submission_month_and_base_id_grouping","seconds": 0.034,"outcome": "passed"},{"test": "tests.test_data.test_prepare_from_parquet_proves_train_only_fit_packing_and_repair","seconds": 0.093,"outcome": "passed"},{"test": "tests.test_derivatives.test_gpu_production_decoder_third_order_update_matches_cpu","seconds": 2.451,"outcome": "passed"},{"test": "tests.test_derivatives.test_quartic_penalty_retains_fourth_derivative","seconds": 0.004,"outcome": "passed"},{"test": "tests.test_derivatives.test_mixed_cubic_exactly_averages_to_tensor_norm","seconds": 0.042,"outcome": "passed"},{"test": "tests.test_derivatives.test_random_probe_generator_gives_independent_directions","seconds": 0.183,"outcome": "passed"},{"test": "tests.test_derivatives.test_penalty_supports_linear_loss_and_unused_coordinates[third]","seconds": 0.002,"outcome": "passed"},{"test": "tests.test_derivatives.test_penalty_supports_linear_loss_and_unused_coordinates[trace]","seconds": 0.003,"outcome": "passed"},{"test": "tests.test_derivatives.test_penalty_supports_linear_loss_and_unused_coordinates[hessian_norm]","seconds": 0.003,"outcome": "passed"},{"test": "tests.test_derivatives.test_quadratic_has_curvature_and_zero_third_derivative","seconds": 0.002,"outcome": "passed"},{"test": "tests.test_derivatives.test_signed_hessian_trace_and_squared_norm_have_correct_gradients","seconds": 0.004,"outcome": "passed"},{"test": "tests.test_derivatives.test_tiny_transformer_against_dense_tensor_and_finite_differences","seconds": 1.62,"outcome": "passed"},{"test": "tests.test_derivatives.test_actual_adamw_update_responds_to_the_third_order_term","seconds": 0.007,"outcome": "passed"},{"test": "tests.test_derivatives.test_production_story_model_exposes_full_weight_penalty_gradient","seconds": 0.045,"outcome": "passed"},{"test": "tests.test_derivatives.test_pythia_adapter_fourth_derivative_and_portable_checkpoint","seconds": 4.554,"outcome": "passed","measurements": {"adapter_directional_autograd": "9035.374247002468",2 unmodified lines},{"test": "tests.test_derivatives.test_large_finite_gradient_norm_survives_squaring","seconds": 0.002,"outcome": "passed"},{"test": "tests.test_derivatives.test_sequential_windows_reproduce_joint_penalty_and_training_gradient","seconds": 0.189,"outcome": "passed"},{"test": "tests.test_reporting.test_snapshot_keeps_full_score_and_trace_semantics","seconds": 0.015,"outcome": "passed"},{"test": "tests.test_reporting.test_report_before_first_run_keeps_readme_and_emits_protocol_paper","seconds": 0.485,"outcome": "passed"},{"test": "tests.test_training.test_randomized_control_preserves_coordinate_magnitudes_and_zero_is_noop","seconds": 0.099,"outcome": "passed"},{"test": "tests.test_training.test_step_recovery_matches_uninterrupted_weights","seconds": 2.134,"outcome": "passed"},{"test": "tests.test_training.test_adapter_confirmation_observes_early_matched_time_checkpoints","seconds": 0.001,"outcome": "passed"},{"test": "tests.test_training.test_evaluator_requires_measured_schedule_before_test_reads","seconds": 0.029,"outcome": "passed"}]
56 unmodified lines5758596061626364656667681 unmodified line70717273747576777879808182838485868788899091929320 unmodified lines11411511611711811912023 unmodified lines14414514614714814956 unmodified lines}def _time_match(seed, records):"""Look backward from the shortest complete training run to actual validation evaluations."""runs = {method: records[seed, method] for method in _METHODS}if any(not _number(run.get("train_seconds")) or run["train_seconds"] <= 0 for run in runs.values()):return Nonecutoff = min(run["train_seconds"] for run in runs.values())# Production logs evaluate fixed windows at each diagnostic, including the final step.# Older homogeneous result files have a single dev_nll field for the same population.fixed_windows = any("matched_dev_nll" in run for run in runs.values())1 unmodified linematched = {}for method, run in runs.items():events = list(run.get("events") or [])final = run.get("status") not in {"configured", "in progress", "training", "failed"}if final and _number(run.get(summary_field)):events.append({"tokens": run["tokens"], "train_seconds": run["train_seconds"],"dev_nll": run[summary_field],})eligible = [event for event in eventsif _number(event.get("train_seconds")) and 0 <= event["train_seconds"] <= cutoffand _number(event.get("dev_nll")) and event["dev_nll"] >= 0and _number(event.get("tokens")) and event["tokens"] >= 0]if not eligible:return None# max() takes the first equal timestamp, giving a real event priority over its summary.event = max(eligible, key=lambda x: x["train_seconds"])matched[method] = {key: event[key] for key in ("tokens", "train_seconds", "dev_nll")}matched[method]["staleness_seconds"] = cutoff - event["train_seconds"]return {"seed": seed, "cutoff_seconds": cutoff, "by_method": matched}20 unmodified linesresult = {"stage": stage, "status": "pending", "complete": False, "success": None,"n_expected_seeds": len(_SEEDS), "n_complete_seeds": 0, "missing": [],"comparisons": {}, "matched_time": [], "reason": "Awaiting confirmatory runs.",}records = {}for row in summaries:23 unmodified linestiming = _time_match(seed, records)if timing is not None:result["matched_time"].append(timing)if result["missing"]:result.update(status="incomplete", reason=f"All checkpoints must reach {horizon:,} target tokens.")return result56 unmodified lines5758596061626364656667681 unmodified line7071727374757677787980818283848586878889909192939420 unmodified lines11511611711811912012123 unmodified lines14514614714814915015115215315456 unmodified lines}def _time_match(seed, records, clock="train_seconds"):"""Look backward from the shortest complete training run to actual validation evaluations."""runs = {method: records[seed, method] for method in _METHODS}if any(not _number(run.get(clock)) or run[clock] <= 0 for run in runs.values()):return Nonecutoff = min(run[clock] for run in runs.values())# Production logs evaluate fixed windows at each diagnostic, including the final step.# Older homogeneous result files have a single dev_nll field for the same population.fixed_windows = any("matched_dev_nll" in run for run in runs.values())1 unmodified linematched = {}for method, run in runs.items():events = list(run.get("events") or [])final = run.get("status") not in {"configured", "in progress", "training", "failed", "initializing", "scoring development"}if final and _number(run.get(summary_field)):events.append({"tokens": run["tokens"], "train_seconds": run["train_seconds"], clock:run[clock],"dev_nll": run[summary_field],})eligible = [event for event in eventsif _number(event.get(clock)) and 0 <= event[clock] <= cutoffand _number(event.get("dev_nll")) and event["dev_nll"] >= 0and _number(event.get("tokens")) and event["tokens"] >= 0]if not eligible:return None# max() takes the first equal timestamp, giving a real event priority over its summary.event = max(eligible, key=lambda x: x[clock])matched[method] = {key: event[key] for key in ("tokens", "train_seconds", "dev_nll")}matched[method]["clock_seconds"] = event[clock]matched[method]["staleness_seconds"] = cutoff - event[clock]return {"seed": seed, "cutoff_seconds": cutoff, "by_method": matched}20 unmodified linesresult = {"stage": stage, "status": "pending", "complete": False, "success": None,"n_expected_seeds": len(_SEEDS), "n_complete_seeds": 0, "missing": [],"comparisons": {}, "matched_time": [], "matched_nonhost_time": [], "reason": "Awaiting confirmatory runs.",}records = {}for row in summaries:23 unmodified linestiming = _time_match(seed, records)if timing is not None:result["matched_time"].append(timing)if stage=="abstracts":gpu_interval = _time_match(seed,records,"training_seconds_excluding_host_probes")if gpu_interval is not None:result["matched_nonhost_time"].append(gpu_interval)if result["missing"]:result.update(status="incomplete", reason=f"All checkpoints must reach {horizon:,} target tokens.")return result
10 unmodified lines11121314151617181920212210 unmodified linesdef dashboard(project, port):"""Serve the same Pages application locally with a live view of atomically recorded events."""from .report_records import study_snapshotclass Handler(SimpleHTTPRequestHandler):def do_GET(self):if self.path.split("?",1)[0] == "/live.json":data = json.dumps(study_snapshot(project),ensure_ascii=False,allow_nan=False).encode()self.send_response(200)self.send_header("Content-Type","application/json; charset=utf-8")self.send_header("Cache-Control","no-store")10 unmodified lines11121314151617181920212223242526272829303132333410 unmodified linesdef dashboard(project, port):"""Serve the same Pages application locally with a live view of atomically recorded events."""from .report_records import read_json, study_snapshotpartial_calibrations=storage_root(project)/"calibration"class Handler(SimpleHTTPRequestHandler):def do_GET(self):if self.path.split("?",1)[0] == "/live.json":study = study_snapshot(project)for run in study["runs"]:if run.get("status")=="initializing":kinds={"combined":("trace","third"),"sham":("third",)}.get(run.get("method"),(run.get("method"),))for kind in kinds:suffix="-fp64" if run["stage"]=="abstracts" else ""file=partial_calibrations/f"{run['stage']}-{kind}{suffix}-draws.json"draws=read_json(file).get("draws",[])if draws:run["status"]=f"calibrating ({len(draws)}/16)"run["calibration_progress"]={"draws_completed":len(draws),"last_draw":draws[-1]}data = json.dumps(study,ensure_ascii=False,allow_nan=False).encode()self.send_response(200)self.send_header("Content-Type","application/json; charset=utf-8")self.send_header("Cache-Control","no-store")
25 unmodified lines26272829303122 unmodified lines5455565758596079 unmodified lines14014114214314414514614714814915015115215315415526 unmodified lines182183184185186187188189136 unmodified lines32632732832933033133212 unmodified lines34534634734834935025 unmodified linesfrom .report_records import METHODS, REPOSITORY, STAGES, completed, describe_difference, finite, fmt, verdict_textREFERENCES = {"roughness": ("Duchon, Splines minimizing rotation-invariant semi-norms in Sobolev spaces","https://doi.org/10.1007/BFb0086566"),"trace": ("Liu, Yu and Lin, Regularizing deep neural networks with stochastic estimators of Hessian trace",22 unmodified linesdef _cite(key):label, url = REFERENCES[key]return _link(url, label.split(",")[0] if key != "trace" else "Liu, Yu and Lin")def _styles():79 unmodified linesreturn scores, resourcesdef _matched_rows(study):"""Print every matched seed, including each arm's distance from the shared cutoff."""rows = []for stage, outcome in study["stages"].items():for entry in outcome.get("matched_time", []):cutoff = entry["cutoff_seconds"]losses = []for method in ("ce", "trace", "third"):point = entry["by_method"][method]lag = cutoff - point["train_seconds"]losses.append(f"{fmt(point['dev_nll'], 4)} ({fmt(lag, 1)})")rows.append([STAGES[stage], entry["seed"], fmt(cutoff, 1), *losses])return rows26 unmodified lines"can share its trace while individual curvature components vary. Summing squared ""third partials assigns a nonnegative cost to that variation in the chosen coordinates. ""The proposed local density adapts an order-three spline roughness measure. The ""published signed-trace language experiments studied recurrent language models. "f"{_cite('roughness')} · {_cite('trace')} · {_cite('coordinates')}")p("FUT++ approximates third weight derivatives of minibatch language-model loss with ""differences between Hessian estimates at consecutive reference checkpoints. It uses ""these terms to predict the effect of reordering training batches. Here the squared "136 unmodified linesrows, [56, 49, 78, 35, 34, 64, 48, 57, 54]))p("Times and rates are per-run medians within each hardware, method, phase, strength and ""target budget. The clock sums synchronized training steps, including batch transfer and ""the optimizer update. Evaluation, checkpointing and uploads take additional time. Peak ""memory is PyTorch’s recorded maximum allocated GPU tensor memory during the run, including ""evaluation. Untrained controls have no training speed.", "caption")else:12 unmodified linesmatched, [82, 34, 65, 98, 98, 98]))else:p("Awaiting a complete, timed three-method confirmatory seed with eligible development checkpoints.", "caption")pair_rows = [[STAGES[stage], METHODS.get(base, base), pair["seed"],fmt(pair["third_nll"], 5), fmt(pair["baseline_nll"], 5), fmt(pair["delta"], 5)]for stage, outcome in study["stages"].items()25 unmodified lines2627282930313233343522 unmodified lines5859606162636479 unmodified lines14414514614714814915015115215315415515615715815926 unmodified lines186187188189190191192193194195136 unmodified lines33233333433533633733812 unmodified lines35135235335435535635735835936036136236336425 unmodified linesfrom .report_records import METHODS, REPOSITORY, STAGES, completed, describe_difference, finite, fmt, verdict_textREFERENCES = {"flat": ("Hochreiter and Schmidhuber, Simplifying neural nets by discovering flat minima","https://proceedings.neurips.cc/paper/1994/hash/01882513d5fa7c329e940dda99b12147-Abstract.html"),"gpt_trace": ("Zhang, Li and Ju, Noise Stability Optimization for Finding Flat Minima: A Hessian-based Regularization Approach","https://arxiv.org/pdf/2306.08553#page=12"),"roughness": ("Duchon, Splines minimizing rotation-invariant semi-norms in Sobolev spaces","https://doi.org/10.1007/BFb0086566"),"trace": ("Liu, Yu and Lin, Regularizing deep neural networks with stochastic estimators of Hessian trace",22 unmodified linesdef _cite(key):label, url = REFERENCES[key]return _link(url, label.rsplit(", ",1)[0])def _styles():79 unmodified linesreturn scores, resourcesdef _matched_rows(study,key="matched_time"):"""Print every matched seed, including each arm's distance from the shared cutoff."""rows = []for stage, outcome in study["stages"].items():for entry in outcome.get(key, []):cutoff = entry["cutoff_seconds"]losses = []for method in ("ce", "trace", "third"):point = entry["by_method"][method]lag = point["staleness_seconds"]losses.append(f"{fmt(point['dev_nll'], 4)} ({fmt(lag, 1)})")rows.append([STAGES[stage], entry["seed"], fmt(cutoff, 1), *losses])return rows26 unmodified lines"can share its trace while individual curvature components vary. Summing squared ""third partials assigns a nonnegative cost to that variation in the chosen coordinates. ""The proposed local density adapts an order-three spline roughness measure. The ""original flat-minima work searched for broad regions of low training error. Liu, Yu and Lin ""regularized recurrent language models with the Hessian trace. Zhang, Li and Ju investigated ""a symmetric approximation to trace regularization in GPT-2 downstream fine-tuning. "f"{_cite('roughness')} · {_cite('flat')} · {_cite('trace')} · {_cite('gpt_trace')}, Table 5 · {_cite('coordinates')}")p("FUT++ approximates third weight derivatives of minibatch language-model loss with ""differences between Hessian estimates at consecutive reference checkpoints. It uses ""these terms to predict the effect of reordering training batches. Here the squared "136 unmodified linesrows, [56, 49, 78, 35, 34, 64, 48, 57, 54]))p("Times and rates are per-run medians within each hardware, method, phase, strength and ""target budget. The clock sums synchronized training steps, including batch transfer and ""the optimizer update and any host FP64 probe while the GPU is reserved. Evaluation, checkpointing and uploads take additional time. Peak ""memory is PyTorch’s recorded maximum allocated GPU tensor memory during the run, including ""evaluation. Untrained controls have no training speed.", "caption")else:12 unmodified linesmatched, [82, 34, 65, 98, 98, 98]))else:p("Awaiting a complete, timed three-method confirmatory seed with eligible development checkpoints.", "caption")nonhost = _matched_rows(study,"matched_nonhost_time")if nonhost:p("Adapter timing after subtracting host derivative calls", "subheading")p("This supplementary clock removes the observed duration of host derivative calls including their ""transfers. The table uses the same fixed development windows and reports checkpoint lags in seconds. ""Individual CUDA kernel durations were not profiled.", "caption")flow.append(_grid(styles,["Corpus","Seed","Cutoff (s)","AdamW NLL (lag s)","Trace NLL (lag s)","Third NLL (lag s)"],nonhost,[82,34,65,98,98,98]))pair_rows = [[STAGES[stage], METHODS.get(base, base), pair["seed"],fmt(pair["third_nll"], 5), fmt(pair["baseline_nll"], 5), fmt(pair["delta"], 5)]for stage, outcome in study["stages"].items()
38 unmodified lines3940414243444584 unmodified lines13013113213313413538 unmodified lines"token_budget", "batch_windows", "microbatch", "context", "weights_sha256", "dev_tokens","git_revision", "gpu", "torch", "matched_dev_nll", "finished_at", "initial_trainable_sha256","derivative_dtype", "derivative_device", "host_probe_seconds", "training_seconds_excluding_host_probes", "cpu_threads","process_peak_rss_mib", "evaluation_batch_windows",)EVENT_FIELDS = ("step", "tokens", "train_seconds", "loss", "accuracy", "penalty", "dev_nll",84 unmodified linesrecord["id"] = folder.nameif "targets_scored" in state and not summary:record["evaluation_progress"] = statefailures = read_json(folder / "attempts.json").get("failures", [])if last_error and last_error not in failures:failures.append(last_error)38 unmodified lines3940414243444584 unmodified lines13013113213313413513613713838 unmodified lines"token_budget", "batch_windows", "microbatch", "context", "weights_sha256", "dev_tokens","git_revision", "gpu", "torch", "matched_dev_nll", "finished_at", "initial_trainable_sha256","derivative_dtype", "derivative_device", "host_probe_seconds", "training_seconds_excluding_host_probes", "cpu_threads","process_peak_rss_mib", "evaluation_batch_windows", "test_seconds", "evaluated_at",)EVENT_FIELDS = ("step", "tokens", "train_seconds", "loss", "accuracy", "penalty", "dev_nll",84 unmodified linesrecord["id"] = folder.nameif "targets_scored" in state and not summary:record["evaluation_progress"] = statetest_state = read_json(folder / "test_state.json")if test_state and "test_nll" not in summary:record["evaluation_progress"] = test_statefailures = read_json(folder / "attempts.json").get("failures", [])if last_error and last_error not in failures:failures.append(last_error)
91 unmodified lines92939495969791 unmodified linesparts.append(f"### {STAGES[stage]} at equal training time\n\n" + _table(times, ["Seed", "Common cutoff (s)", "Method", "Recorded checkpoint (s)","Training tokens", "Dev NLL"]))return "\n\n".join(parts)91 unmodified lines929394959697989910010110210310410591 unmodified linesparts.append(f"### {STAGES[stage]} at equal training time\n\n" + _table(times, ["Seed", "Common cutoff (s)", "Method", "Recorded checkpoint (s)","Training tokens", "Dev NLL"]))supplement = [[item["seed"],fmt(item["cutoff_seconds"],1),METHODS[m],fmt(point["clock_seconds"],1),fmt(point["tokens"],0),fmt(point["dev_nll"],5)]for item in analysis.get("matched_nonhost_time",[]) for m,point in item["by_method"].items()]if supplement:parts.append(f"### {STAGES[stage]} after subtracting host derivative calls\n\n""This supplementary clock excludes the measured host probe calls and their transfers. ""The registered comparison above counts elapsed time with one GPU reserved.\n\n" +_table(supplement,["Seed","Cutoff (s)","Method","Checkpoint (s)","Training tokens","Dev NLL"]))return "\n\n".join(parts)
9 unmodified lines1011121314151653 unmodified lines7071727374757677787980813 unmodified lines8586878889901 unmodified line92939495969798991001011025 unmodified lines1081091101111121131141151161171189 unmodified linesfrom .data import preparefrom .evaluation import scorefrom .models import build_modelfrom .records import HORIZONS, RATIOS, read_json, run_name, sha256, time_now, write_jsonfrom .release import STAGE_HUB, publish_snapshot, publish_weightsfrom .train import run_one53 unmodified linesraise ValueError(f"Different corpus for {name}")weights_file(storage,summary)frozen["runs"][name] = summary["weights_sha256"]if summary.get("initial_trainable_sha256"):initial.add(summary["initial_trainable_sha256"])if len(initial)>1:raise ValueError(f"Initial trainable weights differ across {stage} seed {seed} arms")if initial:frozen.setdefault("initializations",{})[str(seed)] = initial.pop()frozen["freeze_id"] = hashlib.sha256(json.dumps(frozen,sort_keys=True).encode()).hexdigest()path = project/"results"/"freeze"/f"{stage}.json"if path.exists() and read_json(path)!=frozen:3 unmodified linesdef evaluate_one(project, storage, run_id, device):path = project/"results"/run_id/"summary.json"summary = read_json(path)stage = summary["stage"]1 unmodified linedata = storage/"data"/stageif sealed["runs"].get(run_id)!=summary.get("weights_sha256") or run_id not in sealed["runs"]:raise ValueError("Evaluation requires a checkpoint present in the stage freeze")weights = weights_file(storage,summary)if "test_nll" in summary:if summary["freeze_id"]!=sealed["freeze_id"]:raise ValueError("Existing evaluation uses a different freeze")return summaryif sha256(data/"test.bin") != sealed["test_sha256"]:raise ValueError("Test stream differs from the frozen manifest")model = build_model(stage,summary["seed"],device,storage)5 unmodified linesif set(state)!=set(get_peft_model_state_dict(model)):raise ValueError("Adapter payload does not match the pinned backbone and target modules")set_peft_model_state_dict(model,state)stats = score(model,data/"test.bin",device,summary.get("evaluation_batch_windows",summary["microbatch"]))summary.update(test_nll=stats["nll"],test_accuracy=stats["accuracy"],test_tokens=stats["tokens"],test_manifest_sha256=sealed["test_sha256"],freeze_id=sealed["freeze_id"],evaluated_at=time_now())write_json(path,summary)return summary9 unmodified lines1011121314151653 unmodified lines707172737475767778798081823 unmodified lines868788899091921 unmodified line9495969798991001011021031041051065 unmodified lines1121131141151161171181191201211221231241251261271281291301311321339 unmodified linesfrom .data import preparefrom .evaluation import scorefrom .models import build_modelfrom .records import HORIZONS, RATIOS, Recorder, read_json, run_name, sha256, time_now, write_jsonfrom .release import STAGE_HUB, publish_snapshot, publish_weightsfrom .train import run_one53 unmodified linesraise ValueError(f"Different corpus for {name}")weights_file(storage,summary)frozen["runs"][name] = summary["weights_sha256"]digest = summary.get("initial_trainable_sha256")if not digest:raise ValueError(f"Missing initial trainable-weight digest for {name}")initial.add(digest)if len(initial)!=1:raise ValueError(f"Initial trainable weights differ across {stage} seed {seed} arms")frozen.setdefault("initializations",{})[str(seed)] = initial.pop()frozen["freeze_id"] = hashlib.sha256(json.dumps(frozen,sort_keys=True).encode()).hexdigest()path = project/"results"/"freeze"/f"{stage}.json"if path.exists() and read_json(path)!=frozen:3 unmodified linesdef evaluate_one(project, storage, run_id, device):from .progress import week_schedulepath = project/"results"/run_id/"summary.json"summary = read_json(path)stage = summary["stage"]1 unmodified linedata = storage/"data"/stageif sealed["runs"].get(run_id)!=summary.get("weights_sha256") or run_id not in sealed["runs"]:raise ValueError("Evaluation requires a checkpoint present in the stage freeze")if week_schedule(project) is None:raise ValueError("The one-week timing and memory projection requires selected pilots from both stages before test scoring")if "test_nll" in summary:if summary["freeze_id"]!=sealed["freeze_id"]:raise ValueError("Existing evaluation uses a different freeze")return summaryweights = weights_file(storage,summary)if sha256(data/"test.bin") != sealed["test_sha256"]:raise ValueError("Test stream differs from the frozen manifest")model = build_model(stage,summary["seed"],device,storage)5 unmodified linesif set(state)!=set(get_peft_model_state_dict(model)):raise ValueError("Adapter payload does not match the pinned backbone and target modules")set_peft_model_state_dict(model,state)recorder = Recorder(project,run_id)state = path.parent/"test_state.json"def report_progress(row):# Publish elapsed time and coverage during a sealed evaluation. The full-corpus# NLL and accuracy enter the summary only after every target has been scored.coverage = {key:row[key] for key in ("targets_scored","targets_to_score","score_seconds")}write_json(state,{"split":"test","timestamp":time_now(),**coverage})recorder.emit({"split":"test",**coverage},"test_progress.jsonl")report_progress({"targets_scored":0,"targets_to_score":(data/"test.bin").stat().st_size//2-1,"score_seconds":0.0})stats = score(model,data/"test.bin",device,summary.get("evaluation_batch_windows",summary["microbatch"]),progress=report_progress)summary.update(test_nll=stats["nll"],test_accuracy=stats["accuracy"],test_tokens=stats["tokens"],test_manifest_sha256=sealed["test_sha256"],freeze_id=sealed["freeze_id"],test_seconds=read_json(state)["score_seconds"],evaluated_at=time_now())write_json(path,summary)state.unlink(missing_ok=True)return summary
49 unmodified lines505152535455114 unmodified lines17017117217317417517617717817914 unmodified lines19419519619719819920020120220320420520649 unmodified linesreturn peak * (0.1+0.9*0.5*(1+math.cos(math.pi*progress)))def chosen_coefficients(project, storage, config, device, microbatch):method, ratio, stage = (config[k] for k in ("method","ratio","stage"))if method in {"ce","initial","unigram"}:114 unmodified linesgroups = [{"params":[p for p in parameters if p.ndim>1],"weight_decay":0.1},{"params":[p for p in parameters if p.ndim<=1],"weight_decay":0.0}]optimizer = torch.optim.AdamW(groups,lr=1e-4,betas=(0.9,0.95),fused=(device.type=="cuda"))start,elapsed = restore_state(ckpt/"latest.pt",model,optimizer,config,recorder,device)host_probes = sum(e.get("host_probe_seconds",0.0) for e in json_lines(output/"events.jsonl"))# Match elapsed-time comparisons with periodic fixed development windows in every arm.interval = min(128,max(1,steps//16))for step in range(start,steps):model.train()tic = time.perf_counter()14 unmodified linestorch.cuda.synchronize(device)elapsed += time.perf_counter()-ticdone = step+1if done % 8 == 0 or active or done == 1 or done % interval == 0 or done == steps:row = {"step":done, "tokens":done*batch*CONTEXT, "train_seconds":elapsed, "loss":base.item(),"accuracy":accuracy.item(), "lr":lr, "gradient_norm":norm.item(),"derivatives":terms,"host_probe_seconds":host_seconds,"training_seconds_excluding_host_probes":max(0.0,elapsed-host_probes)}if terms:row["penalty"] = sum(8*t["lambda"]*t["estimate"] for t in terms.values())if done%interval == 0 or done==steps:metrics = score(model,data/"dev.bin",device,score_batch,limit_windows=64)row.update(dev_nll=metrics["nll"],dev_accuracy=metrics["accuracy"])recorder.emit(row)49 unmodified lines505152535455565758596061114 unmodified lines17617717817918018118218318418518618718818919019119219319414 unmodified lines20921021121221321421521621721821922022122249 unmodified linesreturn peak * (0.1+0.9*0.5*(1+math.cos(math.pi*progress)))def validation_due(stage, phase, step, interval):"""Observe the early portion of every adapter confirmatory arm at common data positions."""initial_adapter = stage=="abstracts" and phase=="confirm" and step<intervalreturn (step>0 and step%interval==0) or (initial_adapter and step%4==0)def chosen_coefficients(project, storage, config, device, microbatch):method, ratio, stage = (config[k] for k in ("method","ratio","stage"))if method in {"ce","initial","unigram"}:114 unmodified linesgroups = [{"params":[p for p in parameters if p.ndim>1],"weight_decay":0.1},{"params":[p for p in parameters if p.ndim<=1],"weight_decay":0.0}]optimizer = torch.optim.AdamW(groups,lr=1e-4,betas=(0.9,0.95),fused=(device.type=="cuda"))# A restart during the first checkpoint interval must discard measurements from# updates whose weights and optimizer moments were never committed.if not (ckpt/"latest.pt").exists():save_state(ckpt/"latest.pt",model,optimizer,0,0.0,config)start,elapsed = restore_state(ckpt/"latest.pt",model,optimizer,config,recorder,device)history = json_lines(output/"events.jsonl")host_probes = sum(e.get("host_probe_seconds",0.0) for e in history)# Match elapsed-time comparisons with periodic fixed development windows in every arm.interval = min(128,max(1,steps//16))if start==0 and validation_due(stage,config["phase"],0,interval) and not history:metrics = score(model,data/"dev.bin",device,score_batch,limit_windows=64)recorder.emit({"step":0,"tokens":0,"train_seconds":0.0,"training_seconds_excluding_host_probes":0.0,"dev_nll":metrics["nll"],"dev_accuracy":metrics["accuracy"]})for step in range(start,steps):model.train()tic = time.perf_counter()14 unmodified linestorch.cuda.synchronize(device)elapsed += time.perf_counter()-ticdone = step+1validate = validation_due(stage,config["phase"],done,interval) or done==stepsif done % 8 == 0 or active or done == 1 or validate:row = {"step":done, "tokens":done*batch*CONTEXT, "train_seconds":elapsed, "loss":base.item(),"accuracy":accuracy.item(), "lr":lr, "gradient_norm":norm.item(),"derivatives":terms,"host_probe_seconds":host_seconds,"training_seconds_excluding_host_probes":max(0.0,elapsed-host_probes)}if terms:row["penalty"] = sum(8*t["lambda"]*t["estimate"] for t in terms.values())if validate:metrics = score(model,data/"dev.bin",device,score_batch,limit_windows=64)row.update(dev_nll=metrics["nll"],dev_accuracy=metrics["accuracy"])recorder.emit(row)
150 unmodified lines151152153154155156150 unmodified linesassert first["by_method"]["third"]["tokens"] == 80def test_time_matched_comparison_uses_one_validation_population_across_methods():"""Whole-split NLL cannot replace a fixed-window diagnostic in another run."""rows = complete_matrix()150 unmodified lines151152153154155156157158159160161162163164165166167168169150 unmodified linesassert first["by_method"]["third"]["tokens"] == 80def test_adapter_time_comparisons_keep_allocated_device_and_host_excluded_clocks_distinct():rows = complete_matrix()for row in rows:regularized = row["method"]!="ce"row.update(stage="abstracts",tokens=524288,target_tokens=524288,dev_nll=1.0,train_seconds=20.0 if regularized else 10.0,training_seconds_excluding_host_probes=10.0)row["events"]=[{"train_seconds":9.0,"training_seconds_excluding_host_probes":4.0,"tokens":100,"dev_nll":2.0}]result = analyze_stage(rows,"abstracts")assert result["matched_time"][0]["by_method"]["third"]["dev_nll"]==2.0assert result["matched_nonhost_time"][0]["by_method"]["third"]["dev_nll"]==1.0def test_time_matched_comparison_uses_one_validation_population_across_methods():"""Whole-split NLL cannot replace a fixed-window diagnostic in another run."""rows = complete_matrix()
86 unmodified lines87888986 unmodified linesassert normal["dev_nll"]==resumed["dev_nll"]finally:torch.set_num_threads(prior_threads)86 unmodified lines8788899091929394959697989910010110210310410510610710810986 unmodified linesassert normal["dev_nll"]==resumed["dev_nll"]finally:torch.set_num_threads(prior_threads)def test_adapter_confirmation_observes_early_matched_time_checkpoints():"""A slow host probe can span the baseline's whole time cutoff before a routine validation."""from thirdloss.train import validation_dueexpected = [0, 4, 8, 12, 16, 20, 24, 28, 32, 64]assert [step for step in range(65) if validation_due("abstracts","confirm",step,32)] == expectedassert [step for step in range(65) if validation_due("stories","confirm",step,32)] == [32,64]assert [step for step in range(17) if validation_due("abstracts","pilot",step,4)] == [4,8,12,16]def test_evaluator_requires_measured_schedule_before_test_reads(tmp_path):"""Exercise the standalone entry point without placing any test token bytes on disk."""import pytestfrom thirdloss.study import evaluate_onerun_id = "stories-confirm-s01-ce-r00"write_json(tmp_path/"results"/run_id/"summary.json",{"stage":"stories","id":run_id,"weights_sha256":"abc"})write_json(tmp_path/"results"/"freeze"/"stories.json",{"runs":{run_id:"abc"},"freeze_id":"fixture"})with pytest.raises(ValueError,match="one-week"):evaluate_one(tmp_path,tmp_path/"storage",run_id,torch.device("cpu"))
research/README.md+3-2
research/docs/explorer.js+10-1
research/docs/figures/curves.png

Large File Pointer Details
- SHA256: de2e927c0f2199c1bf6ecbfeace0f2e77699b9def6c4147fc272fc6ed4b25a45
- Pointer size: 131 Bytes
- Size of remote file: 114 kB

Large File Pointer Details
- SHA256: ef784b3c67e9ec9749f869204edd94e13be0eb693a6c167674e071ff8579d5d1
- Pointer size: 131 Bytes
- Size of remote file: 160 kB
research/docs/runbook.md+1-1
research/docs/study.json
research/docs/third-derivative-penalty.mdAdded+154
research/reports/amendments/adapter-precision.md+2
research/reports/experiments/abstracts-pilot-s00-third-r03-fp64/experiment.mdAdded+69
research/reports/experiments/abstracts-pilot-s00-third-r03-fp64/learnings.mdAdded+5
research/reports/experiments/experiments.md+1
research/reports/experiments/learnings.md+2
research/reports/paper.pdf
research/reports/progress.md+3-3
research/reports/summary.md+2-1
research/results/abstracts-pilot-s00-third-r03-fp64/config.jsonAdded+18
research/results/abstracts-pilot-s00-third-r03-fp64/evaluation.jsonlAdded+12
research/results/abstracts-pilot-s00-third-r03-fp64/events.jsonlAdded+22
research/results/abstracts-pilot-s00-third-r03-fp64/samples.jsonlAdded+3
research/results/abstracts-pilot-s00-third-r03-fp64/summary.jsonAdded+43
research/results/calibration/abstracts-third-fp64.jsonAdded+155
research/results/verification/pythia-scoring-batches.jsonAdded+49
research/results/verification/tests.json+42-27
research/src/thirdloss/analysis.py+14-9
research/src/thirdloss/cli.py+14-2
research/src/thirdloss/report_paper.py+21-7
research/src/thirdloss/report_records.py+4-1
research/src/thirdloss/reporting.py+8
research/src/thirdloss/study.py+24-9
research/src/thirdloss/train.py+19-3
research/tests/test_analysis.py+13
research/tests/test_training.py+20