Property-based testing of batch-invariant operations
mmaaz.ca·9h·
Discuss: Hacker News

Muhammad Maaz

Home / Writings October 5, 2025 The code accompanying this post is available at pbt-batch-invariance.

Recently, a Thinking Machines blog post discussed why nondeterminism in large language models is a problem. The blog argues that batch-invariance in matrix multiplication, RMSNorm, and attention is crucial for deterministic inference. In their repo, the test_batch_invariance.py file shows a simple test for batch-invariance of matrix multiplication, with a random draw of PyTorch tensors (basicall…

Similar Posts

Loading similar posts...