Search papers, labs, and topics across Lattice.
P^{t-1}: draft probs 2:Pt←ParallelForward(Xt−1)P^{t}\leftarrow\textsc{ParallelForward}(X^{t-1}) 3:Xt←[]X^{t}\leftarrow[\,] 4:𝚏𝚒𝚛𝚜𝚝_𝚛𝚎𝚓_𝚒𝚍𝚡←−1\mathtt{first\_rej\_idx}\leftarrow-1 5:for i=1→Li=1\to L do \pdfrefobj⊳\triangleright Adaptive Continuation Loop 6: pi←Pitp_{i}\leftarrow P^{t}_{i}; qi←Pit−1q_{i}\leftarrow P^{t-1}_{i}; xit−1←Xit−1x_{i}^{t-1}\leftarrow X^{t-1}_{i} 7: r∼U[0,1]r\sim U[0,1] 8: if r<min(1,piqi)r<\min(1,\frac{p_{i}}{q_{i}}) then 9: xit←xit−1x_{i}^{t}\leftarrow x_{i}^{t-1} \pdfrefobj⊳\triangleright Accept 10: else 11: xit←Sample(max(pi−qi,0))x_{i}^{t}\leftarrow\textsc{Sample}(\max(p_{i}-q_{i},0)) \pdfrefobj⊳\triangleright Reject 12: if 𝚏𝚒𝚛𝚜𝚝_𝚛𝚎𝚓_𝚒𝚍𝚡=−1\mathtt{first\_rej\_idx}=-1 then 13: 𝚏𝚒𝚛𝚜𝚝_𝚛𝚎𝚓_𝚒𝚍𝚡←i\mathtt{first\_rej\_idx}\leftarrow i 14: end if 15: end if 16:end for\pdfrefobj⊳\triangleright No break 17:if 𝚏𝚒𝚛𝚜𝚝_𝚛𝚎𝚓_𝚒𝚍𝚡≠−1\mathtt{first\_rej\_idx}\neq-1 then \pdfrefobj⊳\triangleright Proactive Drafting 18: Xt←PD(Xt,𝚏𝚒𝚛𝚜𝚝_𝚛𝚎𝚓_𝚒𝚍𝚡)X^{t}\leftarrow\textsc{PD}(X^{t},\mathtt{first\_rej\_idx}) 19:end if 20:return Xt,PtX^{t},P^{t} Our full algorithm, SJD-PAC, is detailed in Algorithm 1. It integrates the two aforementioned components: Adaptive Continuation (AC) and Proactive Drafting (PD). The algorithm begins by performing a parallel forward pass to obtain the target probabilities PtP^{t} (Line 2). We initialize a variable 𝚏𝚒𝚛𝚜𝚝_𝚛𝚎𝚓_𝚒𝚍𝚡\mathtt{first\_rej\_idx} to track the position of the first mismatch (Line 4). In the AC Loop (Lines 5–17), unlike standard SJD which terminates on the first rejection, our loop always continues to verify all LL tokens. During this pass, standard acceptance (Line 10) or rejection sampling (Line 12) is performed for each token. If a token is rejected, we check if it is the first rejection; if so, we record its position in 𝚏𝚒𝚛𝚜𝚝_𝚛𝚎𝚓_𝚒𝚍𝚡\mathtt{first\_rej\_idx} (Lines 13-15) and continue the loop without breaking. After the loop, we check if any rejections occurred (Line 19). If 𝚏𝚒𝚛𝚜𝚝_𝚛𝚎𝚓_𝚒𝚍𝚡\mathtt{first\_rej\_idx} is not -1, we activate the Proactive Drafting (PD) mechanism (Line 20). The PD function leverages the target distribution pp to generate diversified token sequences starting from the position of the first rejection. SJD-PAC is rigorously lossless, as both the AC and PD components preserve the underlying target distribution. The framework is also training-free and model-agnostic. 5 Experiments 5.1 Experimental Setup Models and Benchmarks. We evaluate our method on two text-to-image models: Lumina-mGPT [14] and Emu3 [27]. For Lumina-mGPT, we use the standard
1
0
2
0
Text-to-image synthesis just got almost 4x faster without sacrificing image quality, thanks to a clever twist on Speculative Jacobi Decoding that keeps the generation process moving even when initial drafts are rejected.