A matrix with 2.2 trillion coefficients
Four pairs of feature vectors let us train a regression whose full weight matrix would occupy 16 TiB. Here is what the laptop actually stored, what it learned, and how we checked the answer.
One update explains the storage bill
Suppose each observation describes a pair, such as a document and a query. Let x describe the document, z the query, and y the score we want to predict. A bilinear regressor predicts xᵀWz. An entry of W describes how one document feature interacts with one query feature. With 2,097,152 features on one side and 1,048,576 on the other, that gives 2,199,023,255,552 entries.
For squared error, each SGD step adds a multiple of the outer product xzᵀ to the matrix. Start at zero and visit four training pairs in any fixed order. After any number of steps, the entire matrix is a weighted sum of those same four outer products. Store their feature vectors and four weights, and any entry can be reconstructed on demand.
LinearFit first builds a four-by-four Gram matrix. Entry ij multiplies the dot product of the two left vectors by the dot product of the two right vectors. That product is the inner product of the two outer products. During training, a dot product against one Gram row gives a prediction, and one expansion coefficient changes. At inference, a new pair only needs dot products against the stored factors. Pairwise kernels use the same product structure. Generalized vec trick for fast learning of pairwise kernel models

We chose four deterministic, signed feature patterns with targets 1, −0.5, 0.75 and 0.25. Twelve passes made 48 updates. The training half mean squared error fell from 0.234375 to 1.397 × 10⁻⁸. The last matrix entry changed from zero to 1.43016 × 10⁻⁶. At the largest width, the complete process took a median of 155.84 ms across seven launches, including constructing 96 MiB of factors, building the Gram matrix and printing the result.
The number of adjustable coefficients in this fixture is four. The matrix rank is at most four. A general dense language model has many independently adjustable weights and a different training workload. Increasing the number of example pairs also has a cost here. For n pairs the Gram matrix contains n² entries. The method is a good fit when the number of pairs is small compared with the product of the feature widths.
Checking the training rule independently
On a separate fixture, NumPy explicitly updated every entry of a 5 × 7 matrix after each of nine random pairs for four epochs. The largest final difference across all 35 entries was 2.78 × 10⁻¹⁷. Twelve unseen pairs had a maximum prediction difference of 1.53 × 10⁻¹⁶. Saving after two epochs and resuming produced byte-identical coefficient output to four uninterrupted epochs. Three deterministic fixtures also matched explicit updates at every coordinate, up to a 256 × 128 matrix.
Three questions before a distributed run
How much state lands on one worker?
Albatross divides weights, gradients and optimizer state according to the requested ZeRO stage, giving any remainder to the lowest numbered workers. Consider 2⁴¹ independently stored parameters at two bytes for each weight, two for each gradient and twelve for optimizer state. At stage 3 all three arrays are partitioned. With 512 workers, each worker’s share is exactly 64 GiB. If each device has 80 GiB and the job reserves 16 GiB for everything else, 512 is the smallest count that satisfies that arithmetic budget. ZeRO: Memory Optimizations Toward Training Trillion Parameter Models

Which bytes restore the next tensor slice?
Kinglet accepts a tensor length, element width, shard size and a half-open slice. In the study, five two-byte elements straddled a shard boundary. The answer was four bytes at the end of shard 1023 and six at the beginning of shard 1024. The result contains inclusive byte endpoints suitable for an HTTP range request. A local test physically wrote shard files, reconstructed 32 random slices and compared each byte against the original file. The large-offset case checked address arithmetic independently of storage capacity. HTTP range requests
What if one worker cancels another?
At one coordinate, suppose a worker contributes 10¹⁶ and 1, and a second worker contributes −10¹⁶. A naive floating-point sum can lose the 1. Chaffinch merges two sorted coordinate streams with compensated summation and divides by the global example count. With four examples the fixture returns 0.25. A second check compared 52 worker contributions against Python’s math.fsum at four coordinates, including 2⁴¹ − 1 and 2⁵³ − 1. All four means matched. This is a local reducer that can operate on worker outputs. Transport, scheduling and failure recovery belong to the distributed application.
What changes when weights can vary independently?
We also trained a sparse embedding table with 549,755,813,888 rows and four independent weights per row. An unseen row starts at zero. Training examples reached 64 rows spread across the table, each with four different targets. For each row, two observations went to one worker stream and two to another. Chaffinch combined the streams and BlyxTorch applied the mean gradients. Both worker streams ran in one CPU process.
After twelve rounds, 256 distinct weights had changed. Every updated weight matched its analytically predicted value within 10⁻¹⁴. To check prediction, we asked for a weighted combination of the four features that had never appeared in training, on each of the 64 trained rows. Mean squared error fell from 0.54294 to 3.24 × 10⁻⁸. A separate unseen row still returned four zeros. This experiment exercises independently trainable coordinates within a 2.2-trillion-weight address space. Its physical workload is the 256 weights the examples touched.
Download the Blyx program and its verification script into one folder. Run python check_sparse.py --compiler blyxc with Git and the compiler revision in the framework guide. The script fetches the two pinned framework sources and checks both errors against an independent calculation. Training program in Blyx · Verification script · Observed results
Restart a million-weight run from disk
In a second test we launched two native Blyx workers on the same computer. One owned the first 524,288 coordinates of the 2⁴¹-weight model and the other owned the last 524,288. Kinglet checked both shard boundaries. Each coordinate received its own seeded target. A worker minimized the sum of squared errors with BlyxTorch SGD, updating one independent weight per target. The objective separates along the shard boundary, so the workers could train concurrently without exchanging gradients.
After four epochs, both workers exited. The launcher saved the weights and a manifest with the coordinate ranges and file checksums. Two fresh processes restored the files and trained for four more epochs. We also ran eight uninterrupted epochs from the same initialization. All 1,048,576 weights changed. Both final checkpoint files were byte-identical between the restarted and uninterrupted runs, and every weight matched the independent NumPy calculation exactly on these binary-fraction inputs.

