Random Seeds in LLM Sampling: Reproducibility Without a Guarantee
Subtitle: A seed can replay a draw. It cannot freeze the whole stack.
- Panel 1 - How one draw picks a token:
- PRNG emits a number from 0 to 1
- Probabilities: [0.60, 0.30, 0.10]
- Cumulative bands: 0-.60 | .60-.90 | .90-1
- Draw 0.72 lands on token two
- Same RNG stream can replay the pick
- Panel 2 - The reproducibility target:
- Same prompt bytes
- Same model and tokenizer versions
- Same temperature, top-p, and seed
- Same provider path and fingerprint
- Target: same inputs -> same output
- Panel 3 - Where the promise breaks:
- Greedy decoding may ignore the seed
- GPU kernels can run in a new order
- Batching can alter floating-point ties
- Hosted backends can change unseen
- A seed controls randomness, not the stack
- Panel 4 - Falsify determinism:
- Fix seed; change temperature once
- Fix seed; change model or provider
- Then freeze all visible settings
- Repeat the request several times
- Report match rate plus fingerprint