Publish amended FP64 study, numerical references and verified implementation
Browse files- research/.env.example +3 -0
- research/README.md +3 -1
- research/docs/figures/curves.png +2 -2
- research/docs/runbook.md +2 -0
- research/docs/study.json +0 -0
- research/pyproject.toml +1 -1
- research/reports/amendments/adapter-precision.md +13 -0
- research/reports/experiments/abstracts-pilot-s00-third-r03/experiment.md +7 -1
- research/reports/experiments/abstracts-pilot-s00-third-r03/learnings.md +1 -1
- research/reports/experiments/experiments.md +1 -1
- research/reports/experiments/learnings.md +1 -1
- research/reports/paper.pdf +0 -0
- research/reports/progress.md +3 -3
- research/reports/summary.md +1 -1
- research/results/verification/numerical-exclusions.json +6 -0
- research/results/verification/pythia-batch-activations.json +1467 -0
- research/results/verification/pythia-fp64-agreement.json +6 -0
- research/results/verification/pythia-fp64-cpu.json +13 -0
- research/results/verification/pythia-fp64-cuda.json +13 -0
- research/results/verification/stories-full-gradient.json +12 -0
- research/results/verification/tests.json +24 -24
- research/src/thirdloss/cli.py +5 -0
- research/src/thirdloss/models.py +24 -0
- research/src/thirdloss/objectives.py +57 -12
- research/src/thirdloss/precision.py +53 -68
- research/src/thirdloss/probe_check.py +29 -0
- research/src/thirdloss/progress.py +1 -1
- research/src/thirdloss/records.py +15 -1
- research/src/thirdloss/release.py +5 -0
- research/src/thirdloss/report_paper.py +11 -0
- research/src/thirdloss/report_records.py +11 -2
- research/src/thirdloss/reporting.py +8 -0
- research/src/thirdloss/study.py +4 -1
- research/src/thirdloss/train.py +21 -6
- research/tests/test_derivatives.py +25 -0
- research/uv.lock +2 -0
research/.env.example
CHANGED
|
@@ -1,3 +1,6 @@
|
|
| 1 |
# Copy to .env to override the default ./storage directory for large data and weights.
|
| 2 |
THIRDLOSS_STORAGE=./storage
|
|
|
|
|
|
|
|
|
|
| 3 |
# HF_TOKEN can be supplied by the existing interactive Hugging Face login.
|
|
|
|
| 1 |
# Copy to .env to override the default ./storage directory for large data and weights.
|
| 2 |
THIRDLOSS_STORAGE=./storage
|
| 3 |
+
THIRDLOSS_ADAPTER_DERIVATIVE_DEVICE=cpu
|
| 4 |
+
OMP_NUM_THREADS=6
|
| 5 |
+
MKL_NUM_THREADS=6
|
| 6 |
# HF_TOKEN can be supplied by the existing interactive Hugging Face login.
|
research/README.md
CHANGED
|
@@ -19,6 +19,8 @@ The third-order term measures how the Hessian changes as weights move. Two indep
|
|
| 19 |
|
| 20 |
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)
|
| 21 |
|
|
|
|
|
|
|
| 22 |
<!-- RESULTS:START -->
|
| 23 |
[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)
|
| 24 |
|
|
@@ -34,7 +36,7 @@ Recorded 14 runs, including 13 with a completed summary.
|
|
| 34 |
|
| 35 |
| Stage | Phase | Method | Ratio | Tokens/run | Runs | Median dev NLL | Median test NLL |
|
| 36 |
| --- | --- | --- | --- | --- | --- | --- | --- |
|
| 37 |
-
| Research abstracts |
|
| 38 |
| TinyStories | control | Initial checkpoint | 0.000 | 0 | 1 | 8.3437 | — |
|
| 39 |
| TinyStories | control | Unigram | 0.000 | 0 | 1 | 6.0036 | — |
|
| 40 |
| TinyStories | pilot | Ordinary AdamW | 0.000 | 2,097,152 | 1 | 3.8770 | — |
|
|
|
|
| 19 |
|
| 20 |
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)
|
| 21 |
|
| 22 |
+
A same-probe check on pretrained Pythia found that single-precision arithmetic materially changed the third-order training gradient. The first adapter pilot is archived as a numerical diagnostic. The corrected adapter arms evaluate derivatives in double precision while ordinary training and prediction use the GPU. [Pre-test precision amendment](reports/amendments/adapter-precision.md) · [Full-model numerical checks](results/verification)
|
| 23 |
+
|
| 24 |
<!-- RESULTS:START -->
|
| 25 |
[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)
|
| 26 |
|
|
|
|
| 36 |
|
| 37 |
| Stage | Phase | Method | Ratio | Tokens/run | Runs | Median dev NLL | Median test NLL |
|
| 38 |
| --- | --- | --- | --- | --- | --- | --- | --- |
|
| 39 |
+
| Research abstracts | diagnostic | Third derivative | 0.030 | 65,536 | 1 | 3.1168 | — |
|
| 40 |
| TinyStories | control | Initial checkpoint | 0.000 | 0 | 1 | 8.3437 | — |
|
| 41 |
| TinyStories | control | Unigram | 0.000 | 0 | 1 | 6.0036 | — |
|
| 42 |
| TinyStories | pilot | Ordinary AdamW | 0.000 | 2,097,152 | 1 | 3.8770 | — |
|
research/docs/figures/curves.png
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
research/docs/runbook.md
CHANGED
|
@@ -17,6 +17,8 @@ Use `uv run thirdloss report` to regenerate the README results, PDF, figures, ex
|
|
| 17 |
|
| 18 |
After preparing abstracts, `uv run thirdloss verify --pretrained --device cuda` also compares both implementations of the penalty and its entire training gradient on the same pair of training windows, adapter initialization and sign probes. The diagnostic materializes the original joint graph for comparison. Its GPU allocation exceeded 10 GiB during the original replay. The ordinary adapter training path processes the two windows sequentially. `--device cpu` runs the optional comparison in host memory. [Adapter verification](../reports/reviews/adapter-verification.md)
|
| 19 |
|
|
|
|
|
|
|
| 20 |
## Load a published checkpoint
|
| 21 |
|
| 22 |
All models are indexed in the [Hugging Face collection](https://huggingface.co/collections/BurnyCoder/third-derivatives-in-language-model-training-6b067fb7d5ae3eca49ebb378). The run name identifies its objective, phase, seed and penalty strength. Replace the example run name with the desired published checkpoint. Run from a clone with the locked environment.
|
|
|
|
| 17 |
|
| 18 |
After preparing abstracts, `uv run thirdloss verify --pretrained --device cuda` also compares both implementations of the penalty and its entire training gradient on the same pair of training windows, adapter initialization and sign probes. The diagnostic materializes the original joint graph for comparison. Its GPU allocation exceeded 10 GiB during the original replay. The ordinary adapter training path processes the two windows sequentially. `--device cpu` runs the optional comparison in host memory. [Adapter verification](../reports/reviews/adapter-verification.md)
|
| 19 |
|
| 20 |
+
`uv run thirdloss verify --reference --device cpu` repeats the full-size FP64 calculation using the archived pilot’s CUDA probe stream. The production study uses `THIRDLOSS_ADAPTER_DERIVATIVE_DEVICE=cpu` on the laptop, six host math threads (`OMP_NUM_THREADS=6`, `MKL_NUM_THREADS=6`), and the GPU for cross-entropy, optimizer updates, generation and scoring. The derivative device, arithmetic, calibration and per-update host time are recorded. The `-fp64` suffix identifies amended adapter runs. [Protocol amendment](../reports/amendments/adapter-precision.md)
|
| 21 |
+
|
| 22 |
## Load a published checkpoint
|
| 23 |
|
| 24 |
All models are indexed in the [Hugging Face collection](https://huggingface.co/collections/BurnyCoder/third-derivatives-in-language-model-training-6b067fb7d5ae3eca49ebb378). The run name identifies its objective, phase, seed and penalty strength. Replace the example run name with the desired published checkpoint. Run from a clone with the locked environment.
|
research/docs/study.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
research/pyproject.toml
CHANGED
|
@@ -7,7 +7,7 @@ dependencies = [
|
|
| 7 |
"torch==2.15.0", "numpy>=2", "transformers>=5.24,<6", "peft>=0.22,<1",
|
| 8 |
"huggingface-hub>=1", "tokenizers>=0.22", "safetensors>=0.5",
|
| 9 |
"pyarrow>=20", "filelock>=3", "httpx>=0.27", "python-dotenv>=1",
|
| 10 |
-
"matplotlib>=3.10", "reportlab>=4", "scipy>=1.14",
|
| 11 |
]
|
| 12 |
|
| 13 |
[project.scripts]
|
|
|
|
| 7 |
"torch==2.15.0", "numpy>=2", "transformers>=5.24,<6", "peft>=0.22,<1",
|
| 8 |
"huggingface-hub>=1", "tokenizers>=0.22", "safetensors>=0.5",
|
| 9 |
"pyarrow>=20", "filelock>=3", "httpx>=0.27", "python-dotenv>=1",
|
| 10 |
+
"matplotlib>=3.10", "reportlab>=4", "scipy>=1.14", "psutil>=6",
|
| 11 |
]
|
| 12 |
|
| 13 |
[project.scripts]
|
research/reports/amendments/adapter-precision.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Pre-test amendment to adapter derivative arithmetic
|
| 2 |
+
|
| 3 |
+
25 November 2026. Registered after the initial FP32 adapter pilot and before any confirmatory adapter training or test-set scoring. The original preregistration is preserved. [Original protocol](../preregistration.md) · [Raw diagnostic pilot](../../results/abstracts-pilot-s00-third-r03)
|
| 4 |
+
|
| 5 |
+
The original calibration overflowed while computing the norm of finite gradient entries. Further checks on the full pretrained checkpoint found large differences between single-precision implementations of the same penalty. Independent CPU and GPU double-precision runs on identical adapter weights, target tokens and probes agreed on the direction and scale of the fourth-order gradient. The host implementation was faster than the laptop GPU for this calculation. A separate full-weight TinyStories probe compared its original GPU calculation against double precision. [Single-precision GPU experiment](../../results/verification/pythia-joint-cuda.json) · [CPU reference](../../results/verification/pythia-fp64-cpu.json) · [GPU reference](../../results/verification/pythia-fp64-cuda.json) · [Cross-device gradient agreement](../../results/verification/pythia-fp64-agreement.json) · [TinyStories check](../../results/verification/stories-full-gradient.json)
|
| 6 |
+
|
| 7 |
+
All subsequent adapter derivative arms use a double-precision copy of the same frozen checkpoint and current QKV factors, with double-precision eager attention and the original causal mask. The two-window contraction carries its full fourth-order contribution. CUDA draws the paired random signs. The CPU computes the derivative penalty in FP64 on this machine, scales its gradient, and returns it to the ordinary GPU optimizer. Token cross-entropy, model weights, AdamW and scoring use the registered FP32 GPU path. Hessian trace and squared Hessian norm receive the same precision treatment. The combined and sign-randomized controls use these calibrated gradients. [Implementation](../../src/thirdloss/objectives.py) · [Attention backend registration](https://huggingface.co/docs/transformers/attention_interface)
|
| 8 |
+
|
| 9 |
+
The first FP32 adapter pilot remains public with its original checkpoint, scores and examples. A diagnostic phase label excludes it from development selection and inference. Recalibrate on the same training windows, rerun the entire registered grid, and identify corrected derivative runs by the `-fp64` suffix. The TinyStories protocol, seed assignments, data, update gates, strengths, token horizons and statistical decision rule retain their registered definitions. [Exclusion record](../../results/verification/numerical-exclusions.json) · [Planned runs](../planned-runs.md)
|
| 10 |
+
|
| 11 |
+
The 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)
|
| 12 |
+
|
| 13 |
+
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)
|
research/reports/experiments/abstracts-pilot-s00-third-r03/experiment.md
CHANGED
|
@@ -4,7 +4,7 @@ Run `abstracts-pilot-s00-third-r03` · [raw records](../../../results/abstracts-
|
|
| 4 |
|
| 5 |
| Stage | Method | Phase | Seed | Ratio | Train tokens | Dev NLL | Test NLL | Tokens/s | Status |
|
| 6 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
| 7 |
-
| Research abstracts | Third derivative |
|
| 8 |
|
| 9 |
Training time is 72.3 seconds. Peak allocated GPU memory is 6,369.6 MiB. Development token accuracy is 0.4128. Test token accuracy is —.
|
| 10 |
|
|
@@ -16,6 +16,12 @@ Training time is 72.3 seconds. Peak allocated GPU memory is 6,369.6 MiB. Develop
|
|
| 16 |
| --- | --- |
|
| 17 |
| 2026-11-25T07:00:21+00:00 | FloatingPointError('Nonfinite or zero third calibration norm at draw 0: inf') |
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
## Fixed-prompt generations
|
| 20 |
|
| 21 |
**Prompt**
|
|
|
|
| 4 |
|
| 5 |
| Stage | Method | Phase | Seed | Ratio | Train tokens | Dev NLL | Test NLL | Tokens/s | Status |
|
| 6 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
| 7 |
+
| Research abstracts | Third derivative | diagnostic | 0 | 0.030 | 65,536 | 3.1168 | — | 907 | complete |
|
| 8 |
|
| 9 |
Training time is 72.3 seconds. Peak allocated GPU memory is 6,369.6 MiB. Development token accuracy is 0.4128. Test token accuracy is —.
|
| 10 |
|
|
|
|
| 16 |
| --- | --- |
|
| 17 |
| 2026-11-25T07:00:21+00:00 | FloatingPointError('Nonfinite or zero third calibration norm at draw 0: inf') |
|
| 18 |
|
| 19 |
+
## Numerical diagnostic
|
| 20 |
+
|
| 21 |
+
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.
|
| 22 |
+
|
| 23 |
+
[Precision amendment](../../amendments/adapter-precision.md)
|
| 24 |
+
|
| 25 |
## Fixed-prompt generations
|
| 26 |
|
| 27 |
**Prompt**
|
research/reports/experiments/abstracts-pilot-s00-third-r03/learnings.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# Run learnings
|
| 2 |
|
| 3 |
-
|
| 4 |
|
| 5 |
[Experiment and source records](experiment.md)
|
|
|
|
| 1 |
# Run learnings
|
| 2 |
|
| 3 |
+
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).
|
| 4 |
|
| 5 |
[Experiment and source records](experiment.md)
|
research/reports/experiments/experiments.md
CHANGED
|
@@ -7,7 +7,7 @@ NLL is negative log-likelihood in nats per target token. A smaller value assigns
|
|
| 7 |
| Run | Stage | Method | Phase | Seed | Ratio | Train tokens | Dev NLL | Test NLL | Tokens/s | Status |
|
| 8 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
| 9 |
| [abstracts-control-s00-initial-r00](./abstracts-control-s00-initial-r00/experiment.md) | Research abstracts | Initial checkpoint | control | 0 | 0.000 | — | — | — | — | configured |
|
| 10 |
-
| [abstracts-pilot-s00-third-r03](./abstracts-pilot-s00-third-r03/experiment.md) | Research abstracts | Third derivative |
|
| 11 |
| [stories-control-s00-initial-r00](./stories-control-s00-initial-r00/experiment.md) | TinyStories | Initial checkpoint | control | 0 | 0.000 | 0 | 8.3437 | — | 0 | complete |
|
| 12 |
| [stories-control-s00-unigram-r00](./stories-control-s00-unigram-r00/experiment.md) | TinyStories | Unigram | control | 0 | 0.000 | 0 | 6.0036 | — | 0 | complete |
|
| 13 |
| [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 |
| Run | Stage | Method | Phase | Seed | Ratio | Train tokens | Dev NLL | Test NLL | Tokens/s | Status |
|
| 8 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
| 9 |
| [abstracts-control-s00-initial-r00](./abstracts-control-s00-initial-r00/experiment.md) | Research abstracts | Initial checkpoint | control | 0 | 0.000 | — | — | — | — | configured |
|
| 10 |
+
| [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 |
|
| 11 |
| [stories-control-s00-initial-r00](./stories-control-s00-initial-r00/experiment.md) | TinyStories | Initial checkpoint | control | 0 | 0.000 | 0 | 8.3437 | — | 0 | complete |
|
| 12 |
| [stories-control-s00-unigram-r00](./stories-control-s00-unigram-r00/experiment.md) | TinyStories | Unigram | control | 0 | 0.000 | 0 | 6.0036 | — | 0 | complete |
|
| 13 |
| [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 |
|
research/reports/experiments/learnings.md
CHANGED
|
@@ -8,7 +8,7 @@ Independent random signs include mixed weight derivatives in the expected penalt
|
|
| 8 |
|
| 9 |
- [abstracts-control-s00-initial-r00](./abstracts-control-s00-initial-r00/experiment.md) — A development observation is pending.
|
| 10 |
|
| 11 |
-
- [abstracts-pilot-s00-third-r03](./abstracts-pilot-s00-third-r03/experiment.md) —
|
| 12 |
|
| 13 |
- [stories-control-s00-initial-r00](./stories-control-s00-initial-r00/experiment.md) — The observed development NLL is 8.3437 nats per target token.
|
| 14 |
|
|
|
|
| 8 |
|
| 9 |
- [abstracts-control-s00-initial-r00](./abstracts-control-s00-initial-r00/experiment.md) — A development observation is pending.
|
| 10 |
|
| 11 |
+
- [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).
|
| 12 |
|
| 13 |
- [stories-control-s00-initial-r00](./stories-control-s00-initial-r00/experiment.md) — The observed development NLL is 8.3437 nats per target token.
|
| 14 |
|
research/reports/paper.pdf
CHANGED
|
Binary files a/research/reports/paper.pdf and b/research/reports/paper.pdf differ
|
|
|
research/reports/progress.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
# Study progress
|
| 2 |
|
| 3 |
-
Updated 2026-11-25T07:
|
| 4 |
|
| 5 |
-
|
| 6 |
|
| 7 |
## Current record
|
| 8 |
|
|
@@ -12,7 +12,7 @@ Pilot rates project 1.69 remaining confirmation GPU-hours, excluding validation,
|
|
| 12 |
|
| 13 |
Statistical status: pending. Awaiting confirmatory runs.
|
| 14 |
|
| 15 |
-
**abstracts** has
|
| 16 |
|
| 17 |
Statistical status: pending. Awaiting confirmatory runs.
|
| 18 |
|
|
|
|
| 1 |
# Study progress
|
| 2 |
|
| 3 |
+
Updated 2026-11-25T07:56:00+00:00.
|
| 4 |
|
| 5 |
+
12 training/control records and 0 final evaluations are complete. This is 10.0% of 120 planned model milestones.
|
| 6 |
|
| 7 |
## Current record
|
| 8 |
|
|
|
|
| 12 |
|
| 13 |
Statistical status: pending. Awaiting confirmatory runs.
|
| 14 |
|
| 15 |
+
**abstracts** has 0 completed runs. Current records: abstracts-control-s00-initial-r00 (configured, 0 targets).
|
| 16 |
|
| 17 |
Statistical status: pending. Awaiting confirmatory runs.
|
| 18 |
|
research/reports/summary.md
CHANGED
|
@@ -16,7 +16,7 @@ Recorded 14 runs, including 13 with a completed summary.
|
|
| 16 |
|
| 17 |
| Stage | Phase | Method | Ratio | Tokens/run | Runs | Median dev NLL | Median test NLL |
|
| 18 |
| --- | --- | --- | --- | --- | --- | --- | --- |
|
| 19 |
-
| Research abstracts |
|
| 20 |
| TinyStories | control | Initial checkpoint | 0.000 | 0 | 1 | 8.3437 | — |
|
| 21 |
| TinyStories | control | Unigram | 0.000 | 0 | 1 | 6.0036 | — |
|
| 22 |
| TinyStories | pilot | Ordinary AdamW | 0.000 | 2,097,152 | 1 | 3.8770 | — |
|
|
|
|
| 16 |
|
| 17 |
| Stage | Phase | Method | Ratio | Tokens/run | Runs | Median dev NLL | Median test NLL |
|
| 18 |
| --- | --- | --- | --- | --- | --- | --- | --- |
|
| 19 |
+
| Research abstracts | diagnostic | Third derivative | 0.030 | 65,536 | 1 | 3.1168 | — |
|
| 20 |
| TinyStories | control | Initial checkpoint | 0.000 | 0 | 1 | 8.3437 | — |
|
| 21 |
| TinyStories | control | Unigram | 0.000 | 0 | 1 | 6.0036 | — |
|
| 22 |
| TinyStories | pilot | Ordinary AdamW | 0.000 | 2,097,152 | 1 | 3.8770 | — |
|
research/results/verification/numerical-exclusions.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"abstracts-pilot-s00-third-r03": {
|
| 3 |
+
"reason": "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.",
|
| 4 |
+
"replacement": "abstracts-pilot-s00-third-r03-fp64"
|
| 5 |
+
}
|
| 6 |
+
}
|
research/results/verification/pythia-batch-activations.json
ADDED
|
@@ -0,0 +1,1467 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"timestamp": "2026-11-25T07:40:17+00:00",
|
| 3 |
+
"device": "cuda",
|
| 4 |
+
"weights_dtype": "float32",
|
| 5 |
+
"layers": [
|
| 6 |
+
{
|
| 7 |
+
"name": "base_model.model.gpt_neox.embed_in",
|
| 8 |
+
"max_abs_gap": 0.0,
|
| 9 |
+
"max_abs_value": 0.406005859375,
|
| 10 |
+
"relative_rms": 0.0,
|
| 11 |
+
"tokens_at_max": [
|
| 12 |
+
0,
|
| 13 |
+
0
|
| 14 |
+
]
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"name": "base_model.model.gpt_neox.layers.0.input_layernorm",
|
| 18 |
+
"max_abs_gap": 0.0,
|
| 19 |
+
"max_abs_value": 12.498207092285156,
|
| 20 |
+
"relative_rms": 0.0,
|
| 21 |
+
"tokens_at_max": [
|
| 22 |
+
0,
|
| 23 |
+
0
|
| 24 |
+
]
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"name": "base_model.model.gpt_neox.layers.0.attention.query_key_value",
|
| 28 |
+
"max_abs_gap": 1.1920928955078125e-05,
|
| 29 |
+
"max_abs_value": 15.708852767944336,
|
| 30 |
+
"relative_rms": 4.2196657125056464e-07,
|
| 31 |
+
"tokens_at_max": [
|
| 32 |
+
1,
|
| 33 |
+
76
|
| 34 |
+
]
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"name": "base_model.model.gpt_neox.layers.0.attention.dense",
|
| 38 |
+
"max_abs_gap": 2.9802322387695312e-06,
|
| 39 |
+
"max_abs_value": 3.6252167224884033,
|
| 40 |
+
"relative_rms": 9.023665959738863e-07,
|
| 41 |
+
"tokens_at_max": [
|
| 42 |
+
1,
|
| 43 |
+
1
|
| 44 |
+
]
|
| 45 |
+
},
|
| 46 |
+
{
|
| 47 |
+
"name": "base_model.model.gpt_neox.layers.0.mlp.dense_h_to_4h",
|
| 48 |
+
"max_abs_gap": 7.3909759521484375e-06,
|
| 49 |
+
"max_abs_value": 5.050264358520508,
|
| 50 |
+
"relative_rms": 4.617810435899275e-07,
|
| 51 |
+
"tokens_at_max": [
|
| 52 |
+
0,
|
| 53 |
+
109
|
| 54 |
+
]
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"name": "base_model.model.gpt_neox.layers.0.mlp.dense_4h_to_h",
|
| 58 |
+
"max_abs_gap": 1.9073486328125e-06,
|
| 59 |
+
"max_abs_value": 8.868011474609375,
|
| 60 |
+
"relative_rms": 3.838648201041958e-07,
|
| 61 |
+
"tokens_at_max": [
|
| 62 |
+
0,
|
| 63 |
+
25
|
| 64 |
+
]
|
| 65 |
+
},
|
| 66 |
+
{
|
| 67 |
+
"name": "base_model.model.gpt_neox.layers.0",
|
| 68 |
+
"max_abs_gap": 2.9802322387695312e-06,
|
| 69 |
+
"max_abs_value": 11.694438934326172,
|
| 70 |
+
"relative_rms": 4.470770493427262e-07,
|
| 71 |
+
"tokens_at_max": [
|
| 72 |
+
1,
|
| 73 |
+
1
|
| 74 |
+
]
|
| 75 |
+
},
|
| 76 |
+
{
|
| 77 |
+
"name": "base_model.model.gpt_neox.layers.1.input_layernorm",
|
| 78 |
+
"max_abs_gap": 5.245208740234375e-06,
|
| 79 |
+
"max_abs_value": 13.576578140258789,
|
| 80 |
+
"relative_rms": 4.894830809388377e-07,
|
| 81 |
+
"tokens_at_max": [
|
| 82 |
+
1,
|
| 83 |
+
1
|
| 84 |
+
]
|
| 85 |
+
},
|
| 86 |
+
{
|
| 87 |
+
"name": "base_model.model.gpt_neox.layers.1.attention.query_key_value",
|
| 88 |
+
"max_abs_gap": 2.384185791015625e-05,
|
| 89 |
+
"max_abs_value": 18.406139373779297,
|
| 90 |
+
"relative_rms": 5.762543635691443e-07,
|
| 91 |
+
"tokens_at_max": [
|
| 92 |
+
1,
|
| 93 |
+
68
|
| 94 |
+
]
|
| 95 |
+
},
|
| 96 |
+
{
|
| 97 |
+
"name": "base_model.model.gpt_neox.layers.1.attention.dense",
|
| 98 |
+
"max_abs_gap": 3.6954879760742188e-06,
|
| 99 |
+
"max_abs_value": 1.9696043729782104,
|
| 100 |
+
"relative_rms": 1.482749931332914e-06,
|
| 101 |
+
"tokens_at_max": [
|
| 102 |
+
0,
|
| 103 |
+
17
|
| 104 |
+
]
|
| 105 |
+
},
|
| 106 |
+
{
|
| 107 |
+
"name": "base_model.model.gpt_neox.layers.1.mlp.dense_h_to_4h",
|
| 108 |
+
"max_abs_gap": 8.106231689453125e-06,
|
| 109 |
+
"max_abs_value": 6.580479621887207,
|
| 110 |
+
"relative_rms": 5.740955080644208e-07,
|
| 111 |
+
"tokens_at_max": [
|
| 112 |
+
0,
|
| 113 |
+
27
|
| 114 |
+
]
|
| 115 |
+
},
|
| 116 |
+
{
|
| 117 |
+
"name": "base_model.model.gpt_neox.layers.1.mlp.dense_4h_to_h",
|
| 118 |
+
"max_abs_gap": 5.364418029785156e-06,
|
| 119 |
+
"max_abs_value": 8.428179740905762,
|
| 120 |
+
"relative_rms": 1.019411984781126e-06,
|
| 121 |
+
"tokens_at_max": [
|
| 122 |
+
1,
|
| 123 |
+
1
|
| 124 |
+
]
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"name": "base_model.model.gpt_neox.layers.1",
|
| 128 |
+
"max_abs_gap": 5.7220458984375e-06,
|
| 129 |
+
"max_abs_value": 17.699954986572266,
|
| 130 |
+
"relative_rms": 6.66230605869857e-07,
|
| 131 |
+
"tokens_at_max": [
|
| 132 |
+
1,
|
| 133 |
+
1
|
| 134 |
+
]
|
| 135 |
+
},
|
| 136 |
+
{
|
| 137 |
+
"name": "base_model.model.gpt_neox.layers.2.input_layernorm",
|
| 138 |
+
"max_abs_gap": 1.049041748046875e-05,
|
| 139 |
+
"max_abs_value": 15.39335823059082,
|
| 140 |
+
"relative_rms": 7.808952792610611e-07,
|
| 141 |
+
"tokens_at_max": [
|
| 142 |
+
1,
|
| 143 |
+
74
|
| 144 |
+
]
|
| 145 |
+
},
|
| 146 |
+
{
|
| 147 |
+
"name": "base_model.model.gpt_neox.layers.2.attention.query_key_value",
|
| 148 |
+
"max_abs_gap": 2.09808349609375e-05,
|
| 149 |
+
"max_abs_value": 14.661574363708496,
|
| 150 |
+
"relative_rms": 7.394456929012431e-07,
|
| 151 |
+
"tokens_at_max": [
|
| 152 |
+
1,
|
| 153 |
+
51
|
| 154 |
+
]
|
| 155 |
+
},
|
| 156 |
+
{
|
| 157 |
+
"name": "base_model.model.gpt_neox.layers.2.attention.dense",
|
| 158 |
+
"max_abs_gap": 4.410743713378906e-06,
|
| 159 |
+
"max_abs_value": 3.247537612915039,
|
| 160 |
+
"relative_rms": 1.7706817978899737e-06,
|
| 161 |
+
"tokens_at_max": [
|
| 162 |
+
1,
|
| 163 |
+
1
|
| 164 |
+
]
|
| 165 |
+
},
|
| 166 |
+
{
|
| 167 |
+
"name": "base_model.model.gpt_neox.layers.2.mlp.dense_h_to_4h",
|
| 168 |
+
"max_abs_gap": 1.1086463928222656e-05,
|
| 169 |
+
"max_abs_value": 7.841897964477539,
|
| 170 |
+
"relative_rms": 7.109477537991856e-07,
|
| 171 |
+
"tokens_at_max": [
|
| 172 |
+
1,
|
| 173 |
+
117
|
| 174 |
+
]
|
| 175 |
+
},
|
| 176 |
+
{
|
| 177 |
+
"name": "base_model.model.gpt_neox.layers.2.mlp.dense_4h_to_h",
|
| 178 |
+
"max_abs_gap": 5.602836608886719e-06,
|
| 179 |
+
"max_abs_value": 6.569574356079102,
|
| 180 |
+
"relative_rms": 1.3217350735472206e-06,
|
| 181 |
+
"tokens_at_max": [
|
| 182 |
+
0,
|
| 183 |
+
27
|
| 184 |
+
]
|
| 185 |
+
},
|
| 186 |
+
{
|
| 187 |
+
"name": "base_model.model.gpt_neox.layers.2",
|
| 188 |
+
"max_abs_gap": 1.1920928955078125e-05,
|
| 189 |
+
"max_abs_value": 22.54996109008789,
|
| 190 |
+
"relative_rms": 7.426089445588375e-07,
|
| 191 |
+
"tokens_at_max": [
|
| 192 |
+
0,
|
| 193 |
+
27
|
| 194 |
+
]
|
| 195 |
+
},
|
| 196 |
+
{
|
| 197 |
+
"name": "base_model.model.gpt_neox.layers.3.input_layernorm",
|
| 198 |
+
"max_abs_gap": 1.52587890625e-05,
|
| 199 |
+
"max_abs_value": 17.398685455322266,
|
| 200 |
+
"relative_rms": 9.163061856238686e-07,
|
| 201 |
+
"tokens_at_max": [
|
| 202 |
+
0,
|
| 203 |
+
27
|
| 204 |
+
]
|
| 205 |
+
},
|
| 206 |
+
{
|
| 207 |
+
"name": "base_model.model.gpt_neox.layers.3.attention.query_key_value",
|
| 208 |
+
"max_abs_gap": 2.288818359375e-05,
|
| 209 |
+
"max_abs_value": 19.307382583618164,
|
| 210 |
+
"relative_rms": 7.53020900376356e-07,
|
| 211 |
+
"tokens_at_max": [
|
| 212 |
+
1,
|
| 213 |
+
111
|
| 214 |
+
]
|
| 215 |
+
},
|
| 216 |
+
{
|
| 217 |
+
"name": "base_model.model.gpt_neox.layers.3.attention.dense",
|
| 218 |
+
"max_abs_gap": 2.384185791015625e-06,
|
| 219 |
+
"max_abs_value": 2.8529860973358154,
|
| 220 |
+
"relative_rms": 1.4469268813501707e-06,
|
| 221 |
+
"tokens_at_max": [
|
| 222 |
+
0,
|
| 223 |
+
103
|
| 224 |
+
]
|
| 225 |
+
},
|
| 226 |
+
{
|
| 227 |
+
"name": "base_model.model.gpt_neox.layers.3.mlp.dense_h_to_4h",
|
| 228 |
+
"max_abs_gap": 2.47955322265625e-05,
|
| 229 |
+
"max_abs_value": 23.164220809936523,
|
| 230 |
+
"relative_rms": 7.831457774732257e-07,
|
| 231 |
+
"tokens_at_max": [
|
| 232 |
+
1,
|
| 233 |
+
124
|
| 234 |
+
]
|
| 235 |
+
},
|
| 236 |
+
{
|
| 237 |
+
"name": "base_model.model.gpt_neox.layers.3.mlp.dense_4h_to_h",
|
| 238 |
+
"max_abs_gap": 1.33514404296875e-05,
|
| 239 |
+
"max_abs_value": 26.68160629272461,
|
| 240 |
+
"relative_rms": 1.4355940691191746e-06,
|
| 241 |
+
"tokens_at_max": [
|
| 242 |
+
1,
|
| 243 |
+
1
|
| 244 |
+
]
|
| 245 |
+
},
|
| 246 |
+
{
|
| 247 |
+
"name": "base_model.model.gpt_neox.layers.3",
|
| 248 |
+
"max_abs_gap": 2.288818359375e-05,
|
| 249 |
+
"max_abs_value": 32.88378143310547,
|
| 250 |
+
"relative_rms": 8.574684292968851e-07,
|
| 251 |
+
"tokens_at_max": [
|
| 252 |
+
1,
|
| 253 |
+
1
|
| 254 |
+
]
|
| 255 |
+
},
|
| 256 |
+
{
|
| 257 |
+
"name": "base_model.model.gpt_neox.layers.4.input_layernorm",
|
| 258 |
+
"max_abs_gap": 1.1444091796875e-05,
|
| 259 |
+
"max_abs_value": 20.122846603393555,
|
| 260 |
+
"relative_rms": 9.983410561545355e-07,
|
| 261 |
+
"tokens_at_max": [
|
| 262 |
+
0,
|
| 263 |
+
27
|
| 264 |
+
]
|
| 265 |
+
},
|
| 266 |
+
{
|
| 267 |
+
"name": "base_model.model.gpt_neox.layers.4.attention.query_key_value",
|
| 268 |
+
"max_abs_gap": 2.47955322265625e-05,
|
| 269 |
+
"max_abs_value": 16.28276252746582,
|
| 270 |
+
"relative_rms": 8.257723195386494e-07,
|
| 271 |
+
"tokens_at_max": [
|
| 272 |
+
1,
|
| 273 |
+
63
|
| 274 |
+
]
|
| 275 |
+
},
|
| 276 |
+
{
|
| 277 |
+
"name": "base_model.model.gpt_neox.layers.4.attention.dense",
|
| 278 |
+
"max_abs_gap": 2.5033950805664062e-06,
|
| 279 |
+
"max_abs_value": 3.3685057163238525,
|
| 280 |
+
"relative_rms": 1.6093770525191568e-06,
|
| 281 |
+
"tokens_at_max": [
|
| 282 |
+
1,
|
| 283 |
+
17
|
| 284 |
+
]
|
| 285 |
+
},
|
| 286 |
+
{
|
| 287 |
+
"name": "base_model.model.gpt_neox.layers.4.mlp.dense_h_to_4h",
|
| 288 |
+
"max_abs_gap": 5.340576171875e-05,
|
| 289 |
+
"max_abs_value": 94.3346939086914,
|
| 290 |
+
"relative_rms": 8.396532438176487e-07,
|
| 291 |
+
"tokens_at_max": [
|
| 292 |
+
0,
|
| 293 |
+
98
|
| 294 |
+
]
|
| 295 |
+
},
|
| 296 |
+
{
|
| 297 |
+
"name": "base_model.model.gpt_neox.layers.4.mlp.dense_4h_to_h",
|
| 298 |
+
"max_abs_gap": 4.57763671875e-05,
|
| 299 |
+
"max_abs_value": 59.07522964477539,
|
| 300 |
+
"relative_rms": 1.1602669527283394e-06,
|
| 301 |
+
"tokens_at_max": [
|
| 302 |
+
0,
|
| 303 |
+
12
|
| 304 |
+
]
|
| 305 |
+
},
|
| 306 |
+
{
|
| 307 |
+
"name": "base_model.model.gpt_neox.layers.4",
|
| 308 |
+
"max_abs_gap": 4.57763671875e-05,
|
| 309 |
+
"max_abs_value": 92.84129333496094,
|
| 310 |
+
"relative_rms": 8.320233661650981e-07,
|
| 311 |
+
"tokens_at_max": [
|
| 312 |
+
0,
|
| 313 |
+
12
|
| 314 |
+
]
|
| 315 |
+
},
|
| 316 |
+
{
|
| 317 |
+
"name": "base_model.model.gpt_neox.layers.5.input_layernorm",
|
| 318 |
+
"max_abs_gap": 1.239776611328125e-05,
|
| 319 |
+
"max_abs_value": 25.20378303527832,
|
| 320 |
+
"relative_rms": 9.090260472019243e-07,
|
| 321 |
+
"tokens_at_max": [
|
| 322 |
+
0,
|
| 323 |
+
27
|
| 324 |
+
]
|
| 325 |
+
},
|
| 326 |
+
{
|
| 327 |
+
"name": "base_model.model.gpt_neox.layers.5.attention.query_key_value",
|
| 328 |
+
"max_abs_gap": 2.288818359375e-05,
|
| 329 |
+
"max_abs_value": 20.782238006591797,
|
| 330 |
+
"relative_rms": 6.987397371089845e-07,
|
| 331 |
+
"tokens_at_max": [
|
| 332 |
+
0,
|
| 333 |
+
1
|
| 334 |
+
]
|
| 335 |
+
},
|
| 336 |
+
{
|
| 337 |
+
"name": "base_model.model.gpt_neox.layers.5.attention.dense",
|
| 338 |
+
"max_abs_gap": 2.6226043701171875e-06,
|
| 339 |
+
"max_abs_value": 2.8001251220703125,
|
| 340 |
+
"relative_rms": 1.49765445058608e-06,
|
| 341 |
+
"tokens_at_max": [
|
| 342 |
+
0,
|
| 343 |
+
120
|
| 344 |
+
]
|
| 345 |
+
},
|
| 346 |
+
{
|
| 347 |
+
"name": "base_model.model.gpt_neox.layers.5.mlp.dense_h_to_4h",
|
| 348 |
+
"max_abs_gap": 0.0001068115234375,
|
| 349 |
+
"max_abs_value": 106.2582778930664,
|
| 350 |
+
"relative_rms": 8.56117667176942e-07,
|
| 351 |
+
"tokens_at_max": [
|
| 352 |
+
0,
|
| 353 |
+
0
|
| 354 |
+
]
|
| 355 |
+
},
|
| 356 |
+
{
|
| 357 |
+
"name": "base_model.model.gpt_neox.layers.5.mlp.dense_4h_to_h",
|
| 358 |
+
"max_abs_gap": 0.000152587890625,
|
| 359 |
+
"max_abs_value": 298.2729797363281,
|
| 360 |
+
"relative_rms": 5.164617797866939e-07,
|
| 361 |
+
"tokens_at_max": [
|
| 362 |
+
0,
|
| 363 |
+
0
|
| 364 |
+
]
|
| 365 |
+
},
|
| 366 |
+
{
|
| 367 |
+
"name": "base_model.model.gpt_neox.layers.5",
|
| 368 |
+
"max_abs_gap": 0.000152587890625,
|
| 369 |
+
"max_abs_value": 315.3481750488281,
|
| 370 |
+
"relative_rms": 5.0503581509296e-07,
|
| 371 |
+
"tokens_at_max": [
|
| 372 |
+
0,
|
| 373 |
+
0
|
| 374 |
+
]
|
| 375 |
+
},
|
| 376 |
+
{
|
| 377 |
+
"name": "base_model.model.gpt_neox.layers.6.input_layernorm",
|
| 378 |
+
"max_abs_gap": 1.049041748046875e-05,
|
| 379 |
+
"max_abs_value": 22.750995635986328,
|
| 380 |
+
"relative_rms": 1.1296391785036883e-06,
|
| 381 |
+
"tokens_at_max": [
|
| 382 |
+
1,
|
| 383 |
+
12
|
| 384 |
+
]
|
| 385 |
+
},
|
| 386 |
+
{
|
| 387 |
+
"name": "base_model.model.gpt_neox.layers.6.attention.query_key_value",
|
| 388 |
+
"max_abs_gap": 2.47955322265625e-05,
|
| 389 |
+
"max_abs_value": 15.281472206115723,
|
| 390 |
+
"relative_rms": 8.577515921553595e-07,
|
| 391 |
+
"tokens_at_max": [
|
| 392 |
+
1,
|
| 393 |
+
110
|
| 394 |
+
]
|
| 395 |
+
},
|
| 396 |
+
{
|
| 397 |
+
"name": "base_model.model.gpt_neox.layers.6.attention.dense",
|
| 398 |
+
"max_abs_gap": 5.7220458984375e-06,
|
| 399 |
+
"max_abs_value": 2.2023231983184814,
|
| 400 |
+
"relative_rms": 2.1419006113143347e-06,
|
| 401 |
+
"tokens_at_max": [
|
| 402 |
+
1,
|
| 403 |
+
73
|
| 404 |
+
]
|
| 405 |
+
},
|
| 406 |
+
{
|
| 407 |
+
"name": "base_model.model.gpt_neox.layers.6.mlp.dense_h_to_4h",
|
| 408 |
+
"max_abs_gap": 4.9591064453125e-05,
|
| 409 |
+
"max_abs_value": 69.7048110961914,
|
| 410 |
+
"relative_rms": 8.476361121962933e-07,
|
| 411 |
+
"tokens_at_max": [
|
| 412 |
+
1,
|
| 413 |
+
113
|
| 414 |
+
]
|
| 415 |
+
},
|
| 416 |
+
{
|
| 417 |
+
"name": "base_model.model.gpt_neox.layers.6.mlp.dense_4h_to_h",
|
| 418 |
+
"max_abs_gap": 0.0001220703125,
|
| 419 |
+
"max_abs_value": 221.91893005371094,
|
| 420 |
+
"relative_rms": 4.2181205825063826e-07,
|
| 421 |
+
"tokens_at_max": [
|
| 422 |
+
0,
|
| 423 |
+
12
|
| 424 |
+
]
|
| 425 |
+
},
|
| 426 |
+
{
|
| 427 |
+
"name": "base_model.model.gpt_neox.layers.6",
|
| 428 |
+
"max_abs_gap": 0.00018310546875,
|
| 429 |
+
"max_abs_value": 527.6139526367188,
|
| 430 |
+
"relative_rms": 3.37366703633109e-07,
|
| 431 |
+
"tokens_at_max": [
|
| 432 |
+
1,
|
| 433 |
+
0
|
| 434 |
+
]
|
| 435 |
+
},
|
| 436 |
+
{
|
| 437 |
+
"name": "base_model.model.gpt_neox.layers.7.input_layernorm",
|
| 438 |
+
"max_abs_gap": 1.1444091796875e-05,
|
| 439 |
+
"max_abs_value": 22.020517349243164,
|
| 440 |
+
"relative_rms": 1.2266026004540486e-06,
|
| 441 |
+
"tokens_at_max": [
|
| 442 |
+
0,
|
| 443 |
+
97
|
| 444 |
+
]
|
| 445 |
+
},
|
| 446 |
+
{
|
| 447 |
+
"name": "base_model.model.gpt_neox.layers.7.attention.query_key_value",
|
| 448 |
+
"max_abs_gap": 2.6702880859375e-05,
|
| 449 |
+
"max_abs_value": 17.947790145874023,
|
| 450 |
+
"relative_rms": 7.958362189931992e-07,
|
| 451 |
+
"tokens_at_max": [
|
| 452 |
+
0,
|
| 453 |
+
69
|
| 454 |
+
]
|
| 455 |
+
},
|
| 456 |
+
{
|
| 457 |
+
"name": "base_model.model.gpt_neox.layers.7.attention.dense",
|
| 458 |
+
"max_abs_gap": 3.933906555175781e-06,
|
| 459 |
+
"max_abs_value": 1.61724853515625,
|
| 460 |
+
"relative_rms": 2.3181166649748076e-06,
|
| 461 |
+
"tokens_at_max": [
|
| 462 |
+
0,
|
| 463 |
+
91
|
| 464 |
+
]
|
| 465 |
+
},
|
| 466 |
+
{
|
| 467 |
+
"name": "base_model.model.gpt_neox.layers.7.mlp.dense_h_to_4h",
|
| 468 |
+
"max_abs_gap": 4.1961669921875e-05,
|
| 469 |
+
"max_abs_value": 28.31519317626953,
|
| 470 |
+
"relative_rms": 9.223035594704969e-07,
|
| 471 |
+
"tokens_at_max": [
|
| 472 |
+
1,
|
| 473 |
+
102
|
| 474 |
+
]
|
| 475 |
+
},
|
| 476 |
+
{
|
| 477 |
+
"name": "base_model.model.gpt_neox.layers.7.mlp.dense_4h_to_h",
|
| 478 |
+
"max_abs_gap": 2.288818359375e-05,
|
| 479 |
+
"max_abs_value": 93.0755386352539,
|
| 480 |
+
"relative_rms": 7.229935742750859e-07,
|
| 481 |
+
"tokens_at_max": [
|
| 482 |
+
1,
|
| 483 |
+
1
|
| 484 |
+
]
|
| 485 |
+
},
|
| 486 |
+
{
|
| 487 |
+
"name": "base_model.model.gpt_neox.layers.7",
|
| 488 |
+
"max_abs_gap": 0.00018310546875,
|
| 489 |
+
"max_abs_value": 610.08349609375,
|
| 490 |
+
"relative_rms": 3.062196776129802e-07,
|
| 491 |
+
"tokens_at_max": [
|
| 492 |
+
0,
|
| 493 |
+
12
|
| 494 |
+
]
|
| 495 |
+
},
|
| 496 |
+
{
|
| 497 |
+
"name": "base_model.model.gpt_neox.layers.8.input_layernorm",
|
| 498 |
+
"max_abs_gap": 1.239776611328125e-05,
|
| 499 |
+
"max_abs_value": 22.42336082458496,
|
| 500 |
+
"relative_rms": 1.3171847499877458e-06,
|
| 501 |
+
"tokens_at_max": [
|
| 502 |
+
1,
|
| 503 |
+
42
|
| 504 |
+
]
|
| 505 |
+
},
|
| 506 |
+
{
|
| 507 |
+
"name": "base_model.model.gpt_neox.layers.8.attention.query_key_value",
|
| 508 |
+
"max_abs_gap": 2.193450927734375e-05,
|
| 509 |
+
"max_abs_value": 16.079593658447266,
|
| 510 |
+
"relative_rms": 8.310492928761393e-07,
|
| 511 |
+
"tokens_at_max": [
|
| 512 |
+
1,
|
| 513 |
+
31
|
| 514 |
+
]
|
| 515 |
+
},
|
| 516 |
+
{
|
| 517 |
+
"name": "base_model.model.gpt_neox.layers.8.attention.dense",
|
| 518 |
+
"max_abs_gap": 5.245208740234375e-06,
|
| 519 |
+
"max_abs_value": 1.9146559238433838,
|
| 520 |
+
"relative_rms": 2.549789326018744e-06,
|
| 521 |
+
"tokens_at_max": [
|
| 522 |
+
0,
|
| 523 |
+
88
|
| 524 |
+
]
|
| 525 |
+
},
|
| 526 |
+
{
|
| 527 |
+
"name": "base_model.model.gpt_neox.layers.8.mlp.dense_h_to_4h",
|
| 528 |
+
"max_abs_gap": 1.430511474609375e-05,
|
| 529 |
+
"max_abs_value": 13.453221321105957,
|
| 530 |
+
"relative_rms": 1.043341547294941e-06,
|
| 531 |
+
"tokens_at_max": [
|
| 532 |
+
0,
|
| 533 |
+
92
|
| 534 |
+
]
|
| 535 |
+
},
|
| 536 |
+
{
|
| 537 |
+
"name": "base_model.model.gpt_neox.layers.8.mlp.dense_4h_to_h",
|
| 538 |
+
"max_abs_gap": 2.6702880859375e-05,
|
| 539 |
+
"max_abs_value": 43.01885223388672,
|
| 540 |
+
"relative_rms": 1.3928632553951028e-06,
|
| 541 |
+
"tokens_at_max": [
|
| 542 |
+
0,
|
| 543 |
+
0
|
| 544 |
+
]
|
| 545 |
+
},
|
| 546 |
+
{
|
| 547 |
+
"name": "base_model.model.gpt_neox.layers.8",
|
| 548 |
+
"max_abs_gap": 0.00018310546875,
|
| 549 |
+
"max_abs_value": 651.2010498046875,
|
| 550 |
+
"relative_rms": 2.9286490313019525e-07,
|
| 551 |
+
"tokens_at_max": [
|
| 552 |
+
0,
|
| 553 |
+
12
|
| 554 |
+
]
|
| 555 |
+
},
|
| 556 |
+
{
|
| 557 |
+
"name": "base_model.model.gpt_neox.layers.9.input_layernorm",
|
| 558 |
+
"max_abs_gap": 1.33514404296875e-05,
|
| 559 |
+
"max_abs_value": 21.649686813354492,
|
| 560 |
+
"relative_rms": 1.3812471431987146e-06,
|
| 561 |
+
"tokens_at_max": [
|
| 562 |
+
1,
|
| 563 |
+
95
|
| 564 |
+
]
|
| 565 |
+
},
|
| 566 |
+
{
|
| 567 |
+
"name": "base_model.model.gpt_neox.layers.9.attention.query_key_value",
|
| 568 |
+
"max_abs_gap": 2.384185791015625e-05,
|
| 569 |
+
"max_abs_value": 16.20388412475586,
|
| 570 |
+
"relative_rms": 9.209652383598928e-07,
|
| 571 |
+
"tokens_at_max": [
|
| 572 |
+
1,
|
| 573 |
+
113
|
| 574 |
+
]
|
| 575 |
+
},
|
| 576 |
+
{
|
| 577 |
+
"name": "base_model.model.gpt_neox.layers.9.attention.dense",
|
| 578 |
+
"max_abs_gap": 1.1682510375976562e-05,
|
| 579 |
+
"max_abs_value": 2.6224303245544434,
|
| 580 |
+
"relative_rms": 2.365374186658478e-06,
|
| 581 |
+
"tokens_at_max": [
|
| 582 |
+
1,
|
| 583 |
+
115
|
| 584 |
+
]
|
| 585 |
+
},
|
| 586 |
+
{
|
| 587 |
+
"name": "base_model.model.gpt_neox.layers.9.mlp.dense_h_to_4h",
|
| 588 |
+
"max_abs_gap": 4.00543212890625e-05,
|
| 589 |
+
"max_abs_value": 6.431606769561768,
|
| 590 |
+
"relative_rms": 1.115543755737856e-06,
|
| 591 |
+
"tokens_at_max": [
|
| 592 |
+
0,
|
| 593 |
+
125
|
| 594 |
+
]
|
| 595 |
+
},
|
| 596 |
+
{
|
| 597 |
+
"name": "base_model.model.gpt_neox.layers.9.mlp.dense_4h_to_h",
|
| 598 |
+
"max_abs_gap": 3.814697265625e-06,
|
| 599 |
+
"max_abs_value": 3.5763766765594482,
|
| 600 |
+
"relative_rms": 2.154436825844218e-06,
|
| 601 |
+
"tokens_at_max": [
|
| 602 |
+
0,
|
| 603 |
+
88
|
| 604 |
+
]
|
| 605 |
+
},
|
| 606 |
+
{
|
| 607 |
+
"name": "base_model.model.gpt_neox.layers.9",
|
| 608 |
+
"max_abs_gap": 0.00018310546875,
|
| 609 |
+
"max_abs_value": 652.6787719726562,
|
| 610 |
+
"relative_rms": 2.9549747462756005e-07,
|
| 611 |
+
"tokens_at_max": [
|
| 612 |
+
0,
|
| 613 |
+
12
|
| 614 |
+
]
|
| 615 |
+
},
|
| 616 |
+
{
|
| 617 |
+
"name": "base_model.model.gpt_neox.layers.10.input_layernorm",
|
| 618 |
+
"max_abs_gap": 2.09808349609375e-05,
|
| 619 |
+
"max_abs_value": 17.91899299621582,
|
| 620 |
+
"relative_rms": 1.4132435302280473e-06,
|
| 621 |
+
"tokens_at_max": [
|
| 622 |
+
1,
|
| 623 |
+
115
|
| 624 |
+
]
|
| 625 |
+
},
|
| 626 |
+
{
|
| 627 |
+
"name": "base_model.model.gpt_neox.layers.10.attention.query_key_value",
|
| 628 |
+
"max_abs_gap": 2.384185791015625e-05,
|
| 629 |
+
"max_abs_value": 21.261045455932617,
|
| 630 |
+
"relative_rms": 5.665982918529083e-07,
|
| 631 |
+
"tokens_at_max": [
|
| 632 |
+
1,
|
| 633 |
+
44
|
| 634 |
+
]
|
| 635 |
+
},
|
| 636 |
+
{
|
| 637 |
+
"name": "base_model.model.gpt_neox.layers.10.attention.dense",
|
| 638 |
+
"max_abs_gap": 9.63360071182251e-06,
|
| 639 |
+
"max_abs_value": 1.569810152053833,
|
| 640 |
+
"relative_rms": 3.128549887723777e-06,
|
| 641 |
+
"tokens_at_max": [
|
| 642 |
+
0,
|
| 643 |
+
52
|
| 644 |
+
]
|
| 645 |
+
},
|
| 646 |
+
{
|
| 647 |
+
"name": "base_model.model.gpt_neox.layers.10.mlp.dense_h_to_4h",
|
| 648 |
+
"max_abs_gap": 1.3768672943115234e-05,
|
| 649 |
+
"max_abs_value": 4.6699066162109375,
|
| 650 |
+
"relative_rms": 1.1452545644526493e-06,
|
| 651 |
+
"tokens_at_max": [
|
| 652 |
+
0,
|
| 653 |
+
86
|
| 654 |
+
]
|
| 655 |
+
},
|
| 656 |
+
{
|
| 657 |
+
"name": "base_model.model.gpt_neox.layers.10.mlp.dense_4h_to_h",
|
| 658 |
+
"max_abs_gap": 4.887580871582031e-06,
|
| 659 |
+
"max_abs_value": 3.4280600547790527,
|
| 660 |
+
"relative_rms": 2.118282753326595e-06,
|
| 661 |
+
"tokens_at_max": [
|
| 662 |
+
1,
|
| 663 |
+
40
|
| 664 |
+
]
|
| 665 |
+
},
|
| 666 |
+
{
|
| 667 |
+
"name": "base_model.model.gpt_neox.layers.10",
|
| 668 |
+
"max_abs_gap": 0.00018310546875,
|
| 669 |
+
"max_abs_value": 653.1604614257812,
|
| 670 |
+
"relative_rms": 3.0901057637297615e-07,
|
| 671 |
+
"tokens_at_max": [
|
| 672 |
+
0,
|
| 673 |
+
12
|
| 674 |
+
]
|
| 675 |
+
},
|
| 676 |
+
{
|
| 677 |
+
"name": "base_model.model.gpt_neox.layers.11.input_layernorm",
|
| 678 |
+
"max_abs_gap": 2.6702880859375e-05,
|
| 679 |
+
"max_abs_value": 19.567428588867188,
|
| 680 |
+
"relative_rms": 1.5301506957535954e-06,
|
| 681 |
+
"tokens_at_max": [
|
| 682 |
+
1,
|
| 683 |
+
115
|
| 684 |
+
]
|
| 685 |
+
},
|
| 686 |
+
{
|
| 687 |
+
"name": "base_model.model.gpt_neox.layers.11.attention.query_key_value",
|
| 688 |
+
"max_abs_gap": 2.47955322265625e-05,
|
| 689 |
+
"max_abs_value": 20.89473533630371,
|
| 690 |
+
"relative_rms": 5.913141469587269e-07,
|
| 691 |
+
"tokens_at_max": [
|
| 692 |
+
0,
|
| 693 |
+
52
|
| 694 |
+
]
|
| 695 |
+
},
|
| 696 |
+
{
|
| 697 |
+
"name": "base_model.model.gpt_neox.layers.11.attention.dense",
|
| 698 |
+
"max_abs_gap": 1.5020370483398438e-05,
|
| 699 |
+
"max_abs_value": 1.4854028224945068,
|
| 700 |
+
"relative_rms": 5.720062988592867e-06,
|
| 701 |
+
"tokens_at_max": [
|
| 702 |
+
0,
|
| 703 |
+
20
|
| 704 |
+
]
|
| 705 |
+
},
|
| 706 |
+
{
|
| 707 |
+
"name": "base_model.model.gpt_neox.layers.11.mlp.dense_h_to_4h",
|
| 708 |
+
"max_abs_gap": 1.9252300262451172e-05,
|
| 709 |
+
"max_abs_value": 4.626473426818848,
|
| 710 |
+
"relative_rms": 1.2416494670691093e-06,
|
| 711 |
+
"tokens_at_max": [
|
| 712 |
+
0,
|
| 713 |
+
52
|
| 714 |
+
]
|
| 715 |
+
},
|
| 716 |
+
{
|
| 717 |
+
"name": "base_model.model.gpt_neox.layers.11.mlp.dense_4h_to_h",
|
| 718 |
+
"max_abs_gap": 7.838010787963867e-06,
|
| 719 |
+
"max_abs_value": 3.216123342514038,
|
| 720 |
+
"relative_rms": 2.1928226222461695e-06,
|
| 721 |
+
"tokens_at_max": [
|
| 722 |
+
0,
|
| 723 |
+
119
|
| 724 |
+
]
|
| 725 |
+
},
|
| 726 |
+
{
|
| 727 |
+
"name": "base_model.model.gpt_neox.layers.11",
|
| 728 |
+
"max_abs_gap": 0.00018310546875,
|
| 729 |
+
"max_abs_value": 653.8958129882812,
|
| 730 |
+
"relative_rms": 3.4962499400472865e-07,
|
| 731 |
+
"tokens_at_max": [
|
| 732 |
+
0,
|
| 733 |
+
12
|
| 734 |
+
]
|
| 735 |
+
},
|
| 736 |
+
{
|
| 737 |
+
"name": "base_model.model.gpt_neox.layers.12.input_layernorm",
|
| 738 |
+
"max_abs_gap": 2.6702880859375e-05,
|
| 739 |
+
"max_abs_value": 19.953630447387695,
|
| 740 |
+
"relative_rms": 1.85824866394271e-06,
|
| 741 |
+
"tokens_at_max": [
|
| 742 |
+
0,
|
| 743 |
+
95
|
| 744 |
+
]
|
| 745 |
+
},
|
| 746 |
+
{
|
| 747 |
+
"name": "base_model.model.gpt_neox.layers.12.attention.query_key_value",
|
| 748 |
+
"max_abs_gap": 7.534027099609375e-05,
|
| 749 |
+
"max_abs_value": 25.511869430541992,
|
| 750 |
+
"relative_rms": 6.441257631770359e-07,
|
| 751 |
+
"tokens_at_max": [
|
| 752 |
+
0,
|
| 753 |
+
53
|
| 754 |
+
]
|
| 755 |
+
},
|
| 756 |
+
{
|
| 757 |
+
"name": "base_model.model.gpt_neox.layers.12.attention.dense",
|
| 758 |
+
"max_abs_gap": 8.687376976013184e-06,
|
| 759 |
+
"max_abs_value": 1.8501089811325073,
|
| 760 |
+
"relative_rms": 3.882458140525723e-06,
|
| 761 |
+
"tokens_at_max": [
|
| 762 |
+
0,
|
| 763 |
+
52
|
| 764 |
+
]
|
| 765 |
+
},
|
| 766 |
+
{
|
| 767 |
+
"name": "base_model.model.gpt_neox.layers.12.mlp.dense_h_to_4h",
|
| 768 |
+
"max_abs_gap": 2.9243528842926025e-05,
|
| 769 |
+
"max_abs_value": 5.292316436767578,
|
| 770 |
+
"relative_rms": 1.3004607673091918e-06,
|
| 771 |
+
"tokens_at_max": [
|
| 772 |
+
0,
|
| 773 |
+
55
|
| 774 |
+
]
|
| 775 |
+
},
|
| 776 |
+
{
|
| 777 |
+
"name": "base_model.model.gpt_neox.layers.12.mlp.dense_4h_to_h",
|
| 778 |
+
"max_abs_gap": 5.513429641723633e-06,
|
| 779 |
+
"max_abs_value": 3.292102575302124,
|
| 780 |
+
"relative_rms": 2.271756963434333e-06,
|
| 781 |
+
"tokens_at_max": [
|
| 782 |
+
0,
|
| 783 |
+
52
|
| 784 |
+
]
|
| 785 |
+
},
|
| 786 |
+
{
|
| 787 |
+
"name": "base_model.model.gpt_neox.layers.12",
|
| 788 |
+
"max_abs_gap": 0.00018310546875,
|
| 789 |
+
"max_abs_value": 654.2213745117188,
|
| 790 |
+
"relative_rms": 3.57006430552649e-07,
|
| 791 |
+
"tokens_at_max": [
|
| 792 |
+
0,
|
| 793 |
+
12
|
| 794 |
+
]
|
| 795 |
+
},
|
| 796 |
+
{
|
| 797 |
+
"name": "base_model.model.gpt_neox.layers.13.input_layernorm",
|
| 798 |
+
"max_abs_gap": 3.230571746826172e-05,
|
| 799 |
+
"max_abs_value": 19.393434524536133,
|
| 800 |
+
"relative_rms": 1.909263612933336e-06,
|
| 801 |
+
"tokens_at_max": [
|
| 802 |
+
0,
|
| 803 |
+
95
|
| 804 |
+
]
|
| 805 |
+
},
|
| 806 |
+
{
|
| 807 |
+
"name": "base_model.model.gpt_neox.layers.13.attention.query_key_value",
|
| 808 |
+
"max_abs_gap": 7.82012939453125e-05,
|
| 809 |
+
"max_abs_value": 45.34965896606445,
|
| 810 |
+
"relative_rms": 6.742088395400184e-07,
|
| 811 |
+
"tokens_at_max": [
|
| 812 |
+
0,
|
| 813 |
+
52
|
| 814 |
+
]
|
| 815 |
+
},
|
| 816 |
+
{
|
| 817 |
+
"name": "base_model.model.gpt_neox.layers.13.attention.dense",
|
| 818 |
+
"max_abs_gap": 4.00543212890625e-05,
|
| 819 |
+
"max_abs_value": 1.3778043985366821,
|
| 820 |
+
"relative_rms": 1.4170323430909e-05,
|
| 821 |
+
"tokens_at_max": [
|
| 822 |
+
0,
|
| 823 |
+
87
|
| 824 |
+
]
|
| 825 |
+
},
|
| 826 |
+
{
|
| 827 |
+
"name": "base_model.model.gpt_neox.layers.13.mlp.dense_h_to_4h",
|
| 828 |
+
"max_abs_gap": 5.245208740234375e-05,
|
| 829 |
+
"max_abs_value": 6.871615409851074,
|
| 830 |
+
"relative_rms": 1.319060742411597e-06,
|
| 831 |
+
"tokens_at_max": [
|
| 832 |
+
0,
|
| 833 |
+
55
|
| 834 |
+
]
|
| 835 |
+
},
|
| 836 |
+
{
|
| 837 |
+
"name": "base_model.model.gpt_neox.layers.13.mlp.dense_4h_to_h",
|
| 838 |
+
"max_abs_gap": 1.7523765563964844e-05,
|
| 839 |
+
"max_abs_value": 4.4081597328186035,
|
| 840 |
+
"relative_rms": 2.2920401502975783e-06,
|
| 841 |
+
"tokens_at_max": [
|
| 842 |
+
0,
|
| 843 |
+
103
|
| 844 |
+
]
|
| 845 |
+
},
|
| 846 |
+
{
|
| 847 |
+
"name": "base_model.model.gpt_neox.layers.13",
|
| 848 |
+
"max_abs_gap": 0.00018310546875,
|
| 849 |
+
"max_abs_value": 654.6845092773438,
|
| 850 |
+
"relative_rms": 6.383006978575023e-07,
|
| 851 |
+
"tokens_at_max": [
|
| 852 |
+
0,
|
| 853 |
+
12
|
| 854 |
+
]
|
| 855 |
+
},
|
| 856 |
+
{
|
| 857 |
+
"name": "base_model.model.gpt_neox.layers.14.input_layernorm",
|
| 858 |
+
"max_abs_gap": 5.0731003284454346e-05,
|
| 859 |
+
"max_abs_value": 15.851959228515625,
|
| 860 |
+
"relative_rms": 3.4389769535013327e-06,
|
| 861 |
+
"tokens_at_max": [
|
| 862 |
+
0,
|
| 863 |
+
54
|
| 864 |
+
]
|
| 865 |
+
},
|
| 866 |
+
{
|
| 867 |
+
"name": "base_model.model.gpt_neox.layers.14.attention.query_key_value",
|
| 868 |
+
"max_abs_gap": 0.0023956298828125,
|
| 869 |
+
"max_abs_value": 524.9828491210938,
|
| 870 |
+
"relative_rms": 1.6980361941182705e-06,
|
| 871 |
+
"tokens_at_max": [
|
| 872 |
+
0,
|
| 873 |
+
103
|
| 874 |
+
]
|
| 875 |
+
},
|
| 876 |
+
{
|
| 877 |
+
"name": "base_model.model.gpt_neox.layers.14.attention.dense",
|
| 878 |
+
"max_abs_gap": 0.00016558170318603516,
|
| 879 |
+
"max_abs_value": 1.0486657619476318,
|
| 880 |
+
"relative_rms": 8.425267580942004e-05,
|
| 881 |
+
"tokens_at_max": [
|
| 882 |
+
0,
|
| 883 |
+
52
|
| 884 |
+
]
|
| 885 |
+
},
|
| 886 |
+
{
|
| 887 |
+
"name": "base_model.model.gpt_neox.layers.14.mlp.dense_h_to_4h",
|
| 888 |
+
"max_abs_gap": 6.0558319091796875e-05,
|
| 889 |
+
"max_abs_value": 12.988927841186523,
|
| 890 |
+
"relative_rms": 2.7181014899203696e-06,
|
| 891 |
+
"tokens_at_max": [
|
| 892 |
+
0,
|
| 893 |
+
103
|
| 894 |
+
]
|
| 895 |
+
},
|
| 896 |
+
{
|
| 897 |
+
"name": "base_model.model.gpt_neox.layers.14.mlp.dense_4h_to_h",
|
| 898 |
+
"max_abs_gap": 2.485513687133789e-05,
|
| 899 |
+
"max_abs_value": 3.8862740993499756,
|
| 900 |
+
"relative_rms": 4.962589881621655e-06,
|
| 901 |
+
"tokens_at_max": [
|
| 902 |
+
0,
|
| 903 |
+
89
|
| 904 |
+
]
|
| 905 |
+
},
|
| 906 |
+
{
|
| 907 |
+
"name": "base_model.model.gpt_neox.layers.14",
|
| 908 |
+
"max_abs_gap": 0.00018310546875,
|
| 909 |
+
"max_abs_value": 655.3150634765625,
|
| 910 |
+
"relative_rms": 2.3407142598839094e-06,
|
| 911 |
+
"tokens_at_max": [
|
| 912 |
+
0,
|
| 913 |
+
12
|
| 914 |
+
]
|
| 915 |
+
},
|
| 916 |
+
{
|
| 917 |
+
"name": "base_model.model.gpt_neox.layers.15.input_layernorm",
|
| 918 |
+
"max_abs_gap": 0.00027883052825927734,
|
| 919 |
+
"max_abs_value": 22.92913818359375,
|
| 920 |
+
"relative_rms": 1.3430483255166066e-05,
|
| 921 |
+
"tokens_at_max": [
|
| 922 |
+
0,
|
| 923 |
+
41
|
| 924 |
+
]
|
| 925 |
+
},
|
| 926 |
+
{
|
| 927 |
+
"name": "base_model.model.gpt_neox.layers.15.attention.query_key_value",
|
| 928 |
+
"max_abs_gap": 0.006488800048828125,
|
| 929 |
+
"max_abs_value": 139.92422485351562,
|
| 930 |
+
"relative_rms": 1.2036916294933557e-05,
|
| 931 |
+
"tokens_at_max": [
|
| 932 |
+
0,
|
| 933 |
+
97
|
| 934 |
+
]
|
| 935 |
+
},
|
| 936 |
+
{
|
| 937 |
+
"name": "base_model.model.gpt_neox.layers.15.attention.dense",
|
| 938 |
+
"max_abs_gap": 7.43865966796875e-05,
|
| 939 |
+
"max_abs_value": 1.3831342458724976,
|
| 940 |
+
"relative_rms": 3.625781715574378e-05,
|
| 941 |
+
"tokens_at_max": [
|
| 942 |
+
1,
|
| 943 |
+
56
|
| 944 |
+
]
|
| 945 |
+
},
|
| 946 |
+
{
|
| 947 |
+
"name": "base_model.model.gpt_neox.layers.15.mlp.dense_h_to_4h",
|
| 948 |
+
"max_abs_gap": 0.00019931793212890625,
|
| 949 |
+
"max_abs_value": 5.665473937988281,
|
| 950 |
+
"relative_rms": 7.50701560180638e-06,
|
| 951 |
+
"tokens_at_max": [
|
| 952 |
+
0,
|
| 953 |
+
52
|
| 954 |
+
]
|
| 955 |
+
},
|
| 956 |
+
{
|
| 957 |
+
"name": "base_model.model.gpt_neox.layers.15.mlp.dense_4h_to_h",
|
| 958 |
+
"max_abs_gap": 8.547306060791016e-05,
|
| 959 |
+
"max_abs_value": 4.346837043762207,
|
| 960 |
+
"relative_rms": 1.3999888403926353e-05,
|
| 961 |
+
"tokens_at_max": [
|
| 962 |
+
0,
|
| 963 |
+
97
|
| 964 |
+
]
|
| 965 |
+
},
|
| 966 |
+
{
|
| 967 |
+
"name": "base_model.model.gpt_neox.layers.15",
|
| 968 |
+
"max_abs_gap": 0.00018310546875,
|
| 969 |
+
"max_abs_value": 655.3131103515625,
|
| 970 |
+
"relative_rms": 2.482563719472909e-06,
|
| 971 |
+
"tokens_at_max": [
|
| 972 |
+
0,
|
| 973 |
+
12
|
| 974 |
+
]
|
| 975 |
+
},
|
| 976 |
+
{
|
| 977 |
+
"name": "base_model.model.gpt_neox.layers.16.input_layernorm",
|
| 978 |
+
"max_abs_gap": 0.0002689361572265625,
|
| 979 |
+
"max_abs_value": 21.729997634887695,
|
| 980 |
+
"relative_rms": 1.427318532949177e-05,
|
| 981 |
+
"tokens_at_max": [
|
| 982 |
+
0,
|
| 983 |
+
52
|
| 984 |
+
]
|
| 985 |
+
},
|
| 986 |
+
{
|
| 987 |
+
"name": "base_model.model.gpt_neox.layers.16.attention.query_key_value",
|
| 988 |
+
"max_abs_gap": 0.0004915595054626465,
|
| 989 |
+
"max_abs_value": 23.044898986816406,
|
| 990 |
+
"relative_rms": 4.997375187330916e-06,
|
| 991 |
+
"tokens_at_max": [
|
| 992 |
+
0,
|
| 993 |
+
52
|
| 994 |
+
]
|
| 995 |
+
},
|
| 996 |
+
{
|
| 997 |
+
"name": "base_model.model.gpt_neox.layers.16.attention.dense",
|
| 998 |
+
"max_abs_gap": 0.00015783309936523438,
|
| 999 |
+
"max_abs_value": 4.56437873840332,
|
| 1000 |
+
"relative_rms": 1.1724904298667388e-05,
|
| 1001 |
+
"tokens_at_max": [
|
| 1002 |
+
0,
|
| 1003 |
+
50
|
| 1004 |
+
]
|
| 1005 |
+
},
|
| 1006 |
+
{
|
| 1007 |
+
"name": "base_model.model.gpt_neox.layers.16.mlp.dense_h_to_4h",
|
| 1008 |
+
"max_abs_gap": 0.00031185150146484375,
|
| 1009 |
+
"max_abs_value": 6.300185680389404,
|
| 1010 |
+
"relative_rms": 8.838814879083553e-06,
|
| 1011 |
+
"tokens_at_max": [
|
| 1012 |
+
0,
|
| 1013 |
+
50
|
| 1014 |
+
]
|
| 1015 |
+
},
|
| 1016 |
+
{
|
| 1017 |
+
"name": "base_model.model.gpt_neox.layers.16.mlp.dense_4h_to_h",
|
| 1018 |
+
"max_abs_gap": 0.00012946128845214844,
|
| 1019 |
+
"max_abs_value": 6.584473609924316,
|
| 1020 |
+
"relative_rms": 1.0129479528988861e-05,
|
| 1021 |
+
"tokens_at_max": [
|
| 1022 |
+
0,
|
| 1023 |
+
52
|
| 1024 |
+
]
|
| 1025 |
+
},
|
| 1026 |
+
{
|
| 1027 |
+
"name": "base_model.model.gpt_neox.layers.16",
|
| 1028 |
+
"max_abs_gap": 0.00031185150146484375,
|
| 1029 |
+
"max_abs_value": 655.0548095703125,
|
| 1030 |
+
"relative_rms": 2.479992946757285e-06,
|
| 1031 |
+
"tokens_at_max": [
|
| 1032 |
+
0,
|
| 1033 |
+
97
|
| 1034 |
+
]
|
| 1035 |
+
},
|
| 1036 |
+
{
|
| 1037 |
+
"name": "base_model.model.gpt_neox.layers.17.input_layernorm",
|
| 1038 |
+
"max_abs_gap": 0.0004596710205078125,
|
| 1039 |
+
"max_abs_value": 23.75990867614746,
|
| 1040 |
+
"relative_rms": 1.0536914198510197e-05,
|
| 1041 |
+
"tokens_at_max": [
|
| 1042 |
+
0,
|
| 1043 |
+
97
|
| 1044 |
+
]
|
| 1045 |
+
},
|
| 1046 |
+
{
|
| 1047 |
+
"name": "base_model.model.gpt_neox.layers.17.attention.query_key_value",
|
| 1048 |
+
"max_abs_gap": 0.0078125,
|
| 1049 |
+
"max_abs_value": 529.2301025390625,
|
| 1050 |
+
"relative_rms": 3.43890319689903e-06,
|
| 1051 |
+
"tokens_at_max": [
|
| 1052 |
+
1,
|
| 1053 |
+
59
|
| 1054 |
+
]
|
| 1055 |
+
},
|
| 1056 |
+
{
|
| 1057 |
+
"name": "base_model.model.gpt_neox.layers.17.attention.dense",
|
| 1058 |
+
"max_abs_gap": 0.00044989585876464844,
|
| 1059 |
+
"max_abs_value": 2.889995813369751,
|
| 1060 |
+
"relative_rms": 9.471994456296235e-05,
|
| 1061 |
+
"tokens_at_max": [
|
| 1062 |
+
1,
|
| 1063 |
+
45
|
| 1064 |
+
]
|
| 1065 |
+
},
|
| 1066 |
+
{
|
| 1067 |
+
"name": "base_model.model.gpt_neox.layers.17.mlp.dense_h_to_4h",
|
| 1068 |
+
"max_abs_gap": 0.00016158819198608398,
|
| 1069 |
+
"max_abs_value": 8.377714157104492,
|
| 1070 |
+
"relative_rms": 7.44798405799073e-06,
|
| 1071 |
+
"tokens_at_max": [
|
| 1072 |
+
0,
|
| 1073 |
+
53
|
| 1074 |
+
]
|
| 1075 |
+
},
|
| 1076 |
+
{
|
| 1077 |
+
"name": "base_model.model.gpt_neox.layers.17.mlp.dense_4h_to_h",
|
| 1078 |
+
"max_abs_gap": 0.0001653432846069336,
|
| 1079 |
+
"max_abs_value": 9.393798828125,
|
| 1080 |
+
"relative_rms": 1.005812357658865e-05,
|
| 1081 |
+
"tokens_at_max": [
|
| 1082 |
+
1,
|
| 1083 |
+
90
|
| 1084 |
+
]
|
| 1085 |
+
},
|
| 1086 |
+
{
|
| 1087 |
+
"name": "base_model.model.gpt_neox.layers.17",
|
| 1088 |
+
"max_abs_gap": 0.0004425048828125,
|
| 1089 |
+
"max_abs_value": 654.2085571289062,
|
| 1090 |
+
"relative_rms": 4.812363785763232e-06,
|
| 1091 |
+
"tokens_at_max": [
|
| 1092 |
+
1,
|
| 1093 |
+
45
|
| 1094 |
+
]
|
| 1095 |
+
},
|
| 1096 |
+
{
|
| 1097 |
+
"name": "base_model.model.gpt_neox.layers.18.input_layernorm",
|
| 1098 |
+
"max_abs_gap": 0.0003428459167480469,
|
| 1099 |
+
"max_abs_value": 19.94373321533203,
|
| 1100 |
+
"relative_rms": 1.755606939902383e-05,
|
| 1101 |
+
"tokens_at_max": [
|
| 1102 |
+
0,
|
| 1103 |
+
64
|
| 1104 |
+
]
|
| 1105 |
+
},
|
| 1106 |
+
{
|
| 1107 |
+
"name": "base_model.model.gpt_neox.layers.18.attention.query_key_value",
|
| 1108 |
+
"max_abs_gap": 0.015289306640625,
|
| 1109 |
+
"max_abs_value": 642.1129760742188,
|
| 1110 |
+
"relative_rms": 5.656620668088673e-06,
|
| 1111 |
+
"tokens_at_max": [
|
| 1112 |
+
1,
|
| 1113 |
+
45
|
| 1114 |
+
]
|
| 1115 |
+
},
|
| 1116 |
+
{
|
| 1117 |
+
"name": "base_model.model.gpt_neox.layers.18.attention.dense",
|
| 1118 |
+
"max_abs_gap": 0.00048357248306274414,
|
| 1119 |
+
"max_abs_value": 1.7377463579177856,
|
| 1120 |
+
"relative_rms": 0.00021125798172512162,
|
| 1121 |
+
"tokens_at_max": [
|
| 1122 |
+
0,
|
| 1123 |
+
55
|
| 1124 |
+
]
|
| 1125 |
+
},
|
| 1126 |
+
{
|
| 1127 |
+
"name": "base_model.model.gpt_neox.layers.18.mlp.dense_h_to_4h",
|
| 1128 |
+
"max_abs_gap": 0.0004303455352783203,
|
| 1129 |
+
"max_abs_value": 17.204357147216797,
|
| 1130 |
+
"relative_rms": 1.3865520576973268e-05,
|
| 1131 |
+
"tokens_at_max": [
|
| 1132 |
+
0,
|
| 1133 |
+
64
|
| 1134 |
+
]
|
| 1135 |
+
},
|
| 1136 |
+
{
|
| 1137 |
+
"name": "base_model.model.gpt_neox.layers.18.mlp.dense_4h_to_h",
|
| 1138 |
+
"max_abs_gap": 0.00020122528076171875,
|
| 1139 |
+
"max_abs_value": 6.786255836486816,
|
| 1140 |
+
"relative_rms": 1.7051635067257892e-05,
|
| 1141 |
+
"tokens_at_max": [
|
| 1142 |
+
0,
|
| 1143 |
+
64
|
| 1144 |
+
]
|
| 1145 |
+
},
|
| 1146 |
+
{
|
| 1147 |
+
"name": "base_model.model.gpt_neox.layers.18",
|
| 1148 |
+
"max_abs_gap": 0.0006084442138671875,
|
| 1149 |
+
"max_abs_value": 651.4319458007812,
|
| 1150 |
+
"relative_rms": 7.828664512375922e-06,
|
| 1151 |
+
"tokens_at_max": [
|
| 1152 |
+
0,
|
| 1153 |
+
97
|
| 1154 |
+
]
|
| 1155 |
+
},
|
| 1156 |
+
{
|
| 1157 |
+
"name": "base_model.model.gpt_neox.layers.19.input_layernorm",
|
| 1158 |
+
"max_abs_gap": 0.0005931854248046875,
|
| 1159 |
+
"max_abs_value": 21.731918334960938,
|
| 1160 |
+
"relative_rms": 2.3317123460363254e-05,
|
| 1161 |
+
"tokens_at_max": [
|
| 1162 |
+
1,
|
| 1163 |
+
91
|
| 1164 |
+
]
|
| 1165 |
+
},
|
| 1166 |
+
{
|
| 1167 |
+
"name": "base_model.model.gpt_neox.layers.19.attention.query_key_value",
|
| 1168 |
+
"max_abs_gap": 0.01470947265625,
|
| 1169 |
+
"max_abs_value": 640.523681640625,
|
| 1170 |
+
"relative_rms": 6.234064354285566e-06,
|
| 1171 |
+
"tokens_at_max": [
|
| 1172 |
+
1,
|
| 1173 |
+
45
|
| 1174 |
+
]
|
| 1175 |
+
},
|
| 1176 |
+
{
|
| 1177 |
+
"name": "base_model.model.gpt_neox.layers.19.attention.dense",
|
| 1178 |
+
"max_abs_gap": 0.0006557703018188477,
|
| 1179 |
+
"max_abs_value": 3.9767050743103027,
|
| 1180 |
+
"relative_rms": 0.0001741164203792999,
|
| 1181 |
+
"tokens_at_max": [
|
| 1182 |
+
0,
|
| 1183 |
+
53
|
| 1184 |
+
]
|
| 1185 |
+
},
|
| 1186 |
+
{
|
| 1187 |
+
"name": "base_model.model.gpt_neox.layers.19.mlp.dense_h_to_4h",
|
| 1188 |
+
"max_abs_gap": 0.0007228851318359375,
|
| 1189 |
+
"max_abs_value": 25.261152267456055,
|
| 1190 |
+
"relative_rms": 1.8904776281187993e-05,
|
| 1191 |
+
"tokens_at_max": [
|
| 1192 |
+
0,
|
| 1193 |
+
53
|
| 1194 |
+
]
|
| 1195 |
+
},
|
| 1196 |
+
{
|
| 1197 |
+
"name": "base_model.model.gpt_neox.layers.19.mlp.dense_4h_to_h",
|
| 1198 |
+
"max_abs_gap": 0.00042748451232910156,
|
| 1199 |
+
"max_abs_value": 11.329166412353516,
|
| 1200 |
+
"relative_rms": 2.4512984017610178e-05,
|
| 1201 |
+
"tokens_at_max": [
|
| 1202 |
+
1,
|
| 1203 |
+
110
|
| 1204 |
+
]
|
| 1205 |
+
},
|
| 1206 |
+
{
|
| 1207 |
+
"name": "base_model.model.gpt_neox.layers.19",
|
| 1208 |
+
"max_abs_gap": 0.0008945465087890625,
|
| 1209 |
+
"max_abs_value": 645.1903076171875,
|
| 1210 |
+
"relative_rms": 1.203310962096045e-05,
|
| 1211 |
+
"tokens_at_max": [
|
| 1212 |
+
1,
|
| 1213 |
+
91
|
| 1214 |
+
]
|
| 1215 |
+
},
|
| 1216 |
+
{
|
| 1217 |
+
"name": "base_model.model.gpt_neox.layers.20.input_layernorm",
|
| 1218 |
+
"max_abs_gap": 0.001544952392578125,
|
| 1219 |
+
"max_abs_value": 36.4130744934082,
|
| 1220 |
+
"relative_rms": 3.1718175646449605e-05,
|
| 1221 |
+
"tokens_at_max": [
|
| 1222 |
+
1,
|
| 1223 |
+
91
|
| 1224 |
+
]
|
| 1225 |
+
},
|
| 1226 |
+
{
|
| 1227 |
+
"name": "base_model.model.gpt_neox.layers.20.attention.query_key_value",
|
| 1228 |
+
"max_abs_gap": 0.0182037353515625,
|
| 1229 |
+
"max_abs_value": 602.9384155273438,
|
| 1230 |
+
"relative_rms": 1.5172176411536552e-05,
|
| 1231 |
+
"tokens_at_max": [
|
| 1232 |
+
1,
|
| 1233 |
+
45
|
| 1234 |
+
]
|
| 1235 |
+
},
|
| 1236 |
+
{
|
| 1237 |
+
"name": "base_model.model.gpt_neox.layers.20.attention.dense",
|
| 1238 |
+
"max_abs_gap": 0.0007804743945598602,
|
| 1239 |
+
"max_abs_value": 5.991945743560791,
|
| 1240 |
+
"relative_rms": 0.00013436755596297518,
|
| 1241 |
+
"tokens_at_max": [
|
| 1242 |
+
0,
|
| 1243 |
+
121
|
| 1244 |
+
]
|
| 1245 |
+
},
|
| 1246 |
+
{
|
| 1247 |
+
"name": "base_model.model.gpt_neox.layers.20.mlp.dense_h_to_4h",
|
| 1248 |
+
"max_abs_gap": 0.0014348030090332031,
|
| 1249 |
+
"max_abs_value": 24.034454345703125,
|
| 1250 |
+
"relative_rms": 2.4666129808496448e-05,
|
| 1251 |
+
"tokens_at_max": [
|
| 1252 |
+
0,
|
| 1253 |
+
64
|
| 1254 |
+
]
|
| 1255 |
+
},
|
| 1256 |
+
{
|
| 1257 |
+
"name": "base_model.model.gpt_neox.layers.20.mlp.dense_4h_to_h",
|
| 1258 |
+
"max_abs_gap": 0.00039196014404296875,
|
| 1259 |
+
"max_abs_value": 14.84354019165039,
|
| 1260 |
+
"relative_rms": 3.497911510194846e-05,
|
| 1261 |
+
"tokens_at_max": [
|
| 1262 |
+
1,
|
| 1263 |
+
122
|
| 1264 |
+
]
|
| 1265 |
+
},
|
| 1266 |
+
{
|
| 1267 |
+
"name": "base_model.model.gpt_neox.layers.20",
|
| 1268 |
+
"max_abs_gap": 0.001430511474609375,
|
| 1269 |
+
"max_abs_value": 630.1370849609375,
|
| 1270 |
+
"relative_rms": 1.4716079361052543e-05,
|
| 1271 |
+
"tokens_at_max": [
|
| 1272 |
+
1,
|
| 1273 |
+
91
|
| 1274 |
+
]
|
| 1275 |
+
},
|
| 1276 |
+
{
|
| 1277 |
+
"name": "base_model.model.gpt_neox.layers.21.input_layernorm",
|
| 1278 |
+
"max_abs_gap": 0.001735687255859375,
|
| 1279 |
+
"max_abs_value": 24.415802001953125,
|
| 1280 |
+
"relative_rms": 3.634903747302999e-05,
|
| 1281 |
+
"tokens_at_max": [
|
| 1282 |
+
1,
|
| 1283 |
+
50
|
| 1284 |
+
]
|
| 1285 |
+
},
|
| 1286 |
+
{
|
| 1287 |
+
"name": "base_model.model.gpt_neox.layers.21.attention.query_key_value",
|
| 1288 |
+
"max_abs_gap": 0.044678688049316406,
|
| 1289 |
+
"max_abs_value": 775.98193359375,
|
| 1290 |
+
"relative_rms": 2.328359783220885e-05,
|
| 1291 |
+
"tokens_at_max": [
|
| 1292 |
+
0,
|
| 1293 |
+
53
|
| 1294 |
+
]
|
| 1295 |
+
},
|
| 1296 |
+
{
|
| 1297 |
+
"name": "base_model.model.gpt_neox.layers.21.attention.dense",
|
| 1298 |
+
"max_abs_gap": 0.0029993057250976562,
|
| 1299 |
+
"max_abs_value": 6.722148418426514,
|
| 1300 |
+
"relative_rms": 0.00015889388385582882,
|
| 1301 |
+
"tokens_at_max": [
|
| 1302 |
+
0,
|
| 1303 |
+
35
|
| 1304 |
+
]
|
| 1305 |
+
},
|
| 1306 |
+
{
|
| 1307 |
+
"name": "base_model.model.gpt_neox.layers.21.mlp.dense_h_to_4h",
|
| 1308 |
+
"max_abs_gap": 0.0010929107666015625,
|
| 1309 |
+
"max_abs_value": 27.890026092529297,
|
| 1310 |
+
"relative_rms": 2.8264523906795763e-05,
|
| 1311 |
+
"tokens_at_max": [
|
| 1312 |
+
0,
|
| 1313 |
+
109
|
| 1314 |
+
]
|
| 1315 |
+
},
|
| 1316 |
+
{
|
| 1317 |
+
"name": "base_model.model.gpt_neox.layers.21.mlp.dense_4h_to_h",
|
| 1318 |
+
"max_abs_gap": 0.0006766319274902344,
|
| 1319 |
+
"max_abs_value": 62.54146194458008,
|
| 1320 |
+
"relative_rms": 2.9184409647138402e-05,
|
| 1321 |
+
"tokens_at_max": [
|
| 1322 |
+
1,
|
| 1323 |
+
120
|
| 1324 |
+
]
|
| 1325 |
+
},
|
| 1326 |
+
{
|
| 1327 |
+
"name": "base_model.model.gpt_neox.layers.21",
|
| 1328 |
+
"max_abs_gap": 0.002902984619140625,
|
| 1329 |
+
"max_abs_value": 566.9014892578125,
|
| 1330 |
+
"relative_rms": 2.029851506860881e-05,
|
| 1331 |
+
"tokens_at_max": [
|
| 1332 |
+
0,
|
| 1333 |
+
35
|
| 1334 |
+
]
|
| 1335 |
+
},
|
| 1336 |
+
{
|
| 1337 |
+
"name": "base_model.model.gpt_neox.layers.22.input_layernorm",
|
| 1338 |
+
"max_abs_gap": 0.0030372142791748047,
|
| 1339 |
+
"max_abs_value": 27.241514205932617,
|
| 1340 |
+
"relative_rms": 4.0577211814317626e-05,
|
| 1341 |
+
"tokens_at_max": [
|
| 1342 |
+
1,
|
| 1343 |
+
106
|
| 1344 |
+
]
|
| 1345 |
+
},
|
| 1346 |
+
{
|
| 1347 |
+
"name": "base_model.model.gpt_neox.layers.22.attention.query_key_value",
|
| 1348 |
+
"max_abs_gap": 0.06003570556640625,
|
| 1349 |
+
"max_abs_value": 898.0181274414062,
|
| 1350 |
+
"relative_rms": 2.33898064413216e-05,
|
| 1351 |
+
"tokens_at_max": [
|
| 1352 |
+
1,
|
| 1353 |
+
106
|
| 1354 |
+
]
|
| 1355 |
+
},
|
| 1356 |
+
{
|
| 1357 |
+
"name": "base_model.model.gpt_neox.layers.22.attention.dense",
|
| 1358 |
+
"max_abs_gap": 0.0027146339416503906,
|
| 1359 |
+
"max_abs_value": 3.661842107772827,
|
| 1360 |
+
"relative_rms": 0.0003161599747251391,
|
| 1361 |
+
"tokens_at_max": [
|
| 1362 |
+
1,
|
| 1363 |
+
83
|
| 1364 |
+
]
|
| 1365 |
+
},
|
| 1366 |
+
{
|
| 1367 |
+
"name": "base_model.model.gpt_neox.layers.22.mlp.dense_h_to_4h",
|
| 1368 |
+
"max_abs_gap": 0.0011353492736816406,
|
| 1369 |
+
"max_abs_value": 16.722763061523438,
|
| 1370 |
+
"relative_rms": 3.3983399807033945e-05,
|
| 1371 |
+
"tokens_at_max": [
|
| 1372 |
+
0,
|
| 1373 |
+
64
|
| 1374 |
+
]
|
| 1375 |
+
},
|
| 1376 |
+
{
|
| 1377 |
+
"name": "base_model.model.gpt_neox.layers.22.mlp.dense_4h_to_h",
|
| 1378 |
+
"max_abs_gap": 0.0008884668350219727,
|
| 1379 |
+
"max_abs_value": 292.5569763183594,
|
| 1380 |
+
"relative_rms": 1.4793545917842143e-05,
|
| 1381 |
+
"tokens_at_max": [
|
| 1382 |
+
0,
|
| 1383 |
+
35
|
| 1384 |
+
]
|
| 1385 |
+
},
|
| 1386 |
+
{
|
| 1387 |
+
"name": "base_model.model.gpt_neox.layers.22",
|
| 1388 |
+
"max_abs_gap": 0.0026607513427734375,
|
| 1389 |
+
"max_abs_value": 276.8265686035156,
|
| 1390 |
+
"relative_rms": 4.180718058479702e-05,
|
| 1391 |
+
"tokens_at_max": [
|
| 1392 |
+
1,
|
| 1393 |
+
43
|
| 1394 |
+
]
|
| 1395 |
+
},
|
| 1396 |
+
{
|
| 1397 |
+
"name": "base_model.model.gpt_neox.layers.23.input_layernorm",
|
| 1398 |
+
"max_abs_gap": 0.0040607452392578125,
|
| 1399 |
+
"max_abs_value": 53.87395095825195,
|
| 1400 |
+
"relative_rms": 5.154414657782089e-05,
|
| 1401 |
+
"tokens_at_max": [
|
| 1402 |
+
0,
|
| 1403 |
+
96
|
| 1404 |
+
]
|
| 1405 |
+
},
|
| 1406 |
+
{
|
| 1407 |
+
"name": "base_model.model.gpt_neox.layers.23.attention.query_key_value",
|
| 1408 |
+
"max_abs_gap": 0.07127568125724792,
|
| 1409 |
+
"max_abs_value": 721.5701904296875,
|
| 1410 |
+
"relative_rms": 3.228014644149212e-05,
|
| 1411 |
+
"tokens_at_max": [
|
| 1412 |
+
0,
|
| 1413 |
+
55
|
| 1414 |
+
]
|
| 1415 |
+
},
|
| 1416 |
+
{
|
| 1417 |
+
"name": "base_model.model.gpt_neox.layers.23.attention.dense",
|
| 1418 |
+
"max_abs_gap": 0.001585245132446289,
|
| 1419 |
+
"max_abs_value": 5.612361431121826,
|
| 1420 |
+
"relative_rms": 0.00023014131507444877,
|
| 1421 |
+
"tokens_at_max": [
|
| 1422 |
+
1,
|
| 1423 |
+
18
|
| 1424 |
+
]
|
| 1425 |
+
},
|
| 1426 |
+
{
|
| 1427 |
+
"name": "base_model.model.gpt_neox.layers.23.mlp.dense_h_to_4h",
|
| 1428 |
+
"max_abs_gap": 0.0037593841552734375,
|
| 1429 |
+
"max_abs_value": 40.99713897705078,
|
| 1430 |
+
"relative_rms": 4.110116035797986e-05,
|
| 1431 |
+
"tokens_at_max": [
|
| 1432 |
+
0,
|
| 1433 |
+
55
|
| 1434 |
+
]
|
| 1435 |
+
},
|
| 1436 |
+
{
|
| 1437 |
+
"name": "base_model.model.gpt_neox.layers.23.mlp.dense_4h_to_h",
|
| 1438 |
+
"max_abs_gap": 0.0027112960815429688,
|
| 1439 |
+
"max_abs_value": 269.8653259277344,
|
| 1440 |
+
"relative_rms": 2.0936656236058123e-05,
|
| 1441 |
+
"tokens_at_max": [
|
| 1442 |
+
1,
|
| 1443 |
+
43
|
| 1444 |
+
]
|
| 1445 |
+
},
|
| 1446 |
+
{
|
| 1447 |
+
"name": "base_model.model.gpt_neox.layers.23",
|
| 1448 |
+
"max_abs_gap": 0.00188446044921875,
|
| 1449 |
+
"max_abs_value": 54.347686767578125,
|
| 1450 |
+
"relative_rms": 6.879849658004294e-05,
|
| 1451 |
+
"tokens_at_max": [
|
| 1452 |
+
1,
|
| 1453 |
+
50
|
| 1454 |
+
]
|
| 1455 |
+
},
|
| 1456 |
+
{
|
| 1457 |
+
"name": "base_model.model.gpt_neox.final_layer_norm",
|
| 1458 |
+
"max_abs_gap": 0.002675771713256836,
|
| 1459 |
+
"max_abs_value": 50.99740982055664,
|
| 1460 |
+
"relative_rms": 7.207863419402131e-05,
|
| 1461 |
+
"tokens_at_max": [
|
| 1462 |
+
0,
|
| 1463 |
+
92
|
| 1464 |
+
]
|
| 1465 |
+
}
|
| 1466 |
+
]
|
| 1467 |
+
}
|
research/results/verification/pythia-fp64-agreement.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"timestamp": "2026-11-25T07:46:08+00:00",
|
| 3 |
+
"relative_gradient_difference": 1.4164963675817825e-05,
|
| 4 |
+
"cosine": 0.9999999999034994,
|
| 5 |
+
"max_abs_difference": 1537666745.1381836
|
| 6 |
+
}
|
research/results/verification/pythia-fp64-cpu.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"timestamp": "2026-11-25T07:41:15+00:00",
|
| 3 |
+
"device": "cpu",
|
| 4 |
+
"dtype": "float64",
|
| 5 |
+
"initial_trainable_sha256": "1c45ca4d5b3a6cd1b53eadaa7df8af15e21a040a8a61aa7f0e91d1b6f019320b",
|
| 6 |
+
"probes_sha256": "7ab2a090e32d3e2d93af10cc9161953f4227dc6e1ff5950d9f59be0a4235da13",
|
| 7 |
+
"two_window_cross_entropy": 3.2335151510901134,
|
| 8 |
+
"max_logit_abs_difference": 6.341593916658894e-12,
|
| 9 |
+
"penalty": 834685395129.9045,
|
| 10 |
+
"gradient_norm": 910729436494438.9,
|
| 11 |
+
"finite": true,
|
| 12 |
+
"probe_seconds": 59.94162890000007
|
| 13 |
+
}
|
research/results/verification/pythia-fp64-cuda.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"timestamp": "2026-11-25T07:46:08+00:00",
|
| 3 |
+
"device": "cuda",
|
| 4 |
+
"dtype": "float64",
|
| 5 |
+
"initial_trainable_sha256": "1c45ca4d5b3a6cd1b53eadaa7df8af15e21a040a8a61aa7f0e91d1b6f019320b",
|
| 6 |
+
"probes_sha256": "7ab2a090e32d3e2d93af10cc9161953f4227dc6e1ff5950d9f59be0a4235da13",
|
| 7 |
+
"two_window_cross_entropy": 3.2335151449211725,
|
| 8 |
+
"max_logit_abs_difference": 4.354738791789714e-12,
|
| 9 |
+
"penalty": 834685852890.465,
|
| 10 |
+
"gradient_norm": 910726918311241.1,
|
| 11 |
+
"finite": true,
|
| 12 |
+
"probe_seconds": 170.7373062000006
|
| 13 |
+
}
|
research/results/verification/stories-full-gradient.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"timestamp": "2026-11-25T07:48:18+00:00",
|
| 3 |
+
"initial_trainable_sha256": "2bcde9c9e4606ee32e6deab703f5efefa0f5d7bd8fab71ebcf6ef28494900958",
|
| 4 |
+
"calibration_seed": 6247,
|
| 5 |
+
"draw": 0,
|
| 6 |
+
"cpu_fp64_penalty": 11725323512.359177,
|
| 7 |
+
"cuda_fp32_penalty": 11725321216.0,
|
| 8 |
+
"cpu_fp64_gradient_norm": 519103298466.8055,
|
| 9 |
+
"cuda_fp32_gradient_norm": 519103237713.8237,
|
| 10 |
+
"relative_gradient_difference": 5.276347670311856e-07,
|
| 11 |
+
"gradient_cosine": 0.9999999999998281
|
| 12 |
+
}
|
research/results/verification/tests.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
| 1 |
{
|
| 2 |
-
"checked_at": "2026-11-25T07:
|
| 3 |
-
"git_revision": "
|
| 4 |
"exit_code": 0,
|
| 5 |
"cases": [
|
| 6 |
{
|
| 7 |
"test": "tests.test_analysis.test_wins_require_both_registered_exact_sign_tests",
|
| 8 |
-
"seconds": 0.
|
| 9 |
"outcome": "passed"
|
| 10 |
},
|
| 11 |
{
|
| 12 |
"test": "tests.test_analysis.test_second_comparator_failure_and_ties_count_separately",
|
| 13 |
-
"seconds": 0.
|
| 14 |
"outcome": "passed"
|
| 15 |
},
|
| 16 |
{
|
|
@@ -85,7 +85,7 @@
|
|
| 85 |
},
|
| 86 |
{
|
| 87 |
"test": "tests.test_analysis.test_time_matched_comparison_uses_one_validation_population_across_methods",
|
| 88 |
-
"seconds": 0.
|
| 89 |
"outcome": "passed"
|
| 90 |
},
|
| 91 |
{
|
|
@@ -95,42 +95,42 @@
|
|
| 95 |
},
|
| 96 |
{
|
| 97 |
"test": "tests.test_data.test_prefix_candidates_match_exhaustive_jaccard_including_boundary",
|
| 98 |
-
"seconds": 0.
|
| 99 |
"outcome": "passed"
|
| 100 |
},
|
| 101 |
{
|
| 102 |
"test": "tests.test_data.test_abstract_submission_month_and_base_id_grouping",
|
| 103 |
-
"seconds": 0.
|
| 104 |
"outcome": "passed"
|
| 105 |
},
|
| 106 |
{
|
| 107 |
"test": "tests.test_data.test_prepare_from_parquet_proves_train_only_fit_packing_and_repair",
|
| 108 |
-
"seconds": 0.
|
| 109 |
"outcome": "passed"
|
| 110 |
},
|
| 111 |
{
|
| 112 |
"test": "tests.test_derivatives.test_gpu_production_decoder_third_order_update_matches_cpu",
|
| 113 |
-
"seconds": 2.
|
| 114 |
"outcome": "passed"
|
| 115 |
},
|
| 116 |
{
|
| 117 |
"test": "tests.test_derivatives.test_quartic_penalty_retains_fourth_derivative",
|
| 118 |
-
"seconds": 0.
|
| 119 |
"outcome": "passed"
|
| 120 |
},
|
| 121 |
{
|
| 122 |
"test": "tests.test_derivatives.test_mixed_cubic_exactly_averages_to_tensor_norm",
|
| 123 |
-
"seconds": 0.
|
| 124 |
"outcome": "passed"
|
| 125 |
},
|
| 126 |
{
|
| 127 |
"test": "tests.test_derivatives.test_random_probe_generator_gives_independent_directions",
|
| 128 |
-
"seconds": 0.
|
| 129 |
"outcome": "passed"
|
| 130 |
},
|
| 131 |
{
|
| 132 |
"test": "tests.test_derivatives.test_penalty_supports_linear_loss_and_unused_coordinates[third]",
|
| 133 |
-
"seconds": 0.
|
| 134 |
"outcome": "passed"
|
| 135 |
},
|
| 136 |
{
|
|
@@ -150,27 +150,27 @@
|
|
| 150 |
},
|
| 151 |
{
|
| 152 |
"test": "tests.test_derivatives.test_signed_hessian_trace_and_squared_norm_have_correct_gradients",
|
| 153 |
-
"seconds": 0.
|
| 154 |
"outcome": "passed"
|
| 155 |
},
|
| 156 |
{
|
| 157 |
"test": "tests.test_derivatives.test_tiny_transformer_against_dense_tensor_and_finite_differences",
|
| 158 |
-
"seconds":
|
| 159 |
"outcome": "passed"
|
| 160 |
},
|
| 161 |
{
|
| 162 |
"test": "tests.test_derivatives.test_actual_adamw_update_responds_to_the_third_order_term",
|
| 163 |
-
"seconds": 0.
|
| 164 |
"outcome": "passed"
|
| 165 |
},
|
| 166 |
{
|
| 167 |
"test": "tests.test_derivatives.test_production_story_model_exposes_full_weight_penalty_gradient",
|
| 168 |
-
"seconds": 0.
|
| 169 |
"outcome": "passed"
|
| 170 |
},
|
| 171 |
{
|
| 172 |
"test": "tests.test_derivatives.test_pythia_adapter_fourth_derivative_and_portable_checkpoint",
|
| 173 |
-
"seconds": 4.
|
| 174 |
"outcome": "passed",
|
| 175 |
"measurements": {
|
| 176 |
"adapter_directional_autograd": "9035.374247002468",
|
|
@@ -179,32 +179,32 @@
|
|
| 179 |
},
|
| 180 |
{
|
| 181 |
"test": "tests.test_derivatives.test_large_finite_gradient_norm_survives_squaring",
|
| 182 |
-
"seconds": 0.
|
| 183 |
"outcome": "passed"
|
| 184 |
},
|
| 185 |
{
|
| 186 |
"test": "tests.test_derivatives.test_sequential_windows_reproduce_joint_penalty_and_training_gradient",
|
| 187 |
-
"seconds": 0.
|
| 188 |
"outcome": "passed"
|
| 189 |
},
|
| 190 |
{
|
| 191 |
"test": "tests.test_reporting.test_snapshot_keeps_full_score_and_trace_semantics",
|
| 192 |
-
"seconds": 0.
|
| 193 |
"outcome": "passed"
|
| 194 |
},
|
| 195 |
{
|
| 196 |
"test": "tests.test_reporting.test_report_before_first_run_keeps_readme_and_emits_protocol_paper",
|
| 197 |
-
"seconds": 0.
|
| 198 |
"outcome": "passed"
|
| 199 |
},
|
| 200 |
{
|
| 201 |
"test": "tests.test_training.test_randomized_control_preserves_coordinate_magnitudes_and_zero_is_noop",
|
| 202 |
-
"seconds": 0.
|
| 203 |
"outcome": "passed"
|
| 204 |
},
|
| 205 |
{
|
| 206 |
"test": "tests.test_training.test_step_recovery_matches_uninterrupted_weights",
|
| 207 |
-
"seconds":
|
| 208 |
"outcome": "passed"
|
| 209 |
}
|
| 210 |
]
|
|
|
|
| 1 |
{
|
| 2 |
+
"checked_at": "2026-11-25T07:54:35+00:00",
|
| 3 |
+
"git_revision": "7412d483aa852eef3bba78ecf33912c8be8a3eb0",
|
| 4 |
"exit_code": 0,
|
| 5 |
"cases": [
|
| 6 |
{
|
| 7 |
"test": "tests.test_analysis.test_wins_require_both_registered_exact_sign_tests",
|
| 8 |
+
"seconds": 0.002,
|
| 9 |
"outcome": "passed"
|
| 10 |
},
|
| 11 |
{
|
| 12 |
"test": "tests.test_analysis.test_second_comparator_failure_and_ties_count_separately",
|
| 13 |
+
"seconds": 0.002,
|
| 14 |
"outcome": "passed"
|
| 15 |
},
|
| 16 |
{
|
|
|
|
| 85 |
},
|
| 86 |
{
|
| 87 |
"test": "tests.test_analysis.test_time_matched_comparison_uses_one_validation_population_across_methods",
|
| 88 |
+
"seconds": 0.002,
|
| 89 |
"outcome": "passed"
|
| 90 |
},
|
| 91 |
{
|
|
|
|
| 95 |
},
|
| 96 |
{
|
| 97 |
"test": "tests.test_data.test_prefix_candidates_match_exhaustive_jaccard_including_boundary",
|
| 98 |
+
"seconds": 0.058,
|
| 99 |
"outcome": "passed"
|
| 100 |
},
|
| 101 |
{
|
| 102 |
"test": "tests.test_data.test_abstract_submission_month_and_base_id_grouping",
|
| 103 |
+
"seconds": 0.053,
|
| 104 |
"outcome": "passed"
|
| 105 |
},
|
| 106 |
{
|
| 107 |
"test": "tests.test_data.test_prepare_from_parquet_proves_train_only_fit_packing_and_repair",
|
| 108 |
+
"seconds": 0.451,
|
| 109 |
"outcome": "passed"
|
| 110 |
},
|
| 111 |
{
|
| 112 |
"test": "tests.test_derivatives.test_gpu_production_decoder_third_order_update_matches_cpu",
|
| 113 |
+
"seconds": 2.731,
|
| 114 |
"outcome": "passed"
|
| 115 |
},
|
| 116 |
{
|
| 117 |
"test": "tests.test_derivatives.test_quartic_penalty_retains_fourth_derivative",
|
| 118 |
+
"seconds": 0.006,
|
| 119 |
"outcome": "passed"
|
| 120 |
},
|
| 121 |
{
|
| 122 |
"test": "tests.test_derivatives.test_mixed_cubic_exactly_averages_to_tensor_norm",
|
| 123 |
+
"seconds": 0.044,
|
| 124 |
"outcome": "passed"
|
| 125 |
},
|
| 126 |
{
|
| 127 |
"test": "tests.test_derivatives.test_random_probe_generator_gives_independent_directions",
|
| 128 |
+
"seconds": 0.172,
|
| 129 |
"outcome": "passed"
|
| 130 |
},
|
| 131 |
{
|
| 132 |
"test": "tests.test_derivatives.test_penalty_supports_linear_loss_and_unused_coordinates[third]",
|
| 133 |
+
"seconds": 0.003,
|
| 134 |
"outcome": "passed"
|
| 135 |
},
|
| 136 |
{
|
|
|
|
| 150 |
},
|
| 151 |
{
|
| 152 |
"test": "tests.test_derivatives.test_signed_hessian_trace_and_squared_norm_have_correct_gradients",
|
| 153 |
+
"seconds": 0.005,
|
| 154 |
"outcome": "passed"
|
| 155 |
},
|
| 156 |
{
|
| 157 |
"test": "tests.test_derivatives.test_tiny_transformer_against_dense_tensor_and_finite_differences",
|
| 158 |
+
"seconds": 2.44,
|
| 159 |
"outcome": "passed"
|
| 160 |
},
|
| 161 |
{
|
| 162 |
"test": "tests.test_derivatives.test_actual_adamw_update_responds_to_the_third_order_term",
|
| 163 |
+
"seconds": 0.019,
|
| 164 |
"outcome": "passed"
|
| 165 |
},
|
| 166 |
{
|
| 167 |
"test": "tests.test_derivatives.test_production_story_model_exposes_full_weight_penalty_gradient",
|
| 168 |
+
"seconds": 0.046,
|
| 169 |
"outcome": "passed"
|
| 170 |
},
|
| 171 |
{
|
| 172 |
"test": "tests.test_derivatives.test_pythia_adapter_fourth_derivative_and_portable_checkpoint",
|
| 173 |
+
"seconds": 4.959,
|
| 174 |
"outcome": "passed",
|
| 175 |
"measurements": {
|
| 176 |
"adapter_directional_autograd": "9035.374247002468",
|
|
|
|
| 179 |
},
|
| 180 |
{
|
| 181 |
"test": "tests.test_derivatives.test_large_finite_gradient_norm_survives_squaring",
|
| 182 |
+
"seconds": 0.003,
|
| 183 |
"outcome": "passed"
|
| 184 |
},
|
| 185 |
{
|
| 186 |
"test": "tests.test_derivatives.test_sequential_windows_reproduce_joint_penalty_and_training_gradient",
|
| 187 |
+
"seconds": 0.109,
|
| 188 |
"outcome": "passed"
|
| 189 |
},
|
| 190 |
{
|
| 191 |
"test": "tests.test_reporting.test_snapshot_keeps_full_score_and_trace_semantics",
|
| 192 |
+
"seconds": 0.014,
|
| 193 |
"outcome": "passed"
|
| 194 |
},
|
| 195 |
{
|
| 196 |
"test": "tests.test_reporting.test_report_before_first_run_keeps_readme_and_emits_protocol_paper",
|
| 197 |
+
"seconds": 0.586,
|
| 198 |
"outcome": "passed"
|
| 199 |
},
|
| 200 |
{
|
| 201 |
"test": "tests.test_training.test_randomized_control_preserves_coordinate_magnitudes_and_zero_is_noop",
|
| 202 |
+
"seconds": 0.134,
|
| 203 |
"outcome": "passed"
|
| 204 |
},
|
| 205 |
{
|
| 206 |
"test": "tests.test_training.test_step_recovery_matches_uninterrupted_weights",
|
| 207 |
+
"seconds": 2.016,
|
| 208 |
"outcome": "passed"
|
| 209 |
}
|
| 210 |
]
|
research/src/thirdloss/cli.py
CHANGED
|
@@ -45,6 +45,7 @@ def parser():
|
|
| 45 |
if action=="verify":
|
| 46 |
sub.add_argument("--pretrained",action="store_true",help="Also compare a full joint derivative on the prepared adapter training corpus")
|
| 47 |
sub.add_argument("--reference",action="store_true",help="Compute the FP64 pretrained reference using the original CUDA signs")
|
|
|
|
| 48 |
sub.add_argument("--device",default="cuda",help="Device for the optional full pretrained cross-check")
|
| 49 |
if action=="train":
|
| 50 |
sub.add_argument("--method",choices=(*METHODS,"unigram","initial"),required=True)
|
|
@@ -79,6 +80,10 @@ def main(argv=None):
|
|
| 79 |
from .precision import reference_gradient
|
| 80 |
from .records import setup_device
|
| 81 |
reference_gradient(project,setup_device(args.device))
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
return
|
| 83 |
if args.action=="dashboard":
|
| 84 |
return dashboard(project,args.port)
|
|
|
|
| 45 |
if action=="verify":
|
| 46 |
sub.add_argument("--pretrained",action="store_true",help="Also compare a full joint derivative on the prepared adapter training corpus")
|
| 47 |
sub.add_argument("--reference",action="store_true",help="Compute the FP64 pretrained reference using the original CUDA signs")
|
| 48 |
+
sub.add_argument("--scoring-batches",action="store_true",help="Benchmark Pythia inference grouping on training windows")
|
| 49 |
sub.add_argument("--device",default="cuda",help="Device for the optional full pretrained cross-check")
|
| 50 |
if action=="train":
|
| 51 |
sub.add_argument("--method",choices=(*METHODS,"unigram","initial"),required=True)
|
|
|
|
| 80 |
from .precision import reference_gradient
|
| 81 |
from .records import setup_device
|
| 82 |
reference_gradient(project,setup_device(args.device))
|
| 83 |
+
if args.scoring_batches:
|
| 84 |
+
from .probe_check import benchmark_scoring
|
| 85 |
+
from .records import setup_device
|
| 86 |
+
benchmark_scoring(project,setup_device(args.device))
|
| 87 |
return
|
| 88 |
if args.action=="dashboard":
|
| 89 |
return dashboard(project,args.port)
|
research/src/thirdloss/models.py
CHANGED
|
@@ -134,6 +134,30 @@ def logits_of(model, ids):
|
|
| 134 |
return out if isinstance(out, torch.Tensor) else out.logits
|
| 135 |
|
| 136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
def trainable_digest(model):
|
| 138 |
"""Fingerprint each named trainable tensor at initialization to audit seed pairing."""
|
| 139 |
digest = hashlib.sha256()
|
|
|
|
| 134 |
return out if isinstance(out, torch.Tensor) else out.logits
|
| 135 |
|
| 136 |
|
| 137 |
+
def dtype_attention(module,query,key,value,attention_mask,scaling,dropout=0.0,**kwargs):
|
| 138 |
+
"""The upstream GPT-NeoX eager attention formula, retaining FP64 at softmax.
|
| 139 |
+
|
| 140 |
+
https://github.com/huggingface/transformers/blob/main/src/transformers/models/gpt_neox/modeling_gpt_neox.py
|
| 141 |
+
"""
|
| 142 |
+
scores = (query @ key.transpose(-2,-1))*scaling
|
| 143 |
+
if attention_mask is not None:
|
| 144 |
+
scores = scores+attention_mask
|
| 145 |
+
weights = F.dropout(scores.softmax(-1),p=dropout,training=module.training)
|
| 146 |
+
return (weights @ value).transpose(1,2).contiguous(),weights
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
def widen_pythia(model):
|
| 150 |
+
"""Use the registered eager mask with dtype-preserving attention on this replica only."""
|
| 151 |
+
from transformers import AttentionInterface, AttentionMaskInterface
|
| 152 |
+
from transformers.masking_utils import eager_mask
|
| 153 |
+
# Register both hooks so attention stays causal. https://huggingface.co/docs/transformers/attention_interface
|
| 154 |
+
name = "thirdloss_eager_fp64"
|
| 155 |
+
AttentionInterface.register(name,dtype_attention)
|
| 156 |
+
AttentionMaskInterface.register(name,eager_mask)
|
| 157 |
+
model.get_base_model().set_attn_implementation(name)
|
| 158 |
+
return model.double().eval()
|
| 159 |
+
|
| 160 |
+
|
| 161 |
def trainable_digest(model):
|
| 162 |
"""Fingerprint each named trainable tensor at initialization to audit seed pairing."""
|
| 163 |
digest = hashlib.sha256()
|
research/src/thirdloss/objectives.py
CHANGED
|
@@ -2,9 +2,10 @@
|
|
| 2 |
|
| 3 |
import statistics
|
| 4 |
import time
|
|
|
|
| 5 |
import torch
|
| 6 |
|
| 7 |
-
from .models import build_model, logits_of, token_loss, token_nll
|
| 8 |
from .penalties import estimate, inner, partials, random_signs, third_contraction
|
| 9 |
from .records import BATCHES, read_json, sha256, time_now, write_json
|
| 10 |
from .windows import TrainingWindows, generator, probe_rows
|
|
@@ -56,10 +57,41 @@ def two_window_third_gradient(model, parameters, inputs, targets, u, v):
|
|
| 56 |
return inner(mean,mean), tuple(a+b for a,b in zip(grad_first,grad_second,strict=True))
|
| 57 |
|
| 58 |
|
| 59 |
-
def
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
"""Differentiate the sampled penalty, including the fourth-order contraction."""
|
| 61 |
rng = generator(inputs.device, seed, step, 827)
|
| 62 |
rows = probe_rows(seed, step, len(inputs))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
if kind == "third" and hasattr(model, "peft_config"):
|
| 64 |
u, v = random_signs(parameters,rng), random_signs(parameters,rng)
|
| 65 |
return two_window_third_gradient(model,parameters,inputs[rows],targets[rows],u,v)
|
|
@@ -70,21 +102,26 @@ def probe_gradient(model, parameters, inputs, targets, kind, seed, step):
|
|
| 70 |
|
| 71 |
def calibrate(project, storage, stage, kind, device, microbatch):
|
| 72 |
"""Fix unit-strength scales for all seeds using only training data at pilot initialization."""
|
| 73 |
-
|
|
|
|
| 74 |
data = storage / "data" / stage
|
| 75 |
fingerprint = sha256(data/"manifest.json")
|
| 76 |
if path.exists():
|
| 77 |
existing = read_json(path)
|
| 78 |
if existing["data_manifest_sha256"] != fingerprint:
|
| 79 |
raise ValueError(f"Calibration data changed for {stage}")
|
|
|
|
|
|
|
| 80 |
return existing["unit_lambda"]
|
| 81 |
model = build_model(stage, 0, device, storage)
|
|
|
|
| 82 |
parameters = tuple(p for p in model.parameters() if p.requires_grad)
|
| 83 |
windows = TrainingWindows(data/"train.bin", 6247, BATCHES[stage])
|
| 84 |
# Each draw has its own data/probe address. A reboot can resume a long calibration
|
| 85 |
# without mixing corpora, physical batching or old estimator implementations.
|
| 86 |
-
work = storage/"calibration"/f"{stage}-{kind}-draws.json"
|
| 87 |
-
identity = {"data_manifest_sha256":fingerprint,"microbatch":microbatch,"version":
|
|
|
|
| 88 |
partial = read_json(work) if work.exists() else {**identity,"draws":[]}
|
| 89 |
if any(partial.get(k)!=v for k,v in identity.items()):
|
| 90 |
raise ValueError(f"Different settings in partial calibration for {stage} {kind}")
|
|
@@ -100,7 +137,7 @@ def calibrate(project, storage, stage, kind, device, microbatch):
|
|
| 100 |
if device.type == "cuda":
|
| 101 |
torch.cuda.reset_peak_memory_stats(device)
|
| 102 |
started = time.perf_counter()
|
| 103 |
-
value, grads = probe_gradient(model, parameters, inputs, targets, kind, 6247, step)
|
| 104 |
norm = vector_norm(grads).item()
|
| 105 |
probe_seconds = time.perf_counter()-started
|
| 106 |
if not (0 < norm < float("inf") and 0 < ce_norm < float("inf")):
|
|
@@ -114,26 +151,34 @@ def calibrate(project, storage, stage, kind, device, microbatch):
|
|
| 114 |
del grads
|
| 115 |
result = statistics.median(row["norm_ratio"] for row in rows)
|
| 116 |
write_json(path, {"stage":stage, "kind":kind, "data_manifest_sha256":fingerprint,
|
| 117 |
-
"unit_lambda":result, "draws":rows
|
|
|
|
|
|
|
| 118 |
work.unlink(missing_ok=True)
|
| 119 |
return result
|
| 120 |
|
| 121 |
|
| 122 |
-
def add_penalty(model, parameters, inputs, targets, coefficients, method, seed, step):
|
| 123 |
"""Add the gated derivative contribution to already-accumulated CE gradients."""
|
| 124 |
telemetry = {}
|
| 125 |
for kind, weight in coefficients.items():
|
| 126 |
if not weight:
|
| 127 |
continue
|
| 128 |
-
|
|
|
|
| 129 |
raw_norm = vector_norm(grads).item()
|
| 130 |
if method == "sham":
|
| 131 |
signs = random_signs(parameters, generator(inputs.device, seed, step, 839))
|
| 132 |
-
grads = tuple(g * sign for g, sign in zip(grads, signs, strict=True))
|
| 133 |
with torch.no_grad():
|
| 134 |
for param, grad in zip(parameters, grads, strict=True):
|
| 135 |
if param.grad is None:
|
| 136 |
param.grad = torch.zeros_like(param)
|
| 137 |
-
|
| 138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
return telemetry
|
|
|
|
| 2 |
|
| 3 |
import statistics
|
| 4 |
import time
|
| 5 |
+
import os
|
| 6 |
import torch
|
| 7 |
|
| 8 |
+
from .models import build_model, logits_of, token_loss, token_nll, trainable_digest, widen_pythia
|
| 9 |
from .penalties import estimate, inner, partials, random_signs, third_contraction
|
| 10 |
from .records import BATCHES, read_json, sha256, time_now, write_json
|
| 11 |
from .windows import TrainingWindows, generator, probe_rows
|
|
|
|
| 57 |
return inner(mean,mean), tuple(a+b for a,b in zip(grad_first,grad_second,strict=True))
|
| 58 |
|
| 59 |
|
| 60 |
+
def adapter_derivative_device():
|
| 61 |
+
"""The registered laptop uses host FP64 for adapter probes and CUDA for ordinary training."""
|
| 62 |
+
return torch.device(os.environ.get("THIRDLOSS_ADAPTER_DERIVATIVE_DEVICE","cpu"))
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
def derivative_replica(stage,seed,storage):
|
| 66 |
+
"""Keep a high-precision frozen backbone for adapter derivatives. Preserve caller RNGs."""
|
| 67 |
+
if stage!="abstracts":
|
| 68 |
+
return None
|
| 69 |
+
devices = [torch.cuda.current_device()] if torch.cuda.is_available() else []
|
| 70 |
+
with torch.random.fork_rng(devices=devices):
|
| 71 |
+
return widen_pythia(build_model(stage,seed,adapter_derivative_device(),storage))
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
def probe_gradient(model, parameters, inputs, targets, kind, seed, step, replica=None):
|
| 75 |
"""Differentiate the sampled penalty, including the fourth-order contraction."""
|
| 76 |
rng = generator(inputs.device, seed, step, 827)
|
| 77 |
rows = probe_rows(seed, step, len(inputs))
|
| 78 |
+
if replica is not None:
|
| 79 |
+
# All arms draw the original CUDA signs. Only the arithmetic and storage of
|
| 80 |
+
# the small derivative batch change. Sync every factor at the current optimizer step.
|
| 81 |
+
precise = tuple(p for p in replica.parameters() if p.requires_grad)
|
| 82 |
+
with torch.no_grad():
|
| 83 |
+
for dest,source in zip(precise,parameters,strict=True):
|
| 84 |
+
dest.copy_(source)
|
| 85 |
+
device = precise[0].device
|
| 86 |
+
x,y = inputs[rows].to(device),targets[rows].to(device)
|
| 87 |
+
def signs():
|
| 88 |
+
return tuple(s.to(device=device,dtype=torch.float64) for s in random_signs(parameters,rng))
|
| 89 |
+
u = signs()
|
| 90 |
+
if kind=="third":
|
| 91 |
+
return two_window_third_gradient(replica,precise,x,y,u,signs())
|
| 92 |
+
loss = token_loss(logits_of(replica,x),y)
|
| 93 |
+
value = estimate(loss,precise,kind,u=u)
|
| 94 |
+
return value.detach(),partials(value,precise,create_graph=False)
|
| 95 |
if kind == "third" and hasattr(model, "peft_config"):
|
| 96 |
u, v = random_signs(parameters,rng), random_signs(parameters,rng)
|
| 97 |
return two_window_third_gradient(model,parameters,inputs[rows],targets[rows],u,v)
|
|
|
|
| 102 |
|
| 103 |
def calibrate(project, storage, stage, kind, device, microbatch):
|
| 104 |
"""Fix unit-strength scales for all seeds using only training data at pilot initialization."""
|
| 105 |
+
suffix = "-fp64" if stage=="abstracts" else ""
|
| 106 |
+
path = project / "results" / "calibration" / f"{stage}-{kind}{suffix}.json"
|
| 107 |
data = storage / "data" / stage
|
| 108 |
fingerprint = sha256(data/"manifest.json")
|
| 109 |
if path.exists():
|
| 110 |
existing = read_json(path)
|
| 111 |
if existing["data_manifest_sha256"] != fingerprint:
|
| 112 |
raise ValueError(f"Calibration data changed for {stage}")
|
| 113 |
+
if suffix and existing.get("derivative_device") != str(adapter_derivative_device()):
|
| 114 |
+
raise ValueError("Adapter calibration uses a different derivative device")
|
| 115 |
return existing["unit_lambda"]
|
| 116 |
model = build_model(stage, 0, device, storage)
|
| 117 |
+
replica = derivative_replica(stage,0,storage)
|
| 118 |
parameters = tuple(p for p in model.parameters() if p.requires_grad)
|
| 119 |
windows = TrainingWindows(data/"train.bin", 6247, BATCHES[stage])
|
| 120 |
# Each draw has its own data/probe address. A reboot can resume a long calibration
|
| 121 |
# without mixing corpora, physical batching or old estimator implementations.
|
| 122 |
+
work = storage/"calibration"/f"{stage}-{kind}{suffix}-draws.json"
|
| 123 |
+
identity = {"data_manifest_sha256":fingerprint,"microbatch":microbatch,"version":3,
|
| 124 |
+
"derivative_device":str(adapter_derivative_device() if replica is not None else device)}
|
| 125 |
partial = read_json(work) if work.exists() else {**identity,"draws":[]}
|
| 126 |
if any(partial.get(k)!=v for k,v in identity.items()):
|
| 127 |
raise ValueError(f"Different settings in partial calibration for {stage} {kind}")
|
|
|
|
| 137 |
if device.type == "cuda":
|
| 138 |
torch.cuda.reset_peak_memory_stats(device)
|
| 139 |
started = time.perf_counter()
|
| 140 |
+
value, grads = probe_gradient(model, parameters, inputs, targets, kind, 6247, step,replica)
|
| 141 |
norm = vector_norm(grads).item()
|
| 142 |
probe_seconds = time.perf_counter()-started
|
| 143 |
if not (0 < norm < float("inf") and 0 < ce_norm < float("inf")):
|
|
|
|
| 151 |
del grads
|
| 152 |
result = statistics.median(row["norm_ratio"] for row in rows)
|
| 153 |
write_json(path, {"stage":stage, "kind":kind, "data_manifest_sha256":fingerprint,
|
| 154 |
+
"unit_lambda":result, "draws":rows,"derivative_device":identity["derivative_device"],
|
| 155 |
+
"derivative_dtype":"float64" if replica is not None else "float32",
|
| 156 |
+
"initial_trainable_sha256":trainable_digest(model)})
|
| 157 |
work.unlink(missing_ok=True)
|
| 158 |
return result
|
| 159 |
|
| 160 |
|
| 161 |
+
def add_penalty(model, parameters, inputs, targets, coefficients, method, seed, step, replica=None):
|
| 162 |
"""Add the gated derivative contribution to already-accumulated CE gradients."""
|
| 163 |
telemetry = {}
|
| 164 |
for kind, weight in coefficients.items():
|
| 165 |
if not weight:
|
| 166 |
continue
|
| 167 |
+
started = time.perf_counter()
|
| 168 |
+
value, grads = probe_gradient(model, parameters, inputs, targets, kind, seed, step,replica)
|
| 169 |
raw_norm = vector_norm(grads).item()
|
| 170 |
if method == "sham":
|
| 171 |
signs = random_signs(parameters, generator(inputs.device, seed, step, 839))
|
| 172 |
+
grads = tuple(g * sign.to(g.device) for g, sign in zip(grads, signs, strict=True))
|
| 173 |
with torch.no_grad():
|
| 174 |
for param, grad in zip(parameters, grads, strict=True):
|
| 175 |
if param.grad is None:
|
| 176 |
param.grad = torch.zeros_like(param)
|
| 177 |
+
if replica is None:
|
| 178 |
+
param.grad.add_(grad, alpha=8*weight)
|
| 179 |
+
else:
|
| 180 |
+
# Scale in FP64 before returning the registered contribution to the FP32 optimizer.
|
| 181 |
+
param.grad.add_((grad*(8*weight)).to(param))
|
| 182 |
+
telemetry[kind] = {"estimate":value.item(), "raw_grad_norm":raw_norm, "lambda":weight,
|
| 183 |
+
"probe_seconds":time.perf_counter()-started}
|
| 184 |
return telemetry
|
research/src/thirdloss/precision.py
CHANGED
|
@@ -1,68 +1,53 @@
|
|
| 1 |
-
"""Independent, high-precision reference for the first real adapter calibration probe."""
|
| 2 |
-
|
| 3 |
-
import hashlib
|
| 4 |
-
import time
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
from .
|
| 10 |
-
from .
|
| 11 |
-
from .
|
| 12 |
-
from .
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
"""
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
value,gradient=two_window_third_gradient(model,parameters,x,y,*signs)
|
| 55 |
-
flat=torch.cat([p.detach().flatten().cpu() for p in gradient])
|
| 56 |
-
elapsed=time.perf_counter()-started
|
| 57 |
-
directory=storage/"diagnostics"
|
| 58 |
-
directory.mkdir(parents=True,exist_ok=True)
|
| 59 |
-
save_file({"gradient":flat},str(directory/f"pythia-reference-{device.type}.safetensors"))
|
| 60 |
-
h=hashlib.sha256()
|
| 61 |
-
for sign in (*signs[0],*signs[1]): h.update(sign.float().cpu().contiguous().numpy().tobytes())
|
| 62 |
-
result={"timestamp":time_now(),"device":str(device),"dtype":"float64", "initial_trainable_sha256":initial,
|
| 63 |
-
"probes_sha256":h.hexdigest(),"two_window_cross_entropy":nll,
|
| 64 |
-
"max_logit_abs_difference":logit_gap,"penalty":value.item(),"gradient_norm":flat.norm().item(),
|
| 65 |
-
"finite":bool(flat.isfinite().all()),"probe_seconds":elapsed}
|
| 66 |
-
write_json(project/"results"/"verification"/f"pythia-fp64-{device.type}.json",result)
|
| 67 |
-
print(result,flush=True)
|
| 68 |
-
return result
|
|
|
|
| 1 |
+
"""Independent, high-precision reference for the first real adapter calibration probe."""
|
| 2 |
+
|
| 3 |
+
import hashlib
|
| 4 |
+
import time
|
| 5 |
+
|
| 6 |
+
import torch
|
| 7 |
+
|
| 8 |
+
from .models import build_model, logits_of, token_loss, trainable_digest, widen_pythia
|
| 9 |
+
from .objectives import two_window_third_gradient
|
| 10 |
+
from .penalties import random_signs
|
| 11 |
+
from .records import storage_root, time_now, write_json
|
| 12 |
+
from .windows import TrainingWindows, generator, probe_rows
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
def reference_gradient(project,device):
|
| 16 |
+
"""Generate the production CUDA signs and promote the same pretrained weights to FP64."""
|
| 17 |
+
from safetensors.torch import save_file
|
| 18 |
+
storage=storage_root(project)
|
| 19 |
+
model=build_model("abstracts",0,device,storage).eval()
|
| 20 |
+
initial=trainable_digest(model)
|
| 21 |
+
parameters=tuple(p for p in model.parameters() if p.requires_grad)
|
| 22 |
+
# Generate signs with the *same* device generator as the observed pilot, also for CPU AD.
|
| 23 |
+
rng=generator(torch.device("cuda"),6247,0,827)
|
| 24 |
+
shapes=tuple(torch.empty_like(p,device="cuda") for p in parameters)
|
| 25 |
+
signs=[tuple(g.to(device=device,dtype=torch.float64) for g in random_signs(shapes,rng)) for _ in range(2)]
|
| 26 |
+
del shapes,parameters
|
| 27 |
+
widen_pythia(model)
|
| 28 |
+
parameters=tuple(p for p in model.parameters() if p.requires_grad)
|
| 29 |
+
x,y=TrainingWindows(storage/"data"/"abstracts"/"train.bin",6247,8).get(0,device)
|
| 30 |
+
rows=probe_rows(6247,0,8)
|
| 31 |
+
x,y=x[rows],y[rows]
|
| 32 |
+
# RoPE values are frozen position constants and follow the checkpoint's upstream formula.
|
| 33 |
+
with torch.no_grad():
|
| 34 |
+
logits=logits_of(model,x)
|
| 35 |
+
nll=token_loss(logits,y).item()
|
| 36 |
+
logit_gap=(logits-torch.cat([logits_of(model,t[None,:]) for t in x])).abs().max().item()
|
| 37 |
+
del logits
|
| 38 |
+
started=time.perf_counter()
|
| 39 |
+
value,gradient=two_window_third_gradient(model,parameters,x,y,*signs)
|
| 40 |
+
flat=torch.cat([p.detach().flatten().cpu() for p in gradient])
|
| 41 |
+
elapsed=time.perf_counter()-started
|
| 42 |
+
directory=storage/"diagnostics"
|
| 43 |
+
directory.mkdir(parents=True,exist_ok=True)
|
| 44 |
+
save_file({"gradient":flat},str(directory/f"pythia-reference-{device.type}.safetensors"))
|
| 45 |
+
h=hashlib.sha256()
|
| 46 |
+
for sign in (*signs[0],*signs[1]): h.update(sign.float().cpu().contiguous().numpy().tobytes())
|
| 47 |
+
result={"timestamp":time_now(),"device":str(device),"dtype":"float64", "initial_trainable_sha256":initial,
|
| 48 |
+
"probes_sha256":h.hexdigest(),"two_window_cross_entropy":nll,
|
| 49 |
+
"max_logit_abs_difference":logit_gap,"penalty":value.item(),"gradient_norm":flat.norm().item(),
|
| 50 |
+
"finite":bool(flat.isfinite().all()),"probe_seconds":elapsed}
|
| 51 |
+
write_json(project/"results"/"verification"/f"pythia-fp64-{device.type}.json",result)
|
| 52 |
+
print(result,flush=True)
|
| 53 |
+
return result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
research/src/thirdloss/probe_check.py
CHANGED
|
@@ -78,3 +78,32 @@ def verify_pretrained(project,device):
|
|
| 78 |
write_json(project/"results"/"verification"/f"pythia-joint-{device.type}.json",result)
|
| 79 |
print(result,flush=True)
|
| 80 |
return result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
write_json(project/"results"/"verification"/f"pythia-joint-{device.type}.json",result)
|
| 79 |
print(result,flush=True)
|
| 80 |
return result
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
def benchmark_scoring(project,device):
|
| 84 |
+
"""Measure physical inference batch sizes on the same spaced *training* windows."""
|
| 85 |
+
from .evaluation import score
|
| 86 |
+
storage=storage_root(project)
|
| 87 |
+
model=build_model("abstracts",0,device,storage).eval()
|
| 88 |
+
path=storage/"data"/"abstracts"/"train.bin"
|
| 89 |
+
records=[]
|
| 90 |
+
for batch in (2,8,16,32):
|
| 91 |
+
score(model,path,device,batch,limit_windows=16)
|
| 92 |
+
if device.type=="cuda":
|
| 93 |
+
torch.cuda.reset_peak_memory_stats(device)
|
| 94 |
+
start=time.perf_counter()
|
| 95 |
+
metrics=score(model,path,device,batch,limit_windows=256)
|
| 96 |
+
seconds=time.perf_counter()-start
|
| 97 |
+
records.append(dict(batch=batch,seconds=seconds,targets_per_second=metrics["tokens"]/seconds,
|
| 98 |
+
peak_allocated_mib=torch.cuda.max_memory_allocated(device)/2**20 if device.type=="cuda" else None,**metrics))
|
| 99 |
+
reference=records[0]
|
| 100 |
+
qualified=[r for r in records[1:] if abs(r["nll"]-reference["nll"])<=2e-6
|
| 101 |
+
and abs(r["accuracy"]-reference["accuracy"])*r["tokens"]<=1
|
| 102 |
+
and r["targets_per_second"]>=1.1*reference["targets_per_second"]
|
| 103 |
+
and (r["peak_allocated_mib"] is None or r["peak_allocated_mib"]<=7*1024)]
|
| 104 |
+
chosen=max(qualified,key=lambda r:r["targets_per_second"]) if qualified else reference
|
| 105 |
+
result={"timestamp":time_now(),"split":"train","device":str(device),"initial_trainable_sha256":trainable_digest(model),
|
| 106 |
+
"records":records,"selected_batch":chosen["batch"]}
|
| 107 |
+
write_json(project/"results"/"verification"/"pythia-scoring-batches.json",result)
|
| 108 |
+
print(result,flush=True)
|
| 109 |
+
return result
|
research/src/thirdloss/progress.py
CHANGED
|
@@ -58,7 +58,7 @@ def week_schedule(project):
|
|
| 58 |
|
| 59 |
def progress(project):
|
| 60 |
study = study_snapshot(project)
|
| 61 |
-
runs = [r for r in study["runs"] if r.get("phase")
|
| 62 |
done = [r for r in runs if r["status"] in {"complete","evaluated"}]
|
| 63 |
tests = [r for r in done if "test_nll" in r]
|
| 64 |
# Each stage has seven development candidates, two free controls, three ablations,
|
|
|
|
| 58 |
|
| 59 |
def progress(project):
|
| 60 |
study = study_snapshot(project)
|
| 61 |
+
runs = [r for r in study["runs"] if r.get("phase") not in {"smoke","diagnostic"}]
|
| 62 |
done = [r for r in runs if r["status"] in {"complete","evaluated"}]
|
| 63 |
tests = [r for r in done if "test_nll" in r]
|
| 64 |
# Each stage has seven development candidates, two free controls, three ablations,
|
research/src/thirdloss/records.py
CHANGED
|
@@ -19,6 +19,17 @@ def time_now():
|
|
| 19 |
return datetime.now(timezone.utc).isoformat(timespec="seconds")
|
| 20 |
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
def storage_root(project):
|
| 23 |
load_dotenv(project / ".env")
|
| 24 |
root = Path(os.environ.get("THIRDLOSS_STORAGE", "storage")).expanduser()
|
|
@@ -70,7 +81,10 @@ class Recorder:
|
|
| 70 |
|
| 71 |
|
| 72 |
def run_name(stage, method, phase, seed, ratio):
|
| 73 |
-
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
|
| 76 |
def setup_device(requested):
|
|
|
|
| 19 |
return datetime.now(timezone.utc).isoformat(timespec="seconds")
|
| 20 |
|
| 21 |
|
| 22 |
+
def peak_process_mib():
|
| 23 |
+
"""OS process working-set high-water mark, including earlier activity in this interpreter."""
|
| 24 |
+
if os.name=="nt":
|
| 25 |
+
import psutil
|
| 26 |
+
return psutil.Process().memory_info().peak_wset/2**20
|
| 27 |
+
import resource
|
| 28 |
+
import sys
|
| 29 |
+
usage = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
|
| 30 |
+
return usage/(2**20 if sys.platform=="darwin" else 1024)
|
| 31 |
+
|
| 32 |
+
|
| 33 |
def storage_root(project):
|
| 34 |
load_dotenv(project / ".env")
|
| 35 |
root = Path(os.environ.get("THIRDLOSS_STORAGE", "storage")).expanduser()
|
|
|
|
| 81 |
|
| 82 |
|
| 83 |
def run_name(stage, method, phase, seed, ratio):
|
| 84 |
+
# Preserve the original FP32 adapter pilot under its published ID. Amended derivative
|
| 85 |
+
# runs have distinct records, weights, RNG checkpoints and calibrated coefficients.
|
| 86 |
+
suffix = "-fp64" if stage=="abstracts" and method in METHODS and method!="ce" else ""
|
| 87 |
+
return f"{stage}-{phase}-s{seed:02d}-{method}-r{round(ratio * 100):02d}{suffix}"
|
| 88 |
|
| 89 |
|
| 90 |
def setup_device(requested):
|
research/src/thirdloss/release.py
CHANGED
|
@@ -81,6 +81,8 @@ def publish_weights(project, storage, summary):
|
|
| 81 |
api.upload_file(repo_id=repo,path_or_fileobj=restart,path_in_repo=f"runs/{run_id}/training_state.pt",
|
| 82 |
commit_message=f"Archive optimizer, data cursor and random state for {run_id}")
|
| 83 |
prior = "EleutherAI/pythia-410m" if stage=="abstracts" else "Random initialization"
|
|
|
|
|
|
|
| 84 |
card = (f"# {run_id}\n\n"
|
| 85 |
f"Research checkpoint for {stage} using the {summary['method']} objective. Base: {prior}. "
|
| 86 |
f"The run processed {summary['tokens']:,} training targets. Full development NLL was "
|
|
@@ -90,6 +92,9 @@ def publish_weights(project, storage, summary):
|
|
| 90 |
f"[machine-readable results]({GITHUB}/tree/main/results/{run_id}). "
|
| 91 |
f"The [restart manifest](restart.json) identifies the saved optimizer, data cursor and RNG state. "
|
| 92 |
f"Use the pinned base and loading instructions in [the guide]({GITHUB}/blob/main/docs/runbook.md).\n")
|
|
|
|
|
|
|
|
|
|
| 93 |
(folder/"README.md").write_text(card,encoding="utf-8")
|
| 94 |
write_json(folder/"training_summary.json",summary)
|
| 95 |
api.upload_folder(repo_id=repo,folder_path=folder,path_in_repo="runs/"+run_id,
|
|
|
|
| 81 |
api.upload_file(repo_id=repo,path_or_fileobj=restart,path_in_repo=f"runs/{run_id}/training_state.pt",
|
| 82 |
commit_message=f"Archive optimizer, data cursor and random state for {run_id}")
|
| 83 |
prior = "EleutherAI/pythia-410m" if stage=="abstracts" else "Random initialization"
|
| 84 |
+
exclusions = project/"results"/"verification"/"numerical-exclusions.json"
|
| 85 |
+
diagnostic = read_json(exclusions).get(run_id) if exclusions.exists() else None
|
| 86 |
card = (f"# {run_id}\n\n"
|
| 87 |
f"Research checkpoint for {stage} using the {summary['method']} objective. Base: {prior}. "
|
| 88 |
f"The run processed {summary['tokens']:,} training targets. Full development NLL was "
|
|
|
|
| 92 |
f"[machine-readable results]({GITHUB}/tree/main/results/{run_id}). "
|
| 93 |
f"The [restart manifest](restart.json) identifies the saved optimizer, data cursor and RNG state. "
|
| 94 |
f"Use the pinned base and loading instructions in [the guide]({GITHUB}/blob/main/docs/runbook.md).\n")
|
| 95 |
+
if diagnostic:
|
| 96 |
+
card += f"\n{diagnostic['reason']} [Numerical audit]({GITHUB}/blob/main/reports/amendments/adapter-precision.md)\n"
|
| 97 |
+
card = "---\nlanguage: [en]\npipeline_tag: text-generation\n---\n" + card
|
| 98 |
(folder/"README.md").write_text(card,encoding="utf-8")
|
| 99 |
write_json(folder/"training_summary.json",summary)
|
| 100 |
api.upload_folder(repo_id=repo,folder_path=folder,path_in_repo="runs/"+run_id,
|
research/src/thirdloss/report_paper.py
CHANGED
|
@@ -246,6 +246,17 @@ def write_paper(study: dict, output: Path, figure_dir: Path, figures: dict) -> N
|
|
| 246 |
"development checkpoint within the shortest final training time of that seed triple. "
|
| 247 |
f"{_cite('seeds')} · {_link(REPOSITORY + '/blob/main/reports/preregistration.md', 'Decision rule')}")
|
| 248 |
p("Results", "heading")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 249 |
run_count = len(study["runs"])
|
| 250 |
done_count = sum(completed(run) for run in study["runs"])
|
| 251 |
p(f"The ledger contains {run_count} runs and {done_count} completed summaries. "
|
|
|
|
| 246 |
"development checkpoint within the shortest final training time of that seed triple. "
|
| 247 |
f"{_cite('seeds')} · {_link(REPOSITORY + '/blob/main/reports/preregistration.md', 'Decision rule')}")
|
| 248 |
p("Results", "heading")
|
| 249 |
+
numerical = study.get("numerics",{})
|
| 250 |
+
single = numerical.get("pythia-joint-cuda",{})
|
| 251 |
+
double = numerical.get("pythia-fp64-agreement",{})
|
| 252 |
+
if single and double:
|
| 253 |
+
p("Numerical accuracy on the pretrained checkpoint", "subheading")
|
| 254 |
+
p(f"For identical Pythia weights and probe signs, changing the FP32 CUDA batching gave a "
|
| 255 |
+
f"{100*single['relative_gradient_difference']:.1f}% relative discrepancy in the training gradient. "
|
| 256 |
+
f"In FP64 the CPU and GPU gradients agreed to relative error {double['relative_gradient_difference']:.2g}. "
|
| 257 |
+
"The initial FP32 pilot is retained as a diagnostic. The amended adapter arms compute their "
|
| 258 |
+
"penalties in FP64 on the CPU and use CUDA for the ordinary loss and optimizer updates. "
|
| 259 |
+
f"{_link(REPOSITORY + '/blob/main/reports/amendments/adapter-precision.md','Pre-test amendment and raw checks')}")
|
| 260 |
run_count = len(study["runs"])
|
| 261 |
done_count = sum(completed(run) for run in study["runs"])
|
| 262 |
p(f"The ledger contains {run_count} runs and {done_count} completed summaries. "
|
research/src/thirdloss/report_records.py
CHANGED
|
@@ -38,10 +38,13 @@ FIELDS = (
|
|
| 38 |
"freeze_id", "test_manifest_sha256", "test_tokens", "data_manifest_sha256",
|
| 39 |
"token_budget", "batch_windows", "microbatch", "context", "weights_sha256", "dev_tokens",
|
| 40 |
"git_revision", "gpu", "torch", "matched_dev_nll", "finished_at", "initial_trainable_sha256",
|
|
|
|
|
|
|
| 41 |
)
|
| 42 |
EVENT_FIELDS = (
|
| 43 |
"step", "tokens", "train_seconds", "loss", "accuracy", "penalty", "dev_nll",
|
| 44 |
"dev_accuracy", "timestamp", "status", "peak_vram_mb",
|
|
|
|
| 45 |
)
|
| 46 |
|
| 47 |
|
|
@@ -111,7 +114,7 @@ def run_record(folder: Path) -> dict:
|
|
| 111 |
events = read_lines(folder / "events.jsonl")
|
| 112 |
record = {key: config[key] for key in FIELDS if key in config}
|
| 113 |
# Calibration can fail before the trainer writes the final configuration.
|
| 114 |
-
identity = re.fullmatch(r"(stories|abstracts)-(\w+)-s(\d+)-(\w+)-r(\d+)", folder.name)
|
| 115 |
if identity and not config:
|
| 116 |
stage, phase, seed, method, ratio = identity.groups()
|
| 117 |
record.update(stage=stage, phase=phase, seed=int(seed), method=method, ratio=int(ratio) / 100)
|
|
@@ -185,6 +188,10 @@ def study_snapshot(root: Path = Path(".")) -> dict:
|
|
| 185 |
for folder in sorted(directory.glob("*")):
|
| 186 |
if folder.is_dir() and any((folder / f).is_file() for f in ("config.json", "summary.json", "failure.json", "state.json")):
|
| 187 |
runs.append(run_record(folder))
|
|
|
|
|
|
|
|
|
|
|
|
|
| 188 |
stages = {stage: analyze_stage(runs, stage) for stage in STAGES}
|
| 189 |
for run in runs:
|
| 190 |
run["events_total"] = len(run["events"])
|
|
@@ -192,10 +199,12 @@ def study_snapshot(root: Path = Path(".")) -> dict:
|
|
| 192 |
context = {stage: {key: read_json(directory / key / f"{stage}.json")
|
| 193 |
for key in ("datasets", "selection", "feasibility")} for stage in STAGES}
|
| 194 |
pilots = {s: pilot_differences(runs, s, context[s]["selection"]) for s in STAGES}
|
|
|
|
|
|
|
| 195 |
return {
|
| 196 |
"generated_at": datetime.now(timezone.utc).isoformat(timespec="seconds"),
|
| 197 |
"runs": runs, "stages": stages, "method_names": METHODS, "stage_names": STAGES,
|
| 198 |
-
"colors": COLORS, "context": context, "pilot_comparisons": pilots,
|
| 199 |
}
|
| 200 |
|
| 201 |
|
|
|
|
| 38 |
"freeze_id", "test_manifest_sha256", "test_tokens", "data_manifest_sha256",
|
| 39 |
"token_budget", "batch_windows", "microbatch", "context", "weights_sha256", "dev_tokens",
|
| 40 |
"git_revision", "gpu", "torch", "matched_dev_nll", "finished_at", "initial_trainable_sha256",
|
| 41 |
+
"derivative_dtype", "derivative_device", "host_probe_seconds", "training_seconds_excluding_host_probes", "cpu_threads",
|
| 42 |
+
"process_peak_rss_mib", "evaluation_batch_windows",
|
| 43 |
)
|
| 44 |
EVENT_FIELDS = (
|
| 45 |
"step", "tokens", "train_seconds", "loss", "accuracy", "penalty", "dev_nll",
|
| 46 |
"dev_accuracy", "timestamp", "status", "peak_vram_mb",
|
| 47 |
+
"training_seconds_excluding_host_probes", "host_probe_seconds",
|
| 48 |
)
|
| 49 |
|
| 50 |
|
|
|
|
| 114 |
events = read_lines(folder / "events.jsonl")
|
| 115 |
record = {key: config[key] for key in FIELDS if key in config}
|
| 116 |
# Calibration can fail before the trainer writes the final configuration.
|
| 117 |
+
identity = re.fullmatch(r"(stories|abstracts)-(\w+)-s(\d+)-(\w+)-r(\d+)(?:-fp64)?", folder.name)
|
| 118 |
if identity and not config:
|
| 119 |
stage, phase, seed, method, ratio = identity.groups()
|
| 120 |
record.update(stage=stage, phase=phase, seed=int(seed), method=method, ratio=int(ratio) / 100)
|
|
|
|
| 188 |
for folder in sorted(directory.glob("*")):
|
| 189 |
if folder.is_dir() and any((folder / f).is_file() for f in ("config.json", "summary.json", "failure.json", "state.json")):
|
| 190 |
runs.append(run_record(folder))
|
| 191 |
+
exclusions = read_json(directory/"verification"/"numerical-exclusions.json")
|
| 192 |
+
for run in runs:
|
| 193 |
+
if run["id"] in exclusions:
|
| 194 |
+
run.update(registered_phase=run["phase"], phase="diagnostic", precision_audit=exclusions[run["id"]])
|
| 195 |
stages = {stage: analyze_stage(runs, stage) for stage in STAGES}
|
| 196 |
for run in runs:
|
| 197 |
run["events_total"] = len(run["events"])
|
|
|
|
| 199 |
context = {stage: {key: read_json(directory / key / f"{stage}.json")
|
| 200 |
for key in ("datasets", "selection", "feasibility")} for stage in STAGES}
|
| 201 |
pilots = {s: pilot_differences(runs, s, context[s]["selection"]) for s in STAGES}
|
| 202 |
+
numerics = {key:read_json(directory/"verification"/(key+".json")) for key in
|
| 203 |
+
("pythia-joint-cuda","pythia-fp64-agreement","pythia-fp64-cpu","pythia-fp64-cuda","stories-full-gradient")}
|
| 204 |
return {
|
| 205 |
"generated_at": datetime.now(timezone.utc).isoformat(timespec="seconds"),
|
| 206 |
"runs": runs, "stages": stages, "method_names": METHODS, "stage_names": STAGES,
|
| 207 |
+
"colors": COLORS, "context": context, "pilot_comparisons": pilots,"numerics":numerics,
|
| 208 |
}
|
| 209 |
|
| 210 |
|
research/src/thirdloss/reporting.py
CHANGED
|
@@ -155,11 +155,19 @@ def _experiments(root, study):
|
|
| 155 |
material += ["## Recorded interruptions", _table(
|
| 156 |
[[failure["timestamp"],failure["error"]] for failure in run["failures"]],
|
| 157 |
["Time (UTC)","Recorded exception"])]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
if run["samples"]:
|
| 159 |
material += ["## Fixed-prompt generations",
|
| 160 |
*[_sample(sample) for sample in run["samples"]]]
|
| 161 |
atomic_text(base / key / "experiment.md", "\n\n".join(material) + "\n")
|
| 162 |
observation = _run_learning(run)
|
|
|
|
|
|
|
| 163 |
if run.get("failures"):
|
| 164 |
observation += f" The run ledger records {len(run['failures'])} interrupted attempt(s)."
|
| 165 |
atomic_text(base / key / "learnings.md", f"# Run learnings\n\n{observation}\n\n"
|
|
|
|
| 155 |
material += ["## Recorded interruptions", _table(
|
| 156 |
[[failure["timestamp"],failure["error"]] for failure in run["failures"]],
|
| 157 |
["Time (UTC)","Recorded exception"])]
|
| 158 |
+
if run.get("precision_audit"):
|
| 159 |
+
material += ["## Numerical diagnostic",run["precision_audit"]["reason"],
|
| 160 |
+
"[Precision amendment](../../amendments/adapter-precision.md)"]
|
| 161 |
+
if finite(run.get("process_peak_rss_mib")):
|
| 162 |
+
material.append(f"The process working-set high-water mark was {fmt(run['process_peak_rss_mib'],1)} MiB. "
|
| 163 |
+
"This OS measure includes earlier work in the same interpreter.")
|
| 164 |
if run["samples"]:
|
| 165 |
material += ["## Fixed-prompt generations",
|
| 166 |
*[_sample(sample) for sample in run["samples"]]]
|
| 167 |
atomic_text(base / key / "experiment.md", "\n\n".join(material) + "\n")
|
| 168 |
observation = _run_learning(run)
|
| 169 |
+
if run.get("precision_audit"):
|
| 170 |
+
observation = run["precision_audit"]["reason"]
|
| 171 |
if run.get("failures"):
|
| 172 |
observation += f" The run ledger records {len(run['failures'])} interrupted attempt(s)."
|
| 173 |
atomic_text(base / key / "learnings.md", f"# Run learnings\n\n{observation}\n\n"
|
research/src/thirdloss/study.py
CHANGED
|
@@ -108,7 +108,7 @@ def evaluate_one(project, storage, run_id, device):
|
|
| 108 |
if set(state)!=set(get_peft_model_state_dict(model)):
|
| 109 |
raise ValueError("Adapter payload does not match the pinned backbone and target modules")
|
| 110 |
set_peft_model_state_dict(model,state)
|
| 111 |
-
stats = score(model,data/"test.bin",device,summary["microbatch"])
|
| 112 |
summary.update(test_nll=stats["nll"],test_accuracy=stats["accuracy"],test_tokens=stats["tokens"],
|
| 113 |
test_manifest_sha256=sealed["test_sha256"],freeze_id=sealed["freeze_id"],
|
| 114 |
evaluated_at=time_now())
|
|
@@ -157,6 +157,9 @@ def run_study(project,storage,stages,device,publish):
|
|
| 157 |
return row
|
| 158 |
for stage in stages:
|
| 159 |
prepare_stage(project,storage,stage)
|
|
|
|
|
|
|
|
|
|
| 160 |
run(stage,"third","pilot",0,0.03)
|
| 161 |
for method in ("initial","unigram"):
|
| 162 |
run(stage,method,"control",0,0)
|
|
|
|
| 108 |
if set(state)!=set(get_peft_model_state_dict(model)):
|
| 109 |
raise ValueError("Adapter payload does not match the pinned backbone and target modules")
|
| 110 |
set_peft_model_state_dict(model,state)
|
| 111 |
+
stats = score(model,data/"test.bin",device,summary.get("evaluation_batch_windows",summary["microbatch"]))
|
| 112 |
summary.update(test_nll=stats["nll"],test_accuracy=stats["accuracy"],test_tokens=stats["tokens"],
|
| 113 |
test_manifest_sha256=sealed["test_sha256"],freeze_id=sealed["freeze_id"],
|
| 114 |
evaluated_at=time_now())
|
|
|
|
| 157 |
return row
|
| 158 |
for stage in stages:
|
| 159 |
prepare_stage(project,storage,stage)
|
| 160 |
+
if stage=="abstracts" and not (project/"results"/"verification"/"pythia-scoring-batches.json").exists():
|
| 161 |
+
from .probe_check import benchmark_scoring
|
| 162 |
+
benchmark_scoring(project,device)
|
| 163 |
run(stage,"third","pilot",0,0.03)
|
| 164 |
for method in ("initial","unigram"):
|
| 165 |
run(stage,method,"control",0,0)
|
research/src/thirdloss/train.py
CHANGED
|
@@ -13,9 +13,9 @@ from filelock import FileLock
|
|
| 13 |
|
| 14 |
from .evaluation import sample_outputs, score, unigram_distribution
|
| 15 |
from .models import build_model, export_weights, trainable_digest
|
| 16 |
-
from .objectives import add_penalty, calibrate, ce_backward
|
| 17 |
from .records import (BATCHES, CONTEXT, HORIZONS, RATIOS, Recorder, json_lines, read_json,
|
| 18 |
-
run_name, sha256, time_now, write_json)
|
| 19 |
from .windows import TrainingWindows, gate
|
| 20 |
|
| 21 |
|
|
@@ -131,6 +131,9 @@ def _run(project, storage, config, recorder, device, microbatch):
|
|
| 131 |
manifest = read_json(data/"manifest.json")
|
| 132 |
config["data_manifest_sha256"] = sha256(data/"manifest.json")
|
| 133 |
config["microbatch"] = microbatch
|
|
|
|
|
|
|
|
|
|
| 134 |
output = recorder.directory
|
| 135 |
state_path = output/"state.json"
|
| 136 |
if not (output/"summary.json").exists():
|
|
@@ -148,10 +151,14 @@ def _run(project, storage, config, recorder, device, microbatch):
|
|
| 148 |
torch.cuda.empty_cache()
|
| 149 |
torch.cuda.reset_peak_memory_stats(device)
|
| 150 |
model = None if method == "unigram" else build_model(stage,seed,device,storage)
|
|
|
|
|
|
|
|
|
|
| 151 |
parameters = tuple(p for p in model.parameters() if p.requires_grad) if model is not None else ()
|
| 152 |
summary = {**config, "device":str(device), "torch":str(torch.__version__), "platform":platform.platform(),
|
| 153 |
"gpu":torch.cuda.get_device_name(device) if device.type=="cuda" else None,
|
| 154 |
"initial_trainable_sha256":trainable_digest(model) if model is not None else None,
|
|
|
|
| 155 |
"git_revision":subprocess.check_output(["git","rev-parse","HEAD"],cwd=project,text=True).strip(),
|
| 156 |
"trainable_parameters":sum(p.numel() for p in parameters)}
|
| 157 |
batch = BATCHES[stage]
|
|
@@ -164,6 +171,7 @@ def _run(project, storage, config, recorder, device, microbatch):
|
|
| 164 |
{"params":[p for p in parameters if p.ndim<=1],"weight_decay":0.0}]
|
| 165 |
optimizer = torch.optim.AdamW(groups,lr=1e-4,betas=(0.9,0.95),fused=(device.type=="cuda"))
|
| 166 |
start,elapsed = restore_state(ckpt/"latest.pt",model,optimizer,config,recorder,device)
|
|
|
|
| 167 |
# Match elapsed-time comparisons with periodic fixed development windows in every arm.
|
| 168 |
interval = min(128,max(1,steps//16))
|
| 169 |
for step in range(start,steps):
|
|
@@ -173,7 +181,10 @@ def _run(project, storage, config, recorder, device, microbatch):
|
|
| 173 |
optimizer.zero_grad(set_to_none=True)
|
| 174 |
base,accuracy = ce_backward(model,inputs,targets,microbatch)
|
| 175 |
active = bool(config["coefficients"]) and gate(seed,step)
|
| 176 |
-
terms = add_penalty(model,parameters,inputs,targets,config["coefficients"],method,seed,step) if active else {}
|
|
|
|
|
|
|
|
|
|
| 177 |
norm = torch.nn.utils.clip_grad_norm_(parameters,1.0,error_if_nonfinite=True)
|
| 178 |
lr = learning_rate(stage,step,steps)
|
| 179 |
for group in optimizer.param_groups:
|
|
@@ -185,22 +196,25 @@ def _run(project, storage, config, recorder, device, microbatch):
|
|
| 185 |
done = step+1
|
| 186 |
if done % 8 == 0 or active or done == 1 or done % interval == 0 or done == steps:
|
| 187 |
row = {"step":done, "tokens":done*batch*CONTEXT, "train_seconds":elapsed, "loss":base.item(),
|
| 188 |
-
"accuracy":accuracy.item(), "lr":lr, "gradient_norm":norm.item(),"derivatives":terms
|
|
|
|
| 189 |
if terms:
|
| 190 |
row["penalty"] = sum(8*t["lambda"]*t["estimate"] for t in terms.values())
|
| 191 |
if done%interval == 0 or done==steps:
|
| 192 |
-
metrics = score(model,data/"dev.bin",device,
|
| 193 |
row.update(dev_nll=metrics["nll"],dev_accuracy=metrics["accuracy"])
|
| 194 |
recorder.emit(row)
|
| 195 |
if done%interval == 0 or done==steps:
|
| 196 |
save_state(ckpt/"latest.pt",model,optimizer,done,elapsed,config)
|
| 197 |
del optimizer
|
|
|
|
|
|
|
| 198 |
dist = unigram_distribution(data/"train.bin",4096 if stage=="stories" else 50304) if method=="unigram" else None
|
| 199 |
write_json(state_path,{"status":"scoring development","timestamp":time_now()})
|
| 200 |
def evaluation_progress(row):
|
| 201 |
write_json(state_path,{"status":"scoring development",**row})
|
| 202 |
recorder.emit({"split":"dev",**row},"evaluation.jsonl")
|
| 203 |
-
validation = score(model,data/"dev.bin",device,
|
| 204 |
# A rerun after final-checkpoint interruption writes each documented sample exactly once.
|
| 205 |
sample_path = output/"samples.jsonl"
|
| 206 |
if sample_path.exists():
|
|
@@ -213,6 +227,7 @@ def _run(project, storage, config, recorder, device, microbatch):
|
|
| 213 |
summary["matched_dev_nll"] = next(e["dev_nll"] for e in reversed(json_lines(output/"events.jsonl"))
|
| 214 |
if "dev_nll" in e)
|
| 215 |
summary.update(tokens=budget,steps=steps,train_seconds=elapsed,tokens_per_sec=budget/elapsed if elapsed else 0,
|
|
|
|
| 216 |
peak_vram_mb=torch.cuda.max_memory_allocated(device)/2**20 if device.type=="cuda" else 0,
|
| 217 |
dev_nll=validation["nll"],dev_accuracy=validation["accuracy"],dev_tokens=validation["tokens"],
|
| 218 |
finished_at=time_now(),status="complete")
|
|
|
|
| 13 |
|
| 14 |
from .evaluation import sample_outputs, score, unigram_distribution
|
| 15 |
from .models import build_model, export_weights, trainable_digest
|
| 16 |
+
from .objectives import add_penalty, adapter_derivative_device, calibrate, ce_backward, derivative_replica
|
| 17 |
from .records import (BATCHES, CONTEXT, HORIZONS, RATIOS, Recorder, json_lines, read_json,
|
| 18 |
+
peak_process_mib, run_name, sha256, time_now, write_json)
|
| 19 |
from .windows import TrainingWindows, gate
|
| 20 |
|
| 21 |
|
|
|
|
| 131 |
manifest = read_json(data/"manifest.json")
|
| 132 |
config["data_manifest_sha256"] = sha256(data/"manifest.json")
|
| 133 |
config["microbatch"] = microbatch
|
| 134 |
+
precise = stage=="abstracts" and method not in {"ce","initial","unigram"}
|
| 135 |
+
if precise:
|
| 136 |
+
config.update(derivative_dtype="float64",derivative_device=str(adapter_derivative_device()))
|
| 137 |
output = recorder.directory
|
| 138 |
state_path = output/"state.json"
|
| 139 |
if not (output/"summary.json").exists():
|
|
|
|
| 151 |
torch.cuda.empty_cache()
|
| 152 |
torch.cuda.reset_peak_memory_stats(device)
|
| 153 |
model = None if method == "unigram" else build_model(stage,seed,device,storage)
|
| 154 |
+
replica = derivative_replica(stage,seed,storage) if precise else None
|
| 155 |
+
bench=project/"results"/"verification"/"pythia-scoring-batches.json"
|
| 156 |
+
score_batch=read_json(bench)["selected_batch"] if stage=="abstracts" and bench.exists() else microbatch
|
| 157 |
parameters = tuple(p for p in model.parameters() if p.requires_grad) if model is not None else ()
|
| 158 |
summary = {**config, "device":str(device), "torch":str(torch.__version__), "platform":platform.platform(),
|
| 159 |
"gpu":torch.cuda.get_device_name(device) if device.type=="cuda" else None,
|
| 160 |
"initial_trainable_sha256":trainable_digest(model) if model is not None else None,
|
| 161 |
+
"cpu_threads":torch.get_num_threads(),"evaluation_batch_windows":score_batch,
|
| 162 |
"git_revision":subprocess.check_output(["git","rev-parse","HEAD"],cwd=project,text=True).strip(),
|
| 163 |
"trainable_parameters":sum(p.numel() for p in parameters)}
|
| 164 |
batch = BATCHES[stage]
|
|
|
|
| 171 |
{"params":[p for p in parameters if p.ndim<=1],"weight_decay":0.0}]
|
| 172 |
optimizer = torch.optim.AdamW(groups,lr=1e-4,betas=(0.9,0.95),fused=(device.type=="cuda"))
|
| 173 |
start,elapsed = restore_state(ckpt/"latest.pt",model,optimizer,config,recorder,device)
|
| 174 |
+
host_probes = sum(e.get("host_probe_seconds",0.0) for e in json_lines(output/"events.jsonl"))
|
| 175 |
# Match elapsed-time comparisons with periodic fixed development windows in every arm.
|
| 176 |
interval = min(128,max(1,steps//16))
|
| 177 |
for step in range(start,steps):
|
|
|
|
| 181 |
optimizer.zero_grad(set_to_none=True)
|
| 182 |
base,accuracy = ce_backward(model,inputs,targets,microbatch)
|
| 183 |
active = bool(config["coefficients"]) and gate(seed,step)
|
| 184 |
+
terms = add_penalty(model,parameters,inputs,targets,config["coefficients"],method,seed,step,replica) if active else {}
|
| 185 |
+
host_seconds = (sum(t["probe_seconds"] for t in terms.values())
|
| 186 |
+
if precise and config["derivative_device"]=="cpu" and device.type=="cuda" else 0.0)
|
| 187 |
+
host_probes += host_seconds
|
| 188 |
norm = torch.nn.utils.clip_grad_norm_(parameters,1.0,error_if_nonfinite=True)
|
| 189 |
lr = learning_rate(stage,step,steps)
|
| 190 |
for group in optimizer.param_groups:
|
|
|
|
| 196 |
done = step+1
|
| 197 |
if done % 8 == 0 or active or done == 1 or done % interval == 0 or done == steps:
|
| 198 |
row = {"step":done, "tokens":done*batch*CONTEXT, "train_seconds":elapsed, "loss":base.item(),
|
| 199 |
+
"accuracy":accuracy.item(), "lr":lr, "gradient_norm":norm.item(),"derivatives":terms,
|
| 200 |
+
"host_probe_seconds":host_seconds,"training_seconds_excluding_host_probes":max(0.0,elapsed-host_probes)}
|
| 201 |
if terms:
|
| 202 |
row["penalty"] = sum(8*t["lambda"]*t["estimate"] for t in terms.values())
|
| 203 |
if done%interval == 0 or done==steps:
|
| 204 |
+
metrics = score(model,data/"dev.bin",device,score_batch,limit_windows=64)
|
| 205 |
row.update(dev_nll=metrics["nll"],dev_accuracy=metrics["accuracy"])
|
| 206 |
recorder.emit(row)
|
| 207 |
if done%interval == 0 or done==steps:
|
| 208 |
save_state(ckpt/"latest.pt",model,optimizer,done,elapsed,config)
|
| 209 |
del optimizer
|
| 210 |
+
summary.update(host_probe_seconds=host_probes,training_seconds_excluding_host_probes=max(0.0,elapsed-host_probes))
|
| 211 |
+
del replica
|
| 212 |
dist = unigram_distribution(data/"train.bin",4096 if stage=="stories" else 50304) if method=="unigram" else None
|
| 213 |
write_json(state_path,{"status":"scoring development","timestamp":time_now()})
|
| 214 |
def evaluation_progress(row):
|
| 215 |
write_json(state_path,{"status":"scoring development",**row})
|
| 216 |
recorder.emit({"split":"dev",**row},"evaluation.jsonl")
|
| 217 |
+
validation = score(model,data/"dev.bin",device,score_batch,unigram=dist,progress=evaluation_progress)
|
| 218 |
# A rerun after final-checkpoint interruption writes each documented sample exactly once.
|
| 219 |
sample_path = output/"samples.jsonl"
|
| 220 |
if sample_path.exists():
|
|
|
|
| 227 |
summary["matched_dev_nll"] = next(e["dev_nll"] for e in reversed(json_lines(output/"events.jsonl"))
|
| 228 |
if "dev_nll" in e)
|
| 229 |
summary.update(tokens=budget,steps=steps,train_seconds=elapsed,tokens_per_sec=budget/elapsed if elapsed else 0,
|
| 230 |
+
process_peak_rss_mib=peak_process_mib(),
|
| 231 |
peak_vram_mb=torch.cuda.max_memory_allocated(device)/2**20 if device.type=="cuda" else 0,
|
| 232 |
dev_nll=validation["nll"],dev_accuracy=validation["accuracy"],dev_tokens=validation["tokens"],
|
| 233 |
finished_at=time_now(),status="complete")
|
research/tests/test_derivatives.py
CHANGED
|
@@ -271,6 +271,31 @@ def test_pythia_adapter_fourth_derivative_and_portable_checkpoint(tmp_path, monk
|
|
| 271 |
set_peft_model_state_dict(fresh, payload)
|
| 272 |
torch.testing.assert_close(logits_of(fresh, ids), logits_of(model, ids), rtol=0, atol=0)
|
| 273 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 274 |
|
| 275 |
def test_large_finite_gradient_norm_survives_squaring():
|
| 276 |
"""The real adapter calibration exposed overflow only in the FP32 norm reduction."""
|
|
|
|
| 271 |
set_peft_model_state_dict(fresh, payload)
|
| 272 |
torch.testing.assert_close(logits_of(fresh, ids), logits_of(model, ids), rtol=0, atol=0)
|
| 273 |
|
| 274 |
+
# The production FP64 replica receives the current optimized factors. Its registered
|
| 275 |
+
# mask must prevent future tokens influencing earlier logits in the new attention backend.
|
| 276 |
+
from thirdloss.objectives import derivative_replica, probe_gradient
|
| 277 |
+
from thirdloss.penalties import random_signs
|
| 278 |
+
from thirdloss.windows import generator, probe_rows
|
| 279 |
+
monkeypatch.setenv("THIRDLOSS_ADAPTER_DERIVATIVE_DEVICE","cpu")
|
| 280 |
+
before = torch.get_rng_state()
|
| 281 |
+
replica = derivative_replica("abstracts",27,tmp_path)
|
| 282 |
+
assert torch.equal(before,torch.get_rng_state())
|
| 283 |
+
y = (ids+1)%17
|
| 284 |
+
streamed,streamed_grad = probe_gradient(model,params,ids,y,"third",7,0,replica)
|
| 285 |
+
precise = tuple(p for p in replica.parameters() if p.requires_grad)
|
| 286 |
+
for source,dest in zip(params,precise,strict=True):
|
| 287 |
+
torch.testing.assert_close(dest,source,rtol=0,atol=0)
|
| 288 |
+
rows = probe_rows(7,0,len(ids))
|
| 289 |
+
probe_rng = generator(ids.device,7,0,827)
|
| 290 |
+
a,b = random_signs(params,probe_rng),random_signs(params,probe_rng)
|
| 291 |
+
exact = estimate(token_loss(logits_of(replica,ids[rows]),y[rows]),precise,"third",u=a,v=b)
|
| 292 |
+
torch.testing.assert_close(streamed,exact.detach(),rtol=1e-10,atol=1e-8)
|
| 293 |
+
for observed,expected in zip(streamed_grad,torch.autograd.grad(exact,precise),strict=True):
|
| 294 |
+
torch.testing.assert_close(observed,expected,rtol=1e-7,atol=1e-7)
|
| 295 |
+
altered=ids.clone()
|
| 296 |
+
altered[:,-1]=(altered[:,-1]+4)%17
|
| 297 |
+
torch.testing.assert_close(logits_of(replica,ids)[:,:-1],logits_of(replica,altered)[:,:-1],rtol=0,atol=0)
|
| 298 |
+
|
| 299 |
|
| 300 |
def test_large_finite_gradient_norm_survives_squaring():
|
| 301 |
"""The real adapter calibration exposed overflow only in the FP32 norm reduction."""
|
research/uv.lock
CHANGED
|
@@ -864,6 +864,7 @@ dependencies = [
|
|
| 864 |
{ name = "matplotlib" },
|
| 865 |
{ name = "numpy" },
|
| 866 |
{ name = "peft" },
|
|
|
|
| 867 |
{ name = "pyarrow" },
|
| 868 |
{ name = "python-dotenv" },
|
| 869 |
{ name = "reportlab" },
|
|
@@ -888,6 +889,7 @@ requires-dist = [
|
|
| 888 |
{ name = "matplotlib", specifier = ">=3.10" },
|
| 889 |
{ name = "numpy", specifier = ">=2" },
|
| 890 |
{ name = "peft", specifier = ">=0.22,<1" },
|
|
|
|
| 891 |
{ name = "pyarrow", specifier = ">=20" },
|
| 892 |
{ name = "python-dotenv", specifier = ">=1" },
|
| 893 |
{ name = "reportlab", specifier = ">=4" },
|
|
|
|
| 864 |
{ name = "matplotlib" },
|
| 865 |
{ name = "numpy" },
|
| 866 |
{ name = "peft" },
|
| 867 |
+
{ name = "psutil" },
|
| 868 |
{ name = "pyarrow" },
|
| 869 |
{ name = "python-dotenv" },
|
| 870 |
{ name = "reportlab" },
|
|
|
|
| 889 |
{ name = "matplotlib", specifier = ">=3.10" },
|
| 890 |
{ name = "numpy", specifier = ">=2" },
|
| 891 |
{ name = "peft", specifier = ">=0.22,<1" },
|
| 892 |
+
{ name = "psutil", specifier = ">=6" },
|
| 893 |
{ name = "pyarrow", specifier = ">=20" },
|
| 894 |
{ name = "python-dotenv", specifier = ">=1" },
|
| 895 |
{ name = "reportlab", specifier = ">=4" },
|