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 / Random Seed
Transformer & LLM components

Random Seed

A random seed initializes the pseudo-random generator that drives sampling at temperature > 0. Same seed + same prompt + same settings + same model + same runtime → same output.

Seed control is supported across most local-AI runtimes: llama.cpp's --seed, vLLM's seed= SamplingParams, Ollama's seed option in the request body. Setting -1 typically asks for a random seed each request.

Caveat from deterministic-decoding: even with a fixed seed, reproducibility across hardware or runtime versions is not guaranteed. Use seed for within-session reproducibility, not as a cross-system stability mechanism.

Practical example

Debugging a flaky agent pipeline built on Ollama, an operator notices the model occasionally emits malformed JSON on an otherwise-reliable extraction prompt. To isolate whether the failure is prompt-dependent or sampling noise, they pin seed: 42 in the request body and rerun the exact same prompt 20 times — if the output is now byte-identical every time, the original failure was a sampling-driven edge case at temperature > 0, not a prompt bug. They can then binary-search seeds to find one that reliably reproduces the malformed output for debugging, without needing production traffic. Note this reproducibility only holds within the same Ollama version and hardware; upgrading the runtime or switching from CUDA to Metal can shift results even with an identical seed and prompt.

Related terms

Deterministic DecodingSampling (Decoding)Temperature (sampling)

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 →