본문으로 건너뛰기

llm-d Plugin 설정 가이드

ProfileHandler

pd-profile-handler

- type: pd-profile-handler
parameters:
threshold: 0
hashBlockSize: 64
prefillProfile: prefill
decodeProfile: decode
- type: prefill-header-handler

prefill-header-handler와 함께 사용해야합니다.

작동 방식은 아래와 같습니다.

  • decode profile을 실행합니다.
  • threshold > 0으로 설정된 경우
    • prefix-cache-scorer를 통해 확인한 decode 서버의 prefix cache hit 수를 가져옵니다.
    • prompts - (hit * hashBlockSize) < threshold인 경우 decode profile 결과만 반환합니다.
  • prefill profile을 실행합니다.
  • 최종적으로 decode profile을 선택하고 profile 결과로 decode만 반환하면 decode만, prefill과 decode를 모두 반환하면 prefill과 decode를 함께 실행합니다.

Scorer

prefix-cache-scorer

PreRequest

prefill-header-handler

- type: prefill-header-handler

SchedulingResult에 prefill profile 결과가 포함된 경우, X-Prefiller-Host-Port: <host>:<port> 헤더를 추가합니다.