Pinned Tweet
Boba tapioca balls/pearls are polymers. Their chewiness comes from long starch molecules tangled with water, and that structure changes when they are cooked, chilled, or reheated.
I made a tiny interactive demo of the microstructure:
leannchen86.github.io/matsci…
For GPT pretraining, if we corrupt the data by placing an EOS (end-of-sequence) token in the middle of a document, it’s no surprise that the model’s structural learning suffers.
But what if we replace that misplaced EOS with an ordinary token like “uh” or “constitution”? Turns out they’re almost equally harmful.
1
160
2/ We continued pretraining GPT-2 124M under controlled conditions on PMC articles and government reports. In each document, we moved one EOS from the true ending to an internal join while keeping the EOS count, text, packing, token budget, and compute fixed.
This increased continuation NLL after the join in every paired seed - equivalent to roughly 7.5–8% higher perplexity on those targeted continuations.
1
115
I've had fun visualizing ml concepts with manim. Here’s a small two-layer MLP, where each layer computes h = ReLU(Wx+b).
This viz lets you see that every connection is a single weight value.
Pretraining data is often curated by quality scores or semantic similarity, but neither necessarily tells us whether selected docs give a model distinct learning signals.
In a small GPT-2 test, we took 10 FineWeb documents spanning different FineWeb-Edu quality scores and asked: if we can keep only 5, which set gives the most distinct gradient signals?
Turns out the FineWeb-Edu top 5 ranked in the bottom 4% of all sets by gradient diversity.
From each document, we took the first 513 GPT-2 tokens (512 next-token predictions), averaged those prediction losses into one loss per doc, backpropagated that loss and recorded gradients from GPT-2’s final two transformer blocks: 14.2M values, ~11% of its weights. The gradient captures how that document would try to move those weights during training, before the optimizer turns it into a weight update.
To mimic a fixed data budget: if we can keep only 5 of 10 docs, which 5 give the most distinct learning signals?
There are C(10,5) = 252 possible sets. To compare how diverse the five gradient directions are within each set, we scored all 252 using gradient G-Vendi: higher means less-redundant update directions. Turns out FineWeb-Edu’s top five scored 4.425, placing it only at the 3.97th percentile, whereas the best set scored 4.932 and shared just 1/5 documents with the FineWeb-Edu top five.
1
90
Made a little web simulation of our Fremont datacenter! You can drag & drop SSDs and see various rack stats. Ping me if you’d like other SSD types added.
leannchen86.github.io/ssd-ra…
3
339



