LLM pre-training commonly treats every token in a training sequence as an independent sample of the gradient. Under this assumption, gradient noise scales as 1/(BS) for batch size B and sequence length S, so B is halved whenever S is doubled. We show that this rule breaks down beyond a certain lengt
Critical Sequence Length: A Note on How Document Structure Bounds Gradient-Noise Reduction
A research note argues that the standard pre-training assumption that gradient noise scales as 1/(BS) for batch size B and sequence length S breaks down beyond a certain sequence length, which the authors call the critical sequence length. The finding implies that doubling sequence length S cannot always be offset by halving batch size B, because document structure bounds how much gradient-noise reduction longer sequences deliver.
When scaling sequence length, verify the 1/(BS) noise reduction still holds past the critical sequence length before halving batch size to save compute.
more in playbook: Fine-tuning and dataRun your AI side-project on zahid.host
EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.