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.