Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_llm-speculative-decoding-internals

Speculative decoding internals

7 COMPONENTS · 6 FLOWS · UPDATED 2026-11-23
GITHUB README / PR PREVIEW CARD
[![Speculative decoding internals — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_llm-speculative-decoding-internals/opengraph-image)](https://archos.sageideas.dev/d/dgm_llm-speculative-decoding-internals)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_llm-speculative-decoding-internals)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_llm-speculative-decoding-internals" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Speculative decoding internals — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  src_0[("Client application")]
  n0_1["AI gateway"]
  n1_2["Inference server"]
  n2_3["Inference server"]
  n3_4[("KV cache")]
  ctrl_5["OpenTelemetry Collector"]
  sink_6[("Client application")]
  src_0 -->|"1. Low batch · HTTPS"| n0_1
  n0_1 -->|"2. Drafts K · TCP"| n1_2
  n1_2 -->|"3. Verifies K · TCP"| n2_3
  n2_3 -->|"4. Commits · TCP"| n3_4
  n3_4 -->|"5. Exact dist · HTTPS"| sink_6
  n2_3 -->|"Accept len · OTLP"| ctrl_5

COMPONENT STACK (7)

  • Client applicationSTATEFUL
    Latency-critical req
  • AI gatewaySTATELESS
    Low-batch decode path
  • Inference serverSTATELESS
    Fast draft (1B / Medusa)
  • Inference serverSTATELESS
    70B target 1-pass verify
  • KV cacheSTATEFUL
    Accepts match + rollback
  • OpenTelemetry CollectorSTATELESS
    Mean accepted tokens
  • Client applicationSTATEFUL
    2-3x faster ITL

REQUEST & DATA FLOW (6)

  1. Client application → AI gateway (Low batch)[HTTPS]
  2. AI gateway → Inference server (Drafts K)[TCP]
  3. Inference server → Inference server (Verifies K)[TCP]
  4. Inference server → KV cache (Commits)[TCP]
  5. KV cache → Client application (Exact dist)[HTTPS]
  6. Inference server → OpenTelemetry Collector (Accept len)[OTLP]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →