RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Eruo Fredoline
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
Glossary / Transformer & LLM components / Deterministic Decoding
Transformer & LLM components

Deterministic Decoding

Deterministic decoding means same prompt → same output, every time. Achieved by setting temperature to 0 (always pick the highest-probability token) and pinning the random seed for any tiebreaks.

Sounds simple, isn't. Even at temperature 0, GPU floating-point non-associativity can produce different logits across runs (especially with batch-size variation), which can flip ties. True bit-exact reproducibility requires single-batch, deterministic kernels (CUBLAS_DETERMINISTIC, cuDNN deterministic mode), and pinned seed everywhere.

For local AI evaluation, "deterministic enough" usually means temperature 0 + single batch + same hardware/runtime version. Cross-runtime reproducibility (llama.cpp ↔ vLLM) is essentially never bit-exact even with identical sampling settings.

Practical example

An engineer debugging a quantization regression runs the same prompt through an FP16 baseline and a Q4_K_M GGUF build, both at temperature 0, expecting identical completions modulo the quant error — but the FP16 outputs differ slightly between two runs on the same GPU. The cause: batch size changed between runs (1 vs 4 concurrent requests), and GPU kernels use non-associative floating-point reduction, so summation order shifts logits by fractions of a bit, occasionally flipping a near-tied argmax. Pinning batch size to 1 and enabling CUBLAS_DETERMINISTIC (or the llama.cpp single-thread path) restores run-to-run identical output. This matters for regression testing: comparing a new quantization format against baseline requires knowing whether observed diffs are real quality loss or just non-deterministic noise — bit-exact reproducibility is a precondition for that comparison to mean anything.

Related terms

Random SeedTemperature 0 (Greedy Sampling)Sampling (Decoding)

Reviewed by Eruo Fredoline. See our editorial policy.

Buyer guides
  • Best GPU for local AI →
  • Best laptop for local AI →
  • Best Mac for local AI →
When it doesn't work
  • CUDA out of memory →
  • Ollama running slowly →
  • ROCm not detected →