# DetLLM – Deterministic Inference Checks

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdetllm-deterministic-inference-checks%2F172541%3E%5C
**Category:** 🤗Transformers\
**Created:** [January 17, 2026, 11:33pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdetllm-deterministic-inference-checks%2F172541 "2026-01-17T23:33:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cerru02](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/cerru02/32/57315_2.png) [@Cerru02](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FCerru02)%5C
**Post date:** [January 17, 2026, 11:33pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdetllm-deterministic-inference-checks%2F172541%2F1 "2026-01-17T23:33:30Z")

</div>

I kept getting annoyed by LLM inference non-reproducibility, and one thing that really surprised me is that changing batch size can change outputs even under “deterministic” settings.

So I built DetLLM: it measures and proves repeatability using token-level traces + a first-divergence diff, and writes a minimal repro pack for every run (env snapshot, run config, applied controls, traces, report).

I prototyped this version today in a few hours with Codex. The hardest part was the HLD I did a few days ago, but I was honestly surprised by how well Codex handled the implementation. I didn’t expect it to come together in under a day.

repo: [https://github.com/tommasocerruti/detllm](https://github.com/tommasocerruti/detllm)

Would love feedback, and if you find any prompts/models/setups that still make it diverge.
