forked from NVlabs/Fast-dLLM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
726 lines (688 loc) · 32.7 KB
/
index.html
File metadata and controls
726 lines (688 loc) · 32.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
<!DOCTYPE html>
<html lang="en">
<head>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://www.nvidia.com/favicon.ico">
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fast-dLLM</title>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.5; /* Adjust this value to make the spacing larger */
margin: 0;
padding: 0;
color: black;
/* background-image: url('asset/samples/pexels-photo-28821825.jpeg'); Background image */
background-size: contain; /* Cover the entire viewport */
background-attachment: fixed; /* Fixed background */
background-position: center;
direction: ltr;
}
.hero {
text-align: center;
padding: 50px 0;
background-color: #fff;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
}
.hero h1 {
font-size: 5em;
margin: 0.2em 0;
}
.hero h2 {
font-size: 2.8em;
margin: 0.2em 0;
font-weight: normal;
line-height: 1.4; /* Adjust this value to make the spacing larger */
}
.hero p {
font-size: 1.4em;
margin-bottom: 1em;
}
.button {
display: inline-block;
padding: 10px 20px;
margin: 5px;
font-size: 0.9em;
color: white;
background-color: black;
border-radius: 30px;
text-decoration: none;
}
.button_green {
display: inline-block;
padding: 10px 20px;
margin: 5px;
font-size: 0.9em;
color: black;
background-color: #76b900;
border-radius: 30px;
text-decoration: none;
}
.gallery-container {
max-width: 77%; /* Limit the width of the gallery */
margin: 0 auto; /* Center the gallery */
padding: 20px 0; /* Add some padding on top and bottom */
}
.gallery {
display: grid;
grid-template-columns: repeat(12, 1fr); /* 12 columns grid */
grid-auto-rows: 150px; /* Adjust row height */
gap: 10px;
}
.gallery-item {
overflow: hidden;
/*aspect-ratio: 1/1; !* Keep the aspect ratio of the images *!*/
}
.gallery-item img {
width: 100%;
height: 100%;
object-fit: cover;
cursor: pointer; /* Cursor change on hover */
border-radius: 10px; /* Rounded corners */
transition: transform 0.3s ease; /* Add smooth transition */
}
/* Image scaling on hover */
.gallery-item img:hover {
transform: scale(1.2); /* Scale the image to 1.2 times its original size */
}
/* Define specific grid item placements */
.item1 { grid-column: span 3; grid-row: span 3; } /* Large image */
.item2 { grid-column: span 7; grid-row: span 3; } /* Smaller image */
.item3 { grid-column: span 2; grid-row: span 3; } /* Horizontal image */
.item4 { grid-column: span 6; grid-row: span 3; } /* Wide image */
.item5 { grid-column: span 4; grid-row: span 3; } /* Wide image */
.item6 { grid-column: span 2; grid-row: span 3; } /* Wide image */
.item7 { grid-column: span 4; grid-row: span 4; } /* Square image */
.item8 { grid-column: span 3; grid-row: span 4; } /* Vertical image */
.item9 { grid-column: span 2; grid-row: span 4; } /* Vertical image */
.item10 { grid-column: span 3; grid-row: span 4; } /* Another larger image */
.item11 { grid-column: span 2; grid-row: span 3; } /* Another larger image */
.item12 { grid-column: span 4; grid-row: span 3; } /* Another larger image */
.item13 { grid-column: span 2; grid-row: span 3; } /* Another larger image */
.item14 { grid-column: span 4; grid-row: span 3; } /* Another larger image */
.item15 { grid-column: span 4; grid-row: span 4; } /* Another larger image */
.item16 { grid-column: span 4; grid-row: span 4; } /* Another larger image */
.item17 { grid-column: span 2; grid-row: span 4; } /* Another larger image */
.item18 { grid-column: span 2; grid-row: span 4; } /* Another larger image */
.item19 { grid-column: span 3; grid-row: span 5; } /* Another larger image */
.item20 { grid-column: span 3; grid-row: span 5; } /* Another larger image */
.item21 { grid-column: span 3; grid-row: span 5; } /* Another larger image */
.item22 { grid-column: span 3; grid-row: span 5; } /* Another larger image */
.item23 { grid-column: span 6; grid-row: span 4; } /* Another larger image */
.item24 { grid-column: span 3; grid-row: span 4; } /* Another larger image */
.item25 { grid-column: span 3; grid-row: span 4; } /* Another larger image */
.item26 { grid-column: span 3; grid-row: span 5; } /* Another larger image */
.item27 { grid-column: span 3; grid-row: span 5; } /* Another larger image */
.item28 { grid-column: span 6; grid-row: span 5; } /* Another larger image */
.item29 { grid-column: span 3; grid-row: span 3; } /* Another larger image */
.item30 { grid-column: span 3; grid-row: span 3; } /* Another larger image */
.item31 { grid-column: span 3; grid-row: span 3; } /* Another larger image */
.item32 { grid-column: span 3; grid-row: span 3; } /* Another larger image */
/* Modal styling */
#modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgba(0, 0, 0, 0.9); /* Black w/ opacity */
justify-content: center; /* Horizontally center the image */
flex-direction: column;
align-items: center; /* Center align items vertically */
}
#modal img {
margin: auto;
display: block;
max-width: 77%;
max-height: 77%; /* Ensure the image doesn't overflow vertically */
object-fit: contain; /* Make sure the aspect ratio is preserved */
}
#modal-description {
color: white;
text-align: center;
margin-top: 10px; /* Adjust this value to move text closer to the image */
font-size: 1.2em;
}
.description {
font-family: Arial, sans-serif;
font-style: normal;
font-size: 17px;
line-height: 1.47;
color: #333;
/*color: black; !* Text color *!*/
letter-spacing: -0.022em;
font-weight: 400;
background-color: #fff; /* Solid background color that spans the entire width */
padding: 20px 0; /* Add vertical padding */
text-align: center; /* Center align text */
border-top-left-radius: 20px;
border-top-right-radius: 20px;
box-shadow: 2px 4px 12px #00000054;
}
.description_noborder {
font-family: Arial, sans-serif;
font-style: normal;
font-size: 17px;
line-height: 1.47;
color: #333;
/*color: black; !* Text color *!*/
letter-spacing: -0.022em;
font-weight: 400;
background-color: #fff; /* Solid background color that spans the entire width */
padding: 20px 0; /* Add vertical padding */
text-align: center; /* Center align text */
}
.description-content {
/*background-color: rgba(255, 255, 255, 0.1); !* Semi-transparent background inside the section *!*/
/*border: 2px solid #555; !* Adding a lighter border *!*/
max-width: 65%; /* Limit the width to 80% of the screen */
margin: 0 auto; /* Center the content horizontally */
padding: 20px; /* Padding inside the border */
font-style: normal;
border-radius: 18px;
/*box-shadow: 2px 4px 12px #00000014;*/
}
.description-content h2 {
display: block;
color: black;
font-size: 1.5em;
line-height: 1.125;
letter-spacing: .004em;
font-weight: 600;
text-align: left; /* Center-align the h2 */
margin-block-start: 0.83em;
margin-block-end: 0.83em;
margin-inline-start: 0px;
margin-inline-end: 0px;
font-style: normal;
}
.description-content p {
font-size: 1.1em;
text-align: left; /* Left-align the p */
font-weight: normal;
}
.citation {
/*background-color: #333; !* Solid background color that spans the entire width *!*/
font-family: Arial, sans-serif;
background-color: #fff; /* Solid background color that spans the entire width */
color: black;
padding: 10px;
text-align: center;
margin-top: 10px;
}
.citation-content {
text-align: left;
border-radius: 15px; /* Rounded corners */
font-size: 0.8em;
max-width: 80%; /* Limit the width to 80% of the screen */
margin: 0 auto; /* Center the content horizontally */
margin-top: -30px;
padding: 0; /* Padding inside the border */
background-color: #f5f5f5; /* Semi-transparent background inside the section */
overflow-x: auto; /* Horizontal scrolling */
overflow-y: hidden; /* Prevent vertical scrolling */
white-space: nowrap; /* Prevent line breaks */
}
.citation-content h2 {
font-size: 2em;
text-align: left;
font-weight: normal;
}
.citation pre {
border-radius: 15px; /* Rounded corners */
max-width: 90%; /* Limit the width to 80% of the screen */
text-align: left;
}
.footer {
background-color: #f5f5f5;
box-shadow: 2px 4px 12px #00000054;
color: #333;
padding: 20px;
text-align: center;
margin-top: -20px;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
}
.footer a {
color: dodgerblue;
text-decoration: none;
}
.inserted-image {
max-width: 80%; /* Set the maximum width for the image */
height: auto; /* Ensure the height adjusts automatically to maintain aspect ratio */
margin: 30px; /* Add space above and below the image */
margin-top: 10px;
display: block; /* Make sure the image is treated as a block-level element */
margin-left: auto; /* Center the image horizontally */
margin-right: auto;
border-radius: 10px;
box-shadow: 2px 2px 10px 3px #00000030;
}
.inserted-image-noshadow {
max-width: 30%; /* Set the maximum width for the image */
margin-left: auto; /* Center the image horizontally */
margin-right: auto;
border-radius: 10px;
}
.video-container {
text-align: center; /* Center the video horizontally */
margin: 20px 0; /* Add some vertical margin around the video */
}
video {
max-width: 80%; /* The video will scale to fit the container */
height: auto; /* Maintain the video's aspect ratio */
border-radius: 10px; /* Rounded corners for the video */
box-shadow: 2px 2px 10px 3px #00000054;
}
.logo {
color: black;
display: flex;
justify-content: center;
/*justify-content: left;*/
align-items: center;
text-align: center;
gap: 60px;
}
.logo-sup {
position: absolute;
top: -5px; /* Adjust this value to position it closer to the top */
right: -10px; /* Adjust this value to move it horizontally */
font-size: 14px; /* Increase the size of the superscript */
color: black; /* Change the color if needed */
}
/* Image comparison container */
.image-comparison-container {
background-color: #fff; /* Solid background color that spans the entire width */
}
.image-comparison-content {
position: relative;
width: 580px; /* Adjust the width as needed */
height: 402px; /* Adjust the height as needed */
overflow: hidden; /* Make sure overflow isn't hiding any part of the images */
margin: 0 auto;
margin-top: -20px;
cursor: ew-resize;
border-radius: 10px;
}
.image-comparison-content img {
position: absolute;
width: 100%;
height: 99%;
background-color: #fff;
object-fit: contain; /* Use contain to ensure the whole image is visible */
}
.image-comparison-content .slider {
position: absolute;
top: 0;
bottom: 0;
left: 50%;
width: 2px;
background-color: #fff;
z-index: 10;
}
.image-comparison-content .slider-black {
position: absolute;
top: 0;
bottom: 0;
left: 50%;
width: 2px;
background-color: black;
z-index: 10;
}
.demo {
margin-top: -20px;
background-color: #fff;
text-align: center;
}
.demo iframe {
width: 50%;
}
.image-comparison-content .image-2 {
clip-path: inset(0 0 0 50%);
}
.image-comparison-content .image-4 {
clip-path: inset(0 0 0 50%);
}
@media (max-width: 4096px) {
.gallery {
/*grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); !* Adjust columns for smaller screens *!*/
grid-auto-columns: 100px; /* Adjust columns for smaller screens */
grid-auto-rows: 200px; /* Set a fixed height for the grid items */
}
.demo iframe {
width: 800px;
}
}
@media (max-width: 2048px) {
.gallery {
/*grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); !* Adjust columns for smaller screens *!*/
grid-auto-columns: 60px; /* Adjust columns for smaller screens */
grid-auto-rows: 90px; /* Set a fixed height for the grid items */
}
.demo iframe {
width: 800px;
}
}
@media (min-width: 2048px) {
.description-content {
max-width: 728px; /* Limit the width to 80% of the screen */
padding: 10px; /* Padding inside the border */
}
.citation-content {
max-width: 728px; /* Limit the width to 80% of the screen */
padding: 10px; /* Padding inside the border */
}
.inserted-image {
max-width: 1024px; /* Limit the width to 80% of the screen */
padding: 10px; /* Padding inside the border */
}
.inserted-image-noshadow {
max-width: 384px; /* Limit the width to 80% of the screen */
}
video {
max-width: 1024px; /* The video will scale to fit the container */
}
}
@media (max-width: 1024px) {
.gallery {
/*grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); !* Adjust columns for smaller screens *!*/
grid-auto-columns: 40px; /* Adjust columns for smaller screens */
grid-auto-rows: 70px; /* Set a fixed height for the grid items */
}
.demo iframe {
width: 80%;
}
}
@media (min-width: 1024px) {
.description-content {
max-width: 728px; /* Limit the width to 80% of the screen */
padding: 10px; /* Padding inside the border */
}
.citation-content {
max-width: 728px; /* Limit the width to 80% of the screen */
padding: 10px; /* Padding inside the border */
}
.inserted-image {
max-width: 826px; /* Limit the width to 80% of the screen */
padding: 5px; /* Padding inside the border */
}
.inserted-image-noshadow {
max-width: 384px; /* Limit the width to 80% of the screen */
}
video {
max-width: 728px; /* The video will scale to fit the container */
}
}
@media (max-width: 768px) {
.gallery {
/*grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); !* Adjust columns for smaller screens *!*/
grid-auto-columns: 20px; /* Adjust columns for smaller screens */
grid-auto-rows: 30px; /* Set a fixed height for the grid items */
gap: 5px;
}
.gallery-container {
max-width: 85%; /* Limit the width of the gallery */
padding: 10px 0; /* Add some padding on top and bottom */
}
.hero h1 {
font-size: 3em;
}
.hero h2 {
font-size: 2em;
}
.hero p {
font-size: 1em;
}
.description-content {
max-width: 92%; /* Limit the width to 80% of the screen */
padding: 10px; /* Padding inside the border */
}
.citation-content {
max-width: 92%; /* Limit the width to 80% of the screen */
padding: 10px; /* Padding inside the border */
}
.inserted-image {
max-width: 95%; /* Limit the width to 80% of the screen */
padding: 5px; /* Padding inside the border */
}
.inserted-image-noshadow {
max-width: 50%; /* Limit the width to 80% of the screen */
margin-left: auto; /* Center the image horizontally */
margin-right: auto;
}
.image-comparison-content {
max-height: 300px; /* Limit the width to 80% of the screen */
max-width: 92%;
}
video {
max-width: 92%; /* The video will scale to fit the container */
}
.logo {
gap: 10px;
}
.demo iframe {
width: 95%;
}
}
/* Dark mode */
@media (prefers-color-scheme: dark) {
.description {
background-color: #333; /* Dark color for dark mode */
color: white; /* Light text color for dark mode */
}
.description_noborder {
background-color: #333; /* Dark color for dark mode */
color: white; /* Light text color for dark mode */
}
.description_noborder h2{
background-color: #333; /* Dark color for dark mode */
color: white; /* Light text color for dark mode */
}
.description-content h2 {
background-color: #333; /* Dark color for dark mode */
color: white; /* Light text color for dark mode */
}
.citation {
background-color: #333; /* Dark color for dark mode */
color: white; /* Light text color for dark mode */
}
.citation-content {
background-color: #555; /* Dark color for dark mode */
}
.citation-content h2 {
background-color: #555; /* Dark color for dark mode */
}
.footer {
background-color: #222; /* Dark color for dark mode */
color: white;
}
.image-comparison-container {
background-color: #333; /* Dark color for dark mode */
}
.demo {
background-color: #333;
}
}
</style>
</head>
<body>
<div class="hero">
<h2>Fast-dLLM: Training-free Acceleration of Diffusion LLM <br>
by Enabling KV Cache and Parallel Decoding</h2>
<!-- Add author and institution information -->
<div style="margin-top: 20px; text-align: center;">
<p style="font-size: 1.3em; margin-bottom: 5px;">
<a href="https://hills-code.github.io/" target="_blank" style="color: #76b900;">Chengyue Wu</a><sup>1,2*</sup>,
<a href="https://haozhang534.github.io/" target="_blank" style="color: #76b900;">Hao Zhang</a><sup>2*</sup>,
<a href="https://scholar.google.com/citations?user=aA70TOwAAAAJ&hl=en" target="_blank" style="color: #76b900;">Shuchen Xue</a><sup>4</sup>,
<a href="https://zhijianliu.com/" target="_blank" style="color: #76b900;">Zhijian Liu</a><sup>2</sup>,
<a href="https://scholar.google.com/citations?user=NDFQrLQAAAAJ&hl=en" target="_blank" style="color: #76b900;">Shizhe Diao</a><sup>2</sup>,
<a href="https://lzhu.me//" target="_blank" style="color: #76b900;">Ligeng Zhu</a><sup>2</sup>,
<a href="http://luoping.me/" target="_blank" style="color: #76b900;">Ping Luo</a><sup>1</sup>,
<a href="https://hanlab.mit.edu/songhan/" target="_blank" style="color: #76b900;">Song Han</a><sup>2,3</sup>,
<a href="https://xieenze.github.io/" target="_blank" style="color: #76b900;">Enze Xie</a><sup>2</sup>
</p>
<p style="font-size: 1.2em; color: #888;">
<sup>1</sup>HKU, <sup>2</sup>NVIDIA, <sup>3</sup>MIT, <sup>4</sup>Independent Researcher
<br>
*Equal contribution
</p>
</div>
<!-- <div style="overflow: hidden; background-color: #6699cc;">-->
<div style="overflow: hidden; background-color: #fff;">
<div class="logo" style="padding: 12px;">
<a href="" style="text-decoration: none; font-size: 16px;">
<img src="asset/hku.png" alt="HKU Logo" style="width: auto; height: 40px;">
</a>
<a href="https://www.nvidia.com/" style="text-decoration: none; font-size: 16px;">
<img src="https://nv-tlabs.github.io/3DStyleNet/assets/nvidia.svg" alt="NVIDIA Logo" style="width: auto; height: 30px;">
</a>
<a href="https://hanlab.mit.edu/" style="text-decoration: none; font-size: 16px;">
<img src="asset/mit_han.png" alt="MIT Logo" style="width: auto; height: 30px;">
</a>
</div>
</div>
<a href="paper/fast_dllm.pdf" class="button">Paper</a>
<a href="https://github.com/NVlabs/Fast-dLLM" class="button">Code</a>
</div>
<div class="description-content">
<h2>About Fast-dLLM</h2>
<p> Diffusion-based large language models (Diffusion LLMs) have shown promise for non-autoregressive text generation with parallel decoding capabilities.
However, the practical inference speed of open-sourced Diffusion LLMs often lags behind autoregressive models due to the lack of Key-Value (KV) Cache and quality degradation when decoding multiple tokens simultaneously.
To bridge this gap, we introduce a novel <strong style="font-size: 18px;">block-wise approximate KV Cache mechanism</strong> tailored for bidirectional diffusion models, enabling cache reuse with negligible performance drop.
Additionally, we identify the root cause of generation quality degradation in parallel decoding as the disruption of token dependencies under the conditional independence assumption.
To address this, we propose a <strong style="font-size: 18px;">confidence-aware parallel decoding strategy</strong> that selectively decodes tokens exceeding a confidence threshold, mitigating dependency violations and maintaining generation quality.
Experimental results on LLaDA and Dream models across multiple LLM benchmarks demonstrate up to <strong style="font-size: 18px;">27.6x throughput improvement</strong> with minimal accuracy loss, closing the performance gap with autoregressive models and paving the way for practical deployment of Diffusion LLMs.</p>
</div>
<!-- Insert your image here -->
<div>
<img src="asset/speedup.jpg" alt="End-to-end speedup over vanilla LLaDA baseline."
class="inserted-image">
</div>
<div class="description-content">
<h2>Case Study of Parallel Decoding</h2>
<p> This case study compares the generation process with and without parallel decoding.
The left panel shows standard decoding, where tokens are revealed one by one at each step.
The right panel demonstrates our confidence-aware parallel decoding,
which allows multiple confident tokens to be unmasked in parallel at each step.
As shown, parallel decoding significantly accelerates the generation process while maintaining sequence quality.
The color legend indicates the generation step for each token.
</p>
</div>
<div style="width: 100%; display: flex; justify-content: center;">
<figure style="display: flex; flex-direction: column; align-items: center; max-width: 900px; width: 100%;">
<div style="display: flex; justify-content: center; width: 100%;">
<img src="asset/output.gif" alt="Decoding comparison" class="inserted-image" style="max-width: 80%; min-width: 120px;">
</div>
<figcaption style="margin-top: 12px; text-align: center; color: #555; font-size: 1em;">
<b>Left:</b> Standard decoding (LLaDA).
<b>Right:</b> Confidence-aware parallel decoding.
</figcaption>
</figure>
</div>
<div class="description-content">
<h2>Several Core Design Details for Efficiency</h2>
<p>
•
<strong style="font-size: 18px;">Key-Value Cache for Block-Wise Decoding:</strong>
We propose an efficient block-wise decoding KV Cache mechanism for Masked Diffusion Models (MDMs). By reusing attention Key-Value activations across multiple steps within each block, our approach avoids redundant computation and significantly accelerates inference. Furthermore, our DualCache extension also caches masked suffix tokens, enabling even greater speedup with negligible accuracy loss.
</p>
</div>
<div>
<img src="asset/kvcache.jpg" alt="KV Cache for block-wise decoding." class="inserted-image">
</div>
<section class="description_noborder">
<div class="description-content">
<p>
•
<strong style="font-size: 18px;">Confidence-Aware Parallel Decoding:</strong>
Instead of decoding tokens sequentially, we introduce a confidence-aware parallel decoding scheme. At each step, only tokens with confidence over a threshold are unmasked in parallel, while uncertain ones remain masked for future steps. This selective approach effectively balances decoding efficiency and output quality, and is theoretically supported by our parallel decoding theorem for high-confidence predictions.
</p>
</div>
<div>
<img src="asset/pseudo_code.jpg" alt="Pseudo code for our method." class="inserted-image">
</div>
<div class="description-content">
<h2>Overall Performance</h2>
<p>Overall, introducing the KV Cache mechanism yields significant speed improvements for all tasks and sequence lengths, typically achieving
a <strong style="font-size: 18px;">2x to 3.6x speedup</strong> compared to the vanilla backbone.
When the parallel decoding strategy is applied individually, we see additional acceleration,
often pushing speedups to <strong style="font-size: 18px;">4x-6x</strong> for the evaluated settings, particularly as the generation length increases.
When both techniques are combined, the improvements become even more pronounced.
On LLaDA, for example, combined KV Cache and parallel decoding methods boost throughput by up to <strong style="font-size: 18px;">11x</strong> (GSM8K, length 512) and <strong style="font-size: 18px;">9.2x</strong> (MBPP, length 512)
over the standard baseline. Similarly, on Dream-Base, the largest throughput gains are observed on MBPP (<strong style="font-size: 18px;">7.8x</strong> at length 512) and GSM8K (<strong style="font-size: 18px;">5.6x</strong> at length 512).
These results indicate that not only are our methods effective individually, but they are also highly complementary, resulting in the combined acceleration.</p>
</div>
<div>
<img src="asset/overall_performance.jpg" alt="Overall performance" class="inserted-image">
</div>
<!--BibTex citation -->
<!-- <div class="description-content">
<h2 class="title">BibTeX</h2>
</div>
<section class="citation" id="BibTeX">
<div class="citation-content">
<pre><code></code></pre>
</div>
</section> -->
</section>
<!--End BibTex citation -->
<!-- Footer Section -->
<footer class="footer">
<div class="container">
<div class="columns is-centered">
<div class="column is-8">
<div class="content">
<p>
This website is licensed under a <a
rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank">Creative
Commons Attribution-ShareAlike 4.0 International License</a>.
</p>
</div>
</div>
</div>
</div>
</footer>
<!-- End Footer -->
<script>
// Function to open the modal and display the clicked image and description
function openModal(img) {
var modal = document.getElementById("modal");
var modalImg = document.getElementById("modal-img");
var modalDescription = document.getElementById("modal-description");
modal.style.display = "flex";
modalImg.src = img.src;
modalDescription.textContent = img.getAttribute('data-description'); // Get description from data-description attribute
}
// Add click event listeners to all images in the gallery with their descriptions
const images = document.querySelectorAll('.gallery-item img');
images.forEach((img) => {
img.addEventListener('click', () => openModal(img));
});
</script>
<script>
const container = document.querySelector('.image-comparison-content');
const slider = document.querySelector('.slider');
// const slider_black = document.querySelector('.slider-black');
const image2 = document.querySelector('.image-2');
// const image4 = document.querySelector('.image-4');
container.addEventListener('mousemove', (e) => {
const rect = container.getBoundingClientRect();
let xPos = e.clientX - rect.left;
if (xPos < 0) xPos = 0;
if (xPos > rect.width) xPos = rect.width;
const percentage = (xPos / rect.width) * 100;
slider.style.left = `${percentage}%`;
// slider_black.style.left = `${percentage}%`;
image2.style.clipPath = `inset(0 0 0 ${percentage}%)`;
// image4.style.clipPath = `inset(0 0 0 ${percentage}%)`;
});
</script>
</body>
</html>