← 回到 Reading
Daily Dose of DS 2026-10-26

Why Temperature 0 Isn't Deterministic in LLM Inference

在處理劑量和參考代碼等精準資訊時,LLM voice agents 在 speech-to-text 與 text-to-speech 兩層的語音準確度至關重要。Deepgram 的 Flux TTS 著手解決 outbound speech 層的問題,專注於保留技術名詞與 alphanumeric 字串的精確度。在評測中,Flux TTS 在藥品名稱和追蹤號碼等複雜術語上達到了 3.4% 的 word error rate。一項模擬獸醫處方補充的實際測試顯示,它能精確保留動態細節,例如變動的領取時間和處方編號。即使在 temperature 0 下,由於 floating-point addition 具有 non-associative 特性,LLM inference 在多次執行間仍可能產生 non-deterministic 的輸出。當 inference server 上的 dynamic batch sizes 發生變化時,GPU kernels 會以不同方式分割 matmuls 和 attention 等運算,從而改變 summation 順序並導致微小的 logit 差異。在分數接近的情況下,argmax 會選出不同的 token,進而因 autoregressive generation 而導致完全分歧的結果。像 vLLM 和 SGLang 這樣的 inference engines 已經透過引入 batch-invariant execution modes 來解決此問題,但代價是效能會有所降低。

閱讀原文 ↗
目錄 2 段
  1. 01精準掌握細節的 voice agent
  2. 02為什麼在 LLM inference 中 temperature 0 並非 deterministic
VOICE AI

精準掌握細節的 voice agent

在處理劑量和參考代碼等精準資訊時,LLM voice agents 在 speech-to-text 與 text-to-speech 兩層的語音準確度至關重要。Deepgram 的 Flux TTS 著手解決 outbound speech 層的問題,專注於保留技術名詞與 alphanumeric 字串的精確度。在評測中,Flux TTS 在藥品名稱和追蹤號碼等複雜術語上達到了 3.4% 的 word error rate。一項模擬獸醫處方補充的實際測試顯示,它能精確保留動態細節,例如變動的領取時間和處方編號。

  • 精確的 speech-to-text 與 text-to-speech 都是防止 voice agents 遺漏資訊的必備要件。
  • Deepgram 的 Flux TTS 負責處理 outbound text-to-speech,重點在於保留複雜的 alphanumeric 與技術細節。
  • Flux TTS 在涵蓋藥品名稱、追蹤號碼與技術字串的 benchmark 測試中,達到了 3.4% 的 word error rate。
  • 一項模擬處方補充的測試顯示,該系統在處理動態變化的預約細節時仍能維持準確度。
LLM INFERENCE

為什麼在 LLM inference 中 temperature 0 並非 deterministic

即使在 temperature 0 下,由於 floating-point addition 具有 non-associative 特性,LLM inference 在多次執行間仍可能產生 non-deterministic 的輸出。當 inference server 上的 dynamic batch sizes 發生變化時,GPU kernels 會以不同方式分割 matmuls 和 attention 等運算,從而改變 summation 順序並導致微小的 logit 差異。在分數接近的情況下,argmax 會選出不同的 token,進而因 autoregressive generation 而導致完全分歧的結果。像 vLLM 和 SGLang 這樣的 inference engines 已經透過引入 batch-invariant execution modes 來解決此問題,但代價是效能會有所降低。

  • Temperature 0 會停用 sampling,但無法防止數十億次 GPU 運算中因 floating-point non-associativity 所導致的 logit 差異。
  • Dynamic batch sizes 會導致 GPU kernels 以不同方式劃分 workloads(例如 split-K 與 split-KV),進而改變加法運算的順序。
  • 在分數極為接近的 token 上,微小的 logit 差異就會反轉 argmax 的決策,並透過 autoregressive 的過程複合放大,產生截然不同的 completions。
  • Thinking Machines 透過固定 split sizes 並在不論 batch size 大小的情況下標準化 reduction orders,實現了完全的 determinism。
  • vLLM 與 SGLang 現在都提供了 batch-invariant 的 deterministic modes,不過 SGLang 回報平均會有約 34.35% 的效能降低。