code-switch-mtp / docs /final_deck /build /results_template.html
Anupam-Rawat-IITB's picture
Refresh to the current main: code, results, logs and the final deck
c5241c0 verified
Raw History Blame Contribute Delete
3.39 kB
<section id="results" class="main">
<div class="head">
<h1 class="title">Lossless decoding at 2.9× greedy speed on Hindi (Devanagari) and 4.9× on Hindi (ITRANS), measured end to end</h1>
<p class="byline">CS 769 project, group G31. Anupam Rawat, Sujeet Kumar Singh, Bilal Baig. Mentor: Karthika N J.</p>
</div>
<p class="r-sub">Output is identical to greedy decoding on every document in every system. Frozen Llama-3.2-1B with three look-ahead draft heads.</p>
<div class="r-left">
<p class="cap">Speed-up over greedy decoding, end to end, 16 verified tokens per round. About 120 held-out documents × 64 new tokens per condition, {{SEEDS}}, drafting from a 4,352-token shortlist.</p>
<table class="t rt">
<tr class="t-head"><th>Condition</th><th class="r-v">Chain of 3 drafts</th><th class="r-v">Tree</th><th class="r-v">Tree + 5 copied tokens</th><th class="r-v">Tree + 8 copied tokens</th><th class="r-v">Tree + 12 copied tokens</th><th class="r-m">Low-looping documents</th><th class="r-m">Greedy, ms per word</th><th class="r-m">Best, ms per word</th></tr>
{{ROWS}}
</table>
<p class="note">Chain: one draft per head. Tree: the 16 most confident draft nodes. Copied tokens: if the last two or more tokens occurred earlier, that many verified tokens are the ones that followed.</p>
</div>
<div class="row">
<div class="blk r-what">
<h3 class="blk-h">What it shows</h3>
<ul class="r-takes">
<li><b>Lossless in practice.</b> Every system reproduces greedy output token for token.</li>
<li><b>The copied branch is the speed gain.</b> In Devanagari, 2.9× with 12 copied tokens against 1.85× for the chain.</li>
<li><b>The tree alone is not faster than the chain.</b> Its 29% more tokens per pass are spent on a longer backbone pass.</li>
<li><b>Romanized Hindi goes from slowest to fastest.</b> 87% to 89% of its continuation tokens repeat the prompt (Devanagari 55%, English 13%).</li>
</ul>
</div>
<div class="blk r-split">
<h3 class="blk-h">Where the time of one round goes</h3>
<p class="small">Hindi (Devanagari), seed 0, tree + 12 copied tokens, 16 verified tokens, ms per round.</p>
<table class="t bt">
<tr><td>Draft the tree (3 heads, shortlist)</td><td class="r-ms">2.1</td></tr>
<tr><td>Suffix lookup for the copied branch</td><td>0.03</td></tr>
<tr><td>Build inputs and attention mask</td><td>0.40</td></tr>
<tr><td>Backbone pass over 17 tokens and argmax</td><td>23.3</td></tr>
<tr><td>Accept the path, update the cache</td><td>1.8</td></tr>
<tr><td><b>One round, 4.42 tokens</b></td><td><b>27.6</b></td></tr>
<tr><td>Greedy decoding, 1 token</td><td>18.1</td></tr>
</table>
</div>
<div class="blk r-cav">
<h3 class="blk-h">Limits of the measurement</h3>
<p class="body">One GTX 1080 Ti, fp32, batch size 1, a Python decoder, greedy decoding, 64 new tokens after a 256-token prompt.</p>
<p class="body">Greedy decoding with a 1B model loops. Low-looping: tree + 12 copied tokens on documents where at most 10% of the continuation repeats itself (44 to 65 per condition). In romanized Hindi the continuation largely restates the prompt, which is what the copied tokens exploit.</p>
</div>
</div>
<p class="compute"><b>Compute.</b> 3 × GTX 1080 Ti (11 GB) + 1 × Quadro P6000 (24 GB), fp32. Timing: 10 to 34 min per run on one idle GTX 1080 Ti, peak 5.9 GB. Heads: 15 runs × 10M tokens, 6 to 8 h each, 350 to 465 tokens/s, peak 8.8 GB.</p>
<aside>{{ASIDE}}</aside>
</section>