简体中文 · Checkpoint and checksum · Evaluation results (JSON).

In a recent development, this 107M-parameter causal language model replaces the feed-forward network in each of its eight Transformer blocks with column attention. After attention over token positions, each token uses its own activations to generate eight 256 × 256 matrices that mix channels.

The long-term goal is to run capable models locally on devices with limited memory. We are testing whether extra computation on the device can buy a smaller set of resident weights, bringing more inference workloads within reach of consumer GPUs and onboard computers in robots.

Interim checkpoint at step 59,000 of an ongoing 20-epoch run. The model had seen 762,772,121 next-token targets (about 1.64 epochs). The comparison uses the original authors’ closest publicly released base model by total parameter count, TinyStories-2Layers-33M. Counts include embeddings and count tied weights once. Official checkpoint and revision.

Both scores use the same 215,176 held-out targets, 512-token blocks, microbatch 4, eager attention and BF16 autocast. The column-attention score comes from validation on an RTX 5090 at step 59,000. The official checkpoint was evaluated on CPU. The column-attention checkpoint has 36.2% more parameters. Depth, positional encoding and training histories also differ. This comparison measures next-token prediction on the selected stories.

In a recent development, A GPU can have enough arithmetic throughput to generate the next token while lacking the VRAM to hold the weights, KV cache and workspace together. For a model with large dense FFNs, one option is to keep some weights in system RAM and transfer them to the GPU layer by layer. When the transfer takes longer than the compute available to overlap it, generation stalls and per-token latency rises. Buying higher-memory hardware raises deployment cost. Both trade-offs matter for a robot that must respond on time using its onboard computer. FlexGen study of single-GPU offloading.

Column attention offers a specific trade-off. Let m be both the number of queries per group and the number of shared keys. Keep the residual width at 512, the group count at 8 and the Q/K dimension at 54, and include the output projection. The four projections in one mixer have 35,712 × m learned weights, while QK scoring takes 8 × 54 × m² multiply–accumulates per token. Along this scaling path, scoring arithmetic grows quadratically with the number of mixer projection parameters. Doubling the slots doubles the projection parameters and gives each token four times as many channel scores. At the current m = 256, each layer generates 524,288 scores per token in on-chip tiles. Mixer projections · Tiled scoring kernel.

If this compute-intensive design can reach the same quality with fewer trainable parameters, it could reduce resident weight storage and weight transfers during inference, making local deployment practical on more devices. Training presents a related opportunity. In data-parallel training with the same worker count, gradient precision and synchronization frequency, the gradient payload scales with the trainable parameter count. More local computation per learned weight could ease network bandwidth demands and make distributed training across consumer GPUs more practical. Peak memory, per-token latency and bytes communicated per update at matched quality are the measurements that would test these deployment hypotheses. PyTorch on distributed gradient synchronization.

Industry observers note that the residual width is 512. All eight layers use global causal row attention with 16 heads and RoPE over each 32-dimensional row query and key. Column attention then operates inside one token:.

The Q/K/V/output projections are learned weights. The mixing coefficients in A are generated anew at each position. At fixed channel width, column scoring costs O(n) in sequence length and uses n × 8 × 256² × 54 multiply–accumulates per layer. Global row attention still has quadratic score computation in n. The BF16 Triton training kernel tiles channel scores on chip and recomputes Q during backward. Column mixer · Triton kernel · Rotary row attention.

Use Python 3.12 and install the dependencies below. Download column-attention-256-step-59000.pt into the repository root from the release. The inference download command fetches the tokenizer and model configuration. Download weights.

It has been revealed that download the pinned corpus and official baseline, encode the data, then run each evaluation on the device used for its reported score. The column-attention command requires a BF16-capable CUDA GPU.

In a recent development, the reported run uses an RTX 5090 with CUDA BF16, Triton column attention, CPU AdamW with FP32 master weights and moments, and seed 42. The learning rate warms to 0.0003 over 500 updates and then stays constant. The effective batch was 32 through update 58,444, with microbatch 8 for the first 250 updates and 32 thereafter. Starting at update 58,445, each update uses one microbatch of 40 packed sequences. The command below starts a fresh run at 32 sequences per update. Trainer.

It has been revealed that GPU training was tested with PyTorch 2.11.0+cu130 and triton-windows 3.7.0.post26. For that environment, install the CUDA wheel from https://download.pytorch.org/whl/cu130 and install triton-windows==3.7.0.post26. For model checks use python verify_wide_model.py (CPU) or python verify_wide_model.py --cuda-mixer (CUDA). Use python live_loss.py to view training on port 8765.

Project code is licensed under Apache-2.0. TinyStories was created by Ronen Eldan and Yuanzhi Li. TinyStories paper · Upstream dataset.

📌 Read also:

→ Read original article