% DLite paper reading; compile locally with pdflatex via build_slides.py.
\documentclass[aspectratio=169,11pt]{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb,graphicx,booktabs}

\definecolor{AcademicBlue}{RGB}{26,57,86}
\definecolor{AcademicTeal}{RGB}{0,105,112}
\setbeamercolor{structure}{fg=AcademicBlue}
\setbeamercolor{frametitle}{fg=AcademicBlue,bg=white}
\setbeamercolor{title}{fg=AcademicBlue}
\setbeamercolor{alerted text}{fg=AcademicTeal}
\setbeamercolor{block title}{fg=white,bg=AcademicBlue}
\setbeamercolor{block body}{fg=black,bg=AcademicBlue!5}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{itemize items}[circle]
\setbeamertemplate{footline}{%
  \hfill\usebeamerfont{page number in head/foot}%
  \insertframenumber\,/\,\inserttotalframenumber\hspace{4mm}\vspace{3mm}}
\setbeamersize{text margin left=8mm,text margin right=8mm}
\setbeamerfont{frametitle}{size=\Large,series=\bfseries}
\setbeamerfont{title}{size=\LARGE,series=\bfseries}
\newcommand{\papersource}[1]{\par\smallskip{\scriptsize\color{gray}#1\par}}
\newcommand{\tauk}{\tau}

\title[DLite]{DLite: History-Free Speculative Decoding for Agentic AI}
\subtitle{Research group paper discussion}
\author{Paper by Jiaming Xu et al.}
\date{arXiv:2610.23787v1 \quad 16 October 2026}

\begin{document}

\begin{frame}
  \titlepage
  \vspace{-4mm}
  \centering\small\href{https://arxiv.org/abs/2610.23787v1}{arxiv.org/abs/2610.23787v1}
\end{frame}

\begin{frame}{The thesis: let the target model carry the history}
  \begin{block}{Problem}
  An agent repeatedly grows its context. A small drafter must both understand that history and maintain a second historical KV cache.
  \end{block}
  \begin{block}{DLite}
  Reuse target-model hidden states; predict in a fixed local window; restore only the missing within-block causal dependence.
  \end{block}
  \vspace{1mm}
  \centering\alert{Qwen3-8B SWE-bench: $2.74\times$ decoding speedup versus $1.60\times$ for DSpark.}
  \papersource{Paper, Secs. 3--5; Table 3, PDF p. 8. Speedups are relative to vanilla decoding.}
\end{frame}

\begin{frame}{Agent turns grow the input but often produce short outputs}
  \centering
  \includegraphics[width=0.98\linewidth,height=0.62\textheight,keepaspectratio]{figures/agent.pdf}
  \begin{itemize}
    \item Existing drafters can fall to roughly 1--2 output tokens per verification round on agent tasks.
    \item Repeated short turns make draft-state maintenance frequent.
  \end{itemize}
  \papersource{Paper, Fig. 1 and Sec. 3.1, PDF pp. 2--4. Figure reproduced from the authors.}
\end{frame}

\begin{frame}{Speculative speedup depends on quality \emph{and} draft cost}
  \begin{block}{Draft \(\rightarrow\) verify \(\rightarrow\) commit}
  A draft model proposes $N$ tokens. The target verifies them together and commits the accepted prefix, with a target-model continuation token at rejection.
  \end{block}
  \[
    \mathrm{Speedup}\approx
    \frac{\mathrm{Time}_{M_T}(1)\,\tau}
    {\mathrm{Time}_{M_T}(N)+\mathrm{Time}_{M_D}(N)}
  \]
  \begin{itemize}
    \item $\tau$: mean tokens produced per target verification; larger is better.
    \item $M_T$: target model; $M_D$: drafter. Draft latency can erase gains in $\tau$.
  \end{itemize}
  \papersource{Paper, Sec. 2.1, Eq. (1), Fig. 2(a), PDF p. 3. The equation is an approximation.}
\end{frame}

\begin{frame}{A historical draft KV cache creates a second long-lived state}
  \begin{columns}[T,onlytextwidth]
  \column{0.48\textwidth}
  \begin{block}{Model-side cost}
  A limited-capacity drafter independently reconstructs the growing context; its acceptance length falls on agent workloads.
  \end{block}
  \column{0.48\textwidth}
  \begin{block}{System-side cost}
  Accepted tokens update draft KV, and prefix reuse preserves it across turns. A DeepSeek-V4 MTP/SGLang example attributes 10--20\% of inference latency to this work.
  \end{block}
  \end{columns}
  \vspace{4mm}
  \centering\alert{The target model has already encoded the historical context.}
  \papersource{Paper, Sec. 3, PDF pp. 3--4. The 10--20\% measurement is for the reported setup.}
\end{frame}

\begin{frame}{DLite drafts locally while the target retains its KV cache}
  \centering
  \includegraphics[width=0.98\linewidth,height=0.75\textheight,keepaspectratio]{figures/overview2.pdf}
  \papersource{Paper, Fig. 3 and Sec. 4.1, PDF pp. 4--5. Figure reproduced from the authors.}
\end{frame}

\begin{frame}{Target features carry context into a fixed local window}
  \begin{columns}[T,onlytextwidth]
  \column{0.53\textwidth}
  \begin{itemize}
    \item Extract multiple target-layer states at the current position.
    \item Add a learned source/depth embedding:
  \end{itemize}
  \[
  z_t^{(l)}=h_t^{(l)}+e_{\mathrm{depth}}^{(l)}.
  \]
  \begin{itemize}
    \item Present layers as separate sequence elements.
  \end{itemize}
  \column{0.43\textwidth}
  \begin{block}{Local prediction input}
  Target features\\[1mm]
  + current anchor token\\[1mm]
  + $K$ draft placeholders
  \end{block}
  \begin{itemize}
    \item Local position IDs reset each round.
    \item No historical \emph{draft} KV is stored.
  \end{itemize}
  \end{columns}
  \papersource{Paper, Sec. 4.1.1, Eq. (2), Fig. 3, PDF pp. 4--5; Appendix A.2, PDF p. 13.}
\end{frame}

\begin{frame}{Parallel drafting is missing the within-block prefix}
  \[
  p_T(x_{t+T}\mid x_{<t+T})
  =p_T(x_{t+T}\mid x_{<t},x_{t:t+T-1}).
  \]
  \begin{itemize}
    \item Parallel backbone computes $h_T$ before positions $<T$ are sampled.
    \item Target hidden states supply historical context $x_{<t}$.
    \item A light recurrent state supplies the generated block prefix:
  \end{itemize}
  \[
  s_T=g_\phi(s_{T-1},E(x_{t+T-1})),\qquad
  q_{\theta,\phi}(x_{t+T}\mid h_T,s_T)\approx p_T(x_{t+T}\mid x_{<t+T}).
  \]
  \papersource{Paper, Sec. 4.1.2, Eqs. (3)--(5), PDF p. 5. $E$ is the token embedding.}
\end{frame}

\begin{frame}{The sequential head works before vocabulary projection}
  \begin{columns}[c,onlytextwidth]
  \column{0.42\textwidth}
  \includegraphics[width=\linewidth,height=0.60\textheight,keepaspectratio]{figures/training-head.pdf}
  \column{0.55\textwidth}
  \begin{itemize}
    \item Low-rank RNN-style head updates only within a draft block.
    \item DLite refines hidden states before applying the LM head.
    \item This avoids an intermediate $D\times V$ projection at every draft position ($D$: hidden size, $V$: vocabulary size).
  \end{itemize}
  \end{columns}
  \papersource{Paper, Fig. 4(a), Sec. 4.1.2, PDF pp. 5--6. Cropped author figure.}
\end{frame}

\begin{frame}{Direct target-model KL struggles in this architecture}
  \centering
  \includegraphics[width=0.95\linewidth,height=0.59\textheight,keepaspectratio]{figures/training-direct.pdf}
  \begin{itemize}
    \item In the paper's direct-distillation comparison, CE yields a higher acceptance rate than KL.
    \item The target predicts autoregressively over history; the backbone predicts in parallel from compressed target states.
  \end{itemize}
  \papersource{Paper, Fig. 4(b), Sec. 4.2, PDF p. 6. Cropped author figure.}
\end{frame}

\begin{frame}{Two-stage training bridges the conditioning mismatch}
  \begin{columns}[T,onlytextwidth]
  \column{0.48\textwidth}
  \begin{block}{1. Warm-up}
  Train an isomorphic, history-aware teacher with token CE. Then distill its distribution into history-free DLite with forward KL.
  \end{block}
  \column{0.48\textwidth}
  \begin{block}{2. Stable stage}
  Remove the teacher. Align DLite directly to the target model using token CE and a target--draft $L_1$ distribution loss.
  \end{block}
  \end{columns}
  \vspace{3mm}
  \centering\alert{Training-only teacher: no historical draft KV at inference.}
  \papersource{Paper, Sec. 4.2, PDF p. 6; Appendix A.1, PDF p. 12.}
\end{frame}

\begin{frame}{The two objectives supervise different gaps}
  \small
  \[
  \mathcal L_{\mathrm{warmup}}=\sum_{i=1}^{K}w_iD_{\mathrm{KL}}(p_i^H\Vert q_i),
  \qquad w_i=e^{-(i-1)/\gamma},\quad \gamma=4.
  \]
  \[
  \mathcal L_{\mathrm{stable}}=\lambda_{\mathrm{CE}}\mathcal L_{\mathrm{CE}}
  +\lambda_{\mathrm{TV}}\sum_i w_i\lVert p_i^T-q_i\rVert_1.
  \]
  \begin{itemize}
    \item $p_i^H$: history-aware teacher; $p_i^T$: target; $q_i$: DLite.
    \item Teacher CE: 8 epochs; warm-up KL: 2; stable stage: 6.
    \item $\lambda_{\mathrm{CE}}=0.1$, $\lambda_{\mathrm{TV}}=1$. The paper's ``TV'' formula uses $L_1$ without a $1/2$ factor.
  \end{itemize}
  \papersource{Paper, Sec. 4.2, Eqs. (6)--(7), PDF p. 6; Appendix A.1, PDF p. 12.}
\end{frame}

\begin{frame}{Evaluation separates acceptance, decoding speed, and TPS}
  \begin{itemize}
    \item \textbf{Targets:} Qwen3-4B/8B on NVIDIA H800; $K=7$ for all methods.
    \item \textbf{DLite:} 5-layer backbone; 12/14 target hidden states; rank 320/512 for 4B/8B.
    \item \textbf{Tasks:} general math/code/chat; four LongBench v2 categories; four agent benchmarks.
    \item \textbf{Comparators:} vanilla decoding; EAGLE-3, DFlash, DSpark; DFlash2/DFlow in Table 1.
  \end{itemize}
  \begin{block}{Metric reading}
  $\tau$ = tokens per target verification; speedup = decoding rate / vanilla rate; TPS = aggregate token throughput at a stated concurrency.
  \end{block}
  \papersource{Paper, Sec. 5.1, PDF p. 7; Appendix A.1, PDF p. 12.}
\end{frame}

\begin{frame}{On standard tasks, acceptance mostly improves modestly}
  \centering
  \begin{tabular}{llrr}
  \toprule
  Target & Benchmark & DSpark $\tau$ & DLite $\tau$\\
  \midrule
  Qwen3-4B & GSM8K & 6.27 & \textbf{6.38}\\
  Qwen3-4B & MBPP & 5.48 & \textbf{5.64}\\
  Qwen3-8B & LiveCodeBench & 5.43 & \textbf{5.66}\\
  Qwen3-8B & Alpaca & 3.64 & \textbf{3.78}\\
  \bottomrule
  \end{tabular}
  \vspace{4mm}
  \begin{itemize}
    \item Removing draft history does not lower acceptance against DSpark in Table 1.
    \item Exception to ``best against everyone'': 4B MT-Bench has DFlash2 4.14, DLite 3.94.
  \end{itemize}
  \papersource{Paper, Table 1, Sec. 5.2, PDF p. 7. Higher $\tau$ is better.}
\end{frame}

\begin{frame}{Long context gives larger gains in acceptance and speed}
  \centering
  \begin{tabular}{llcc}
  \toprule
  Target & LongBench v2 task & DSpark & DLite\\
  \midrule
  4B & Multi-Doc QA & $1.81\times$ / 2.20 & \textbf{$2.18\times$ / 2.74}\\
  4B & Code Repo Ud. & $2.02\times$ / 2.44 & \textbf{$2.66\times$ / 3.14}\\
  8B & Long-dialog Hist. & $3.02\times$ / 4.01 & \textbf{$3.96\times$ / 4.77}\\
  \bottomrule
  \end{tabular}
  \vspace{5mm}
  \begin{block}{Each cell: decoding speedup / acceptance length $\tau$}
  The advantage appears on all four reported LongBench v2 categories for both target sizes.
  \end{block}
  \papersource{Paper, Table 2, Sec. 5.2, PDF p. 8. Speedup is versus vanilla decoding.}
\end{frame}

\begin{frame}{Agent workloads show the strongest relative speed gains}
  \centering
  \begin{tabular}{llcc}
  \toprule
  Target & Agent task & DSpark & DLite\\
  \midrule
  4B & AgentLongBench & $1.45\times$ / 1.84 & \textbf{$2.07\times$ / 2.51}\\
  4B & SWE-bench & $1.64\times$ / 1.89 & \textbf{$2.68\times$ / 3.15}\\
  8B & SWE-bench & $1.60\times$ / 1.94 & \textbf{$2.74\times$ / 3.19}\\
  \bottomrule
  \end{tabular}
  \vspace{5mm}
  \begin{itemize}
    \item 8B SWE-bench: $(2.74/1.60-1)\approx71\%$ higher speedup ratio than DSpark.
    \item Figures describe model decoding; BFCL tool execution time is excluded.
  \end{itemize}
  \papersource{Paper, Table 3, Sec. 5.2, PDF p. 8; Appendix A.2, PDF pp. 13--14.}
\end{frame}

\begin{frame}{At concurrency 64, DLite retains a throughput edge}
  \centering
  \begin{tabular}{llrrr}
  \toprule
  Target & Task & DSpark TPS & DLite TPS & Relative gain\\
  \midrule
  4B & Alpaca & 13,548 & \textbf{14,300} & 5.6\%\\
  4B & LiveCodeBench & 11,309 & \textbf{12,075} & 6.8\%\\
  8B & LiveCodeBench & 5,621 & \textbf{5,758} & 2.4\%\\
  \bottomrule
  \end{tabular}
  \vspace{5mm}
  \begin{itemize}
    \item Total TPS reflects both acceptance quality and draft/system overhead.
    \item The table supports a throughput benefit; it does not isolate head latency.
  \end{itemize}
  \papersource{Paper, Table 4, Sec. 5.2, PDF p. 9. One tiny exception: 4B MT-Bench at concurrency 16.}
\end{frame}

\begin{frame}{The matched teacher improves final acceptance}
  \centering
  \includegraphics[width=0.95\linewidth,height=0.62\textheight,keepaspectratio]{figures/ablation-stage.pdf}
  \begin{itemize}
    \item Two-stage training exceeds single-stage training through the stable phase.
    \item Final acceptance improves on GSM8K, MBPP, and MT-Bench.
  \end{itemize}
  \papersource{Paper, Fig. 5(a), Sec. 5.3, PDF p. 9. Cropped author figure.}
\end{frame}

\begin{frame}{After training, a draft KV window adds little acceptance}
  \begin{columns}[c,onlytextwidth]
  \column{0.57\textwidth}
  \includegraphics[width=\linewidth,height=0.65\textheight,keepaspectratio]{figures/ablation-kv.pdf}
  \column{0.40\textwidth}
  \begin{itemize}
    \item Compare no draft KV with 128- and 512-token sliding KV windows.
    \item Final $\tau$ is similar on GSM8K, MBPP, and Alpaca.
    \item The authors infer target features can substitute for draft history after sufficient training.
  \end{itemize}
  \end{columns}
  \papersource{Paper, Fig. 5(b), Sec. 5.3, PDF pp. 8--9. Cropped author figure.}
\end{frame}

\begin{frame}{A moderate feature count and head rank are sufficient}
  \centering
  \begin{tabular}{lcr}
  \toprule
  Design choice & Configuration & Avg. $\tau$\\
  \midrule
  Target hidden states & 7 / \textbf{14} / 36 & 3.14 / \textbf{3.30} / 3.27\\
  Composition & feature / \textbf{sequence} & 3.04 / \textbf{3.30}\\
  Sequential-head rank & 256 / \textbf{512} / 4096 & 3.16 / \textbf{3.30} / 3.33\\
  \bottomrule
  \end{tabular}
  \vspace{5mm}
  \begin{itemize}
    \item The 8B design study uses a common 80K-sample subset.
    \item Larger designs give diminishing acceptance gains with more computation.
  \end{itemize}
  \papersource{Paper, Appendix A.2, Table 5, PDF p. 13. Average over Alpaca, GSM8K, MBPP, Multi-Doc QA.}
\end{frame}

\begin{frame}{Takeaways and measured scope}
  \begin{enumerate}
    \item \textbf{Architectural idea:} remove growing draft history while reusing contextual target states.
    \item \textbf{Quality mechanism:} parallel local backbone plus low-rank within-block causal head.
    \item \textbf{Optimization:} matched history-aware teacher, then direct CE + $L_1$ target alignment.
    \item \textbf{Evidence:} strong decoding gains on reported Qwen3-4B/8B long-context and agent tasks.
  \end{enumerate}
  \vspace{2mm}
  \begin{block}{Deployment question}
  The serving stack must expose target hidden states; reported speedups measure decoding, not full agent task completion or tool time.
  \end{block}
  \papersource{Paper, Secs. 4--6 and Appendix A.2, PDF pp. 4--10, 13--14.}
\end{frame}

\begin{frame}{Paper and discussion pointers}
  \begin{block}{Primary source}
  Jiaming Xu et al., \emph{DLite: History-free Speculative Decoding for Agentic AI}, arXiv:2610.23787v1, 2026.\\[2mm]
  \href{https://arxiv.org/abs/2610.23787v1}{https://arxiv.org/abs/2610.23787v1}
  \end{block}
  \begin{itemize}
    \item Fig. 3: what information moves from target to drafter?
    \item Fig. 5: when can target features replace draft KV?
    \item Table 3: which agent traces give the largest relative gain?
  \end{itemize}
\end{frame}

\end{document}