Download the worker and launcher together. With NumPy 2.2.6 and the compiler revision from the release guide, run python check_workers.py --compiler blyxc. Use --power 10 to try a smaller run with 1,024 weights per worker. Native worker in Blyx · Launcher and independent checks · Checkpoint measurements
Differentiate a quantum circuit on a CPU
BlyxTorch 0.5.0 starts a circuit in the all-zero state. Each layer applies a separately adjustable Y rotation to each qubit, then entangles neighbours with a CNOT chain. We measure the expectation of Z on one chosen qubit. The training command adjusts the angles to move that expectation toward a target. A two-qubit example started at 0.992398 and reached −0.24999977 after 40 updates toward −0.25.
One way to get a derivative is to shift a rotation by +π/2 and −π/2, evaluate both circuits and halve the difference. An adjoint sweep instead propagates the measured observable backward through the simulated circuit, collecting every angle derivative. We checked the implementation against an independent dense rotation-matrix simulator using parameter shifts. The largest absolute difference across 116 derivatives was 1.33 × 10⁻¹⁵. Schuld et al., evaluating analytic gradients on quantum hardware · Jones and Gacon, efficient calculation of gradients in simulated circuits

| Qubits | Angles | Adjoint | Parameter shift |
|---|---|---|---|
| 4 | 12 | 10.09 ms | 14.19 ms |
| 6 | 18 | 10.03 ms | 17.45 ms |
| 8 | 24 | 9.93 ms | 30.40 ms |
| 10 | 30 | 14.12 ms | 92.29 ms |
The 6.54× timing ratio at ten qubits compares two differentiation algorithms on the same CPU. The simulator stores 2q real amplitudes per state and accepts up to 16 qubits. Its gate set is real-valued. Exporting a circuit produces OpenQASM 3 text for an external backend. We parsed exports at 1, 2, 5 and 16 qubits. Hardware execution, device noise, dense trillion-parameter LLM training and end-to-end multi-node throughput remain unmeasured. OpenQASM 3 specification
Run the same checks
Download the native archive for your OS from each release below. Compare each archive with its release’s SHA256SUMS. Place the five framework executables and the two study executables in a directory called bin. LinearFit supplies pair-study and BlyxTorch supplies quantum-study. Windows filenames end in .exe.
| Release | What to try |
|---|---|
| LinearFit 0.2.0 | Train a bilinear regressor and query a weight. |
| BlyxTorch 0.5.0 | Train an Ry/CNOT circuit and export it as OpenQASM 3. |
| Albatross 0.2.0 | Calculate the bytes of model state on each worker. |
| Kinglet 0.2.0 | Read the pieces of a tensor slice from its shards. |
| Chaffinch 0.2.0 | Combine two workers’ sparse gradient sums. |
./bin/pair-study factors 21
./bin/quantum-study adjoint 10 3 4
./bin/quantum-study shift 10 3 4
python -m pip install numpy==2.2.6
python reproduce.py --bin ./bin --out my-measurements.jsonOur workstation ran Windows on an Intel Family 6 Model 154 processor, with Python 3.10.6 and NumPy 2.2.6 for the independent checks. The timing driver runs one warm-up and then times seven fresh processes per configuration. Seeds 712, 192 and 2889 control its random reference fixtures. Timing is machine-dependent. To redraw the four charts, put figures.py beside measurements.json and worker-measurements.json and run it with Matplotlib installed.