피드로 돌아가기
Speculative decoding shifted our output distribution and evals missed it
Dev.toDev.to
AI/ML

Speculative Decoding의 수치적 불일치 해결을 통한 1.9배 Throughput 확보 및 신뢰성 검증

Speculative decoding shifted our output distribution and evals missed it

Marcus Chen2026년 6월 18일5advanced

Context

Llama-3.1-8B 기반 Tool-call 에이전트의 추론 Latency 단축을 위해 vLLM의 Speculative Decoding 도입. 하지만 Float16 연산의 정밀도 차이와 Kernel Path 변경으로 인해 Greedy Decoding 시 결과값이 미세하게 변하는 Drift 현상 발생.

Technical Solution

  • Draft Model(1B)의 제안과 Target Model(8B)의 일괄 검증 구조를 통한 추론 속도 최적화
  • Batch Forward Pass와 Sequential Path 간의 Reduction Order 차이로 인한 Logit 불일치 지점 파악
  • HF generate() API 기반의 Offline Eval을 제거하고 실제 Serving Endpoint를 통한 통합 검증 경로 구축
  • Draft Model Hash 및 Kernel Version을 포함한 System Fingerprint 기반의 CI Assertion 도입
  • 정밀도가 필수적인 금융 워크플로우 전용 Target-only Serving 경로 분리 운영
  • 일일 500개 프롬프트 리플레이 기반의 Divergence Canary 시스템 구축을 통한 Drift 상시 모니터링

1. Speculative Decoding 도입 시 FP16/BF16 정밀도에 따른 Token Drift 가능성 측정

2. Eval Harness 설계 시 Model API가 아닌 실제 Serving Gateway를 경유하도록 구성

3. 추론 설정(Config)과 런타임 버전을 해싱한 Fingerprint를 통해 배포 전 경로 일관성 검증

4. 비결정적 결과가 치명적인 특정 엔드포인트는 Draft Model 없이 Target-only로 격리 운영

원문 읽기