{ "pdf_info": [ { "preproc_blocks": [ { "type": "title", "bbox": [ 148, 97, 462, 117 ], "lines": [ { "bbox": [ 148, 96, 463, 118 ], "spans": [ { "bbox": [ 148, 96, 463, 118 ], "score": 1.0, "content": "Sparse is Enough in Scaling Transformers", "type": "text" } ], "index": 0 } ], "index": 0 }, { "type": "text", "bbox": [ 117, 160, 205, 181 ], "lines": [ { "bbox": [ 117, 159, 204, 171 ], "spans": [ { "bbox": [ 117, 159, 204, 171 ], "score": 1.0, "content": "Sebastian Jaszczur∗", "type": "text" } ], "index": 1 }, { "bbox": [ 117, 171, 205, 182 ], "spans": [ { "bbox": [ 117, 171, 205, 182 ], "score": 1.0, "content": "University of Warsaw", "type": "text" } ], "index": 3 } ], "index": 2.0 }, { "type": "text", "bbox": [ 220, 159, 321, 181 ], "lines": [ { "bbox": [ 219, 158, 322, 172 ], "spans": [ { "bbox": [ 219, 158, 322, 172 ], "score": 1.0, "content": "Aakanksha Chowdhery", "type": "text" } ], "index": 2 }, { "bbox": [ 235, 170, 306, 182 ], "spans": [ { "bbox": [ 235, 170, 306, 182 ], "score": 1.0, "content": "Google Research", "type": "text" } ], "index": 6 } ], "index": 4.0 }, { "type": "text", "bbox": [ 336, 160, 411, 181 ], "lines": [ { "bbox": [ 336, 159, 412, 171 ], "spans": [ { "bbox": [ 336, 159, 412, 171 ], "score": 1.0, "content": "Afroz Mohiuddin", "type": "text" } ], "index": 4 }, { "bbox": [ 338, 170, 410, 183 ], "spans": [ { "bbox": [ 338, 170, 410, 183 ], "score": 1.0, "content": "Google Research", "type": "text" } ], "index": 5 } ], "index": 4.5 }, { "type": "text", "bbox": [ 426, 160, 492, 182 ], "lines": [ { "bbox": [ 425, 158, 495, 171 ], "spans": [ { "bbox": [ 425, 158, 495, 171 ], "score": 1.0, "content": "Łukasz Kaiser∗", "type": "text" } ], "index": 7 }, { "bbox": [ 441, 169, 479, 183 ], "spans": [ { "bbox": [ 441, 169, 479, 183 ], "score": 1.0, "content": "OpenAI", "type": "text" } ], "index": 8 } ], "index": 7.5 }, { "type": "text", "bbox": [ 144, 198, 226, 221 ], "lines": [ { "bbox": [ 143, 198, 227, 211 ], "spans": [ { "bbox": [ 143, 198, 227, 211 ], "score": 1.0, "content": "Wojciech Gajewski", "type": "text" } ], "index": 9 }, { "bbox": [ 149, 209, 221, 222 ], "spans": [ { "bbox": [ 149, 209, 221, 222 ], "score": 1.0, "content": "Google Research", "type": "text" } ], "index": 12 } ], "index": 10.5 }, { "type": "text", "bbox": [ 266, 198, 357, 221 ], "lines": [ { "bbox": [ 266, 199, 358, 210 ], "spans": [ { "bbox": [ 266, 199, 358, 210 ], "score": 1.0, "content": "Henryk Michalewski", "type": "text" } ], "index": 10 }, { "bbox": [ 277, 210, 348, 221 ], "spans": [ { "bbox": [ 277, 210, 348, 221 ], "score": 1.0, "content": "Google Research", "type": "text" } ], "index": 13 } ], "index": 11.5 }, { "type": "text", "bbox": [ 398, 199, 468, 221 ], "lines": [ { "bbox": [ 399, 197, 467, 211 ], "spans": [ { "bbox": [ 399, 197, 467, 211 ], "score": 1.0, "content": "Jonni Kanerva", "type": "text" } ], "index": 11 }, { "bbox": [ 397, 209, 469, 222 ], "spans": [ { "bbox": [ 397, 209, 469, 222 ], "score": 1.0, "content": "Google Research", "type": "text" } ], "index": 14 } ], "index": 12.5 }, { "type": "title", "bbox": [ 283, 249, 328, 262 ], "lines": [ { "bbox": [ 281, 248, 331, 264 ], "spans": [ { "bbox": [ 281, 248, 331, 264 ], "score": 1.0, "content": "Abstract", "type": "text" } ], "index": 15 } ], "index": 15 }, { "type": "text", "bbox": [ 142, 274, 469, 394 ], "lines": [ { "bbox": [ 141, 274, 471, 287 ], "spans": [ { "bbox": [ 141, 274, 471, 287 ], "score": 1.0, "content": "Large Transformer models yield impressive results on many tasks, but are expen-", "type": "text" } ], "index": 16 }, { "bbox": [ 141, 284, 470, 298 ], "spans": [ { "bbox": [ 141, 284, 470, 298 ], "score": 1.0, "content": "sive to train, or even fine-tune, and so slow at decoding that their use and study", "type": "text" } ], "index": 17 }, { "bbox": [ 141, 295, 469, 309 ], "spans": [ { "bbox": [ 141, 295, 469, 309 ], "score": 1.0, "content": "becomes out of reach. We address this problem by leveraging sparsity. We study", "type": "text" } ], "index": 18 }, { "bbox": [ 141, 307, 471, 320 ], "spans": [ { "bbox": [ 141, 307, 471, 320 ], "score": 1.0, "content": "sparse variants for all layers in the Transformer and propose Scaling Transformers,", "type": "text" } ], "index": 19 }, { "bbox": [ 141, 317, 470, 330 ], "spans": [ { "bbox": [ 141, 317, 470, 330 ], "score": 1.0, "content": "a family of next generation Transformer models that use sparse layers to scale", "type": "text" } ], "index": 20 }, { "bbox": [ 141, 329, 471, 341 ], "spans": [ { "bbox": [ 141, 329, 471, 341 ], "score": 1.0, "content": "efficiently and perform unbatched decoding much faster than the standard Trans-", "type": "text" } ], "index": 21 }, { "bbox": [ 141, 339, 469, 352 ], "spans": [ { "bbox": [ 141, 339, 469, 352 ], "score": 1.0, "content": "former as we scale up the model size. Surprisingly, the sparse layers are enough", "type": "text" } ], "index": 22 }, { "bbox": [ 141, 350, 470, 363 ], "spans": [ { "bbox": [ 141, 350, 470, 363 ], "score": 1.0, "content": "to obtain the same perplexity as the standard Transformer with the same number", "type": "text" } ], "index": 23 }, { "bbox": [ 141, 361, 470, 374 ], "spans": [ { "bbox": [ 141, 361, 470, 374 ], "score": 1.0, "content": "of parameters. We also integrate with prior sparsity approaches to attention and", "type": "text" } ], "index": 24 }, { "bbox": [ 141, 372, 469, 385 ], "spans": [ { "bbox": [ 141, 372, 469, 385 ], "score": 1.0, "content": "enable fast inference on long sequences even with limited memory. This results in", "type": "text" } ], "index": 25 }, { "bbox": [ 140, 383, 446, 396 ], "spans": [ { "bbox": [ 140, 383, 446, 396 ], "score": 1.0, "content": "performance competitive to the state-of-the-art on long text summarization.", "type": "text" } ], "index": 26 } ], "index": 21 }, { "type": "title", "bbox": [ 107, 414, 190, 428 ], "lines": [ { "bbox": [ 105, 413, 192, 430 ], "spans": [ { "bbox": [ 105, 413, 192, 430 ], "score": 1.0, "content": "1 Introduction", "type": "text" } ], "index": 27 } ], "index": 27 }, { "type": "text", "bbox": [ 107, 439, 505, 515 ], "lines": [ { "bbox": [ 105, 438, 505, 452 ], "spans": [ { "bbox": [ 105, 438, 505, 452 ], "score": 1.0, "content": "The field of natural language processing has seen dramatic improvements in recent years due to large", "type": "text" } ], "index": 28 }, { "bbox": [ 105, 450, 504, 462 ], "spans": [ { "bbox": [ 105, 450, 504, 462 ], "score": 1.0, "content": "neural networks based on the Transformer architecture. The original Transformer [42] significantly", "type": "text" } ], "index": 29 }, { "bbox": [ 105, 461, 505, 473 ], "spans": [ { "bbox": [ 105, 461, 505, 473 ], "score": 1.0, "content": "advanced state-of-the-art in machine translation. BERT [7] surpassed all previous methods on", "type": "text" } ], "index": 30 }, { "bbox": [ 105, 472, 505, 484 ], "spans": [ { "bbox": [ 105, 472, 505, 484 ], "score": 1.0, "content": "question answering, language inference and other NLP tasks and was followed by a line of models", "type": "text" } ], "index": 31 }, { "bbox": [ 105, 481, 505, 496 ], "spans": [ { "bbox": [ 105, 481, 505, 496 ], "score": 1.0, "content": "like T5 [30] that further improved these results. The GPT line of models [29, 3] elevated language", "type": "text" } ], "index": 32 }, { "bbox": [ 105, 493, 506, 506 ], "spans": [ { "bbox": [ 105, 493, 506, 506 ], "score": 1.0, "content": "generation to the point that GPT-2 was invited to write short passages for the Economist and GPT-3", "type": "text" } ], "index": 33 }, { "bbox": [ 106, 505, 401, 516 ], "spans": [ { "bbox": [ 106, 505, 401, 516 ], "score": 1.0, "content": "created whole articles almost indistinguishable from human-written ones.", "type": "text" } ], "index": 34 } ], "index": 31 }, { "type": "text", "bbox": [ 107, 521, 505, 587 ], "lines": [ { "bbox": [ 105, 520, 505, 533 ], "spans": [ { "bbox": [ 105, 520, 505, 533 ], "score": 1.0, "content": "The benefits of this progress are undercut by the huge costs such models incur. Strubell et al. [36]", "type": "text" } ], "index": 35 }, { "bbox": [ 105, 530, 506, 545 ], "spans": [ { "bbox": [ 105, 530, 333, 545 ], "score": 1.0, "content": "estimate that training a single base BERT model costs", "type": "text" }, { "bbox": [ 333, 532, 373, 543 ], "score": 0.86, "content": "\\$ 4 k -\\$ 12 k", "type": "inline_equation" }, { "bbox": [ 374, 530, 454, 545 ], "score": 1.0, "content": "and emits as much", "type": "text" }, { "bbox": [ 454, 532, 475, 543 ], "score": 0.88, "content": "\\mathrm { C O _ { 2 } }", "type": "inline_equation" }, { "bbox": [ 475, 530, 506, 545 ], "score": 1.0, "content": "as one", "type": "text" } ], "index": 36 }, { "bbox": [ 105, 542, 506, 556 ], "spans": [ { "bbox": [ 105, 542, 506, 556 ], "score": 1.0, "content": "passenger’s share of a 4-hour flight and later Patterson et al. [27] estimate that training GPT-3 has", "type": "text" } ], "index": 37 }, { "bbox": [ 105, 552, 506, 567 ], "spans": [ { "bbox": [ 105, 552, 189, 567 ], "score": 1.0, "content": "three times as much", "type": "text" }, { "bbox": [ 189, 554, 216, 565 ], "score": 0.9, "content": "\\mathrm { t C O _ { 2 } e }", "type": "inline_equation" }, { "bbox": [ 217, 552, 278, 567 ], "score": 1.0, "content": "(metric tons of", "type": "text" }, { "bbox": [ 279, 554, 299, 565 ], "score": 0.9, "content": "\\mathrm { C O _ { 2 } }", "type": "inline_equation" }, { "bbox": [ 299, 552, 506, 567 ], "score": 1.0, "content": "equivalent) emissions as a SF-NY round trip flight.", "type": "text" } ], "index": 38 }, { "bbox": [ 105, 564, 506, 577 ], "spans": [ { "bbox": [ 105, 564, 506, 577 ], "score": 1.0, "content": "Data and serving costs are also forbidding: a single training run of BERT, for example, processes", "type": "text" } ], "index": 39 }, { "bbox": [ 105, 575, 428, 588 ], "spans": [ { "bbox": [ 105, 575, 428, 588 ], "score": 1.0, "content": "128B tokens, and Google Translate reportedly1 serves over 143B words per day.", "type": "text" } ], "index": 40 } ], "index": 37.5 }, { "type": "text", "bbox": [ 107, 592, 505, 636 ], "lines": [ { "bbox": [ 105, 592, 505, 604 ], "spans": [ { "bbox": [ 105, 592, 505, 604 ], "score": 1.0, "content": "With the growing popularity and size of these models, it is increasingly valuable to make them scale", "type": "text" } ], "index": 41 }, { "bbox": [ 105, 602, 505, 615 ], "spans": [ { "bbox": [ 105, 602, 505, 615 ], "score": 1.0, "content": "efficiently. In this work we propose Scaling Transformers with a separate sparse mechanism for the", "type": "text" } ], "index": 42 }, { "bbox": [ 105, 614, 506, 626 ], "spans": [ { "bbox": [ 105, 614, 506, 626 ], "score": 1.0, "content": "query, key, value and output layers (QKV layers for short) and combine it with sparse feedforward", "type": "text" } ], "index": 43 }, { "bbox": [ 105, 624, 319, 637 ], "spans": [ { "bbox": [ 105, 624, 319, 637 ], "score": 1.0, "content": "blocks to get a fully sparse Transformer architecture.", "type": "text" } ], "index": 44 } ], "index": 42.5 }, { "type": "text", "bbox": [ 107, 641, 505, 685 ], "lines": [ { "bbox": [ 106, 641, 505, 653 ], "spans": [ { "bbox": [ 106, 641, 505, 653 ], "score": 1.0, "content": "To quantify the computational complexity of inference in Transformer models, recall the architecture", "type": "text" } ], "index": 45 }, { "bbox": [ 105, 651, 506, 664 ], "spans": [ { "bbox": [ 105, 651, 506, 664 ], "score": 1.0, "content": "of a Transformer decoder block. It consists of three parts: a masked self-attention layer, an encoder-", "type": "text" } ], "index": 46 }, { "bbox": [ 105, 662, 504, 676 ], "spans": [ { "bbox": [ 105, 662, 479, 676 ], "score": 1.0, "content": "decoder attention layer and a feedforward block. The sizes of these layers are parameterized by", "type": "text" }, { "bbox": [ 479, 663, 504, 674 ], "score": 0.87, "content": "d _ { \\mathrm { m o d e l } }", "type": "inline_equation" } ], "index": 47 }, { "bbox": [ 105, 673, 505, 686 ], "spans": [ { "bbox": [ 105, 673, 124, 686 ], "score": 1.0, "content": "and", "type": "text" }, { "bbox": [ 124, 674, 136, 685 ], "score": 0.84, "content": "d _ { \\mathrm { f f } }", "type": "inline_equation" }, { "bbox": [ 136, 673, 255, 686 ], "score": 1.0, "content": ". The base BERT model sets", "type": "text" }, { "bbox": [ 255, 674, 309, 685 ], "score": 0.92, "content": "d _ { \\mathrm { m o d e l } } = 7 6 8", "type": "inline_equation" }, { "bbox": [ 310, 673, 397, 686 ], "score": 1.0, "content": ", the large BERT has", "type": "text" }, { "bbox": [ 397, 674, 456, 685 ], "score": 0.91, "content": "d _ { \\mathrm { m o d e l } } = 1 0 2 4", "type": "inline_equation" }, { "bbox": [ 456, 673, 505, 686 ], "score": 1.0, "content": ", the largest", "type": "text" } ], "index": 48 } ], "index": 46.5 } ], "page_idx": 0, "page_size": [ 612, 792 ], "discarded_blocks": [ { "type": "discarded", "bbox": [ 122, 692, 263, 713 ], "lines": [ { "bbox": [ 122, 691, 265, 703 ], "spans": [ { "bbox": [ 122, 691, 265, 703 ], "score": 1.0, "content": "∗Work done while at Google Research.", "type": "text" } ] }, { "bbox": [ 119, 701, 234, 714 ], "spans": [ { "bbox": [ 119, 701, 234, 714 ], "score": 1.0, "content": "1https://cutt.ly/skkFJ7a", "type": "text" } ] } ] }, { "type": "discarded", "bbox": [ 106, 731, 385, 742 ], "lines": [ { "bbox": [ 105, 730, 386, 743 ], "spans": [ { "bbox": [ 105, 730, 386, 743 ], "score": 1.0, "content": "35th Conference on Neural Information Processing Systems (NeurIPS 2021).", "type": "text" } ] } ] } ], "para_blocks": [ { "type": "title", "bbox": [ 148, 97, 462, 117 ], "lines": [ { "bbox": [ 148, 96, 463, 118 ], "spans": [ { "bbox": [ 148, 96, 463, 118 ], "score": 1.0, "content": "Sparse is Enough in Scaling Transformers", "type": "text" } ], "index": 0 } ], "index": 0 }, { "type": "text", "bbox": [ 117, 160, 205, 181 ], "lines": [ { "bbox": [ 117, 159, 204, 171 ], "spans": [ { "bbox": [ 117, 159, 204, 171 ], "score": 1.0, "content": "Sebastian Jaszczur∗", "type": "text" } ], "index": 1 }, { "bbox": [ 117, 171, 205, 182 ], "spans": [ { "bbox": [ 117, 171, 205, 182 ], "score": 1.0, "content": "University of Warsaw", "type": "text" } ], "index": 3 } ], "index": 2.0, "bbox_fs": [ 117, 159, 205, 182 ] }, { "type": "text", "bbox": [ 220, 159, 321, 181 ], "lines": [ { "bbox": [ 219, 158, 322, 172 ], "spans": [ { "bbox": [ 219, 158, 322, 172 ], "score": 1.0, "content": "Aakanksha Chowdhery", "type": "text" } ], "index": 2 }, { "bbox": [ 235, 170, 306, 182 ], "spans": [ { "bbox": [ 235, 170, 306, 182 ], "score": 1.0, "content": "Google Research", "type": "text" } ], "index": 6 } ], "index": 4.0, "bbox_fs": [ 219, 158, 322, 182 ] }, { "type": "text", "bbox": [ 336, 160, 411, 181 ], "lines": [ { "bbox": [ 336, 159, 412, 171 ], "spans": [ { "bbox": [ 336, 159, 412, 171 ], "score": 1.0, "content": "Afroz Mohiuddin", "type": "text" } ], "index": 4 }, { "bbox": [ 338, 170, 410, 183 ], "spans": [ { "bbox": [ 338, 170, 410, 183 ], "score": 1.0, "content": "Google Research", "type": "text" } ], "index": 5 } ], "index": 4.5, "bbox_fs": [ 336, 159, 412, 183 ] }, { "type": "text", "bbox": [ 426, 160, 492, 182 ], "lines": [ { "bbox": [ 425, 158, 495, 171 ], "spans": [ { "bbox": [ 425, 158, 495, 171 ], "score": 1.0, "content": "Łukasz Kaiser∗", "type": "text" } ], "index": 7 }, { "bbox": [ 441, 169, 479, 183 ], "spans": [ { "bbox": [ 441, 169, 479, 183 ], "score": 1.0, "content": "OpenAI", "type": "text" } ], "index": 8 } ], "index": 7.5, "bbox_fs": [ 425, 158, 495, 183 ] }, { "type": "text", "bbox": [ 144, 198, 226, 221 ], "lines": [ { "bbox": [ 143, 198, 227, 211 ], "spans": [ { "bbox": [ 143, 198, 227, 211 ], "score": 1.0, "content": "Wojciech Gajewski", "type": "text" } ], "index": 9 }, { "bbox": [ 149, 209, 221, 222 ], "spans": [ { "bbox": [ 149, 209, 221, 222 ], "score": 1.0, "content": "Google Research", "type": "text" } ], "index": 12 } ], "index": 10.5, "bbox_fs": [ 143, 198, 227, 222 ] }, { "type": "text", "bbox": [ 266, 198, 357, 221 ], "lines": [ { "bbox": [ 266, 199, 358, 210 ], "spans": [ { "bbox": [ 266, 199, 358, 210 ], "score": 1.0, "content": "Henryk Michalewski", "type": "text" } ], "index": 10 }, { "bbox": [ 277, 210, 348, 221 ], "spans": [ { "bbox": [ 277, 210, 348, 221 ], "score": 1.0, "content": "Google Research", "type": "text" } ], "index": 13 } ], "index": 11.5, "bbox_fs": [ 266, 199, 358, 221 ] }, { "type": "text", "bbox": [ 398, 199, 468, 221 ], "lines": [ { "bbox": [ 399, 197, 467, 211 ], "spans": [ { "bbox": [ 399, 197, 467, 211 ], "score": 1.0, "content": "Jonni Kanerva", "type": "text" } ], "index": 11 }, { "bbox": [ 397, 209, 469, 222 ], "spans": [ { "bbox": [ 397, 209, 469, 222 ], "score": 1.0, "content": "Google Research", "type": "text" } ], "index": 14 } ], "index": 12.5, "bbox_fs": [ 397, 197, 469, 222 ] }, { "type": "title", "bbox": [ 283, 249, 328, 262 ], "lines": [ { "bbox": [ 281, 248, 331, 264 ], "spans": [ { "bbox": [ 281, 248, 331, 264 ], "score": 1.0, "content": "Abstract", "type": "text" } ], "index": 15 } ], "index": 15 }, { "type": "text", "bbox": [ 142, 274, 469, 394 ], "lines": [ { "bbox": [ 141, 274, 471, 287 ], "spans": [ { "bbox": [ 141, 274, 471, 287 ], "score": 1.0, "content": "Large Transformer models yield impressive results on many tasks, but are expen-", "type": "text" } ], "index": 16 }, { "bbox": [ 141, 284, 470, 298 ], "spans": [ { "bbox": [ 141, 284, 470, 298 ], "score": 1.0, "content": "sive to train, or even fine-tune, and so slow at decoding that their use and study", "type": "text" } ], "index": 17 }, { "bbox": [ 141, 295, 469, 309 ], "spans": [ { "bbox": [ 141, 295, 469, 309 ], "score": 1.0, "content": "becomes out of reach. We address this problem by leveraging sparsity. We study", "type": "text" } ], "index": 18 }, { "bbox": [ 141, 307, 471, 320 ], "spans": [ { "bbox": [ 141, 307, 471, 320 ], "score": 1.0, "content": "sparse variants for all layers in the Transformer and propose Scaling Transformers,", "type": "text" } ], "index": 19 }, { "bbox": [ 141, 317, 470, 330 ], "spans": [ { "bbox": [ 141, 317, 470, 330 ], "score": 1.0, "content": "a family of next generation Transformer models that use sparse layers to scale", "type": "text" } ], "index": 20 }, { "bbox": [ 141, 329, 471, 341 ], "spans": [ { "bbox": [ 141, 329, 471, 341 ], "score": 1.0, "content": "efficiently and perform unbatched decoding much faster than the standard Trans-", "type": "text" } ], "index": 21 }, { "bbox": [ 141, 339, 469, 352 ], "spans": [ { "bbox": [ 141, 339, 469, 352 ], "score": 1.0, "content": "former as we scale up the model size. Surprisingly, the sparse layers are enough", "type": "text" } ], "index": 22 }, { "bbox": [ 141, 350, 470, 363 ], "spans": [ { "bbox": [ 141, 350, 470, 363 ], "score": 1.0, "content": "to obtain the same perplexity as the standard Transformer with the same number", "type": "text" } ], "index": 23 }, { "bbox": [ 141, 361, 470, 374 ], "spans": [ { "bbox": [ 141, 361, 470, 374 ], "score": 1.0, "content": "of parameters. We also integrate with prior sparsity approaches to attention and", "type": "text" } ], "index": 24 }, { "bbox": [ 141, 372, 469, 385 ], "spans": [ { "bbox": [ 141, 372, 469, 385 ], "score": 1.0, "content": "enable fast inference on long sequences even with limited memory. This results in", "type": "text" } ], "index": 25 }, { "bbox": [ 140, 383, 446, 396 ], "spans": [ { "bbox": [ 140, 383, 446, 396 ], "score": 1.0, "content": "performance competitive to the state-of-the-art on long text summarization.", "type": "text" } ], "index": 26 } ], "index": 21, "bbox_fs": [ 140, 274, 471, 396 ] }, { "type": "title", "bbox": [ 107, 414, 190, 428 ], "lines": [ { "bbox": [ 105, 413, 192, 430 ], "spans": [ { "bbox": [ 105, 413, 192, 430 ], "score": 1.0, "content": "1 Introduction", "type": "text" } ], "index": 27 } ], "index": 27 }, { "type": "text", "bbox": [ 107, 439, 505, 515 ], "lines": [ { "bbox": [ 105, 438, 505, 452 ], "spans": [ { "bbox": [ 105, 438, 505, 452 ], "score": 1.0, "content": "The field of natural language processing has seen dramatic improvements in recent years due to large", "type": "text" } ], "index": 28 }, { "bbox": [ 105, 450, 504, 462 ], "spans": [ { "bbox": [ 105, 450, 504, 462 ], "score": 1.0, "content": "neural networks based on the Transformer architecture. The original Transformer [42] significantly", "type": "text" } ], "index": 29 }, { "bbox": [ 105, 461, 505, 473 ], "spans": [ { "bbox": [ 105, 461, 505, 473 ], "score": 1.0, "content": "advanced state-of-the-art in machine translation. BERT [7] surpassed all previous methods on", "type": "text" } ], "index": 30 }, { "bbox": [ 105, 472, 505, 484 ], "spans": [ { "bbox": [ 105, 472, 505, 484 ], "score": 1.0, "content": "question answering, language inference and other NLP tasks and was followed by a line of models", "type": "text" } ], "index": 31 }, { "bbox": [ 105, 481, 505, 496 ], "spans": [ { "bbox": [ 105, 481, 505, 496 ], "score": 1.0, "content": "like T5 [30] that further improved these results. The GPT line of models [29, 3] elevated language", "type": "text" } ], "index": 32 }, { "bbox": [ 105, 493, 506, 506 ], "spans": [ { "bbox": [ 105, 493, 506, 506 ], "score": 1.0, "content": "generation to the point that GPT-2 was invited to write short passages for the Economist and GPT-3", "type": "text" } ], "index": 33 }, { "bbox": [ 106, 505, 401, 516 ], "spans": [ { "bbox": [ 106, 505, 401, 516 ], "score": 1.0, "content": "created whole articles almost indistinguishable from human-written ones.", "type": "text" } ], "index": 34 } ], "index": 31, "bbox_fs": [ 105, 438, 506, 516 ] }, { "type": "text", "bbox": [ 107, 521, 505, 587 ], "lines": [ { "bbox": [ 105, 520, 505, 533 ], "spans": [ { "bbox": [ 105, 520, 505, 533 ], "score": 1.0, "content": "The benefits of this progress are undercut by the huge costs such models incur. Strubell et al. [36]", "type": "text" } ], "index": 35 }, { "bbox": [ 105, 530, 506, 545 ], "spans": [ { "bbox": [ 105, 530, 333, 545 ], "score": 1.0, "content": "estimate that training a single base BERT model costs", "type": "text" }, { "bbox": [ 333, 532, 373, 543 ], "score": 0.86, "content": "\\$ 4 k -\\$ 12 k", "type": "inline_equation" }, { "bbox": [ 374, 530, 454, 545 ], "score": 1.0, "content": "and emits as much", "type": "text" }, { "bbox": [ 454, 532, 475, 543 ], "score": 0.88, "content": "\\mathrm { C O _ { 2 } }", "type": "inline_equation" }, { "bbox": [ 475, 530, 506, 545 ], "score": 1.0, "content": "as one", "type": "text" } ], "index": 36 }, { "bbox": [ 105, 542, 506, 556 ], "spans": [ { "bbox": [ 105, 542, 506, 556 ], "score": 1.0, "content": "passenger’s share of a 4-hour flight and later Patterson et al. [27] estimate that training GPT-3 has", "type": "text" } ], "index": 37 }, { "bbox": [ 105, 552, 506, 567 ], "spans": [ { "bbox": [ 105, 552, 189, 567 ], "score": 1.0, "content": "three times as much", "type": "text" }, { "bbox": [ 189, 554, 216, 565 ], "score": 0.9, "content": "\\mathrm { t C O _ { 2 } e }", "type": "inline_equation" }, { "bbox": [ 217, 552, 278, 567 ], "score": 1.0, "content": "(metric tons of", "type": "text" }, { "bbox": [ 279, 554, 299, 565 ], "score": 0.9, "content": "\\mathrm { C O _ { 2 } }", "type": "inline_equation" }, { "bbox": [ 299, 552, 506, 567 ], "score": 1.0, "content": "equivalent) emissions as a SF-NY round trip flight.", "type": "text" } ], "index": 38 }, { "bbox": [ 105, 564, 506, 577 ], "spans": [ { "bbox": [ 105, 564, 506, 577 ], "score": 1.0, "content": "Data and serving costs are also forbidding: a single training run of BERT, for example, processes", "type": "text" } ], "index": 39 }, { "bbox": [ 105, 575, 428, 588 ], "spans": [ { "bbox": [ 105, 575, 428, 588 ], "score": 1.0, "content": "128B tokens, and Google Translate reportedly1 serves over 143B words per day.", "type": "text" } ], "index": 40 } ], "index": 37.5, "bbox_fs": [ 105, 520, 506, 588 ] }, { "type": "text", "bbox": [ 107, 592, 505, 636 ], "lines": [ { "bbox": [ 105, 592, 505, 604 ], "spans": [ { "bbox": [ 105, 592, 505, 604 ], "score": 1.0, "content": "With the growing popularity and size of these models, it is increasingly valuable to make them scale", "type": "text" } ], "index": 41 }, { "bbox": [ 105, 602, 505, 615 ], "spans": [ { "bbox": [ 105, 602, 505, 615 ], "score": 1.0, "content": "efficiently. In this work we propose Scaling Transformers with a separate sparse mechanism for the", "type": "text" } ], "index": 42 }, { "bbox": [ 105, 614, 506, 626 ], "spans": [ { "bbox": [ 105, 614, 506, 626 ], "score": 1.0, "content": "query, key, value and output layers (QKV layers for short) and combine it with sparse feedforward", "type": "text" } ], "index": 43 }, { "bbox": [ 105, 624, 319, 637 ], "spans": [ { "bbox": [ 105, 624, 319, 637 ], "score": 1.0, "content": "blocks to get a fully sparse Transformer architecture.", "type": "text" } ], "index": 44 } ], "index": 42.5, "bbox_fs": [ 105, 592, 506, 637 ] }, { "type": "text", "bbox": [ 107, 641, 505, 685 ], "lines": [ { "bbox": [ 106, 641, 505, 653 ], "spans": [ { "bbox": [ 106, 641, 505, 653 ], "score": 1.0, "content": "To quantify the computational complexity of inference in Transformer models, recall the architecture", "type": "text" } ], "index": 45 }, { "bbox": [ 105, 651, 506, 664 ], "spans": [ { "bbox": [ 105, 651, 506, 664 ], "score": 1.0, "content": "of a Transformer decoder block. It consists of three parts: a masked self-attention layer, an encoder-", "type": "text" } ], "index": 46 }, { "bbox": [ 105, 662, 504, 676 ], "spans": [ { "bbox": [ 105, 662, 479, 676 ], "score": 1.0, "content": "decoder attention layer and a feedforward block. The sizes of these layers are parameterized by", "type": "text" }, { "bbox": [ 479, 663, 504, 674 ], "score": 0.87, "content": "d _ { \\mathrm { m o d e l } }", "type": "inline_equation" } ], "index": 47 }, { "bbox": [ 105, 673, 505, 686 ], "spans": [ { "bbox": [ 105, 673, 124, 686 ], "score": 1.0, "content": "and", "type": "text" }, { "bbox": [ 124, 674, 136, 685 ], "score": 0.84, "content": "d _ { \\mathrm { f f } }", "type": "inline_equation" }, { "bbox": [ 136, 673, 255, 686 ], "score": 1.0, "content": ". The base BERT model sets", "type": "text" }, { "bbox": [ 255, 674, 309, 685 ], "score": 0.92, "content": "d _ { \\mathrm { m o d e l } } = 7 6 8", "type": "inline_equation" }, { "bbox": [ 310, 673, 397, 686 ], "score": 1.0, "content": ", the large BERT has", "type": "text" }, { "bbox": [ 397, 674, 456, 685 ], "score": 0.91, "content": "d _ { \\mathrm { m o d e l } } = 1 0 2 4", "type": "inline_equation" }, { "bbox": [ 456, 673, 505, 686 ], "score": 1.0, "content": ", the largest", "type": "text" } ], "index": 48 } ], "index": 46.5, "bbox_fs": [ 105, 641, 506, 686 ] } ] }, { "preproc_blocks": [ { "type": "table", "bbox": [ 112, 70, 300, 180 ], "blocks": [ { "type": "table_body", "bbox": [ 112, 70, 300, 180 ], "group_id": 0, "lines": [ { "bbox": [ 112, 70, 300, 180 ], "spans": [ { "bbox": [ 112, 70, 300, 180 ], "score": 0.974, "html": "
ParamsDec. timeDec.time per block
baseline Transf.800M0.160s5.9ms
+ Sparse FF0.093s3.1ms
+ Sparse QKV0.152s6.2ms
+ Sparse FF+QKV0.061s1.9ms
Speedup2.62x3.05x
baseline Transf.17B3.690s0.581s
+Sparse FF1.595s0.259s
+Sparse QKV3.154s0.554s
+Sparse FF+QKV=0.183s0.014s
Speedup20.0x42.5x
", "type": "table", "image_path": "4f8e6f232736a9190cdd1fc301cf633567d9f8df294768d09d6afdb05349720b.jpg" } ] } ], "index": 4, "virtual_lines": [ { "bbox": [ 112, 70, 300, 82.22222222222223 ], "spans": [], "index": 0 }, { "bbox": [ 112, 82.22222222222223, 300, 94.44444444444446 ], "spans": [], "index": 1 }, { "bbox": [ 112, 94.44444444444446, 300, 106.66666666666669 ], "spans": [], "index": 2 }, { "bbox": [ 112, 106.66666666666669, 300, 118.88888888888891 ], "spans": [], "index": 3 }, { "bbox": [ 112, 118.88888888888891, 300, 131.11111111111114 ], "spans": [], "index": 4 }, { "bbox": [ 112, 131.11111111111114, 300, 143.33333333333337 ], "spans": [], "index": 5 }, { "bbox": [ 112, 143.33333333333337, 300, 155.5555555555556 ], "spans": [], "index": 6 }, { "bbox": [ 112, 155.5555555555556, 300, 167.77777777777783 ], "spans": [], "index": 7 }, { "bbox": [ 112, 167.77777777777783, 300, 180.00000000000006 ], "spans": [], "index": 8 } ] }, { "type": "table_caption", "bbox": [ 106, 188, 304, 248 ], "group_id": 0, "lines": [ { "bbox": [ 105, 187, 306, 199 ], "spans": [ { "bbox": [ 105, 187, 306, 199 ], "score": 1.0, "content": "Table 1: Decoding speed (in seconds) of a single token.", "type": "text" } ], "index": 17 }, { "bbox": [ 105, 197, 306, 210 ], "spans": [ { "bbox": [ 105, 197, 306, 210 ], "score": 1.0, "content": "For Transformer model (equivalent to T5 large with ap-", "type": "text" } ], "index": 18 }, { "bbox": [ 106, 208, 304, 219 ], "spans": [ { "bbox": [ 106, 208, 304, 219 ], "score": 1.0, "content": "proximately 800M parameters), Scaling Transformers", "type": "text" } ], "index": 19 }, { "bbox": [ 106, 218, 304, 229 ], "spans": [ { "bbox": [ 106, 218, 235, 229 ], "score": 1.0, "content": "with proposed sparsity mechanisms", "type": "text" }, { "bbox": [ 235, 218, 274, 228 ], "score": 0.89, "content": "( F F { + } Q K V )", "type": "inline_equation" }, { "bbox": [ 275, 218, 304, 229 ], "score": 1.0, "content": "achieve", "type": "text" } ], "index": 20 }, { "bbox": [ 106, 228, 304, 239 ], "spans": [ { "bbox": [ 106, 228, 129, 239 ], "score": 1.0, "content": "up to", "type": "text" }, { "bbox": [ 129, 228, 140, 237 ], "score": 0.43, "content": "2 x", "type": "inline_equation" }, { "bbox": [ 140, 228, 304, 239 ], "score": 1.0, "content": "speedup in decoding compared to baseline", "type": "text" } ], "index": 21 }, { "bbox": [ 106, 237, 297, 249 ], "spans": [ { "bbox": [ 106, 237, 228, 249 ], "score": 1.0, "content": "dense model and 20x speedup for", "type": "text" }, { "bbox": [ 228, 238, 244, 248 ], "score": 0.31, "content": "I 7 B", "type": "inline_equation" }, { "bbox": [ 245, 237, 297, 249 ], "score": 1.0, "content": "param model.", "type": "text" } ], "index": 22 } ], "index": 19.5 } ], "index": 11.75 }, { "type": "image", "bbox": [ 315, 80, 508, 177 ], "blocks": [ { "type": "image_body", "bbox": [ 315, 80, 508, 177 ], "group_id": 0, "lines": [ { "bbox": [ 315, 80, 508, 177 ], "spans": [ { "bbox": [ 315, 80, 508, 177 ], "score": 0.967, "type": "image", "image_path": "f2cbaf0f025de453a8ad2daeabffda720d97428674dd034d813ce5da11e3d960.jpg" } ] } ], "index": 12.5, "virtual_lines": [ { "bbox": [ 315, 80, 508, 92.125 ], "spans": [], "index": 9 }, { "bbox": [ 315, 92.125, 508, 104.25 ], "spans": [], "index": 10 }, { "bbox": [ 315, 104.25, 508, 116.375 ], "spans": [], "index": 11 }, { "bbox": [ 315, 116.375, 508, 128.5 ], "spans": [], "index": 12 }, { "bbox": [ 315, 128.5, 508, 140.625 ], "spans": [], "index": 13 }, { "bbox": [ 315, 140.625, 508, 152.75 ], "spans": [], "index": 14 }, { "bbox": [ 315, 152.75, 508, 164.875 ], "spans": [], "index": 15 }, { "bbox": [ 315, 164.875, 508, 177.0 ], "spans": [], "index": 16 } ] }, { "type": "image_caption", "bbox": [ 311, 187, 507, 248 ], "group_id": 0, "lines": [ { "bbox": [ 311, 187, 508, 200 ], "spans": [ { "bbox": [ 311, 187, 508, 200 ], "score": 1.0, "content": "Figure 1: Log-perplexity of Scaling Transformers", "type": "text" } ], "index": 23 }, { "bbox": [ 311, 198, 508, 209 ], "spans": [ { "bbox": [ 311, 198, 508, 209 ], "score": 1.0, "content": "(equivalent to T5 large with approximately 800M pa-", "type": "text" } ], "index": 24 }, { "bbox": [ 311, 208, 508, 219 ], "spans": [ { "bbox": [ 311, 208, 359, 219 ], "score": 1.0, "content": "rameters) on", "type": "text" }, { "bbox": [ 360, 208, 371, 217 ], "score": 0.32, "content": "C 4", "type": "inline_equation" }, { "bbox": [ 371, 208, 508, 219 ], "score": 1.0, "content": "dataset with proposed sparsity mecha-", "type": "text" } ], "index": 25 }, { "bbox": [ 311, 218, 507, 228 ], "spans": [ { "bbox": [ 311, 218, 371, 228 ], "score": 1.0, "content": "nisms (FF, QKV,", "type": "text" }, { "bbox": [ 371, 218, 409, 228 ], "score": 0.59, "content": "F F { + } Q K V )", "type": "inline_equation" }, { "bbox": [ 409, 218, 507, 228 ], "score": 1.0, "content": "is similar to baseline dense", "type": "text" } ], "index": 26 }, { "bbox": [ 311, 227, 508, 239 ], "spans": [ { "bbox": [ 311, 227, 508, 239 ], "score": 1.0, "content": "model. Other models used in this paper are shown in", "type": "text" } ], "index": 27 }, { "bbox": [ 311, 238, 489, 249 ], "spans": [ { "bbox": [ 311, 238, 489, 249 ], "score": 1.0, "content": "grey lines; raw data is available in the appendix.", "type": "text" } ], "index": 28 } ], "index": 25.5 } ], "index": 19.0 }, { "type": "text", "bbox": [ 107, 271, 505, 391 ], "lines": [ { "bbox": [ 105, 270, 506, 285 ], "spans": [ { "bbox": [ 105, 270, 151, 285 ], "score": 1.0, "content": "GPT-2 has", "type": "text" }, { "bbox": [ 152, 271, 209, 282 ], "score": 0.9, "content": "d _ { \\mathrm { m o d e l } } = 1 6 0 0", "type": "inline_equation" }, { "bbox": [ 210, 270, 289, 285 ], "score": 1.0, "content": "and GPT-3 reaches", "type": "text" }, { "bbox": [ 289, 271, 352, 282 ], "score": 0.91, "content": "d _ { \\mathrm { m o d e l } } = 1 2 2 8 8", "type": "inline_equation" }, { "bbox": [ 352, 270, 506, 285 ], "score": 1.0, "content": ". For both BERT and GPT models the", "type": "text" } ], "index": 29 }, { "bbox": [ 106, 282, 506, 295 ], "spans": [ { "bbox": [ 106, 282, 155, 295 ], "score": 1.0, "content": "authors use", "type": "text" }, { "bbox": [ 155, 283, 211, 293 ], "score": 0.9, "content": "d _ { \\mathrm { f f } } = 4 d _ { \\mathrm { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 212, 282, 506, 295 ], "score": 1.0, "content": ". While decoding a token, the self-attention layer needs to activate four", "type": "text" } ], "index": 30 }, { "bbox": [ 105, 293, 506, 307 ], "spans": [ { "bbox": [ 105, 293, 172, 307 ], "score": 1.0, "content": "matrices of size", "type": "text" }, { "bbox": [ 172, 294, 231, 304 ], "score": 0.92, "content": "d _ { \\mathrm { m o d e l } } \\times d _ { \\mathrm { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 232, 293, 506, 307 ], "score": 1.0, "content": ": one each for the queries, keys and values input to the attention and", "type": "text" } ], "index": 31 }, { "bbox": [ 106, 304, 505, 316 ], "spans": [ { "bbox": [ 106, 304, 505, 316 ], "score": 1.0, "content": "one for merging the output. In the encoder-decoder attention, the keys and values may already be", "type": "text" } ], "index": 32 }, { "bbox": [ 105, 315, 506, 328 ], "spans": [ { "bbox": [ 105, 315, 256, 328 ], "score": 1.0, "content": "cached, so only two matrices of size", "type": "text" }, { "bbox": [ 257, 315, 316, 326 ], "score": 0.92, "content": "d _ { \\mathrm { m o d e l } } \\times d _ { \\mathrm { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 317, 315, 506, 328 ], "score": 1.0, "content": "are activated. The feedforward block consists", "type": "text" } ], "index": 33 }, { "bbox": [ 101, 326, 510, 362 ], "spans": [ { "bbox": [ 101, 326, 133, 362 ], "score": 1.0, "content": "of twoup to: a sing", "type": "text" }, { "bbox": [ 133, 336, 260, 349 ], "score": 0.89, "content": "4 d _ { \\mathrm { m o d e l } } ^ { 2 } + 2 d _ { \\mathrm { m o d e l } } ^ { 2 } + 2 d _ { \\mathrm { m o d e l } } d _ { \\mathrm { f f } }", "type": "inline_equation" }, { "bbox": [ 200, 326, 247, 336 ], "score": 0.9, "content": "d _ { \\mathrm { m o d e l } } \\times d _ { \\mathrm { f f } }", "type": "inline_equation" }, { "bbox": [ 260, 326, 510, 362 ], "score": 1.0, "content": "mitting small additional contribution of biases. The total adds. This sum describes both the number of trainable weights of the number of floating-point operations needed for decoding", "type": "text" } ], "index": 34 }, { "bbox": [ 106, 360, 504, 370 ], "spans": [ { "bbox": [ 106, 360, 504, 370 ], "score": 1.0, "content": "a single token, except for the attention operations (discussed later). The complexity is quadratic in", "type": "text" } ], "index": 35 }, { "bbox": [ 107, 369, 506, 383 ], "spans": [ { "bbox": [ 107, 370, 131, 380 ], "score": 0.88, "content": "d _ { \\mathrm { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 131, 369, 197, 383 ], "score": 1.0, "content": "; for example, as", "type": "text" }, { "bbox": [ 197, 370, 221, 380 ], "score": 0.91, "content": "d _ { \\mathrm { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 222, 369, 506, 383 ], "score": 1.0, "content": "increases 16-fold from base BERT to GPT-3, the complexity of a single", "type": "text" } ], "index": 36 }, { "bbox": [ 106, 380, 197, 392 ], "spans": [ { "bbox": [ 106, 380, 197, 392 ], "score": 1.0, "content": "block grows 256-fold.", "type": "text" } ], "index": 37 } ], "index": 33 }, { "type": "text", "bbox": [ 106, 396, 505, 474 ], "lines": [ { "bbox": [ 102, 394, 506, 412 ], "spans": [ { "bbox": [ 102, 394, 294, 412 ], "score": 1.0, "content": "In comparison Scaling Transformers use only", "type": "text" }, { "bbox": [ 294, 396, 396, 409 ], "score": 0.91, "content": "2 d _ { \\mathrm { m o d e l } } \\sqrt { d _ { \\mathrm { m o d e l } } } = 2 d _ { \\mathrm { m o d e l } } ^ { 1 . 5 }", "type": "inline_equation" }, { "bbox": [ 396, 394, 506, 412 ], "score": 1.0, "content": "parameters in QKV layers", "type": "text" } ], "index": 38 }, { "bbox": [ 106, 408, 506, 420 ], "spans": [ { "bbox": [ 106, 408, 506, 420 ], "score": 1.0, "content": "and yield results as good as the baseline (fully dense) Transformer with the same number of parameters", "type": "text" } ], "index": 39 }, { "bbox": [ 102, 414, 505, 437 ], "spans": [ { "bbox": [ 102, 414, 178, 437 ], "score": 1.0, "content": "and complexity:", "type": "text" }, { "bbox": [ 178, 418, 299, 431 ], "score": 0.91, "content": "\\mathrm { \\bar { 8 } } d _ { \\mathrm { m o d e l } } ^ { 1 . 5 } + 4 d _ { \\mathrm { m o d e l } } ^ { 1 . 5 } + 4 \\dot { d } _ { \\mathrm { m o d e l } } ^ { 1 . 5 }", "type": "inline_equation" }, { "bbox": [ 299, 414, 505, 437 ], "score": 1.0, "content": ". We were surprised that the fully sparse Scaling", "type": "text" } ], "index": 40 }, { "bbox": [ 105, 429, 505, 442 ], "spans": [ { "bbox": [ 105, 429, 505, 442 ], "score": 1.0, "content": "Transformers are indeed enough to match the results of the baseline Transformer on the large C4", "type": "text" } ], "index": 41 }, { "bbox": [ 105, 439, 506, 453 ], "spans": [ { "bbox": [ 105, 439, 506, 453 ], "score": 1.0, "content": "dataset [30] (Figure 1). The improvement in complexity holds not just asymptotically but yields over", "type": "text" } ], "index": 42 }, { "bbox": [ 106, 452, 505, 464 ], "spans": [ { "bbox": [ 106, 452, 126, 462 ], "score": 0.35, "content": "2 . 6 \\mathbf { x }", "type": "inline_equation" }, { "bbox": [ 126, 452, 487, 464 ], "score": 1.0, "content": "speedup in wall-clock hed decoding time already for a model with 800M parameters and", "type": "text" }, { "bbox": [ 488, 452, 505, 462 ], "score": 0.57, "content": "2 0 \\mathrm { x }", "type": "inline_equation" } ], "index": 43 }, { "bbox": [ 105, 462, 382, 474 ], "spans": [ { "bbox": [ 105, 462, 382, 474 ], "score": 1.0, "content": "improvement for a model with 17B parameters, as shown in Table 1.", "type": "text" } ], "index": 44 } ], "index": 41 }, { "type": "text", "bbox": [ 107, 478, 505, 534 ], "lines": [ { "bbox": [ 107, 479, 505, 490 ], "spans": [ { "bbox": [ 107, 479, 505, 490 ], "score": 1.0, "content": "To verify that Scaling Transformers can be used with other Transformer improvements on real tasks,", "type": "text" } ], "index": 45 }, { "bbox": [ 105, 489, 505, 502 ], "spans": [ { "bbox": [ 105, 489, 505, 502 ], "score": 1.0, "content": "we create Terraformer – a Transformer model that uses reversible layers for memory efficiency and", "type": "text" } ], "index": 46 }, { "bbox": [ 105, 500, 506, 513 ], "spans": [ { "bbox": [ 105, 500, 506, 513 ], "score": 1.0, "content": "sparse attention to handle long sequences. We pre-train Terraformer on the C4 dataset and fine-tune it", "type": "text" } ], "index": 47 }, { "bbox": [ 106, 512, 505, 524 ], "spans": [ { "bbox": [ 106, 512, 505, 524 ], "score": 1.0, "content": "on the challenging task of summarizing arxiv articles. Terraformer yields results competitive to the", "type": "text" } ], "index": 48 }, { "bbox": [ 105, 522, 462, 535 ], "spans": [ { "bbox": [ 105, 522, 462, 535 ], "score": 1.0, "content": "state-of-the-art BigBird-Pegasus without using the Pegasus loss in pre-training (Table 5).", "type": "text" } ], "index": 49 } ], "index": 47 }, { "type": "title", "bbox": [ 107, 551, 197, 564 ], "lines": [ { "bbox": [ 105, 550, 198, 566 ], "spans": [ { "bbox": [ 105, 550, 198, 566 ], "score": 1.0, "content": "2 Related Work", "type": "text" } ], "index": 50 } ], "index": 50 }, { "type": "text", "bbox": [ 107, 576, 505, 642 ], "lines": [ { "bbox": [ 105, 576, 506, 589 ], "spans": [ { "bbox": [ 105, 576, 506, 589 ], "score": 1.0, "content": "As discussed in the previous section, large Transformer models brings significant improvements in", "type": "text" } ], "index": 51 }, { "bbox": [ 105, 587, 506, 601 ], "spans": [ { "bbox": [ 105, 587, 506, 601 ], "score": 1.0, "content": "performance, as seen in models such as GPT-3 [3, 17] or T5 [44, 30]. Training and inference incur", "type": "text" } ], "index": 52 }, { "bbox": [ 105, 598, 506, 611 ], "spans": [ { "bbox": [ 105, 598, 506, 611 ], "score": 1.0, "content": "a high computational cost at the scale of hundreds of billions of parameters. Numerous techniques", "type": "text" } ], "index": 53 }, { "bbox": [ 105, 610, 505, 621 ], "spans": [ { "bbox": [ 105, 610, 505, 621 ], "score": 1.0, "content": "improve the efficiency of Transformer models, and Gupta and Agrawal [11] divide them into several", "type": "text" } ], "index": 54 }, { "bbox": [ 105, 620, 506, 633 ], "spans": [ { "bbox": [ 105, 620, 506, 633 ], "score": 1.0, "content": "classes, including pruning, knowledge distillation, quantization, parameter sharing, efficient attention,", "type": "text" } ], "index": 55 }, { "bbox": [ 106, 631, 211, 643 ], "spans": [ { "bbox": [ 106, 631, 211, 643 ], "score": 1.0, "content": "and efficient feedforward.", "type": "text" } ], "index": 56 } ], "index": 53.5 }, { "type": "text", "bbox": [ 107, 647, 504, 670 ], "lines": [ { "bbox": [ 106, 648, 505, 660 ], "spans": [ { "bbox": [ 106, 648, 505, 660 ], "score": 1.0, "content": "Model compression. Model pruning [24, 2] makes matrices smaller by removing unneeded weights", "type": "text" } ], "index": 57 }, { "bbox": [ 106, 659, 505, 671 ], "spans": [ { "bbox": [ 106, 659, 505, 671 ], "score": 1.0, "content": "after or during training, however, the gains in computational complexity on sparse matrices often do", "type": "text" } ], "index": 58 } ], "index": 57.5 } ], "page_idx": 1, "page_size": [ 612, 792 ], "discarded_blocks": [ { "type": "discarded", "bbox": [ 106, 681, 505, 722 ], "lines": [ { "bbox": [ 118, 679, 505, 694 ], "spans": [ { "bbox": [ 118, 679, 323, 694 ], "score": 1.0, "content": "2The 800M model has 24 layers of Encoder & Decoder,", "type": "text" }, { "bbox": [ 323, 682, 375, 691 ], "score": 0.88, "content": "d _ { \\mathrm { m o d e l } } = 1 0 2 4", "type": "inline_equation" }, { "bbox": [ 375, 679, 494, 694 ], "score": 1.0, "content": ", 16 attn heads, attention-sparsity", "type": "text" }, { "bbox": [ 495, 683, 505, 692 ], "score": 0.76, "content": "=", "type": "inline_equation" } ] }, { "bbox": [ 106, 691, 505, 703 ], "spans": [ { "bbox": [ 106, 691, 158, 703 ], "score": 1.0, "content": "16, ff-sparsity", "type": "text" }, { "bbox": [ 158, 692, 179, 701 ], "score": 0.85, "content": "= 6 4", "type": "inline_equation" }, { "bbox": [ 179, 691, 403, 703 ], "score": 1.0, "content": ". We scale up this model to approximately 17B parameters with", "type": "text" }, { "bbox": [ 404, 692, 456, 702 ], "score": 0.9, "content": "d _ { \\mathrm { m o d e l } } = 9 2 1 6", "type": "inline_equation" }, { "bbox": [ 456, 691, 505, 703 ], "score": 1.0, "content": "and get up to", "type": "text" } ] }, { "bbox": [ 106, 701, 505, 713 ], "spans": [ { "bbox": [ 106, 702, 121, 711 ], "score": 0.32, "content": "2 0 \\mathrm { x }", "type": "inline_equation" }, { "bbox": [ 122, 701, 496, 713 ], "score": 1.0, "content": "speedup in decoding compared to baseline dense model. This 17B param model has six layers of Encoder", "type": "text" }, { "bbox": [ 496, 702, 505, 711 ], "score": 0.32, "content": "\\&", "type": "inline_equation" } ] }, { "bbox": [ 106, 711, 348, 723 ], "spans": [ { "bbox": [ 106, 711, 257, 723 ], "score": 1.0, "content": "Decoder, 96 attn heads, attention-sparsity", "type": "text" }, { "bbox": [ 257, 712, 278, 721 ], "score": 0.84, "content": "= 6 4", "type": "inline_equation" }, { "bbox": [ 279, 711, 320, 723 ], "score": 1.0, "content": ", ff-sparsity", "type": "text" }, { "bbox": [ 320, 712, 345, 721 ], "score": 0.81, "content": "= 2 5 6", "type": "inline_equation" }, { "bbox": [ 345, 711, 348, 723 ], "score": 1.0, "content": ".", "type": "text" } ] } ] }, { "type": "discarded", "bbox": [ 302, 742, 309, 750 ], "lines": [ { "bbox": [ 301, 741, 310, 753 ], "spans": [ { "bbox": [ 301, 741, 310, 753 ], "score": 1.0, "content": "2", "type": "text" } ] } ] } ], "para_blocks": [ { "type": "table", "bbox": [ 112, 70, 300, 180 ], "blocks": [ { "type": "table_body", "bbox": [ 112, 70, 300, 180 ], "group_id": 0, "lines": [ { "bbox": [ 112, 70, 300, 180 ], "spans": [ { "bbox": [ 112, 70, 300, 180 ], "score": 0.974, "html": "
ParamsDec. timeDec.time per block
baseline Transf.800M0.160s5.9ms
+ Sparse FF0.093s3.1ms
+ Sparse QKV0.152s6.2ms
+ Sparse FF+QKV0.061s1.9ms
Speedup2.62x3.05x
baseline Transf.17B3.690s0.581s
+Sparse FF1.595s0.259s
+Sparse QKV3.154s0.554s
+Sparse FF+QKV=0.183s0.014s
Speedup20.0x42.5x
", "type": "table", "image_path": "4f8e6f232736a9190cdd1fc301cf633567d9f8df294768d09d6afdb05349720b.jpg" } ] } ], "index": 4, "virtual_lines": [ { "bbox": [ 112, 70, 300, 82.22222222222223 ], "spans": [], "index": 0 }, { "bbox": [ 112, 82.22222222222223, 300, 94.44444444444446 ], "spans": [], "index": 1 }, { "bbox": [ 112, 94.44444444444446, 300, 106.66666666666669 ], "spans": [], "index": 2 }, { "bbox": [ 112, 106.66666666666669, 300, 118.88888888888891 ], "spans": [], "index": 3 }, { "bbox": [ 112, 118.88888888888891, 300, 131.11111111111114 ], "spans": [], "index": 4 }, { "bbox": [ 112, 131.11111111111114, 300, 143.33333333333337 ], "spans": [], "index": 5 }, { "bbox": [ 112, 143.33333333333337, 300, 155.5555555555556 ], "spans": [], "index": 6 }, { "bbox": [ 112, 155.5555555555556, 300, 167.77777777777783 ], "spans": [], "index": 7 }, { "bbox": [ 112, 167.77777777777783, 300, 180.00000000000006 ], "spans": [], "index": 8 } ] }, { "type": "table_caption", "bbox": [ 106, 188, 304, 248 ], "group_id": 0, "lines": [ { "bbox": [ 105, 187, 306, 199 ], "spans": [ { "bbox": [ 105, 187, 306, 199 ], "score": 1.0, "content": "Table 1: Decoding speed (in seconds) of a single token.", "type": "text" } ], "index": 17 }, { "bbox": [ 105, 197, 306, 210 ], "spans": [ { "bbox": [ 105, 197, 306, 210 ], "score": 1.0, "content": "For Transformer model (equivalent to T5 large with ap-", "type": "text" } ], "index": 18 }, { "bbox": [ 106, 208, 304, 219 ], "spans": [ { "bbox": [ 106, 208, 304, 219 ], "score": 1.0, "content": "proximately 800M parameters), Scaling Transformers", "type": "text" } ], "index": 19 }, { "bbox": [ 106, 218, 304, 229 ], "spans": [ { "bbox": [ 106, 218, 235, 229 ], "score": 1.0, "content": "with proposed sparsity mechanisms", "type": "text" }, { "bbox": [ 235, 218, 274, 228 ], "score": 0.89, "content": "( F F { + } Q K V )", "type": "inline_equation" }, { "bbox": [ 275, 218, 304, 229 ], "score": 1.0, "content": "achieve", "type": "text" } ], "index": 20 }, { "bbox": [ 106, 228, 304, 239 ], "spans": [ { "bbox": [ 106, 228, 129, 239 ], "score": 1.0, "content": "up to", "type": "text" }, { "bbox": [ 129, 228, 140, 237 ], "score": 0.43, "content": "2 x", "type": "inline_equation" }, { "bbox": [ 140, 228, 304, 239 ], "score": 1.0, "content": "speedup in decoding compared to baseline", "type": "text" } ], "index": 21 }, { "bbox": [ 106, 237, 297, 249 ], "spans": [ { "bbox": [ 106, 237, 228, 249 ], "score": 1.0, "content": "dense model and 20x speedup for", "type": "text" }, { "bbox": [ 228, 238, 244, 248 ], "score": 0.31, "content": "I 7 B", "type": "inline_equation" }, { "bbox": [ 245, 237, 297, 249 ], "score": 1.0, "content": "param model.", "type": "text" } ], "index": 22 } ], "index": 19.5 } ], "index": 11.75 }, { "type": "image", "bbox": [ 315, 80, 508, 177 ], "blocks": [ { "type": "image_body", "bbox": [ 315, 80, 508, 177 ], "group_id": 0, "lines": [ { "bbox": [ 315, 80, 508, 177 ], "spans": [ { "bbox": [ 315, 80, 508, 177 ], "score": 0.967, "type": "image", "image_path": "f2cbaf0f025de453a8ad2daeabffda720d97428674dd034d813ce5da11e3d960.jpg" } ] } ], "index": 12.5, "virtual_lines": [ { "bbox": [ 315, 80, 508, 92.125 ], "spans": [], "index": 9 }, { "bbox": [ 315, 92.125, 508, 104.25 ], "spans": [], "index": 10 }, { "bbox": [ 315, 104.25, 508, 116.375 ], "spans": [], "index": 11 }, { "bbox": [ 315, 116.375, 508, 128.5 ], "spans": [], "index": 12 }, { "bbox": [ 315, 128.5, 508, 140.625 ], "spans": [], "index": 13 }, { "bbox": [ 315, 140.625, 508, 152.75 ], "spans": [], "index": 14 }, { "bbox": [ 315, 152.75, 508, 164.875 ], "spans": [], "index": 15 }, { "bbox": [ 315, 164.875, 508, 177.0 ], "spans": [], "index": 16 } ] }, { "type": "image_caption", "bbox": [ 311, 187, 507, 248 ], "group_id": 0, "lines": [ { "bbox": [ 311, 187, 508, 200 ], "spans": [ { "bbox": [ 311, 187, 508, 200 ], "score": 1.0, "content": "Figure 1: Log-perplexity of Scaling Transformers", "type": "text" } ], "index": 23 }, { "bbox": [ 311, 198, 508, 209 ], "spans": [ { "bbox": [ 311, 198, 508, 209 ], "score": 1.0, "content": "(equivalent to T5 large with approximately 800M pa-", "type": "text" } ], "index": 24 }, { "bbox": [ 311, 208, 508, 219 ], "spans": [ { "bbox": [ 311, 208, 359, 219 ], "score": 1.0, "content": "rameters) on", "type": "text" }, { "bbox": [ 360, 208, 371, 217 ], "score": 0.32, "content": "C 4", "type": "inline_equation" }, { "bbox": [ 371, 208, 508, 219 ], "score": 1.0, "content": "dataset with proposed sparsity mecha-", "type": "text" } ], "index": 25 }, { "bbox": [ 311, 218, 507, 228 ], "spans": [ { "bbox": [ 311, 218, 371, 228 ], "score": 1.0, "content": "nisms (FF, QKV,", "type": "text" }, { "bbox": [ 371, 218, 409, 228 ], "score": 0.59, "content": "F F { + } Q K V )", "type": "inline_equation" }, { "bbox": [ 409, 218, 507, 228 ], "score": 1.0, "content": "is similar to baseline dense", "type": "text" } ], "index": 26 }, { "bbox": [ 311, 227, 508, 239 ], "spans": [ { "bbox": [ 311, 227, 508, 239 ], "score": 1.0, "content": "model. Other models used in this paper are shown in", "type": "text" } ], "index": 27 }, { "bbox": [ 311, 238, 489, 249 ], "spans": [ { "bbox": [ 311, 238, 489, 249 ], "score": 1.0, "content": "grey lines; raw data is available in the appendix.", "type": "text" } ], "index": 28 } ], "index": 25.5 } ], "index": 19.0 }, { "type": "text", "bbox": [ 107, 271, 505, 391 ], "lines": [ { "bbox": [ 105, 270, 506, 285 ], "spans": [ { "bbox": [ 105, 270, 151, 285 ], "score": 1.0, "content": "GPT-2 has", "type": "text" }, { "bbox": [ 152, 271, 209, 282 ], "score": 0.9, "content": "d _ { \\mathrm { m o d e l } } = 1 6 0 0", "type": "inline_equation" }, { "bbox": [ 210, 270, 289, 285 ], "score": 1.0, "content": "and GPT-3 reaches", "type": "text" }, { "bbox": [ 289, 271, 352, 282 ], "score": 0.91, "content": "d _ { \\mathrm { m o d e l } } = 1 2 2 8 8", "type": "inline_equation" }, { "bbox": [ 352, 270, 506, 285 ], "score": 1.0, "content": ". For both BERT and GPT models the", "type": "text" } ], "index": 29 }, { "bbox": [ 106, 282, 506, 295 ], "spans": [ { "bbox": [ 106, 282, 155, 295 ], "score": 1.0, "content": "authors use", "type": "text" }, { "bbox": [ 155, 283, 211, 293 ], "score": 0.9, "content": "d _ { \\mathrm { f f } } = 4 d _ { \\mathrm { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 212, 282, 506, 295 ], "score": 1.0, "content": ". While decoding a token, the self-attention layer needs to activate four", "type": "text" } ], "index": 30 }, { "bbox": [ 105, 293, 506, 307 ], "spans": [ { "bbox": [ 105, 293, 172, 307 ], "score": 1.0, "content": "matrices of size", "type": "text" }, { "bbox": [ 172, 294, 231, 304 ], "score": 0.92, "content": "d _ { \\mathrm { m o d e l } } \\times d _ { \\mathrm { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 232, 293, 506, 307 ], "score": 1.0, "content": ": one each for the queries, keys and values input to the attention and", "type": "text" } ], "index": 31 }, { "bbox": [ 106, 304, 505, 316 ], "spans": [ { "bbox": [ 106, 304, 505, 316 ], "score": 1.0, "content": "one for merging the output. In the encoder-decoder attention, the keys and values may already be", "type": "text" } ], "index": 32 }, { "bbox": [ 105, 315, 506, 328 ], "spans": [ { "bbox": [ 105, 315, 256, 328 ], "score": 1.0, "content": "cached, so only two matrices of size", "type": "text" }, { "bbox": [ 257, 315, 316, 326 ], "score": 0.92, "content": "d _ { \\mathrm { m o d e l } } \\times d _ { \\mathrm { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 317, 315, 506, 328 ], "score": 1.0, "content": "are activated. The feedforward block consists", "type": "text" } ], "index": 33 }, { "bbox": [ 101, 326, 510, 362 ], "spans": [ { "bbox": [ 101, 326, 133, 362 ], "score": 1.0, "content": "of twoup to: a sing", "type": "text" }, { "bbox": [ 133, 336, 260, 349 ], "score": 0.89, "content": "4 d _ { \\mathrm { m o d e l } } ^ { 2 } + 2 d _ { \\mathrm { m o d e l } } ^ { 2 } + 2 d _ { \\mathrm { m o d e l } } d _ { \\mathrm { f f } }", "type": "inline_equation" }, { "bbox": [ 200, 326, 247, 336 ], "score": 0.9, "content": "d _ { \\mathrm { m o d e l } } \\times d _ { \\mathrm { f f } }", "type": "inline_equation" }, { "bbox": [ 260, 326, 510, 362 ], "score": 1.0, "content": "mitting small additional contribution of biases. The total adds. This sum describes both the number of trainable weights of the number of floating-point operations needed for decoding", "type": "text" } ], "index": 34 }, { "bbox": [ 106, 360, 504, 370 ], "spans": [ { "bbox": [ 106, 360, 504, 370 ], "score": 1.0, "content": "a single token, except for the attention operations (discussed later). The complexity is quadratic in", "type": "text" } ], "index": 35 }, { "bbox": [ 107, 369, 506, 383 ], "spans": [ { "bbox": [ 107, 370, 131, 380 ], "score": 0.88, "content": "d _ { \\mathrm { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 131, 369, 197, 383 ], "score": 1.0, "content": "; for example, as", "type": "text" }, { "bbox": [ 197, 370, 221, 380 ], "score": 0.91, "content": "d _ { \\mathrm { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 222, 369, 506, 383 ], "score": 1.0, "content": "increases 16-fold from base BERT to GPT-3, the complexity of a single", "type": "text" } ], "index": 36 }, { "bbox": [ 106, 380, 197, 392 ], "spans": [ { "bbox": [ 106, 380, 197, 392 ], "score": 1.0, "content": "block grows 256-fold.", "type": "text" } ], "index": 37 } ], "index": 33, "bbox_fs": [ 101, 270, 510, 392 ] }, { "type": "text", "bbox": [ 106, 396, 505, 474 ], "lines": [ { "bbox": [ 102, 394, 506, 412 ], "spans": [ { "bbox": [ 102, 394, 294, 412 ], "score": 1.0, "content": "In comparison Scaling Transformers use only", "type": "text" }, { "bbox": [ 294, 396, 396, 409 ], "score": 0.91, "content": "2 d _ { \\mathrm { m o d e l } } \\sqrt { d _ { \\mathrm { m o d e l } } } = 2 d _ { \\mathrm { m o d e l } } ^ { 1 . 5 }", "type": "inline_equation" }, { "bbox": [ 396, 394, 506, 412 ], "score": 1.0, "content": "parameters in QKV layers", "type": "text" } ], "index": 38 }, { "bbox": [ 106, 408, 506, 420 ], "spans": [ { "bbox": [ 106, 408, 506, 420 ], "score": 1.0, "content": "and yield results as good as the baseline (fully dense) Transformer with the same number of parameters", "type": "text" } ], "index": 39 }, { "bbox": [ 102, 414, 505, 437 ], "spans": [ { "bbox": [ 102, 414, 178, 437 ], "score": 1.0, "content": "and complexity:", "type": "text" }, { "bbox": [ 178, 418, 299, 431 ], "score": 0.91, "content": "\\mathrm { \\bar { 8 } } d _ { \\mathrm { m o d e l } } ^ { 1 . 5 } + 4 d _ { \\mathrm { m o d e l } } ^ { 1 . 5 } + 4 \\dot { d } _ { \\mathrm { m o d e l } } ^ { 1 . 5 }", "type": "inline_equation" }, { "bbox": [ 299, 414, 505, 437 ], "score": 1.0, "content": ". We were surprised that the fully sparse Scaling", "type": "text" } ], "index": 40 }, { "bbox": [ 105, 429, 505, 442 ], "spans": [ { "bbox": [ 105, 429, 505, 442 ], "score": 1.0, "content": "Transformers are indeed enough to match the results of the baseline Transformer on the large C4", "type": "text" } ], "index": 41 }, { "bbox": [ 105, 439, 506, 453 ], "spans": [ { "bbox": [ 105, 439, 506, 453 ], "score": 1.0, "content": "dataset [30] (Figure 1). The improvement in complexity holds not just asymptotically but yields over", "type": "text" } ], "index": 42 }, { "bbox": [ 106, 452, 505, 464 ], "spans": [ { "bbox": [ 106, 452, 126, 462 ], "score": 0.35, "content": "2 . 6 \\mathbf { x }", "type": "inline_equation" }, { "bbox": [ 126, 452, 487, 464 ], "score": 1.0, "content": "speedup in wall-clock hed decoding time already for a model with 800M parameters and", "type": "text" }, { "bbox": [ 488, 452, 505, 462 ], "score": 0.57, "content": "2 0 \\mathrm { x }", "type": "inline_equation" } ], "index": 43 }, { "bbox": [ 105, 462, 382, 474 ], "spans": [ { "bbox": [ 105, 462, 382, 474 ], "score": 1.0, "content": "improvement for a model with 17B parameters, as shown in Table 1.", "type": "text" } ], "index": 44 } ], "index": 41, "bbox_fs": [ 102, 394, 506, 474 ] }, { "type": "text", "bbox": [ 107, 478, 505, 534 ], "lines": [ { "bbox": [ 107, 479, 505, 490 ], "spans": [ { "bbox": [ 107, 479, 505, 490 ], "score": 1.0, "content": "To verify that Scaling Transformers can be used with other Transformer improvements on real tasks,", "type": "text" } ], "index": 45 }, { "bbox": [ 105, 489, 505, 502 ], "spans": [ { "bbox": [ 105, 489, 505, 502 ], "score": 1.0, "content": "we create Terraformer – a Transformer model that uses reversible layers for memory efficiency and", "type": "text" } ], "index": 46 }, { "bbox": [ 105, 500, 506, 513 ], "spans": [ { "bbox": [ 105, 500, 506, 513 ], "score": 1.0, "content": "sparse attention to handle long sequences. We pre-train Terraformer on the C4 dataset and fine-tune it", "type": "text" } ], "index": 47 }, { "bbox": [ 106, 512, 505, 524 ], "spans": [ { "bbox": [ 106, 512, 505, 524 ], "score": 1.0, "content": "on the challenging task of summarizing arxiv articles. Terraformer yields results competitive to the", "type": "text" } ], "index": 48 }, { "bbox": [ 105, 522, 462, 535 ], "spans": [ { "bbox": [ 105, 522, 462, 535 ], "score": 1.0, "content": "state-of-the-art BigBird-Pegasus without using the Pegasus loss in pre-training (Table 5).", "type": "text" } ], "index": 49 } ], "index": 47, "bbox_fs": [ 105, 479, 506, 535 ] }, { "type": "title", "bbox": [ 107, 551, 197, 564 ], "lines": [ { "bbox": [ 105, 550, 198, 566 ], "spans": [ { "bbox": [ 105, 550, 198, 566 ], "score": 1.0, "content": "2 Related Work", "type": "text" } ], "index": 50 } ], "index": 50 }, { "type": "text", "bbox": [ 107, 576, 505, 642 ], "lines": [ { "bbox": [ 105, 576, 506, 589 ], "spans": [ { "bbox": [ 105, 576, 506, 589 ], "score": 1.0, "content": "As discussed in the previous section, large Transformer models brings significant improvements in", "type": "text" } ], "index": 51 }, { "bbox": [ 105, 587, 506, 601 ], "spans": [ { "bbox": [ 105, 587, 506, 601 ], "score": 1.0, "content": "performance, as seen in models such as GPT-3 [3, 17] or T5 [44, 30]. Training and inference incur", "type": "text" } ], "index": 52 }, { "bbox": [ 105, 598, 506, 611 ], "spans": [ { "bbox": [ 105, 598, 506, 611 ], "score": 1.0, "content": "a high computational cost at the scale of hundreds of billions of parameters. Numerous techniques", "type": "text" } ], "index": 53 }, { "bbox": [ 105, 610, 505, 621 ], "spans": [ { "bbox": [ 105, 610, 505, 621 ], "score": 1.0, "content": "improve the efficiency of Transformer models, and Gupta and Agrawal [11] divide them into several", "type": "text" } ], "index": 54 }, { "bbox": [ 105, 620, 506, 633 ], "spans": [ { "bbox": [ 105, 620, 506, 633 ], "score": 1.0, "content": "classes, including pruning, knowledge distillation, quantization, parameter sharing, efficient attention,", "type": "text" } ], "index": 55 }, { "bbox": [ 106, 631, 211, 643 ], "spans": [ { "bbox": [ 106, 631, 211, 643 ], "score": 1.0, "content": "and efficient feedforward.", "type": "text" } ], "index": 56 } ], "index": 53.5, "bbox_fs": [ 105, 576, 506, 643 ] }, { "type": "text", "bbox": [ 107, 647, 504, 670 ], "lines": [ { "bbox": [ 106, 648, 505, 660 ], "spans": [ { "bbox": [ 106, 648, 505, 660 ], "score": 1.0, "content": "Model compression. Model pruning [24, 2] makes matrices smaller by removing unneeded weights", "type": "text" } ], "index": 57 }, { "bbox": [ 106, 659, 505, 671 ], "spans": [ { "bbox": [ 106, 659, 505, 671 ], "score": 1.0, "content": "after or during training, however, the gains in computational complexity on sparse matrices often do", "type": "text" } ], "index": 58 }, { "bbox": [ 105, 73, 505, 85 ], "spans": [ { "bbox": [ 105, 73, 505, 85 ], "score": 1.0, "content": "not result in inference speedups on actual hardware [9]. Structured pruning based approaches [47, 22,", "type": "text", "cross_page": true } ], "index": 0 }, { "bbox": [ 105, 83, 506, 96 ], "spans": [ { "bbox": [ 105, 83, 506, 96 ], "score": 1.0, "content": "43] account for this challenge by leveraging sparsity in hardware in CPU and GPU architectures [1].", "type": "text", "cross_page": true } ], "index": 1 }, { "bbox": [ 105, 93, 505, 108 ], "spans": [ { "bbox": [ 105, 93, 505, 108 ], "score": 1.0, "content": "Our paper is different from pruning approaches in that it relies on dynamic sparsity wherein the", "type": "text", "cross_page": true } ], "index": 2 }, { "bbox": [ 105, 105, 506, 118 ], "spans": [ { "bbox": [ 105, 105, 506, 118 ], "score": 1.0, "content": "feedforward layer loads only a subset of weights in the layer for each token. Our approach is", "type": "text", "cross_page": true } ], "index": 3 }, { "bbox": [ 105, 117, 479, 129 ], "spans": [ { "bbox": [ 105, 117, 479, 129 ], "score": 1.0, "content": "complementary to model quantization studies [35, 38, 28] that use fewer bits for the weights.", "type": "text", "cross_page": true } ], "index": 4 } ], "index": 57.5, "bbox_fs": [ 106, 648, 505, 671 ] } ] }, { "preproc_blocks": [ { "type": "text", "bbox": [ 107, 73, 505, 127 ], "lines": [ { "bbox": [ 105, 73, 505, 85 ], "spans": [ { "bbox": [ 105, 73, 505, 85 ], "score": 1.0, "content": "not result in inference speedups on actual hardware [9]. Structured pruning based approaches [47, 22,", "type": "text" } ], "index": 0 }, { "bbox": [ 105, 83, 506, 96 ], "spans": [ { "bbox": [ 105, 83, 506, 96 ], "score": 1.0, "content": "43] account for this challenge by leveraging sparsity in hardware in CPU and GPU architectures [1].", "type": "text" } ], "index": 1 }, { "bbox": [ 105, 93, 505, 108 ], "spans": [ { "bbox": [ 105, 93, 505, 108 ], "score": 1.0, "content": "Our paper is different from pruning approaches in that it relies on dynamic sparsity wherein the", "type": "text" } ], "index": 2 }, { "bbox": [ 105, 105, 506, 118 ], "spans": [ { "bbox": [ 105, 105, 506, 118 ], "score": 1.0, "content": "feedforward layer loads only a subset of weights in the layer for each token. Our approach is", "type": "text" } ], "index": 3 }, { "bbox": [ 105, 117, 479, 129 ], "spans": [ { "bbox": [ 105, 117, 479, 129 ], "score": 1.0, "content": "complementary to model quantization studies [35, 38, 28] that use fewer bits for the weights.", "type": "text" } ], "index": 4 } ], "index": 2 }, { "type": "text", "bbox": [ 107, 132, 505, 187 ], "lines": [ { "bbox": [ 106, 132, 505, 145 ], "spans": [ { "bbox": [ 106, 132, 505, 145 ], "score": 1.0, "content": "Model distillation. Several natural language models used for mobile inference [13, 39] rely on", "type": "text" } ], "index": 5 }, { "bbox": [ 105, 143, 506, 156 ], "spans": [ { "bbox": [ 105, 143, 506, 156 ], "score": 1.0, "content": "distillation [32] to speed up inference from the pretrained large models. For example, [18] pretrains a", "type": "text" } ], "index": 6 }, { "bbox": [ 105, 154, 507, 168 ], "spans": [ { "bbox": [ 105, 154, 507, 168 ], "score": 1.0, "content": "large model and uses knowledge distillation along with pruning to get more than 10x faster inference.", "type": "text" } ], "index": 7 }, { "bbox": [ 105, 165, 506, 178 ], "spans": [ { "bbox": [ 105, 165, 506, 178 ], "score": 1.0, "content": "Instead of distilling a large model, our approach speeds up inference by reducing the number of", "type": "text" } ], "index": 8 }, { "bbox": [ 105, 177, 281, 189 ], "spans": [ { "bbox": [ 105, 177, 281, 189 ], "score": 1.0, "content": "weights loaded in memory from the model.", "type": "text" } ], "index": 9 } ], "index": 7 }, { "type": "text", "bbox": [ 106, 192, 505, 280 ], "lines": [ { "bbox": [ 106, 193, 506, 205 ], "spans": [ { "bbox": [ 106, 193, 506, 205 ], "score": 1.0, "content": "Sparse attention. Sparse attention-based approaches have made the attention layer more efficient,", "type": "text" } ], "index": 10 }, { "bbox": [ 105, 203, 507, 217 ], "spans": [ { "bbox": [ 105, 203, 507, 217 ], "score": 1.0, "content": "especially for long sequences, by incorporating additional combinatorial mechanisms, as in [40],", "type": "text" } ], "index": 11 }, { "bbox": [ 106, 215, 506, 227 ], "spans": [ { "bbox": [ 106, 215, 506, 227 ], "score": 1.0, "content": "or selecting a subset of tokens this layer attends to [31, 5, 19, 37, 15, 4] or other approaches [12].", "type": "text" } ], "index": 12 }, { "bbox": [ 106, 226, 506, 238 ], "spans": [ { "bbox": [ 106, 226, 506, 238 ], "score": 1.0, "content": "Our work is complementary to these approaches for sparse attention and reuses the advances on", "type": "text" } ], "index": 13 }, { "bbox": [ 105, 236, 506, 249 ], "spans": [ { "bbox": [ 105, 236, 506, 249 ], "score": 1.0, "content": "SOTA therein. Inference speedups in the attention layers also use bottleneck layers [39] or grouped", "type": "text" } ], "index": 14 }, { "bbox": [ 105, 247, 506, 261 ], "spans": [ { "bbox": [ 105, 247, 506, 261 ], "score": 1.0, "content": "convolutions [13]. Our work extends beyond the idea of grouped convolutions approach because", "type": "text" } ], "index": 15 }, { "bbox": [ 106, 258, 505, 270 ], "spans": [ { "bbox": [ 106, 258, 505, 270 ], "score": 1.0, "content": "each attention head is limited to using only a fixed part of the embedding while our work is able to", "type": "text" } ], "index": 16 }, { "bbox": [ 105, 269, 421, 281 ], "spans": [ { "bbox": [ 105, 269, 421, 281 ], "score": 1.0, "content": "permute the embeddings to improve model quality; see Section 3.2 for details.", "type": "text" } ], "index": 17 } ], "index": 13.5 }, { "type": "text", "bbox": [ 107, 285, 505, 362 ], "lines": [ { "bbox": [ 105, 285, 505, 298 ], "spans": [ { "bbox": [ 105, 285, 505, 298 ], "score": 1.0, "content": "Tensor Decomposition. The approaches discussed above significantly improve Transformer speed", "type": "text" } ], "index": 18 }, { "bbox": [ 106, 297, 506, 309 ], "spans": [ { "bbox": [ 106, 297, 506, 309 ], "score": 1.0, "content": "and handling of long sequences, however none of them addresses the fundamental scaling issue: even", "type": "text" } ], "index": 19 }, { "bbox": [ 105, 306, 505, 321 ], "spans": [ { "bbox": [ 105, 306, 505, 321 ], "score": 1.0, "content": "if we distill into a smaller model, quantize it and prune a percentage of the weights, the complexity", "type": "text" } ], "index": 20 }, { "bbox": [ 105, 318, 505, 330 ], "spans": [ { "bbox": [ 105, 319, 222, 330 ], "score": 1.0, "content": "still grows quadratically with", "type": "text" }, { "bbox": [ 222, 318, 246, 329 ], "score": 0.91, "content": "d _ { \\mathrm { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 246, 319, 505, 330 ], "score": 1.0, "content": ". The final approach, which does attack this scaling issue, is called", "type": "text" } ], "index": 21 }, { "bbox": [ 105, 329, 505, 342 ], "spans": [ { "bbox": [ 105, 329, 505, 342 ], "score": 1.0, "content": "tensor decompositions in [11]. Unluckily, as the authors there note, the approach is most effective", "type": "text" } ], "index": 22 }, { "bbox": [ 105, 340, 505, 353 ], "spans": [ { "bbox": [ 105, 340, 505, 353 ], "score": 1.0, "content": "in dealing with large input and output embedding matrices and tends to produce lower performance", "type": "text" } ], "index": 23 }, { "bbox": [ 106, 352, 340, 362 ], "spans": [ { "bbox": [ 106, 352, 340, 362 ], "score": 1.0, "content": "than unstructured models if used inside the decoder block.", "type": "text" } ], "index": 24 } ], "index": 21 }, { "type": "text", "bbox": [ 107, 367, 505, 444 ], "lines": [ { "bbox": [ 106, 367, 505, 380 ], "spans": [ { "bbox": [ 106, 367, 505, 380 ], "score": 1.0, "content": "Sparse feedforward. Mixture of experts approaches have been shown to achieve computational", "type": "text" } ], "index": 25 }, { "bbox": [ 105, 378, 505, 390 ], "spans": [ { "bbox": [ 105, 378, 505, 390 ], "score": 1.0, "content": "efficiency in training [33, 21, 34], scaling up to a trillion parameters [8]. The key idea is to partition", "type": "text" } ], "index": 26 }, { "bbox": [ 105, 389, 505, 402 ], "spans": [ { "bbox": [ 105, 389, 120, 402 ], "score": 1.0, "content": "the", "type": "text" }, { "bbox": [ 121, 389, 132, 400 ], "score": 0.87, "content": "d _ { \\mathrm { f f } }", "type": "inline_equation" }, { "bbox": [ 133, 389, 505, 402 ], "score": 1.0, "content": "-sized dimension into parts (called experts) and retrieve only one part per token, which reduces", "type": "text" } ], "index": 27 }, { "bbox": [ 105, 399, 506, 414 ], "spans": [ { "bbox": [ 105, 399, 295, 414 ], "score": 1.0, "content": "the complexity of the feedforward block from", "type": "text" }, { "bbox": [ 296, 400, 336, 411 ], "score": 0.92, "content": "2 d _ { \\mathrm { m o d e l } } d _ { \\mathrm { f f } }", "type": "inline_equation" }, { "bbox": [ 336, 399, 347, 414 ], "score": 1.0, "content": "to", "type": "text" }, { "bbox": [ 348, 400, 418, 412 ], "score": 0.92, "content": "2 d _ { \\mathrm { m o d e l } } d _ { \\mathrm { f f } } / n _ { \\mathrm { e x p e r t s } }", "type": "inline_equation" }, { "bbox": [ 419, 399, 506, 414 ], "score": 1.0, "content": ". These speedups are", "type": "text" } ], "index": 28 }, { "bbox": [ 105, 411, 505, 423 ], "spans": [ { "bbox": [ 105, 411, 505, 423 ], "score": 1.0, "content": "mostly measured in training speed, and the method focuses on feedforward blocks. In contrast to", "type": "text" } ], "index": 29 }, { "bbox": [ 105, 421, 505, 435 ], "spans": [ { "bbox": [ 105, 421, 505, 435 ], "score": 1.0, "content": "prior methods, we train a full weight matrix and then only activate specific parts of it for each input", "type": "text" } ], "index": 30 }, { "bbox": [ 105, 433, 267, 445 ], "spans": [ { "bbox": [ 105, 433, 267, 445 ], "score": 1.0, "content": "token during decoding; see Section 3.1.", "type": "text" } ], "index": 31 } ], "index": 28 }, { "type": "title", "bbox": [ 107, 460, 214, 474 ], "lines": [ { "bbox": [ 104, 458, 216, 478 ], "spans": [ { "bbox": [ 104, 458, 216, 478 ], "score": 1.0, "content": "3 Sparse is Enough", "type": "text" } ], "index": 32 } ], "index": 32 }, { "type": "text", "bbox": [ 107, 486, 505, 530 ], "lines": [ { "bbox": [ 105, 486, 506, 499 ], "spans": [ { "bbox": [ 105, 486, 506, 499 ], "score": 1.0, "content": "We study how to sparsify every part of the Transformer model—otherwise the non-sparse parts", "type": "text" } ], "index": 33 }, { "bbox": [ 106, 497, 505, 509 ], "spans": [ { "bbox": [ 106, 497, 505, 509 ], "score": 1.0, "content": "dominate decoding time and become a bottleneck. This means we need sparse equivalents for the", "type": "text" } ], "index": 34 }, { "bbox": [ 105, 507, 506, 521 ], "spans": [ { "bbox": [ 105, 507, 506, 521 ], "score": 1.0, "content": "feedforward blocks, for the dense Q, K, V and output layers in attention, and for the final dense layer", "type": "text" } ], "index": 35 }, { "bbox": [ 105, 518, 221, 531 ], "spans": [ { "bbox": [ 105, 518, 221, 531 ], "score": 1.0, "content": "before the softmax and loss.", "type": "text" } ], "index": 36 } ], "index": 34.5 }, { "type": "title", "bbox": [ 108, 544, 244, 556 ], "lines": [ { "bbox": [ 105, 543, 246, 559 ], "spans": [ { "bbox": [ 105, 543, 246, 559 ], "score": 1.0, "content": "3.1 Sparse Feedforward Layer", "type": "text" } ], "index": 37 } ], "index": 37 }, { "type": "text", "bbox": [ 107, 565, 505, 609 ], "lines": [ { "bbox": [ 106, 565, 505, 577 ], "spans": [ { "bbox": [ 106, 565, 505, 577 ], "score": 1.0, "content": "In a baseline Transformer, decoding speed is dominated by the execution cost of the feedforward", "type": "text" } ], "index": 38 }, { "bbox": [ 105, 576, 505, 588 ], "spans": [ { "bbox": [ 105, 576, 505, 588 ], "score": 1.0, "content": "block. Recall that this block consists of two fully-connected (dense) layers with a ReLU nonlinearity", "type": "text" } ], "index": 39 }, { "bbox": [ 105, 587, 504, 599 ], "spans": [ { "bbox": [ 105, 587, 492, 599 ], "score": 1.0, "content": "in between. The dimensionality of activation vectors between these 2 layers is usually denoted by", "type": "text" }, { "bbox": [ 492, 587, 504, 598 ], "score": 0.84, "content": "d _ { \\mathrm { f f } }", "type": "inline_equation" } ], "index": 40 }, { "bbox": [ 105, 597, 492, 611 ], "spans": [ { "bbox": [ 105, 597, 460, 611 ], "score": 1.0, "content": "and is often 4 or 8 times larger than the dimensionality of the activations in other places", "type": "text" }, { "bbox": [ 461, 598, 487, 609 ], "score": 0.83, "content": "[ d _ { \\mathrm { m o d e l } } ]", "type": "inline_equation" }, { "bbox": [ 487, 597, 492, 611 ], "score": 1.0, "content": ").", "type": "text" } ], "index": 41 } ], "index": 39.5 }, { "type": "text", "bbox": [ 106, 614, 505, 691 ], "lines": [ { "bbox": [ 105, 613, 505, 626 ], "spans": [ { "bbox": [ 105, 613, 505, 626 ], "score": 1.0, "content": "We make use of the structure of the feedforward block to sparsify it. One main observation is that the", "type": "text" } ], "index": 42 }, { "bbox": [ 105, 624, 505, 637 ], "spans": [ { "bbox": [ 105, 624, 505, 637 ], "score": 1.0, "content": "ReLU in the middle creates a lot of zeros2. We impose a fixed structure on this middle activation", "type": "text" } ], "index": 43 }, { "bbox": [ 104, 635, 506, 649 ], "spans": [ { "bbox": [ 104, 635, 268, 649 ], "score": 1.0, "content": "vector: only one float in every block of", "type": "text" }, { "bbox": [ 268, 636, 279, 646 ], "score": 0.78, "content": "N", "type": "inline_equation" }, { "bbox": [ 279, 635, 506, 649 ], "score": 1.0, "content": "will be allowed to be non-zero. Prior techniques prune", "type": "text" } ], "index": 44 }, { "bbox": [ 106, 647, 505, 659 ], "spans": [ { "bbox": [ 106, 647, 505, 659 ], "score": 1.0, "content": "weights or blocks from weight matrices and can be referred to as static sparsity. Our proposed", "type": "text" } ], "index": 45 }, { "bbox": [ 105, 658, 505, 670 ], "spans": [ { "bbox": [ 105, 658, 505, 670 ], "score": 1.0, "content": "technique will train a full weight matrix but only activate specific parts of it for each input token", "type": "text" } ], "index": 46 }, { "bbox": [ 106, 669, 505, 681 ], "spans": [ { "bbox": [ 106, 669, 505, 681 ], "score": 1.0, "content": "during decoding. We call this dynamic sparsity, because the model dynamically selects only a fraction", "type": "text" } ], "index": 47 }, { "bbox": [ 105, 679, 370, 693 ], "spans": [ { "bbox": [ 105, 679, 370, 693 ], "score": 1.0, "content": "of its parameters, and the selection is independent for each token.", "type": "text" } ], "index": 48 } ], "index": 45 } ], "page_idx": 2, "page_size": [ 612, 792 ], "discarded_blocks": [ { "type": "discarded", "bbox": [ 107, 701, 505, 722 ], "lines": [ { "bbox": [ 118, 700, 505, 713 ], "spans": [ { "bbox": [ 118, 700, 505, 713 ], "score": 1.0, "content": "2GeLU is another non-linearity often used in the Transformer feedforward block. Table 1 in [26] shows the", "type": "text" } ] }, { "bbox": [ 106, 712, 504, 723 ], "spans": [ { "bbox": [ 106, 712, 504, 723 ], "score": 1.0, "content": "same final loss for ReLU and GeLU on the C4 dataset, though, so in this work for simplicity, we focus on ReLU.", "type": "text" } ] } ] }, { "type": "discarded", "bbox": [ 302, 741, 309, 750 ], "lines": [ { "bbox": [ 301, 740, 310, 752 ], "spans": [ { "bbox": [ 301, 740, 310, 752 ], "score": 1.0, "content": "3", "type": "text" } ] } ] } ], "para_blocks": [ { "type": "text", "bbox": [ 107, 73, 505, 127 ], "lines": [], "index": 2, "bbox_fs": [ 105, 73, 506, 129 ], "lines_deleted": true }, { "type": "text", "bbox": [ 107, 132, 505, 187 ], "lines": [ { "bbox": [ 106, 132, 505, 145 ], "spans": [ { "bbox": [ 106, 132, 505, 145 ], "score": 1.0, "content": "Model distillation. Several natural language models used for mobile inference [13, 39] rely on", "type": "text" } ], "index": 5 }, { "bbox": [ 105, 143, 506, 156 ], "spans": [ { "bbox": [ 105, 143, 506, 156 ], "score": 1.0, "content": "distillation [32] to speed up inference from the pretrained large models. For example, [18] pretrains a", "type": "text" } ], "index": 6 }, { "bbox": [ 105, 154, 507, 168 ], "spans": [ { "bbox": [ 105, 154, 507, 168 ], "score": 1.0, "content": "large model and uses knowledge distillation along with pruning to get more than 10x faster inference.", "type": "text" } ], "index": 7 }, { "bbox": [ 105, 165, 506, 178 ], "spans": [ { "bbox": [ 105, 165, 506, 178 ], "score": 1.0, "content": "Instead of distilling a large model, our approach speeds up inference by reducing the number of", "type": "text" } ], "index": 8 }, { "bbox": [ 105, 177, 281, 189 ], "spans": [ { "bbox": [ 105, 177, 281, 189 ], "score": 1.0, "content": "weights loaded in memory from the model.", "type": "text" } ], "index": 9 } ], "index": 7, "bbox_fs": [ 105, 132, 507, 189 ] }, { "type": "text", "bbox": [ 106, 192, 505, 280 ], "lines": [ { "bbox": [ 106, 193, 506, 205 ], "spans": [ { "bbox": [ 106, 193, 506, 205 ], "score": 1.0, "content": "Sparse attention. Sparse attention-based approaches have made the attention layer more efficient,", "type": "text" } ], "index": 10 }, { "bbox": [ 105, 203, 507, 217 ], "spans": [ { "bbox": [ 105, 203, 507, 217 ], "score": 1.0, "content": "especially for long sequences, by incorporating additional combinatorial mechanisms, as in [40],", "type": "text" } ], "index": 11 }, { "bbox": [ 106, 215, 506, 227 ], "spans": [ { "bbox": [ 106, 215, 506, 227 ], "score": 1.0, "content": "or selecting a subset of tokens this layer attends to [31, 5, 19, 37, 15, 4] or other approaches [12].", "type": "text" } ], "index": 12 }, { "bbox": [ 106, 226, 506, 238 ], "spans": [ { "bbox": [ 106, 226, 506, 238 ], "score": 1.0, "content": "Our work is complementary to these approaches for sparse attention and reuses the advances on", "type": "text" } ], "index": 13 }, { "bbox": [ 105, 236, 506, 249 ], "spans": [ { "bbox": [ 105, 236, 506, 249 ], "score": 1.0, "content": "SOTA therein. Inference speedups in the attention layers also use bottleneck layers [39] or grouped", "type": "text" } ], "index": 14 }, { "bbox": [ 105, 247, 506, 261 ], "spans": [ { "bbox": [ 105, 247, 506, 261 ], "score": 1.0, "content": "convolutions [13]. Our work extends beyond the idea of grouped convolutions approach because", "type": "text" } ], "index": 15 }, { "bbox": [ 106, 258, 505, 270 ], "spans": [ { "bbox": [ 106, 258, 505, 270 ], "score": 1.0, "content": "each attention head is limited to using only a fixed part of the embedding while our work is able to", "type": "text" } ], "index": 16 }, { "bbox": [ 105, 269, 421, 281 ], "spans": [ { "bbox": [ 105, 269, 421, 281 ], "score": 1.0, "content": "permute the embeddings to improve model quality; see Section 3.2 for details.", "type": "text" } ], "index": 17 } ], "index": 13.5, "bbox_fs": [ 105, 193, 507, 281 ] }, { "type": "text", "bbox": [ 107, 285, 505, 362 ], "lines": [ { "bbox": [ 105, 285, 505, 298 ], "spans": [ { "bbox": [ 105, 285, 505, 298 ], "score": 1.0, "content": "Tensor Decomposition. The approaches discussed above significantly improve Transformer speed", "type": "text" } ], "index": 18 }, { "bbox": [ 106, 297, 506, 309 ], "spans": [ { "bbox": [ 106, 297, 506, 309 ], "score": 1.0, "content": "and handling of long sequences, however none of them addresses the fundamental scaling issue: even", "type": "text" } ], "index": 19 }, { "bbox": [ 105, 306, 505, 321 ], "spans": [ { "bbox": [ 105, 306, 505, 321 ], "score": 1.0, "content": "if we distill into a smaller model, quantize it and prune a percentage of the weights, the complexity", "type": "text" } ], "index": 20 }, { "bbox": [ 105, 318, 505, 330 ], "spans": [ { "bbox": [ 105, 319, 222, 330 ], "score": 1.0, "content": "still grows quadratically with", "type": "text" }, { "bbox": [ 222, 318, 246, 329 ], "score": 0.91, "content": "d _ { \\mathrm { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 246, 319, 505, 330 ], "score": 1.0, "content": ". The final approach, which does attack this scaling issue, is called", "type": "text" } ], "index": 21 }, { "bbox": [ 105, 329, 505, 342 ], "spans": [ { "bbox": [ 105, 329, 505, 342 ], "score": 1.0, "content": "tensor decompositions in [11]. Unluckily, as the authors there note, the approach is most effective", "type": "text" } ], "index": 22 }, { "bbox": [ 105, 340, 505, 353 ], "spans": [ { "bbox": [ 105, 340, 505, 353 ], "score": 1.0, "content": "in dealing with large input and output embedding matrices and tends to produce lower performance", "type": "text" } ], "index": 23 }, { "bbox": [ 106, 352, 340, 362 ], "spans": [ { "bbox": [ 106, 352, 340, 362 ], "score": 1.0, "content": "than unstructured models if used inside the decoder block.", "type": "text" } ], "index": 24 } ], "index": 21, "bbox_fs": [ 105, 285, 506, 362 ] }, { "type": "text", "bbox": [ 107, 367, 505, 444 ], "lines": [ { "bbox": [ 106, 367, 505, 380 ], "spans": [ { "bbox": [ 106, 367, 505, 380 ], "score": 1.0, "content": "Sparse feedforward. Mixture of experts approaches have been shown to achieve computational", "type": "text" } ], "index": 25 }, { "bbox": [ 105, 378, 505, 390 ], "spans": [ { "bbox": [ 105, 378, 505, 390 ], "score": 1.0, "content": "efficiency in training [33, 21, 34], scaling up to a trillion parameters [8]. The key idea is to partition", "type": "text" } ], "index": 26 }, { "bbox": [ 105, 389, 505, 402 ], "spans": [ { "bbox": [ 105, 389, 120, 402 ], "score": 1.0, "content": "the", "type": "text" }, { "bbox": [ 121, 389, 132, 400 ], "score": 0.87, "content": "d _ { \\mathrm { f f } }", "type": "inline_equation" }, { "bbox": [ 133, 389, 505, 402 ], "score": 1.0, "content": "-sized dimension into parts (called experts) and retrieve only one part per token, which reduces", "type": "text" } ], "index": 27 }, { "bbox": [ 105, 399, 506, 414 ], "spans": [ { "bbox": [ 105, 399, 295, 414 ], "score": 1.0, "content": "the complexity of the feedforward block from", "type": "text" }, { "bbox": [ 296, 400, 336, 411 ], "score": 0.92, "content": "2 d _ { \\mathrm { m o d e l } } d _ { \\mathrm { f f } }", "type": "inline_equation" }, { "bbox": [ 336, 399, 347, 414 ], "score": 1.0, "content": "to", "type": "text" }, { "bbox": [ 348, 400, 418, 412 ], "score": 0.92, "content": "2 d _ { \\mathrm { m o d e l } } d _ { \\mathrm { f f } } / n _ { \\mathrm { e x p e r t s } }", "type": "inline_equation" }, { "bbox": [ 419, 399, 506, 414 ], "score": 1.0, "content": ". These speedups are", "type": "text" } ], "index": 28 }, { "bbox": [ 105, 411, 505, 423 ], "spans": [ { "bbox": [ 105, 411, 505, 423 ], "score": 1.0, "content": "mostly measured in training speed, and the method focuses on feedforward blocks. In contrast to", "type": "text" } ], "index": 29 }, { "bbox": [ 105, 421, 505, 435 ], "spans": [ { "bbox": [ 105, 421, 505, 435 ], "score": 1.0, "content": "prior methods, we train a full weight matrix and then only activate specific parts of it for each input", "type": "text" } ], "index": 30 }, { "bbox": [ 105, 433, 267, 445 ], "spans": [ { "bbox": [ 105, 433, 267, 445 ], "score": 1.0, "content": "token during decoding; see Section 3.1.", "type": "text" } ], "index": 31 } ], "index": 28, "bbox_fs": [ 105, 367, 506, 445 ] }, { "type": "title", "bbox": [ 107, 460, 214, 474 ], "lines": [ { "bbox": [ 104, 458, 216, 478 ], "spans": [ { "bbox": [ 104, 458, 216, 478 ], "score": 1.0, "content": "3 Sparse is Enough", "type": "text" } ], "index": 32 } ], "index": 32 }, { "type": "text", "bbox": [ 107, 486, 505, 530 ], "lines": [ { "bbox": [ 105, 486, 506, 499 ], "spans": [ { "bbox": [ 105, 486, 506, 499 ], "score": 1.0, "content": "We study how to sparsify every part of the Transformer model—otherwise the non-sparse parts", "type": "text" } ], "index": 33 }, { "bbox": [ 106, 497, 505, 509 ], "spans": [ { "bbox": [ 106, 497, 505, 509 ], "score": 1.0, "content": "dominate decoding time and become a bottleneck. This means we need sparse equivalents for the", "type": "text" } ], "index": 34 }, { "bbox": [ 105, 507, 506, 521 ], "spans": [ { "bbox": [ 105, 507, 506, 521 ], "score": 1.0, "content": "feedforward blocks, for the dense Q, K, V and output layers in attention, and for the final dense layer", "type": "text" } ], "index": 35 }, { "bbox": [ 105, 518, 221, 531 ], "spans": [ { "bbox": [ 105, 518, 221, 531 ], "score": 1.0, "content": "before the softmax and loss.", "type": "text" } ], "index": 36 } ], "index": 34.5, "bbox_fs": [ 105, 486, 506, 531 ] }, { "type": "title", "bbox": [ 108, 544, 244, 556 ], "lines": [ { "bbox": [ 105, 543, 246, 559 ], "spans": [ { "bbox": [ 105, 543, 246, 559 ], "score": 1.0, "content": "3.1 Sparse Feedforward Layer", "type": "text" } ], "index": 37 } ], "index": 37 }, { "type": "text", "bbox": [ 107, 565, 505, 609 ], "lines": [ { "bbox": [ 106, 565, 505, 577 ], "spans": [ { "bbox": [ 106, 565, 505, 577 ], "score": 1.0, "content": "In a baseline Transformer, decoding speed is dominated by the execution cost of the feedforward", "type": "text" } ], "index": 38 }, { "bbox": [ 105, 576, 505, 588 ], "spans": [ { "bbox": [ 105, 576, 505, 588 ], "score": 1.0, "content": "block. Recall that this block consists of two fully-connected (dense) layers with a ReLU nonlinearity", "type": "text" } ], "index": 39 }, { "bbox": [ 105, 587, 504, 599 ], "spans": [ { "bbox": [ 105, 587, 492, 599 ], "score": 1.0, "content": "in between. The dimensionality of activation vectors between these 2 layers is usually denoted by", "type": "text" }, { "bbox": [ 492, 587, 504, 598 ], "score": 0.84, "content": "d _ { \\mathrm { f f } }", "type": "inline_equation" } ], "index": 40 }, { "bbox": [ 105, 597, 492, 611 ], "spans": [ { "bbox": [ 105, 597, 460, 611 ], "score": 1.0, "content": "and is often 4 or 8 times larger than the dimensionality of the activations in other places", "type": "text" }, { "bbox": [ 461, 598, 487, 609 ], "score": 0.83, "content": "[ d _ { \\mathrm { m o d e l } } ]", "type": "inline_equation" }, { "bbox": [ 487, 597, 492, 611 ], "score": 1.0, "content": ").", "type": "text" } ], "index": 41 } ], "index": 39.5, "bbox_fs": [ 105, 565, 505, 611 ] }, { "type": "text", "bbox": [ 106, 614, 505, 691 ], "lines": [ { "bbox": [ 105, 613, 505, 626 ], "spans": [ { "bbox": [ 105, 613, 505, 626 ], "score": 1.0, "content": "We make use of the structure of the feedforward block to sparsify it. One main observation is that the", "type": "text" } ], "index": 42 }, { "bbox": [ 105, 624, 505, 637 ], "spans": [ { "bbox": [ 105, 624, 505, 637 ], "score": 1.0, "content": "ReLU in the middle creates a lot of zeros2. We impose a fixed structure on this middle activation", "type": "text" } ], "index": 43 }, { "bbox": [ 104, 635, 506, 649 ], "spans": [ { "bbox": [ 104, 635, 268, 649 ], "score": 1.0, "content": "vector: only one float in every block of", "type": "text" }, { "bbox": [ 268, 636, 279, 646 ], "score": 0.78, "content": "N", "type": "inline_equation" }, { "bbox": [ 279, 635, 506, 649 ], "score": 1.0, "content": "will be allowed to be non-zero. Prior techniques prune", "type": "text" } ], "index": 44 }, { "bbox": [ 106, 647, 505, 659 ], "spans": [ { "bbox": [ 106, 647, 505, 659 ], "score": 1.0, "content": "weights or blocks from weight matrices and can be referred to as static sparsity. Our proposed", "type": "text" } ], "index": 45 }, { "bbox": [ 105, 658, 505, 670 ], "spans": [ { "bbox": [ 105, 658, 505, 670 ], "score": 1.0, "content": "technique will train a full weight matrix but only activate specific parts of it for each input token", "type": "text" } ], "index": 46 }, { "bbox": [ 106, 669, 505, 681 ], "spans": [ { "bbox": [ 106, 669, 505, 681 ], "score": 1.0, "content": "during decoding. We call this dynamic sparsity, because the model dynamically selects only a fraction", "type": "text" } ], "index": 47 }, { "bbox": [ 105, 679, 370, 693 ], "spans": [ { "bbox": [ 105, 679, 370, 693 ], "score": 1.0, "content": "of its parameters, and the selection is independent for each token.", "type": "text" } ], "index": 48 } ], "index": 45, "bbox_fs": [ 104, 613, 506, 693 ] } ] }, { "preproc_blocks": [ { "type": "image", "bbox": [ 111, 69, 483, 213 ], "blocks": [ { "type": "image_body", "bbox": [ 111, 69, 483, 213 ], "group_id": 0, "lines": [ { "bbox": [ 111, 69, 483, 213 ], "spans": [ { "bbox": [ 111, 69, 483, 213 ], "score": 0.968, "type": "image", "image_path": "593137b37c83d7df86f494b50bcc2a998301a4b5b86badfe59a0fd29bcaaa3c8.jpg" } ] } ], "index": 1, "virtual_lines": [ { "bbox": [ 111, 69, 483, 117.0 ], "spans": [], "index": 0 }, { "bbox": [ 111, 117.0, 483, 165.0 ], "spans": [], "index": 1 }, { "bbox": [ 111, 165.0, 483, 213.0 ], "spans": [], "index": 2 } ] }, { "type": "image_caption", "bbox": [ 106, 226, 505, 266 ], "group_id": 0, "lines": [ { "bbox": [ 105, 225, 505, 238 ], "spans": [ { "bbox": [ 105, 225, 505, 238 ], "score": 1.0, "content": "Figure 2: (a) Sparse Feedforward Layer only activates 1 in N rows/columns of each block to reduce the decoding", "type": "text" } ], "index": 3 }, { "bbox": [ 106, 236, 505, 247 ], "spans": [ { "bbox": [ 106, 236, 505, 247 ], "score": 1.0, "content": "time. Here only two rows/colums in blocks of size 4 are loaded while the weights in dark red are not loaded", "type": "text" } ], "index": 4 }, { "bbox": [ 104, 244, 506, 258 ], "spans": [ { "bbox": [ 104, 244, 506, 258 ], "score": 1.0, "content": "from memory during inference. (b) Sparse Feedforward Controller with the output of 2 blocks of size 4 (1 in 4", "type": "text" } ], "index": 5 }, { "bbox": [ 104, 255, 142, 267 ], "spans": [ { "bbox": [ 104, 255, 142, 267 ], "score": 1.0, "content": "sparsity).", "type": "text" } ], "index": 6 } ], "index": 4.5 } ], "index": 2.75 }, { "type": "text", "bbox": [ 107, 288, 504, 311 ], "lines": [ { "bbox": [ 106, 288, 505, 300 ], "spans": [ { "bbox": [ 106, 288, 505, 300 ], "score": 1.0, "content": "We train a controller to determine which activation in each block can be non-zero; the rest will be set", "type": "text" } ], "index": 7 }, { "bbox": [ 106, 300, 247, 312 ], "spans": [ { "bbox": [ 106, 300, 247, 312 ], "score": 1.0, "content": "to zero. This can be represented as", "type": "text" } ], "index": 8 } ], "index": 7.5 }, { "type": "interline_equation", "bbox": [ 213, 316, 398, 349 ], "lines": [ { "bbox": [ 213, 316, 398, 349 ], "spans": [ { "bbox": [ 213, 316, 398, 349 ], "score": 0.74, "content": "\\begin{array} { c } { Y _ { \\mathrm { s p a r s e } } = \\operatorname* { m a x } ( 0 , x W _ { 1 } + b _ { 1 } ) \\odot \\mathrm { C o n t r o l l e r } ( x ) } \\\\ { \\mathrm { S p a r s e F F N } ( x ) = Y _ { \\mathrm { s p a r s e } } W _ { 2 } + b _ { 2 } } \\end{array}", "type": "interline_equation", "image_path": "258b63e35851013b6c8889410dc534e3a910a76688978c359a14b879a0ec28f0.jpg" } ] } ], "index": 9.5, "virtual_lines": [ { "bbox": [ 213, 316, 398, 332.5 ], "spans": [], "index": 9 }, { "bbox": [ 213, 332.5, 398, 349.0 ], "spans": [], "index": 10 } ] }, { "type": "text", "bbox": [ 107, 353, 505, 409 ], "lines": [ { "bbox": [ 106, 353, 505, 367 ], "spans": [ { "bbox": [ 106, 353, 133, 367 ], "score": 1.0, "content": "where", "type": "text" }, { "bbox": [ 133, 355, 142, 364 ], "score": 0.83, "content": "\\odot", "type": "inline_equation" }, { "bbox": [ 143, 353, 383, 367 ], "score": 1.0, "content": "is element-wise multiplication. Note that each activation in", "type": "text" }, { "bbox": [ 384, 354, 409, 365 ], "score": 0.89, "content": "Y _ { \\mathrm { s p a r s e } }", "type": "inline_equation" }, { "bbox": [ 409, 353, 505, 367 ], "score": 1.0, "content": "corresponds to a single", "type": "text" } ], "index": 11 }, { "bbox": [ 105, 364, 506, 377 ], "spans": [ { "bbox": [ 105, 364, 148, 377 ], "score": 1.0, "content": "column in", "type": "text" }, { "bbox": [ 149, 365, 163, 375 ], "score": 0.91, "content": "W _ { 1 }", "type": "inline_equation" }, { "bbox": [ 164, 364, 241, 377 ], "score": 1.0, "content": "and a single row in", "type": "text" }, { "bbox": [ 242, 365, 257, 375 ], "score": 0.89, "content": "W _ { 2 }", "type": "inline_equation" }, { "bbox": [ 257, 364, 405, 377 ], "score": 1.0, "content": ". Therefore, if we compute Controller", "type": "text" }, { "bbox": [ 405, 365, 419, 376 ], "score": 0.8, "content": "( x )", "type": "inline_equation" }, { "bbox": [ 419, 364, 506, 377 ], "score": 1.0, "content": "output first, we don’t", "type": "text" } ], "index": 12 }, { "bbox": [ 106, 375, 505, 387 ], "spans": [ { "bbox": [ 106, 375, 216, 387 ], "score": 1.0, "content": "have to use any columns in", "type": "text" }, { "bbox": [ 216, 375, 231, 386 ], "score": 0.89, "content": "W _ { 1 }", "type": "inline_equation" }, { "bbox": [ 231, 375, 291, 387 ], "score": 1.0, "content": "or any rows in", "type": "text" }, { "bbox": [ 291, 375, 307, 386 ], "score": 0.9, "content": "W _ { 2 }", "type": "inline_equation" }, { "bbox": [ 307, 375, 505, 387 ], "score": 1.0, "content": "that correspond to an activation set to zero by the", "type": "text" } ], "index": 13 }, { "bbox": [ 106, 386, 504, 399 ], "spans": [ { "bbox": [ 106, 386, 431, 399 ], "score": 1.0, "content": "controller. This allows for much faster decoding, as we have to process only 1 in", "type": "text" }, { "bbox": [ 431, 387, 442, 396 ], "score": 0.81, "content": "N", "type": "inline_equation" }, { "bbox": [ 442, 386, 489, 399 ], "score": 1.0, "content": "columns in", "type": "text" }, { "bbox": [ 489, 386, 504, 397 ], "score": 0.87, "content": "W _ { 1 }", "type": "inline_equation" } ], "index": 14 }, { "bbox": [ 106, 397, 243, 410 ], "spans": [ { "bbox": [ 106, 397, 155, 410 ], "score": 1.0, "content": "and rows in", "type": "text" }, { "bbox": [ 155, 397, 170, 408 ], "score": 0.88, "content": "W _ { 2 }", "type": "inline_equation" }, { "bbox": [ 171, 397, 243, 410 ], "score": 1.0, "content": "(see Figure 2(a)).", "type": "text" } ], "index": 15 } ], "index": 13 }, { "type": "text", "bbox": [ 106, 413, 505, 436 ], "lines": [ { "bbox": [ 106, 413, 506, 426 ], "spans": [ { "bbox": [ 106, 413, 506, 426 ], "score": 1.0, "content": "To design the controller to be computationally inexpensive, we project the input using a low-rank", "type": "text" } ], "index": 16 }, { "bbox": [ 106, 425, 496, 437 ], "spans": [ { "bbox": [ 106, 425, 496, 437 ], "score": 1.0, "content": "bottleneck dense layer. Figure 2(b) illustrates the controller which produces the output as follows", "type": "text" } ], "index": 17 } ], "index": 16.5 }, { "type": "interline_equation", "bbox": [ 191, 442, 418, 456 ], "lines": [ { "bbox": [ 191, 442, 418, 456 ], "spans": [ { "bbox": [ 191, 442, 418, 456 ], "score": 0.88, "content": "\\operatorname { C o n t r o l l e r } ( x ) = \\arg \\operatorname* { m a x } ( \\operatorname { R e s h a p e } ( x C _ { 1 } C _ { 2 } , ( - 1 , N ) ) )", "type": "interline_equation", "image_path": "3911bc8776a700476aaf11d9f08ad9adecb9d759dc7da64d599320fab7781467.jpg" } ] } ], "index": 18, "virtual_lines": [ { "bbox": [ 191, 442, 418, 456 ], "spans": [], "index": 18 } ] }, { "type": "text", "bbox": [ 105, 462, 453, 475 ], "lines": [ { "bbox": [ 104, 459, 450, 478 ], "spans": [ { "bbox": [ 104, 459, 133, 478 ], "score": 1.0, "content": "where", "type": "text" }, { "bbox": [ 133, 462, 209, 474 ], "score": 0.89, "content": "C _ { 1 } \\in \\mathbb { R } ^ { d _ { \\mathrm { m o d e l } } \\times d _ { \\mathrm { l o w r a n k } } }", "type": "inline_equation" }, { "bbox": [ 209, 459, 228, 478 ], "score": 1.0, "content": "and", "type": "text" }, { "bbox": [ 228, 462, 295, 474 ], "score": 0.92, "content": "C _ { 2 } \\in \\mathbb { R } ^ { d _ { \\mathrm { l o w r a n k } } \\times d _ { \\mathrm { f f } } }", "type": "inline_equation" }, { "bbox": [ 296, 459, 319, 478 ], "score": 1.0, "content": ", with", "type": "text" }, { "bbox": [ 320, 463, 349, 474 ], "score": 0.91, "content": "d _ { \\mathrm { l o w r a n k } }", "type": "inline_equation" }, { "bbox": [ 349, 459, 406, 478 ], "score": 1.0, "content": "usually set to", "type": "text" }, { "bbox": [ 406, 463, 450, 475 ], "score": 0.82, "content": "( d _ { \\mathrm { m o d e l } } / N )", "type": "inline_equation" } ], "index": 19 } ], "index": 19 }, { "type": "text", "bbox": [ 106, 479, 506, 600 ], "lines": [ { "bbox": [ 105, 479, 506, 492 ], "spans": [ { "bbox": [ 105, 479, 506, 492 ], "score": 1.0, "content": "During inference the controller uses a discrete argmax function, but during training the model uses a", "type": "text" } ], "index": 20 }, { "bbox": [ 106, 491, 505, 502 ], "spans": [ { "bbox": [ 106, 491, 505, 502 ], "score": 1.0, "content": "softmax to calculate and sample from a distribution. The model learns to select which row/column will", "type": "text" } ], "index": 21 }, { "bbox": [ 105, 501, 505, 514 ], "spans": [ { "bbox": [ 105, 501, 505, 514 ], "score": 1.0, "content": "be non-zero using the Gumbel-Softmax trick for discretization. To determine the active row/column in", "type": "text" } ], "index": 22 }, { "bbox": [ 106, 512, 506, 525 ], "spans": [ { "bbox": [ 106, 512, 506, 525 ], "score": 1.0, "content": "each block, we reparameterize sampling from a Bernoulli distribution by using the Gumbel-Softmax", "type": "text" } ], "index": 23 }, { "bbox": [ 106, 523, 506, 535 ], "spans": [ { "bbox": [ 106, 523, 506, 535 ], "score": 1.0, "content": "trick [25]. Instead of using the logits in each block to directly sample a binary value, we add", "type": "text" } ], "index": 24 }, { "bbox": [ 105, 533, 506, 546 ], "spans": [ { "bbox": [ 105, 533, 506, 546 ], "score": 1.0, "content": "independent noise from the Gumbel distribution to each of the logits, and then select the binary value", "type": "text" } ], "index": 25 }, { "bbox": [ 105, 545, 506, 557 ], "spans": [ { "bbox": [ 105, 545, 305, 557 ], "score": 1.0, "content": "with the highest logit (i.e., argmax) as the sample", "type": "text" }, { "bbox": [ 306, 546, 312, 555 ], "score": 0.77, "content": "z", "type": "inline_equation" }, { "bbox": [ 312, 545, 506, 557 ], "score": 1.0, "content": ". The argmax operation is not differentiable, but", "type": "text" } ], "index": 26 }, { "bbox": [ 105, 556, 507, 568 ], "spans": [ { "bbox": [ 105, 556, 507, 568 ], "score": 1.0, "content": "it can be approximated by a softmax with annealing temperature. Therefore, on the forward pass,", "type": "text" } ], "index": 27 }, { "bbox": [ 104, 565, 507, 581 ], "spans": [ { "bbox": [ 104, 565, 507, 581 ], "score": 1.0, "content": "we use the argmax to obtain a binary one-hot vector for each block, while on the backward pass,", "type": "text" } ], "index": 28 }, { "bbox": [ 104, 577, 506, 592 ], "spans": [ { "bbox": [ 104, 577, 506, 592 ], "score": 1.0, "content": "we approximate it with softmax. This approach is known as the Straight-Through Gumbel-Softmax", "type": "text" } ], "index": 29 }, { "bbox": [ 106, 589, 168, 601 ], "spans": [ { "bbox": [ 106, 589, 168, 601 ], "score": 1.0, "content": "estimator [14].", "type": "text" } ], "index": 30 } ], "index": 25 }, { "type": "text", "bbox": [ 107, 612, 505, 722 ], "lines": [ { "bbox": [ 105, 610, 505, 626 ], "spans": [ { "bbox": [ 105, 610, 505, 626 ], "score": 1.0, "content": "Ablations. We investigate the impact of sparse FF on the model equivalent to T5-large with varying", "type": "text" } ], "index": 31 }, { "bbox": [ 105, 622, 505, 637 ], "spans": [ { "bbox": [ 105, 622, 198, 637 ], "score": 1.0, "content": "levels of sparsity, with", "type": "text" }, { "bbox": [ 199, 624, 256, 635 ], "score": 0.84, "content": "d _ { \\mathrm { m o d e l } } = 1 0 2 4", "type": "inline_equation" }, { "bbox": [ 256, 622, 259, 637 ], "score": 1.0, "content": ",", "type": "text" }, { "bbox": [ 259, 624, 304, 635 ], "score": 0.84, "content": "d _ { \\mathrm { f f } } = 4 0 9 6", "type": "inline_equation" }, { "bbox": [ 304, 622, 505, 637 ], "score": 1.0, "content": ", and 16 attention heads. When we set the sparsity", "type": "text" } ], "index": 32 }, { "bbox": [ 105, 634, 505, 647 ], "spans": [ { "bbox": [ 105, 634, 140, 647 ], "score": 1.0, "content": "level to", "type": "text" }, { "bbox": [ 141, 635, 151, 644 ], "score": 0.79, "content": "N", "type": "inline_equation" }, { "bbox": [ 151, 634, 192, 647 ], "score": 1.0, "content": "(for e.g.", "type": "text" }, { "bbox": [ 192, 635, 231, 645 ], "score": 0.87, "content": "N = 6 4 ,", "type": "inline_equation" }, { "bbox": [ 231, 634, 338, 647 ], "score": 1.0, "content": ") then every block of size", "type": "text" }, { "bbox": [ 339, 635, 349, 644 ], "score": 0.79, "content": "N", "type": "inline_equation" }, { "bbox": [ 350, 634, 505, 647 ], "score": 1.0, "content": "has one non-zero value activated for", "type": "text" } ], "index": 33 }, { "bbox": [ 105, 645, 505, 658 ], "spans": [ { "bbox": [ 105, 645, 385, 658 ], "score": 1.0, "content": "inference. During training, the controller uses the bottleneck layer with", "type": "text" }, { "bbox": [ 386, 645, 439, 657 ], "score": 0.91, "content": "d _ { \\mathrm { l o w r a n k } } = 6 4", "type": "inline_equation" }, { "bbox": [ 439, 645, 505, 658 ], "score": 1.0, "content": "and temperature", "type": "text" } ], "index": 34 }, { "bbox": [ 105, 656, 505, 669 ], "spans": [ { "bbox": [ 105, 656, 505, 669 ], "score": 1.0, "content": "of Gumbel softmax estimator set to 0.1. To improve training stability, the controller in the forward", "type": "text" } ], "index": 35 }, { "bbox": [ 105, 667, 505, 680 ], "spans": [ { "bbox": [ 105, 667, 505, 680 ], "score": 1.0, "content": "pass will use the output of argmax that is a binary one-hot vector for each block with a probability", "type": "text" } ], "index": 36 }, { "bbox": [ 105, 677, 506, 690 ], "spans": [ { "bbox": [ 105, 677, 117, 690 ], "score": 1.0, "content": "of", "type": "text" }, { "bbox": [ 118, 678, 137, 689 ], "score": 0.88, "content": "30 \\%", "type": "inline_equation" }, { "bbox": [ 138, 677, 506, 690 ], "score": 1.0, "content": "and otherwise it uses the output of softmax. Table 2 and Figure 3 show the perplexity and", "type": "text" } ], "index": 37 }, { "bbox": [ 105, 689, 506, 702 ], "spans": [ { "bbox": [ 105, 689, 506, 702 ], "score": 1.0, "content": "the decoding time of this model with varying levels of sparsity in feedforward layer. As the level of", "type": "text" } ], "index": 38 }, { "bbox": [ 105, 700, 505, 712 ], "spans": [ { "bbox": [ 105, 700, 505, 712 ], "score": 1.0, "content": "sparsity increases from 0 to 128, we observe a significant decrease in the decoding time, while the", "type": "text" } ], "index": 39 }, { "bbox": [ 105, 711, 445, 723 ], "spans": [ { "bbox": [ 105, 711, 255, 723 ], "score": 1.0, "content": "neg-log-perplexity of the model with", "type": "text" }, { "bbox": [ 256, 711, 290, 721 ], "score": 0.91, "content": "N = 6 4", "type": "inline_equation" }, { "bbox": [ 290, 711, 445, 723 ], "score": 1.0, "content": "sparsity is comparable to the baseline.", "type": "text" } ], "index": 40 } ], "index": 35.5 } ], "page_idx": 3, "page_size": [ 612, 792 ], "discarded_blocks": [ { "type": "discarded", "bbox": [ 302, 742, 308, 750 ], "lines": [ { "bbox": [ 301, 741, 310, 752 ], "spans": [ { "bbox": [ 301, 741, 310, 752 ], "score": 1.0, "content": "", "type": "text", "height": 11, "width": 9 } ] } ] } ], "para_blocks": [ { "type": "image", "bbox": [ 111, 69, 483, 213 ], "blocks": [ { "type": "image_body", "bbox": [ 111, 69, 483, 213 ], "group_id": 0, "lines": [ { "bbox": [ 111, 69, 483, 213 ], "spans": [ { "bbox": [ 111, 69, 483, 213 ], "score": 0.968, "type": "image", "image_path": "593137b37c83d7df86f494b50bcc2a998301a4b5b86badfe59a0fd29bcaaa3c8.jpg" } ] } ], "index": 1, "virtual_lines": [ { "bbox": [ 111, 69, 483, 117.0 ], "spans": [], "index": 0 }, { "bbox": [ 111, 117.0, 483, 165.0 ], "spans": [], "index": 1 }, { "bbox": [ 111, 165.0, 483, 213.0 ], "spans": [], "index": 2 } ] }, { "type": "image_caption", "bbox": [ 106, 226, 505, 266 ], "group_id": 0, "lines": [ { "bbox": [ 105, 225, 505, 238 ], "spans": [ { "bbox": [ 105, 225, 505, 238 ], "score": 1.0, "content": "Figure 2: (a) Sparse Feedforward Layer only activates 1 in N rows/columns of each block to reduce the decoding", "type": "text" } ], "index": 3 }, { "bbox": [ 106, 236, 505, 247 ], "spans": [ { "bbox": [ 106, 236, 505, 247 ], "score": 1.0, "content": "time. Here only two rows/colums in blocks of size 4 are loaded while the weights in dark red are not loaded", "type": "text" } ], "index": 4 }, { "bbox": [ 104, 244, 506, 258 ], "spans": [ { "bbox": [ 104, 244, 506, 258 ], "score": 1.0, "content": "from memory during inference. (b) Sparse Feedforward Controller with the output of 2 blocks of size 4 (1 in 4", "type": "text" } ], "index": 5 }, { "bbox": [ 104, 255, 142, 267 ], "spans": [ { "bbox": [ 104, 255, 142, 267 ], "score": 1.0, "content": "sparsity).", "type": "text" } ], "index": 6 } ], "index": 4.5 } ], "index": 2.75 }, { "type": "text", "bbox": [ 107, 288, 504, 311 ], "lines": [ { "bbox": [ 106, 288, 505, 300 ], "spans": [ { "bbox": [ 106, 288, 505, 300 ], "score": 1.0, "content": "We train a controller to determine which activation in each block can be non-zero; the rest will be set", "type": "text" } ], "index": 7 }, { "bbox": [ 106, 300, 247, 312 ], "spans": [ { "bbox": [ 106, 300, 247, 312 ], "score": 1.0, "content": "to zero. This can be represented as", "type": "text" } ], "index": 8 } ], "index": 7.5, "bbox_fs": [ 106, 288, 505, 312 ] }, { "type": "interline_equation", "bbox": [ 213, 316, 398, 349 ], "lines": [ { "bbox": [ 213, 316, 398, 349 ], "spans": [ { "bbox": [ 213, 316, 398, 349 ], "score": 0.74, "content": "\\begin{array} { c } { Y _ { \\mathrm { s p a r s e } } = \\operatorname* { m a x } ( 0 , x W _ { 1 } + b _ { 1 } ) \\odot \\mathrm { C o n t r o l l e r } ( x ) } \\\\ { \\mathrm { S p a r s e F F N } ( x ) = Y _ { \\mathrm { s p a r s e } } W _ { 2 } + b _ { 2 } } \\end{array}", "type": "interline_equation", "image_path": "258b63e35851013b6c8889410dc534e3a910a76688978c359a14b879a0ec28f0.jpg" } ] } ], "index": 9.5, "virtual_lines": [ { "bbox": [ 213, 316, 398, 332.5 ], "spans": [], "index": 9 }, { "bbox": [ 213, 332.5, 398, 349.0 ], "spans": [], "index": 10 } ] }, { "type": "text", "bbox": [ 107, 353, 505, 409 ], "lines": [ { "bbox": [ 106, 353, 505, 367 ], "spans": [ { "bbox": [ 106, 353, 133, 367 ], "score": 1.0, "content": "where", "type": "text" }, { "bbox": [ 133, 355, 142, 364 ], "score": 0.83, "content": "\\odot", "type": "inline_equation" }, { "bbox": [ 143, 353, 383, 367 ], "score": 1.0, "content": "is element-wise multiplication. Note that each activation in", "type": "text" }, { "bbox": [ 384, 354, 409, 365 ], "score": 0.89, "content": "Y _ { \\mathrm { s p a r s e } }", "type": "inline_equation" }, { "bbox": [ 409, 353, 505, 367 ], "score": 1.0, "content": "corresponds to a single", "type": "text" } ], "index": 11 }, { "bbox": [ 105, 364, 506, 377 ], "spans": [ { "bbox": [ 105, 364, 148, 377 ], "score": 1.0, "content": "column in", "type": "text" }, { "bbox": [ 149, 365, 163, 375 ], "score": 0.91, "content": "W _ { 1 }", "type": "inline_equation" }, { "bbox": [ 164, 364, 241, 377 ], "score": 1.0, "content": "and a single row in", "type": "text" }, { "bbox": [ 242, 365, 257, 375 ], "score": 0.89, "content": "W _ { 2 }", "type": "inline_equation" }, { "bbox": [ 257, 364, 405, 377 ], "score": 1.0, "content": ". Therefore, if we compute Controller", "type": "text" }, { "bbox": [ 405, 365, 419, 376 ], "score": 0.8, "content": "( x )", "type": "inline_equation" }, { "bbox": [ 419, 364, 506, 377 ], "score": 1.0, "content": "output first, we don’t", "type": "text" } ], "index": 12 }, { "bbox": [ 106, 375, 505, 387 ], "spans": [ { "bbox": [ 106, 375, 216, 387 ], "score": 1.0, "content": "have to use any columns in", "type": "text" }, { "bbox": [ 216, 375, 231, 386 ], "score": 0.89, "content": "W _ { 1 }", "type": "inline_equation" }, { "bbox": [ 231, 375, 291, 387 ], "score": 1.0, "content": "or any rows in", "type": "text" }, { "bbox": [ 291, 375, 307, 386 ], "score": 0.9, "content": "W _ { 2 }", "type": "inline_equation" }, { "bbox": [ 307, 375, 505, 387 ], "score": 1.0, "content": "that correspond to an activation set to zero by the", "type": "text" } ], "index": 13 }, { "bbox": [ 106, 386, 504, 399 ], "spans": [ { "bbox": [ 106, 386, 431, 399 ], "score": 1.0, "content": "controller. This allows for much faster decoding, as we have to process only 1 in", "type": "text" }, { "bbox": [ 431, 387, 442, 396 ], "score": 0.81, "content": "N", "type": "inline_equation" }, { "bbox": [ 442, 386, 489, 399 ], "score": 1.0, "content": "columns in", "type": "text" }, { "bbox": [ 489, 386, 504, 397 ], "score": 0.87, "content": "W _ { 1 }", "type": "inline_equation" } ], "index": 14 }, { "bbox": [ 106, 397, 243, 410 ], "spans": [ { "bbox": [ 106, 397, 155, 410 ], "score": 1.0, "content": "and rows in", "type": "text" }, { "bbox": [ 155, 397, 170, 408 ], "score": 0.88, "content": "W _ { 2 }", "type": "inline_equation" }, { "bbox": [ 171, 397, 243, 410 ], "score": 1.0, "content": "(see Figure 2(a)).", "type": "text" } ], "index": 15 } ], "index": 13, "bbox_fs": [ 105, 353, 506, 410 ] }, { "type": "text", "bbox": [ 106, 413, 505, 436 ], "lines": [ { "bbox": [ 106, 413, 506, 426 ], "spans": [ { "bbox": [ 106, 413, 506, 426 ], "score": 1.0, "content": "To design the controller to be computationally inexpensive, we project the input using a low-rank", "type": "text" } ], "index": 16 }, { "bbox": [ 106, 425, 496, 437 ], "spans": [ { "bbox": [ 106, 425, 496, 437 ], "score": 1.0, "content": "bottleneck dense layer. Figure 2(b) illustrates the controller which produces the output as follows", "type": "text" } ], "index": 17 } ], "index": 16.5, "bbox_fs": [ 106, 413, 506, 437 ] }, { "type": "interline_equation", "bbox": [ 191, 442, 418, 456 ], "lines": [ { "bbox": [ 191, 442, 418, 456 ], "spans": [ { "bbox": [ 191, 442, 418, 456 ], "score": 0.88, "content": "\\operatorname { C o n t r o l l e r } ( x ) = \\arg \\operatorname* { m a x } ( \\operatorname { R e s h a p e } ( x C _ { 1 } C _ { 2 } , ( - 1 , N ) ) )", "type": "interline_equation", "image_path": "3911bc8776a700476aaf11d9f08ad9adecb9d759dc7da64d599320fab7781467.jpg" } ] } ], "index": 18, "virtual_lines": [ { "bbox": [ 191, 442, 418, 456 ], "spans": [], "index": 18 } ] }, { "type": "text", "bbox": [ 105, 462, 453, 475 ], "lines": [ { "bbox": [ 104, 459, 450, 478 ], "spans": [ { "bbox": [ 104, 459, 133, 478 ], "score": 1.0, "content": "where", "type": "text" }, { "bbox": [ 133, 462, 209, 474 ], "score": 0.89, "content": "C _ { 1 } \\in \\mathbb { R } ^ { d _ { \\mathrm { m o d e l } } \\times d _ { \\mathrm { l o w r a n k } } }", "type": "inline_equation" }, { "bbox": [ 209, 459, 228, 478 ], "score": 1.0, "content": "and", "type": "text" }, { "bbox": [ 228, 462, 295, 474 ], "score": 0.92, "content": "C _ { 2 } \\in \\mathbb { R } ^ { d _ { \\mathrm { l o w r a n k } } \\times d _ { \\mathrm { f f } } }", "type": "inline_equation" }, { "bbox": [ 296, 459, 319, 478 ], "score": 1.0, "content": ", with", "type": "text" }, { "bbox": [ 320, 463, 349, 474 ], "score": 0.91, "content": "d _ { \\mathrm { l o w r a n k } }", "type": "inline_equation" }, { "bbox": [ 349, 459, 406, 478 ], "score": 1.0, "content": "usually set to", "type": "text" }, { "bbox": [ 406, 463, 450, 475 ], "score": 0.82, "content": "( d _ { \\mathrm { m o d e l } } / N )", "type": "inline_equation" } ], "index": 19 } ], "index": 19, "bbox_fs": [ 104, 459, 450, 478 ] }, { "type": "text", "bbox": [ 106, 479, 506, 600 ], "lines": [ { "bbox": [ 105, 479, 506, 492 ], "spans": [ { "bbox": [ 105, 479, 506, 492 ], "score": 1.0, "content": "During inference the controller uses a discrete argmax function, but during training the model uses a", "type": "text" } ], "index": 20 }, { "bbox": [ 106, 491, 505, 502 ], "spans": [ { "bbox": [ 106, 491, 505, 502 ], "score": 1.0, "content": "softmax to calculate and sample from a distribution. The model learns to select which row/column will", "type": "text" } ], "index": 21 }, { "bbox": [ 105, 501, 505, 514 ], "spans": [ { "bbox": [ 105, 501, 505, 514 ], "score": 1.0, "content": "be non-zero using the Gumbel-Softmax trick for discretization. To determine the active row/column in", "type": "text" } ], "index": 22 }, { "bbox": [ 106, 512, 506, 525 ], "spans": [ { "bbox": [ 106, 512, 506, 525 ], "score": 1.0, "content": "each block, we reparameterize sampling from a Bernoulli distribution by using the Gumbel-Softmax", "type": "text" } ], "index": 23 }, { "bbox": [ 106, 523, 506, 535 ], "spans": [ { "bbox": [ 106, 523, 506, 535 ], "score": 1.0, "content": "trick [25]. Instead of using the logits in each block to directly sample a binary value, we add", "type": "text" } ], "index": 24 }, { "bbox": [ 105, 533, 506, 546 ], "spans": [ { "bbox": [ 105, 533, 506, 546 ], "score": 1.0, "content": "independent noise from the Gumbel distribution to each of the logits, and then select the binary value", "type": "text" } ], "index": 25 }, { "bbox": [ 105, 545, 506, 557 ], "spans": [ { "bbox": [ 105, 545, 305, 557 ], "score": 1.0, "content": "with the highest logit (i.e., argmax) as the sample", "type": "text" }, { "bbox": [ 306, 546, 312, 555 ], "score": 0.77, "content": "z", "type": "inline_equation" }, { "bbox": [ 312, 545, 506, 557 ], "score": 1.0, "content": ". The argmax operation is not differentiable, but", "type": "text" } ], "index": 26 }, { "bbox": [ 105, 556, 507, 568 ], "spans": [ { "bbox": [ 105, 556, 507, 568 ], "score": 1.0, "content": "it can be approximated by a softmax with annealing temperature. Therefore, on the forward pass,", "type": "text" } ], "index": 27 }, { "bbox": [ 104, 565, 507, 581 ], "spans": [ { "bbox": [ 104, 565, 507, 581 ], "score": 1.0, "content": "we use the argmax to obtain a binary one-hot vector for each block, while on the backward pass,", "type": "text" } ], "index": 28 }, { "bbox": [ 104, 577, 506, 592 ], "spans": [ { "bbox": [ 104, 577, 506, 592 ], "score": 1.0, "content": "we approximate it with softmax. This approach is known as the Straight-Through Gumbel-Softmax", "type": "text" } ], "index": 29 }, { "bbox": [ 106, 589, 168, 601 ], "spans": [ { "bbox": [ 106, 589, 168, 601 ], "score": 1.0, "content": "estimator [14].", "type": "text" } ], "index": 30 } ], "index": 25, "bbox_fs": [ 104, 479, 507, 601 ] }, { "type": "text", "bbox": [ 107, 612, 505, 722 ], "lines": [ { "bbox": [ 105, 610, 505, 626 ], "spans": [ { "bbox": [ 105, 610, 505, 626 ], "score": 1.0, "content": "Ablations. We investigate the impact of sparse FF on the model equivalent to T5-large with varying", "type": "text" } ], "index": 31 }, { "bbox": [ 105, 622, 505, 637 ], "spans": [ { "bbox": [ 105, 622, 198, 637 ], "score": 1.0, "content": "levels of sparsity, with", "type": "text" }, { "bbox": [ 199, 624, 256, 635 ], "score": 0.84, "content": "d _ { \\mathrm { m o d e l } } = 1 0 2 4", "type": "inline_equation" }, { "bbox": [ 256, 622, 259, 637 ], "score": 1.0, "content": ",", "type": "text" }, { "bbox": [ 259, 624, 304, 635 ], "score": 0.84, "content": "d _ { \\mathrm { f f } } = 4 0 9 6", "type": "inline_equation" }, { "bbox": [ 304, 622, 505, 637 ], "score": 1.0, "content": ", and 16 attention heads. When we set the sparsity", "type": "text" } ], "index": 32 }, { "bbox": [ 105, 634, 505, 647 ], "spans": [ { "bbox": [ 105, 634, 140, 647 ], "score": 1.0, "content": "level to", "type": "text" }, { "bbox": [ 141, 635, 151, 644 ], "score": 0.79, "content": "N", "type": "inline_equation" }, { "bbox": [ 151, 634, 192, 647 ], "score": 1.0, "content": "(for e.g.", "type": "text" }, { "bbox": [ 192, 635, 231, 645 ], "score": 0.87, "content": "N = 6 4 ,", "type": "inline_equation" }, { "bbox": [ 231, 634, 338, 647 ], "score": 1.0, "content": ") then every block of size", "type": "text" }, { "bbox": [ 339, 635, 349, 644 ], "score": 0.79, "content": "N", "type": "inline_equation" }, { "bbox": [ 350, 634, 505, 647 ], "score": 1.0, "content": "has one non-zero value activated for", "type": "text" } ], "index": 33 }, { "bbox": [ 105, 645, 505, 658 ], "spans": [ { "bbox": [ 105, 645, 385, 658 ], "score": 1.0, "content": "inference. During training, the controller uses the bottleneck layer with", "type": "text" }, { "bbox": [ 386, 645, 439, 657 ], "score": 0.91, "content": "d _ { \\mathrm { l o w r a n k } } = 6 4", "type": "inline_equation" }, { "bbox": [ 439, 645, 505, 658 ], "score": 1.0, "content": "and temperature", "type": "text" } ], "index": 34 }, { "bbox": [ 105, 656, 505, 669 ], "spans": [ { "bbox": [ 105, 656, 505, 669 ], "score": 1.0, "content": "of Gumbel softmax estimator set to 0.1. To improve training stability, the controller in the forward", "type": "text" } ], "index": 35 }, { "bbox": [ 105, 667, 505, 680 ], "spans": [ { "bbox": [ 105, 667, 505, 680 ], "score": 1.0, "content": "pass will use the output of argmax that is a binary one-hot vector for each block with a probability", "type": "text" } ], "index": 36 }, { "bbox": [ 105, 677, 506, 690 ], "spans": [ { "bbox": [ 105, 677, 117, 690 ], "score": 1.0, "content": "of", "type": "text" }, { "bbox": [ 118, 678, 137, 689 ], "score": 0.88, "content": "30 \\%", "type": "inline_equation" }, { "bbox": [ 138, 677, 506, 690 ], "score": 1.0, "content": "and otherwise it uses the output of softmax. Table 2 and Figure 3 show the perplexity and", "type": "text" } ], "index": 37 }, { "bbox": [ 105, 689, 506, 702 ], "spans": [ { "bbox": [ 105, 689, 506, 702 ], "score": 1.0, "content": "the decoding time of this model with varying levels of sparsity in feedforward layer. As the level of", "type": "text" } ], "index": 38 }, { "bbox": [ 105, 700, 505, 712 ], "spans": [ { "bbox": [ 105, 700, 505, 712 ], "score": 1.0, "content": "sparsity increases from 0 to 128, we observe a significant decrease in the decoding time, while the", "type": "text" } ], "index": 39 }, { "bbox": [ 105, 711, 445, 723 ], "spans": [ { "bbox": [ 105, 711, 255, 723 ], "score": 1.0, "content": "neg-log-perplexity of the model with", "type": "text" }, { "bbox": [ 256, 711, 290, 721 ], "score": 0.91, "content": "N = 6 4", "type": "inline_equation" }, { "bbox": [ 290, 711, 445, 723 ], "score": 1.0, "content": "sparsity is comparable to the baseline.", "type": "text" } ], "index": 40 } ], "index": 35.5, "bbox_fs": [ 105, 610, 506, 723 ] } ] }, { "preproc_blocks": [ { "type": "table", "bbox": [ 142, 127, 265, 174 ], "blocks": [ { "type": "table_body", "bbox": [ 142, 127, 265, 174 ], "group_id": 0, "lines": [ { "bbox": [ 142, 127, 265, 174 ], "spans": [ { "bbox": [ 142, 127, 265, 174 ], "score": 0.968, "html": "
Dec. time
baseline0.160s
Sparse FF 640.093s
Sparse FF1280.089s
", "type": "table", "image_path": "59a0caa67c078970b8179c0f14bb2ee897f1f8f081bff91d7ce5c6341961d654.jpg" } ] } ], "index": 2.5, "virtual_lines": [ { "bbox": [ 142, 127, 265, 150.5 ], "spans": [], "index": 3 }, { "bbox": [ 142, 150.5, 265, 174.0 ], "spans": [], "index": 2 } ] }, { "type": "table_caption", "bbox": [ 138, 182, 270, 213 ], "group_id": 0, "lines": [ { "bbox": [ 138, 181, 271, 193 ], "spans": [ { "bbox": [ 138, 181, 271, 193 ], "score": 1.0, "content": "Table 2: Decoding time of a singe to-", "type": "text" } ], "index": 9 }, { "bbox": [ 138, 192, 270, 203 ], "spans": [ { "bbox": [ 138, 192, 270, 203 ], "score": 1.0, "content": "ken decreases with increasing level", "type": "text" } ], "index": 10 }, { "bbox": [ 138, 202, 236, 213 ], "spans": [ { "bbox": [ 138, 202, 236, 213 ], "score": 1.0, "content": "of sparsity in the FF layer.", "type": "text" } ], "index": 8 } ], "index": 9 } ], "index": 5.75 }, { "type": "image", "bbox": [ 280, 71, 474, 172 ], "blocks": [ { "type": "image_body", "bbox": [ 280, 71, 474, 172 ], "group_id": 0, "lines": [ { "bbox": [ 280, 71, 474, 172 ], "spans": [ { "bbox": [ 280, 71, 474, 172 ], "score": 0.963, "type": "image", "image_path": "325586019a9397c4c24719cbbf8ae82f255474439f3841bab69231222830e4ce.jpg" } ] } ], "index": 5, "virtual_lines": [ { "bbox": [ 280, 71, 474, 85.42857142857143 ], "spans": [], "index": 0 }, { "bbox": [ 280, 85.42857142857143, 474, 99.85714285714286 ], "spans": [], "index": 1 }, { "bbox": [ 280, 99.85714285714286, 474, 114.28571428571429 ], "spans": [], "index": 4 }, { "bbox": [ 280, 114.28571428571429, 474, 128.71428571428572 ], "spans": [], "index": 5 }, { "bbox": [ 280, 128.71428571428572, 474, 143.14285714285714 ], "spans": [], "index": 6 }, { "bbox": [ 280, 143.14285714285714, 474, 157.57142857142856 ], "spans": [], "index": 7 }, { "bbox": [ 280, 157.57142857142856, 474, 171.99999999999997 ], "spans": [], "index": 11 } ] }, { "type": "image_caption", "bbox": [ 276, 182, 473, 222 ], "group_id": 0, "lines": [ { "bbox": [ 276, 182, 473, 193 ], "spans": [ { "bbox": [ 276, 182, 473, 193 ], "score": 1.0, "content": "Figure 3: Log-perplexity of Scaling Transformers with", "type": "text" } ], "index": 12 }, { "bbox": [ 277, 192, 474, 203 ], "spans": [ { "bbox": [ 277, 192, 474, 203 ], "score": 1.0, "content": "Sparse Feedforward layer is very similar to dense base-", "type": "text" } ], "index": 13 }, { "bbox": [ 276, 201, 473, 213 ], "spans": [ { "bbox": [ 276, 201, 353, 213 ], "score": 1.0, "content": "line for sparsity level", "type": "text" }, { "bbox": [ 353, 202, 384, 211 ], "score": 0.89, "content": "N = 6 4", "type": "inline_equation" }, { "bbox": [ 385, 201, 473, 213 ], "score": 1.0, "content": "but degrades slightly for", "type": "text" } ], "index": 14 }, { "bbox": [ 276, 212, 307, 222 ], "spans": [ { "bbox": [ 276, 212, 303, 221 ], "score": 0.84, "content": "N { = } I 2 8", "type": "inline_equation" }, { "bbox": [ 304, 212, 307, 222 ], "score": 1.0, "content": ".", "type": "text" } ], "index": 15 } ], "index": 13.5 } ], "index": 9.25 }, { "type": "text", "bbox": [ 106, 243, 505, 288 ], "lines": [ { "bbox": [ 105, 243, 507, 256 ], "spans": [ { "bbox": [ 105, 243, 507, 256 ], "score": 1.0, "content": "We also checked the performance of the feedforward block with Mixture-of-Experts [33] style sparsity.", "type": "text" } ], "index": 16 }, { "bbox": [ 105, 254, 505, 266 ], "spans": [ { "bbox": [ 105, 254, 481, 266 ], "score": 1.0, "content": "As expected, this technique achieved decoding time comparable to sparse FF – 0.11s instead of", "type": "text" }, { "bbox": [ 482, 255, 505, 265 ], "score": 0.26, "content": "0 . 0 9 s", "type": "inline_equation" } ], "index": 17 }, { "bbox": [ 104, 266, 506, 279 ], "spans": [ { "bbox": [ 104, 266, 506, 279 ], "score": 1.0, "content": "– but with its lack of granularity it achieved log-perplexity of 1.64, worse than both our method and", "type": "text" } ], "index": 18 }, { "bbox": [ 105, 276, 185, 289 ], "spans": [ { "bbox": [ 105, 276, 185, 289 ], "score": 1.0, "content": "the dense baseline.", "type": "text" } ], "index": 19 } ], "index": 17.5 }, { "type": "title", "bbox": [ 107, 300, 212, 313 ], "lines": [ { "bbox": [ 105, 300, 213, 315 ], "spans": [ { "bbox": [ 105, 300, 213, 315 ], "score": 1.0, "content": "3.2 Sparse QKV Layer", "type": "text" } ], "index": 20 } ], "index": 20 }, { "type": "text", "bbox": [ 107, 320, 505, 365 ], "lines": [ { "bbox": [ 105, 320, 507, 334 ], "spans": [ { "bbox": [ 105, 320, 507, 334 ], "score": 1.0, "content": "The decoding speed for a model with sparse feedforward blocks is dominated next by the query, key,", "type": "text" } ], "index": 21 }, { "bbox": [ 105, 331, 507, 345 ], "spans": [ { "bbox": [ 105, 331, 507, 345 ], "score": 1.0, "content": "value and output computation—the dense layers in attention, which we jointly call a QKV layer.", "type": "text" } ], "index": 22 }, { "bbox": [ 104, 341, 507, 358 ], "spans": [ { "bbox": [ 104, 341, 230, 358 ], "score": 1.0, "content": "Each of these dense layers has", "type": "text" }, { "bbox": [ 231, 342, 255, 355 ], "score": 0.91, "content": "d _ { \\mathrm { m o d e l } } ^ { 2 }", "type": "inline_equation" }, { "bbox": [ 255, 341, 507, 358 ], "score": 1.0, "content": "parameters and computation cost. Unfortunately, QKV layers", "type": "text" } ], "index": 23 }, { "bbox": [ 105, 353, 486, 366 ], "spans": [ { "bbox": [ 105, 353, 486, 366 ], "score": 1.0, "content": "don’t have ReLUs, so the method used above to sparsify feedforward blocks is not viable here.", "type": "text" } ], "index": 24 } ], "index": 22.5 }, { "type": "text", "bbox": [ 106, 369, 505, 469 ], "lines": [ { "bbox": [ 106, 370, 505, 383 ], "spans": [ { "bbox": [ 106, 370, 412, 383 ], "score": 1.0, "content": "To make QKV layers sparse, we subdivide the dimensionality of the layer,", "type": "text" }, { "bbox": [ 412, 370, 436, 381 ], "score": 0.91, "content": "d _ { \\mathrm { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 437, 370, 459, 383 ], "score": 1.0, "content": ", into", "type": "text" }, { "bbox": [ 459, 370, 467, 380 ], "score": 0.77, "content": "S", "type": "inline_equation" }, { "bbox": [ 467, 370, 505, 383 ], "score": 1.0, "content": "modules", "type": "text" } ], "index": 25 }, { "bbox": [ 105, 379, 506, 394 ], "spans": [ { "bbox": [ 105, 379, 136, 394 ], "score": 1.0, "content": "of size", "type": "text" }, { "bbox": [ 136, 381, 195, 393 ], "score": 0.93, "content": "M = d _ { \\mathrm { m o d e l } } / S", "type": "inline_equation" }, { "bbox": [ 196, 379, 506, 394 ], "score": 1.0, "content": ", similar to splitting an activation vector into multiple heads. These modules", "type": "text" } ], "index": 26 }, { "bbox": [ 106, 392, 506, 403 ], "spans": [ { "bbox": [ 106, 392, 506, 403 ], "score": 1.0, "content": "can be processed with a convolutional layer with fewer weights and faster computation. However,", "type": "text" } ], "index": 27 }, { "bbox": [ 105, 402, 506, 416 ], "spans": [ { "bbox": [ 105, 402, 506, 416 ], "score": 1.0, "content": "with na¨ıve design each module (and corresponding attention head) could access only a small part of", "type": "text" } ], "index": 28 }, { "bbox": [ 105, 414, 506, 426 ], "spans": [ { "bbox": [ 105, 414, 506, 426 ], "score": 1.0, "content": "a given token embedding. To alleviate that, we develop a multiplicative layer that can represent an", "type": "text" } ], "index": 29 }, { "bbox": [ 106, 425, 505, 437 ], "spans": [ { "bbox": [ 106, 425, 505, 437 ], "score": 1.0, "content": "arbitrary permutation and has fewer parameters and lower computation time than a dense layer. This", "type": "text" } ], "index": 30 }, { "bbox": [ 106, 435, 506, 448 ], "spans": [ { "bbox": [ 106, 435, 506, 448 ], "score": 1.0, "content": "multiplicative layer is inserted right before the convolutional layer, letting each head access any part", "type": "text" } ], "index": 31 }, { "bbox": [ 104, 445, 506, 460 ], "spans": [ { "bbox": [ 104, 445, 506, 460 ], "score": 1.0, "content": "of the embedding (see Figure 4(a)). This solution yields well-performing models that also decode", "type": "text" } ], "index": 32 }, { "bbox": [ 105, 457, 127, 469 ], "spans": [ { "bbox": [ 105, 457, 127, 469 ], "score": 1.0, "content": "fast.", "type": "text" } ], "index": 33 } ], "index": 29 }, { "type": "text", "bbox": [ 106, 480, 505, 525 ], "lines": [ { "bbox": [ 105, 479, 505, 493 ], "spans": [ { "bbox": [ 105, 479, 505, 493 ], "score": 1.0, "content": "Multiplicative dense layer. Our new multiplicative dense layer can represent an arbitrary permuta-", "type": "text" } ], "index": 34 }, { "bbox": [ 104, 489, 506, 506 ], "spans": [ { "bbox": [ 104, 489, 155, 506 ], "score": 1.0, "content": "tion and has", "type": "text" }, { "bbox": [ 156, 491, 232, 503 ], "score": 0.91, "content": "d _ { \\mathrm { m o d e l } } ^ { 2 } / S + \\bar { d } _ { \\mathrm { m o d e l } } S", "type": "inline_equation" }, { "bbox": [ 232, 489, 444, 506 ], "score": 1.0, "content": "parameters, dependent on the sparsity hyperparameter", "type": "text" }, { "bbox": [ 445, 492, 453, 502 ], "score": 0.79, "content": "S", "type": "inline_equation" }, { "bbox": [ 453, 489, 506, 506 ], "score": 1.0, "content": ". It processes", "type": "text" } ], "index": 35 }, { "bbox": [ 104, 502, 506, 517 ], "spans": [ { "bbox": [ 104, 502, 168, 517 ], "score": 1.0, "content": "an input vector", "type": "text" }, { "bbox": [ 168, 504, 210, 514 ], "score": 0.9, "content": "\\mathbf { x } \\in \\mathbb { R } ^ { d _ { \\mathrm { m o d e l } } }", "type": "inline_equation" }, { "bbox": [ 211, 502, 366, 517 ], "score": 1.0, "content": "by splitting it into S “modules” of size", "type": "text" }, { "bbox": [ 367, 504, 426, 515 ], "score": 0.93, "content": "M = d _ { \\mathrm { m o d e l } } / S", "type": "inline_equation" }, { "bbox": [ 427, 502, 506, 517 ], "score": 1.0, "content": ". It produces output", "type": "text" } ], "index": 36 }, { "bbox": [ 106, 511, 198, 527 ], "spans": [ { "bbox": [ 106, 514, 151, 526 ], "score": 0.91, "content": "\\mathbf { y } \\in \\mathring { \\mathbb { R } } ^ { S \\times M }", "type": "inline_equation" }, { "bbox": [ 152, 511, 198, 527 ], "score": 1.0, "content": "as follows", "type": "text" } ], "index": 37 } ], "index": 35.5 }, { "type": "interline_equation", "bbox": [ 256, 524, 353, 551 ], "lines": [ { "bbox": [ 256, 524, 353, 551 ], "spans": [ { "bbox": [ 256, 524, 353, 551 ], "score": 0.93, "content": "\\mathrm { y } _ { s , m } = \\sum _ { i } \\mathrm { x } _ { i } D _ { i , s } E _ { i , m }", "type": "interline_equation", "image_path": "eb159e5aed49b02bddd6780f75dd6142b4b72a37eb08c637a0ded94c55267520.jpg" } ] } ], "index": 38.5, "virtual_lines": [ { "bbox": [ 256, 524, 353, 537.5 ], "spans": [], "index": 38 }, { "bbox": [ 256, 537.5, 353, 551.0 ], "spans": [], "index": 39 } ] }, { "type": "text", "bbox": [ 107, 552, 505, 587 ], "lines": [ { "bbox": [ 104, 550, 506, 568 ], "spans": [ { "bbox": [ 104, 550, 247, 568 ], "score": 1.0, "content": "where the two weight matrices are", "type": "text" }, { "bbox": [ 248, 553, 305, 564 ], "score": 0.93, "content": "D \\in \\mathbb { R } ^ { d _ { \\mathrm { m o d e l } } \\times S }", "type": "inline_equation" }, { "bbox": [ 306, 550, 326, 568 ], "score": 1.0, "content": ", and", "type": "text" }, { "bbox": [ 327, 553, 387, 564 ], "score": 0.91, "content": "E \\in \\mathbb { R } ^ { d _ { \\mathrm { m o d e l } } \\times M }", "type": "inline_equation" }, { "bbox": [ 387, 550, 506, 568 ], "score": 1.0, "content": "(see Figure 4(b)). This layer", "type": "text" } ], "index": 40 }, { "bbox": [ 105, 565, 505, 577 ], "spans": [ { "bbox": [ 105, 565, 505, 577 ], "score": 1.0, "content": "executes significantly faster during inference because of the decreased number of parameters which", "type": "text" } ], "index": 41 }, { "bbox": [ 105, 576, 403, 588 ], "spans": [ { "bbox": [ 105, 576, 368, 588 ], "score": 1.0, "content": "need to be loaded from memory. Unless stated otherwise, we use", "type": "text" }, { "bbox": [ 368, 576, 399, 586 ], "score": 0.9, "content": "S = 1 6", "type": "inline_equation" }, { "bbox": [ 399, 576, 403, 588 ], "score": 1.0, "content": ".", "type": "text" } ], "index": 42 } ], "index": 41 }, { "type": "text", "bbox": [ 107, 592, 505, 626 ], "lines": [ { "bbox": [ 105, 592, 505, 606 ], "spans": [ { "bbox": [ 105, 592, 505, 606 ], "score": 1.0, "content": "The multiplicative layer is designed primarily to represent any permutation, so that each attention", "type": "text" } ], "index": 43 }, { "bbox": [ 105, 604, 505, 616 ], "spans": [ { "bbox": [ 105, 604, 505, 616 ], "score": 1.0, "content": "head can access information from any part of the embedding. We first verify that the multiplicative", "type": "text" } ], "index": 44 }, { "bbox": [ 105, 614, 477, 627 ], "spans": [ { "bbox": [ 105, 614, 477, 627 ], "score": 1.0, "content": "layer can indeed represent an arbitrary permutation (the proof is presented in the Appendix).", "type": "text" } ], "index": 45 } ], "index": 44 }, { "type": "text", "bbox": [ 106, 628, 503, 653 ], "lines": [ { "bbox": [ 106, 628, 504, 642 ], "spans": [ { "bbox": [ 106, 628, 269, 642 ], "score": 1.0, "content": "Theorem 1. For any bijective function", "type": "text" }, { "bbox": [ 270, 628, 447, 641 ], "score": 0.92, "content": "f : \\{ 1 \\cdots d _ { m o d e l } \\} \\Rightarrow \\{ 1 \\cdots S \\} \\times \\{ 1 \\cdots M \\}", "type": "inline_equation" }, { "bbox": [ 447, 628, 497, 642 ], "score": 1.0, "content": "there exists", "type": "text" }, { "bbox": [ 497, 631, 504, 639 ], "score": 0.47, "content": "a", "type": "inline_equation" } ], "index": 46 }, { "bbox": [ 104, 639, 440, 654 ], "spans": [ { "bbox": [ 104, 639, 259, 654 ], "score": 1.0, "content": "pair of weights of multiplicative layer", "type": "text" }, { "bbox": [ 259, 641, 267, 650 ], "score": 0.49, "content": "D", "type": "inline_equation" }, { "bbox": [ 268, 639, 271, 654 ], "score": 1.0, "content": ",", "type": "text" }, { "bbox": [ 271, 641, 279, 650 ], "score": 0.59, "content": "E", "type": "inline_equation" }, { "bbox": [ 280, 639, 318, 654 ], "score": 1.0, "content": "such that", "type": "text" }, { "bbox": [ 319, 642, 361, 652 ], "score": 0.85, "content": "x _ { i } = y _ { s , m }", "type": "inline_equation" }, { "bbox": [ 361, 639, 376, 654 ], "score": 1.0, "content": "for", "type": "text" }, { "bbox": [ 377, 641, 435, 652 ], "score": 0.9, "content": "\\{ s , m \\} = f ( i )", "type": "inline_equation" }, { "bbox": [ 435, 639, 440, 654 ], "score": 1.0, "content": ".", "type": "text" } ], "index": 47 } ], "index": 46.5 }, { "type": "text", "bbox": [ 107, 667, 505, 722 ], "lines": [ { "bbox": [ 105, 666, 505, 680 ], "spans": [ { "bbox": [ 105, 666, 495, 680 ], "score": 1.0, "content": "Convolutional layer. The output of the multiplicative layer is a tensor of type/shape", "type": "text" }, { "bbox": [ 495, 668, 505, 678 ], "score": 0.73, "content": "\\in", "type": "inline_equation" } ], "index": 48 }, { "bbox": [ 104, 675, 506, 692 ], "spans": [ { "bbox": [ 104, 675, 506, 692 ], "score": 1.0, "content": "Rbatch×length×S×M . We process this tensor with a two-dimensional convolutional layer, treating", "type": "text" } ], "index": 49 }, { "bbox": [ 106, 688, 504, 700 ], "spans": [ { "bbox": [ 106, 688, 285, 700 ], "score": 1.0, "content": "the length dimension and number of modules", "type": "text" }, { "bbox": [ 286, 689, 294, 699 ], "score": 0.82, "content": "S", "type": "inline_equation" }, { "bbox": [ 294, 688, 492, 700 ], "score": 1.0, "content": "like height and width of an image. This layer uses", "type": "text" }, { "bbox": [ 492, 689, 504, 699 ], "score": 0.8, "content": "M", "type": "inline_equation" } ], "index": 50 }, { "bbox": [ 105, 699, 505, 713 ], "spans": [ { "bbox": [ 105, 699, 209, 713 ], "score": 1.0, "content": "filters and a kernel size of", "type": "text" }, { "bbox": [ 209, 700, 238, 710 ], "score": 0.91, "content": "F \\times F", "type": "inline_equation" }, { "bbox": [ 238, 699, 341, 713 ], "score": 1.0, "content": "so that each filter looks at", "type": "text" }, { "bbox": [ 342, 700, 351, 710 ], "score": 0.83, "content": "F", "type": "inline_equation" }, { "bbox": [ 351, 699, 391, 713 ], "score": 1.0, "content": "modules (", "type": "text" }, { "bbox": [ 391, 700, 403, 710 ], "score": 0.32, "content": "\\mathbf { \\partial } ^ { \\ast } \\mathbf { S } ^ { \\ast }", "type": "inline_equation" }, { "bbox": [ 403, 699, 467, 713 ], "score": 1.0, "content": "axis) of the last", "type": "text" }, { "bbox": [ 467, 700, 476, 710 ], "score": 0.82, "content": "F", "type": "inline_equation" }, { "bbox": [ 477, 699, 505, 713 ], "score": 1.0, "content": "tokens", "type": "text" } ], "index": 51 }, { "bbox": [ 105, 710, 506, 724 ], "spans": [ { "bbox": [ 105, 710, 506, 724 ], "score": 1.0, "content": "(‘length’ axis). Replacing the standard dense layer with such a convolution reduces the parameter", "type": "text" } ], "index": 52 } ], "index": 50 } ], "page_idx": 4, "page_size": [ 612, 792 ], "discarded_blocks": [ { "type": "discarded", "bbox": [ 302, 741, 308, 750 ], "lines": [ { "bbox": [ 302, 740, 309, 753 ], "spans": [ { "bbox": [ 302, 740, 309, 753 ], "score": 1.0, "content": "5", "type": "text" } ] } ] } ], "para_blocks": [ { "type": "table", "bbox": [ 142, 127, 265, 174 ], "blocks": [ { "type": "table_body", "bbox": [ 142, 127, 265, 174 ], "group_id": 0, "lines": [ { "bbox": [ 142, 127, 265, 174 ], "spans": [ { "bbox": [ 142, 127, 265, 174 ], "score": 0.968, "html": "
Dec. time
baseline0.160s
Sparse FF 640.093s
Sparse FF1280.089s
", "type": "table", "image_path": "59a0caa67c078970b8179c0f14bb2ee897f1f8f081bff91d7ce5c6341961d654.jpg" } ] } ], "index": 2.5, "virtual_lines": [ { "bbox": [ 142, 127, 265, 150.5 ], "spans": [], "index": 3 }, { "bbox": [ 142, 150.5, 265, 174.0 ], "spans": [], "index": 2 } ] }, { "type": "table_caption", "bbox": [ 138, 182, 270, 213 ], "group_id": 0, "lines": [ { "bbox": [ 138, 181, 271, 193 ], "spans": [ { "bbox": [ 138, 181, 271, 193 ], "score": 1.0, "content": "Table 2: Decoding time of a singe to-", "type": "text" } ], "index": 9 }, { "bbox": [ 138, 192, 270, 203 ], "spans": [ { "bbox": [ 138, 192, 270, 203 ], "score": 1.0, "content": "ken decreases with increasing level", "type": "text" } ], "index": 10 }, { "bbox": [ 138, 202, 236, 213 ], "spans": [ { "bbox": [ 138, 202, 236, 213 ], "score": 1.0, "content": "of sparsity in the FF layer.", "type": "text" } ], "index": 8 } ], "index": 9 } ], "index": 5.75 }, { "type": "image", "bbox": [ 280, 71, 474, 172 ], "blocks": [ { "type": "image_body", "bbox": [ 280, 71, 474, 172 ], "group_id": 0, "lines": [ { "bbox": [ 280, 71, 474, 172 ], "spans": [ { "bbox": [ 280, 71, 474, 172 ], "score": 0.963, "type": "image", "image_path": "325586019a9397c4c24719cbbf8ae82f255474439f3841bab69231222830e4ce.jpg" } ] } ], "index": 5, "virtual_lines": [ { "bbox": [ 280, 71, 474, 85.42857142857143 ], "spans": [], "index": 0 }, { "bbox": [ 280, 85.42857142857143, 474, 99.85714285714286 ], "spans": [], "index": 1 }, { "bbox": [ 280, 99.85714285714286, 474, 114.28571428571429 ], "spans": [], "index": 4 }, { "bbox": [ 280, 114.28571428571429, 474, 128.71428571428572 ], "spans": [], "index": 5 }, { "bbox": [ 280, 128.71428571428572, 474, 143.14285714285714 ], "spans": [], "index": 6 }, { "bbox": [ 280, 143.14285714285714, 474, 157.57142857142856 ], "spans": [], "index": 7 }, { "bbox": [ 280, 157.57142857142856, 474, 171.99999999999997 ], "spans": [], "index": 11 } ] }, { "type": "image_caption", "bbox": [ 276, 182, 473, 222 ], "group_id": 0, "lines": [ { "bbox": [ 276, 182, 473, 193 ], "spans": [ { "bbox": [ 276, 182, 473, 193 ], "score": 1.0, "content": "Figure 3: Log-perplexity of Scaling Transformers with", "type": "text" } ], "index": 12 }, { "bbox": [ 277, 192, 474, 203 ], "spans": [ { "bbox": [ 277, 192, 474, 203 ], "score": 1.0, "content": "Sparse Feedforward layer is very similar to dense base-", "type": "text" } ], "index": 13 }, { "bbox": [ 276, 201, 473, 213 ], "spans": [ { "bbox": [ 276, 201, 353, 213 ], "score": 1.0, "content": "line for sparsity level", "type": "text" }, { "bbox": [ 353, 202, 384, 211 ], "score": 0.89, "content": "N = 6 4", "type": "inline_equation" }, { "bbox": [ 385, 201, 473, 213 ], "score": 1.0, "content": "but degrades slightly for", "type": "text" } ], "index": 14 }, { "bbox": [ 276, 212, 307, 222 ], "spans": [ { "bbox": [ 276, 212, 303, 221 ], "score": 0.84, "content": "N { = } I 2 8", "type": "inline_equation" }, { "bbox": [ 304, 212, 307, 222 ], "score": 1.0, "content": ".", "type": "text" } ], "index": 15 } ], "index": 13.5 } ], "index": 9.25 }, { "type": "text", "bbox": [ 106, 243, 505, 288 ], "lines": [ { "bbox": [ 105, 243, 507, 256 ], "spans": [ { "bbox": [ 105, 243, 507, 256 ], "score": 1.0, "content": "We also checked the performance of the feedforward block with Mixture-of-Experts [33] style sparsity.", "type": "text" } ], "index": 16 }, { "bbox": [ 105, 254, 505, 266 ], "spans": [ { "bbox": [ 105, 254, 481, 266 ], "score": 1.0, "content": "As expected, this technique achieved decoding time comparable to sparse FF – 0.11s instead of", "type": "text" }, { "bbox": [ 482, 255, 505, 265 ], "score": 0.26, "content": "0 . 0 9 s", "type": "inline_equation" } ], "index": 17 }, { "bbox": [ 104, 266, 506, 279 ], "spans": [ { "bbox": [ 104, 266, 506, 279 ], "score": 1.0, "content": "– but with its lack of granularity it achieved log-perplexity of 1.64, worse than both our method and", "type": "text" } ], "index": 18 }, { "bbox": [ 105, 276, 185, 289 ], "spans": [ { "bbox": [ 105, 276, 185, 289 ], "score": 1.0, "content": "the dense baseline.", "type": "text" } ], "index": 19 } ], "index": 17.5, "bbox_fs": [ 104, 243, 507, 289 ] }, { "type": "title", "bbox": [ 107, 300, 212, 313 ], "lines": [ { "bbox": [ 105, 300, 213, 315 ], "spans": [ { "bbox": [ 105, 300, 213, 315 ], "score": 1.0, "content": "3.2 Sparse QKV Layer", "type": "text" } ], "index": 20 } ], "index": 20 }, { "type": "text", "bbox": [ 107, 320, 505, 365 ], "lines": [ { "bbox": [ 105, 320, 507, 334 ], "spans": [ { "bbox": [ 105, 320, 507, 334 ], "score": 1.0, "content": "The decoding speed for a model with sparse feedforward blocks is dominated next by the query, key,", "type": "text" } ], "index": 21 }, { "bbox": [ 105, 331, 507, 345 ], "spans": [ { "bbox": [ 105, 331, 507, 345 ], "score": 1.0, "content": "value and output computation—the dense layers in attention, which we jointly call a QKV layer.", "type": "text" } ], "index": 22 }, { "bbox": [ 104, 341, 507, 358 ], "spans": [ { "bbox": [ 104, 341, 230, 358 ], "score": 1.0, "content": "Each of these dense layers has", "type": "text" }, { "bbox": [ 231, 342, 255, 355 ], "score": 0.91, "content": "d _ { \\mathrm { m o d e l } } ^ { 2 }", "type": "inline_equation" }, { "bbox": [ 255, 341, 507, 358 ], "score": 1.0, "content": "parameters and computation cost. Unfortunately, QKV layers", "type": "text" } ], "index": 23 }, { "bbox": [ 105, 353, 486, 366 ], "spans": [ { "bbox": [ 105, 353, 486, 366 ], "score": 1.0, "content": "don’t have ReLUs, so the method used above to sparsify feedforward blocks is not viable here.", "type": "text" } ], "index": 24 } ], "index": 22.5, "bbox_fs": [ 104, 320, 507, 366 ] }, { "type": "text", "bbox": [ 106, 369, 505, 469 ], "lines": [ { "bbox": [ 106, 370, 505, 383 ], "spans": [ { "bbox": [ 106, 370, 412, 383 ], "score": 1.0, "content": "To make QKV layers sparse, we subdivide the dimensionality of the layer,", "type": "text" }, { "bbox": [ 412, 370, 436, 381 ], "score": 0.91, "content": "d _ { \\mathrm { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 437, 370, 459, 383 ], "score": 1.0, "content": ", into", "type": "text" }, { "bbox": [ 459, 370, 467, 380 ], "score": 0.77, "content": "S", "type": "inline_equation" }, { "bbox": [ 467, 370, 505, 383 ], "score": 1.0, "content": "modules", "type": "text" } ], "index": 25 }, { "bbox": [ 105, 379, 506, 394 ], "spans": [ { "bbox": [ 105, 379, 136, 394 ], "score": 1.0, "content": "of size", "type": "text" }, { "bbox": [ 136, 381, 195, 393 ], "score": 0.93, "content": "M = d _ { \\mathrm { m o d e l } } / S", "type": "inline_equation" }, { "bbox": [ 196, 379, 506, 394 ], "score": 1.0, "content": ", similar to splitting an activation vector into multiple heads. These modules", "type": "text" } ], "index": 26 }, { "bbox": [ 106, 392, 506, 403 ], "spans": [ { "bbox": [ 106, 392, 506, 403 ], "score": 1.0, "content": "can be processed with a convolutional layer with fewer weights and faster computation. However,", "type": "text" } ], "index": 27 }, { "bbox": [ 105, 402, 506, 416 ], "spans": [ { "bbox": [ 105, 402, 506, 416 ], "score": 1.0, "content": "with na¨ıve design each module (and corresponding attention head) could access only a small part of", "type": "text" } ], "index": 28 }, { "bbox": [ 105, 414, 506, 426 ], "spans": [ { "bbox": [ 105, 414, 506, 426 ], "score": 1.0, "content": "a given token embedding. To alleviate that, we develop a multiplicative layer that can represent an", "type": "text" } ], "index": 29 }, { "bbox": [ 106, 425, 505, 437 ], "spans": [ { "bbox": [ 106, 425, 505, 437 ], "score": 1.0, "content": "arbitrary permutation and has fewer parameters and lower computation time than a dense layer. This", "type": "text" } ], "index": 30 }, { "bbox": [ 106, 435, 506, 448 ], "spans": [ { "bbox": [ 106, 435, 506, 448 ], "score": 1.0, "content": "multiplicative layer is inserted right before the convolutional layer, letting each head access any part", "type": "text" } ], "index": 31 }, { "bbox": [ 104, 445, 506, 460 ], "spans": [ { "bbox": [ 104, 445, 506, 460 ], "score": 1.0, "content": "of the embedding (see Figure 4(a)). This solution yields well-performing models that also decode", "type": "text" } ], "index": 32 }, { "bbox": [ 105, 457, 127, 469 ], "spans": [ { "bbox": [ 105, 457, 127, 469 ], "score": 1.0, "content": "fast.", "type": "text" } ], "index": 33 } ], "index": 29, "bbox_fs": [ 104, 370, 506, 469 ] }, { "type": "text", "bbox": [ 106, 480, 505, 525 ], "lines": [ { "bbox": [ 105, 479, 505, 493 ], "spans": [ { "bbox": [ 105, 479, 505, 493 ], "score": 1.0, "content": "Multiplicative dense layer. Our new multiplicative dense layer can represent an arbitrary permuta-", "type": "text" } ], "index": 34 }, { "bbox": [ 104, 489, 506, 506 ], "spans": [ { "bbox": [ 104, 489, 155, 506 ], "score": 1.0, "content": "tion and has", "type": "text" }, { "bbox": [ 156, 491, 232, 503 ], "score": 0.91, "content": "d _ { \\mathrm { m o d e l } } ^ { 2 } / S + \\bar { d } _ { \\mathrm { m o d e l } } S", "type": "inline_equation" }, { "bbox": [ 232, 489, 444, 506 ], "score": 1.0, "content": "parameters, dependent on the sparsity hyperparameter", "type": "text" }, { "bbox": [ 445, 492, 453, 502 ], "score": 0.79, "content": "S", "type": "inline_equation" }, { "bbox": [ 453, 489, 506, 506 ], "score": 1.0, "content": ". It processes", "type": "text" } ], "index": 35 }, { "bbox": [ 104, 502, 506, 517 ], "spans": [ { "bbox": [ 104, 502, 168, 517 ], "score": 1.0, "content": "an input vector", "type": "text" }, { "bbox": [ 168, 504, 210, 514 ], "score": 0.9, "content": "\\mathbf { x } \\in \\mathbb { R } ^ { d _ { \\mathrm { m o d e l } } }", "type": "inline_equation" }, { "bbox": [ 211, 502, 366, 517 ], "score": 1.0, "content": "by splitting it into S “modules” of size", "type": "text" }, { "bbox": [ 367, 504, 426, 515 ], "score": 0.93, "content": "M = d _ { \\mathrm { m o d e l } } / S", "type": "inline_equation" }, { "bbox": [ 427, 502, 506, 517 ], "score": 1.0, "content": ". It produces output", "type": "text" } ], "index": 36 }, { "bbox": [ 106, 511, 198, 527 ], "spans": [ { "bbox": [ 106, 514, 151, 526 ], "score": 0.91, "content": "\\mathbf { y } \\in \\mathring { \\mathbb { R } } ^ { S \\times M }", "type": "inline_equation" }, { "bbox": [ 152, 511, 198, 527 ], "score": 1.0, "content": "as follows", "type": "text" } ], "index": 37 } ], "index": 35.5, "bbox_fs": [ 104, 479, 506, 527 ] }, { "type": "interline_equation", "bbox": [ 256, 524, 353, 551 ], "lines": [ { "bbox": [ 256, 524, 353, 551 ], "spans": [ { "bbox": [ 256, 524, 353, 551 ], "score": 0.93, "content": "\\mathrm { y } _ { s , m } = \\sum _ { i } \\mathrm { x } _ { i } D _ { i , s } E _ { i , m }", "type": "interline_equation", "image_path": "eb159e5aed49b02bddd6780f75dd6142b4b72a37eb08c637a0ded94c55267520.jpg" } ] } ], "index": 38.5, "virtual_lines": [ { "bbox": [ 256, 524, 353, 537.5 ], "spans": [], "index": 38 }, { "bbox": [ 256, 537.5, 353, 551.0 ], "spans": [], "index": 39 } ] }, { "type": "text", "bbox": [ 107, 552, 505, 587 ], "lines": [ { "bbox": [ 104, 550, 506, 568 ], "spans": [ { "bbox": [ 104, 550, 247, 568 ], "score": 1.0, "content": "where the two weight matrices are", "type": "text" }, { "bbox": [ 248, 553, 305, 564 ], "score": 0.93, "content": "D \\in \\mathbb { R } ^ { d _ { \\mathrm { m o d e l } } \\times S }", "type": "inline_equation" }, { "bbox": [ 306, 550, 326, 568 ], "score": 1.0, "content": ", and", "type": "text" }, { "bbox": [ 327, 553, 387, 564 ], "score": 0.91, "content": "E \\in \\mathbb { R } ^ { d _ { \\mathrm { m o d e l } } \\times M }", "type": "inline_equation" }, { "bbox": [ 387, 550, 506, 568 ], "score": 1.0, "content": "(see Figure 4(b)). This layer", "type": "text" } ], "index": 40 }, { "bbox": [ 105, 565, 505, 577 ], "spans": [ { "bbox": [ 105, 565, 505, 577 ], "score": 1.0, "content": "executes significantly faster during inference because of the decreased number of parameters which", "type": "text" } ], "index": 41 }, { "bbox": [ 105, 576, 403, 588 ], "spans": [ { "bbox": [ 105, 576, 368, 588 ], "score": 1.0, "content": "need to be loaded from memory. Unless stated otherwise, we use", "type": "text" }, { "bbox": [ 368, 576, 399, 586 ], "score": 0.9, "content": "S = 1 6", "type": "inline_equation" }, { "bbox": [ 399, 576, 403, 588 ], "score": 1.0, "content": ".", "type": "text" } ], "index": 42 } ], "index": 41, "bbox_fs": [ 104, 550, 506, 588 ] }, { "type": "text", "bbox": [ 107, 592, 505, 626 ], "lines": [ { "bbox": [ 105, 592, 505, 606 ], "spans": [ { "bbox": [ 105, 592, 505, 606 ], "score": 1.0, "content": "The multiplicative layer is designed primarily to represent any permutation, so that each attention", "type": "text" } ], "index": 43 }, { "bbox": [ 105, 604, 505, 616 ], "spans": [ { "bbox": [ 105, 604, 505, 616 ], "score": 1.0, "content": "head can access information from any part of the embedding. We first verify that the multiplicative", "type": "text" } ], "index": 44 }, { "bbox": [ 105, 614, 477, 627 ], "spans": [ { "bbox": [ 105, 614, 477, 627 ], "score": 1.0, "content": "layer can indeed represent an arbitrary permutation (the proof is presented in the Appendix).", "type": "text" } ], "index": 45 } ], "index": 44, "bbox_fs": [ 105, 592, 505, 627 ] }, { "type": "text", "bbox": [ 106, 628, 503, 653 ], "lines": [ { "bbox": [ 106, 628, 504, 642 ], "spans": [ { "bbox": [ 106, 628, 269, 642 ], "score": 1.0, "content": "Theorem 1. For any bijective function", "type": "text" }, { "bbox": [ 270, 628, 447, 641 ], "score": 0.92, "content": "f : \\{ 1 \\cdots d _ { m o d e l } \\} \\Rightarrow \\{ 1 \\cdots S \\} \\times \\{ 1 \\cdots M \\}", "type": "inline_equation" }, { "bbox": [ 447, 628, 497, 642 ], "score": 1.0, "content": "there exists", "type": "text" }, { "bbox": [ 497, 631, 504, 639 ], "score": 0.47, "content": "a", "type": "inline_equation" } ], "index": 46 }, { "bbox": [ 104, 639, 440, 654 ], "spans": [ { "bbox": [ 104, 639, 259, 654 ], "score": 1.0, "content": "pair of weights of multiplicative layer", "type": "text" }, { "bbox": [ 259, 641, 267, 650 ], "score": 0.49, "content": "D", "type": "inline_equation" }, { "bbox": [ 268, 639, 271, 654 ], "score": 1.0, "content": ",", "type": "text" }, { "bbox": [ 271, 641, 279, 650 ], "score": 0.59, "content": "E", "type": "inline_equation" }, { "bbox": [ 280, 639, 318, 654 ], "score": 1.0, "content": "such that", "type": "text" }, { "bbox": [ 319, 642, 361, 652 ], "score": 0.85, "content": "x _ { i } = y _ { s , m }", "type": "inline_equation" }, { "bbox": [ 361, 639, 376, 654 ], "score": 1.0, "content": "for", "type": "text" }, { "bbox": [ 377, 641, 435, 652 ], "score": 0.9, "content": "\\{ s , m \\} = f ( i )", "type": "inline_equation" }, { "bbox": [ 435, 639, 440, 654 ], "score": 1.0, "content": ".", "type": "text" } ], "index": 47 } ], "index": 46.5, "bbox_fs": [ 104, 628, 504, 654 ] }, { "type": "text", "bbox": [ 107, 667, 505, 722 ], "lines": [ { "bbox": [ 105, 666, 505, 680 ], "spans": [ { "bbox": [ 105, 666, 495, 680 ], "score": 1.0, "content": "Convolutional layer. The output of the multiplicative layer is a tensor of type/shape", "type": "text" }, { "bbox": [ 495, 668, 505, 678 ], "score": 0.73, "content": "\\in", "type": "inline_equation" } ], "index": 48 }, { "bbox": [ 104, 675, 506, 692 ], "spans": [ { "bbox": [ 104, 675, 506, 692 ], "score": 1.0, "content": "Rbatch×length×S×M . We process this tensor with a two-dimensional convolutional layer, treating", "type": "text" } ], "index": 49 }, { "bbox": [ 106, 688, 504, 700 ], "spans": [ { "bbox": [ 106, 688, 285, 700 ], "score": 1.0, "content": "the length dimension and number of modules", "type": "text" }, { "bbox": [ 286, 689, 294, 699 ], "score": 0.82, "content": "S", "type": "inline_equation" }, { "bbox": [ 294, 688, 492, 700 ], "score": 1.0, "content": "like height and width of an image. This layer uses", "type": "text" }, { "bbox": [ 492, 689, 504, 699 ], "score": 0.8, "content": "M", "type": "inline_equation" } ], "index": 50 }, { "bbox": [ 105, 699, 505, 713 ], "spans": [ { "bbox": [ 105, 699, 209, 713 ], "score": 1.0, "content": "filters and a kernel size of", "type": "text" }, { "bbox": [ 209, 700, 238, 710 ], "score": 0.91, "content": "F \\times F", "type": "inline_equation" }, { "bbox": [ 238, 699, 341, 713 ], "score": 1.0, "content": "so that each filter looks at", "type": "text" }, { "bbox": [ 342, 700, 351, 710 ], "score": 0.83, "content": "F", "type": "inline_equation" }, { "bbox": [ 351, 699, 391, 713 ], "score": 1.0, "content": "modules (", "type": "text" }, { "bbox": [ 391, 700, 403, 710 ], "score": 0.32, "content": "\\mathbf { \\partial } ^ { \\ast } \\mathbf { S } ^ { \\ast }", "type": "inline_equation" }, { "bbox": [ 403, 699, 467, 713 ], "score": 1.0, "content": "axis) of the last", "type": "text" }, { "bbox": [ 467, 700, 476, 710 ], "score": 0.82, "content": "F", "type": "inline_equation" }, { "bbox": [ 477, 699, 505, 713 ], "score": 1.0, "content": "tokens", "type": "text" } ], "index": 51 }, { "bbox": [ 105, 710, 506, 724 ], "spans": [ { "bbox": [ 105, 710, 506, 724 ], "score": 1.0, "content": "(‘length’ axis). Replacing the standard dense layer with such a convolution reduces the parameter", "type": "text" } ], "index": 52 }, { "bbox": [ 105, 275, 504, 289 ], "spans": [ { "bbox": [ 105, 275, 504, 289 ], "score": 1.0, "content": "count and computation time of the QKV layer. At the same time, by convolving over the ‘length’", "type": "text", "cross_page": true } ], "index": 6 }, { "bbox": [ 106, 287, 397, 299 ], "spans": [ { "bbox": [ 106, 287, 397, 299 ], "score": 1.0, "content": "axis, the model can incorporate more context into this computation [23].", "type": "text", "cross_page": true } ], "index": 7 } ], "index": 50, "bbox_fs": [ 104, 666, 506, 724 ] } ] }, { "preproc_blocks": [ { "type": "image", "bbox": [ 111, 72, 491, 209 ], "blocks": [ { "type": "image_body", "bbox": [ 111, 72, 491, 209 ], "group_id": 0, "lines": [ { "bbox": [ 111, 72, 491, 209 ], "spans": [ { "bbox": [ 111, 72, 491, 209 ], "score": 0.973, "type": "image", "image_path": "ed65a04b556b2c7f59046221bc1abec14f54e58c97b0ccf5209a23b0145f85a8.jpg" } ] } ], "index": 1, "virtual_lines": [ { "bbox": [ 111, 72, 491, 117.66666666666666 ], "spans": [], "index": 0 }, { "bbox": [ 111, 117.66666666666666, 491, 163.33333333333331 ], "spans": [], "index": 1 }, { "bbox": [ 111, 163.33333333333331, 491, 208.99999999999997 ], "spans": [], "index": 2 } ] }, { "type": "image_caption", "bbox": [ 107, 221, 503, 253 ], "group_id": 0, "lines": [ { "bbox": [ 105, 222, 506, 234 ], "spans": [ { "bbox": [ 105, 222, 506, 234 ], "score": 1.0, "content": "Figure 4: (a) Multiplicative layer can represent an arbitrary permutation, but has fewer parameters and reduced", "type": "text" } ], "index": 3 }, { "bbox": [ 105, 232, 505, 244 ], "spans": [ { "bbox": [ 105, 232, 397, 244 ], "score": 1.0, "content": "computation time compared to a dense layer. (b) Sparse QKV layer replaces", "type": "text" }, { "bbox": [ 397, 232, 417, 242 ], "score": 0.35, "content": "Q , K ,", "type": "inline_equation" }, { "bbox": [ 417, 232, 436, 244 ], "score": 1.0, "content": ", and", "type": "text" }, { "bbox": [ 437, 232, 444, 241 ], "score": 0.57, "content": "V", "type": "inline_equation" }, { "bbox": [ 445, 232, 505, 244 ], "score": 1.0, "content": "dense layers by", "type": "text" } ], "index": 4 }, { "bbox": [ 105, 242, 504, 254 ], "spans": [ { "bbox": [ 105, 242, 504, 254 ], "score": 1.0, "content": "composing multiplicative and convolutional layers and reducing the number of parameters and decoding time.", "type": "text" } ], "index": 5 } ], "index": 4 } ], "index": 2.5 }, { "type": "text", "bbox": [ 107, 275, 503, 298 ], "lines": [ { "bbox": [ 105, 275, 504, 289 ], "spans": [ { "bbox": [ 105, 275, 504, 289 ], "score": 1.0, "content": "count and computation time of the QKV layer. At the same time, by convolving over the ‘length’", "type": "text" } ], "index": 6 }, { "bbox": [ 106, 287, 397, 299 ], "spans": [ { "bbox": [ 106, 287, 397, 299 ], "score": 1.0, "content": "axis, the model can incorporate more context into this computation [23].", "type": "text" } ], "index": 7 } ], "index": 6.5 }, { "type": "text", "bbox": [ 107, 302, 505, 369 ], "lines": [ { "bbox": [ 105, 301, 503, 316 ], "spans": [ { "bbox": [ 105, 301, 415, 316 ], "score": 1.0, "content": "The output of this layer has the same shape as the input. The optimal value of", "type": "text" }, { "bbox": [ 416, 303, 423, 313 ], "score": 0.82, "content": "S", "type": "inline_equation" }, { "bbox": [ 424, 301, 470, 316 ], "score": 1.0, "content": "is less than", "type": "text" }, { "bbox": [ 471, 302, 503, 314 ], "score": 0.91, "content": "\\sqrt { d _ { \\mathrm { m o d e l } } }", "type": "inline_equation" } ], "index": 8 }, { "bbox": [ 106, 314, 505, 326 ], "spans": [ { "bbox": [ 106, 314, 184, 326 ], "score": 1.0, "content": "Empirically we set", "type": "text" }, { "bbox": [ 184, 315, 193, 324 ], "score": 0.83, "content": "F", "type": "inline_equation" }, { "bbox": [ 193, 314, 214, 326 ], "score": 1.0, "content": "to 3,", "type": "text" }, { "bbox": [ 214, 314, 223, 324 ], "score": 0.74, "content": "S", "type": "inline_equation" }, { "bbox": [ 223, 314, 469, 326 ], "score": 1.0, "content": "equal to the number of heads in the attention mechanism and", "type": "text" }, { "bbox": [ 470, 315, 482, 324 ], "score": 0.81, "content": "M", "type": "inline_equation" }, { "bbox": [ 482, 314, 505, 326 ], "score": 1.0, "content": "to be", "type": "text" } ], "index": 9 }, { "bbox": [ 106, 325, 505, 336 ], "spans": [ { "bbox": [ 106, 325, 505, 336 ], "score": 1.0, "content": "the dimensionality of a single attention head. In this case, we can feed the output of the convolution", "type": "text" } ], "index": 10 }, { "bbox": [ 105, 335, 505, 348 ], "spans": [ { "bbox": [ 105, 335, 505, 348 ], "score": 1.0, "content": "directly to the attention mechanism without reshaping the output. This convolutional layer has", "type": "text" } ], "index": 11 }, { "bbox": [ 105, 344, 505, 360 ], "spans": [ { "bbox": [ 105, 344, 177, 360 ], "score": 1.0, "content": "fewer parameters", "type": "text" }, { "bbox": [ 177, 346, 355, 358 ], "score": 0.92, "content": "( 9 M ^ { 2 } + M = F ^ { 2 } ( d _ { \\mathrm { m o d e l } } / S ) ^ { 2 } + ( \\bar { d } _ { \\mathrm { m o d e l } } / S ) )", "type": "inline_equation" }, { "bbox": [ 355, 344, 505, 360 ], "score": 1.0, "content": ", and lower computational complexity", "type": "text" } ], "index": 12 }, { "bbox": [ 107, 356, 380, 372 ], "spans": [ { "bbox": [ 107, 357, 163, 370 ], "score": 0.89, "content": "( O ( d _ { \\mathrm { m o d e l } } ^ { 2 } / S ) )", "type": "inline_equation" }, { "bbox": [ 163, 356, 298, 372 ], "score": 1.0, "content": "). Unless stated otherwise, we use", "type": "text" }, { "bbox": [ 298, 358, 329, 368 ], "score": 0.88, "content": "S = 1 6", "type": "inline_equation" }, { "bbox": [ 330, 356, 347, 372 ], "score": 1.0, "content": "and", "type": "text" }, { "bbox": [ 347, 358, 374, 368 ], "score": 0.9, "content": "F = 3", "type": "inline_equation" }, { "bbox": [ 375, 356, 380, 372 ], "score": 1.0, "content": ".", "type": "text" } ], "index": 13 } ], "index": 10.5 }, { "type": "text", "bbox": [ 107, 382, 506, 483 ], "lines": [ { "bbox": [ 106, 382, 505, 396 ], "spans": [ { "bbox": [ 106, 382, 505, 396 ], "score": 1.0, "content": "Combining multiplicative and convolutional layers. There are four dense layers to replace in", "type": "text" } ], "index": 14 }, { "bbox": [ 105, 393, 506, 406 ], "spans": [ { "bbox": [ 105, 393, 506, 406 ], "score": 1.0, "content": "the original attention mechanism: Q, K, V, and output. As shown in Figure 4(b), we replace Q, K,", "type": "text" } ], "index": 15 }, { "bbox": [ 106, 405, 506, 417 ], "spans": [ { "bbox": [ 106, 405, 123, 417 ], "score": 1.0, "content": "and", "type": "text" }, { "bbox": [ 123, 405, 132, 415 ], "score": 0.49, "content": "\\mathrm { v }", "type": "inline_equation" }, { "bbox": [ 133, 405, 506, 417 ], "score": 1.0, "content": "dense layers by composing multiplicative and convolutional layers, but with a multiplicative", "type": "text" } ], "index": 16 }, { "bbox": [ 105, 414, 506, 429 ], "spans": [ { "bbox": [ 105, 414, 226, 429 ], "score": 1.0, "content": "layer shared across all three:", "type": "text" }, { "bbox": [ 227, 416, 315, 428 ], "score": 0.87, "content": "Q = \\mathsf { c o n v } _ { Q } ( \\mathsf { m u l t } ( x ) )", "type": "inline_equation" }, { "bbox": [ 315, 414, 319, 429 ], "score": 1.0, "content": ",", "type": "text" }, { "bbox": [ 319, 416, 410, 428 ], "score": 0.76, "content": "K = \\operatorname { c o n v } _ { K } ( \\operatorname { m u l t } ( x ) )", "type": "inline_equation" }, { "bbox": [ 410, 414, 414, 429 ], "score": 1.0, "content": ",", "type": "text" }, { "bbox": [ 414, 415, 502, 428 ], "score": 0.84, "content": "V = \\mathrm { c o n v } _ { V } ( \\bar { \\mathrm { m u l t } } ( x ) )", "type": "inline_equation" }, { "bbox": [ 503, 414, 506, 429 ], "score": 1.0, "content": ".", "type": "text" } ], "index": 17 }, { "bbox": [ 105, 425, 506, 439 ], "spans": [ { "bbox": [ 105, 425, 506, 439 ], "score": 1.0, "content": "We remove the output dense layer. Note that the combined multiplicative-convolutional variant has", "type": "text" } ], "index": 18 }, { "bbox": [ 105, 437, 506, 451 ], "spans": [ { "bbox": [ 105, 437, 506, 451 ], "score": 1.0, "content": "the output dense layer removed, while the other variants have it replaced with their respective sparse", "type": "text" } ], "index": 19 }, { "bbox": [ 106, 448, 506, 461 ], "spans": [ { "bbox": [ 106, 448, 485, 461 ], "score": 1.0, "content": "layers. Including this output layer negatively impacts decoding time. We can set the parameter √", "type": "text" }, { "bbox": [ 486, 449, 494, 458 ], "score": 0.82, "content": "S", "type": "inline_equation" }, { "bbox": [ 494, 448, 506, 461 ], "score": 1.0, "content": "to", "type": "text" } ], "index": 20 }, { "bbox": [ 104, 457, 507, 475 ], "spans": [ { "bbox": [ 104, 457, 137, 475 ], "score": 1.0, "content": "around", "type": "text" }, { "bbox": [ 137, 459, 173, 470 ], "score": 0.92, "content": "\\sqrt { d _ { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 173, 457, 434, 475 ], "score": 1.0, "content": ", getting the number of layer parameters to scale proportionally to", "type": "text" }, { "bbox": [ 434, 459, 462, 471 ], "score": 0.91, "content": "d _ { m o d e l } ^ { 1 . 5 }", "type": "inline_equation" }, { "bbox": [ 462, 457, 507, 475 ], "score": 1.0, "content": "compared", "type": "text" } ], "index": 21 }, { "bbox": [ 104, 468, 243, 488 ], "spans": [ { "bbox": [ 104, 468, 117, 488 ], "score": 1.0, "content": "to", "type": "text" }, { "bbox": [ 117, 470, 145, 483 ], "score": 0.91, "content": "d _ { m o d e l } ^ { 2 }", "type": "inline_equation" }, { "bbox": [ 145, 468, 243, 488 ], "score": 1.0, "content": "of standard QKV layer.", "type": "text" } ], "index": 22 } ], "index": 18 }, { "type": "text", "bbox": [ 106, 496, 505, 584 ], "lines": [ { "bbox": [ 106, 497, 505, 509 ], "spans": [ { "bbox": [ 106, 497, 346, 509 ], "score": 1.0, "content": "Interpretation of QKV layer. Note that when parameter", "type": "text" }, { "bbox": [ 346, 497, 354, 507 ], "score": 0.81, "content": "S", "type": "inline_equation" }, { "bbox": [ 354, 497, 505, 509 ], "score": 1.0, "content": "in convolutional layer is equal to the", "type": "text" } ], "index": 23 }, { "bbox": [ 105, 507, 506, 519 ], "spans": [ { "bbox": [ 105, 507, 506, 519 ], "score": 1.0, "content": "number of heads in the attention mechanism, which is the case in our experiments, then each of the S", "type": "text" } ], "index": 24 }, { "bbox": [ 105, 518, 505, 531 ], "spans": [ { "bbox": [ 105, 518, 505, 531 ], "score": 1.0, "content": "modules corresponds to a single attention head. Therefore, the model uses the convolution to process", "type": "text" } ], "index": 25 }, { "bbox": [ 106, 530, 505, 542 ], "spans": [ { "bbox": [ 106, 530, 505, 542 ], "score": 1.0, "content": "each head using the same linear projection. Without the multiplicative layer this projection would", "type": "text" } ], "index": 26 }, { "bbox": [ 105, 540, 506, 553 ], "spans": [ { "bbox": [ 105, 540, 506, 553 ], "score": 1.0, "content": "operate on a predetermined part of the embedding layer for each head. However, by adding it the", "type": "text" } ], "index": 27 }, { "bbox": [ 105, 550, 505, 564 ], "spans": [ { "bbox": [ 105, 550, 505, 564 ], "score": 1.0, "content": "model can perform arbitrary permutation of dimensions, so each head can have access to arbitrary", "type": "text" } ], "index": 28 }, { "bbox": [ 104, 560, 506, 576 ], "spans": [ { "bbox": [ 104, 560, 506, 576 ], "score": 1.0, "content": "subset of embedding dimensions, not a predetermined subset of them. This fact helps with keeping", "type": "text" } ], "index": 29 }, { "bbox": [ 106, 573, 444, 585 ], "spans": [ { "bbox": [ 106, 573, 444, 585 ], "score": 1.0, "content": "the expressibility of resulting QKV layer despite the reduced number of parameters.", "type": "text" } ], "index": 30 } ], "index": 26.5 }, { "type": "text", "bbox": [ 107, 598, 505, 642 ], "lines": [ { "bbox": [ 105, 597, 505, 611 ], "spans": [ { "bbox": [ 105, 597, 505, 611 ], "score": 1.0, "content": "Ablations. We investigate the impact of sparse QKV layers on the model equivalent to T5-large in", "type": "text" } ], "index": 31 }, { "bbox": [ 105, 609, 505, 621 ], "spans": [ { "bbox": [ 105, 609, 245, 621 ], "score": 1.0, "content": "Figure 5. We increase the value of", "type": "text" }, { "bbox": [ 246, 609, 257, 620 ], "score": 0.89, "content": "d _ { \\mathrm { f f } }", "type": "inline_equation" }, { "bbox": [ 258, 609, 505, 621 ], "score": 1.0, "content": "from 4096 to 6144 to preserve the number of parameters (see", "type": "text" } ], "index": 32 }, { "bbox": [ 105, 621, 505, 632 ], "spans": [ { "bbox": [ 105, 621, 505, 632 ], "score": 1.0, "content": "the next subsection for details). The decoding time with sparse QKV layer variants is similar to the", "type": "text" } ], "index": 33 }, { "bbox": [ 105, 631, 450, 643 ], "spans": [ { "bbox": [ 105, 631, 450, 643 ], "score": 1.0, "content": "baseline because it is dominated by the dense feedforward layer (details in appendix).", "type": "text" } ], "index": 34 } ], "index": 32.5 }, { "type": "text", "bbox": [ 107, 655, 505, 722 ], "lines": [ { "bbox": [ 106, 655, 505, 668 ], "spans": [ { "bbox": [ 106, 655, 505, 668 ], "score": 1.0, "content": "Combined feedforward and QKV sparsity. Sparse QKV layers lower the total number of model", "type": "text" } ], "index": 35 }, { "bbox": [ 105, 667, 506, 679 ], "spans": [ { "bbox": [ 105, 667, 401, 679 ], "score": 1.0, "content": "parameters. To keep the model size matched to the baseline, we increase", "type": "text" }, { "bbox": [ 401, 667, 414, 678 ], "score": 0.87, "content": "d _ { \\mathrm { f f } }", "type": "inline_equation" }, { "bbox": [ 414, 667, 506, 679 ], "score": 1.0, "content": "to keep the number of", "type": "text" } ], "index": 36 }, { "bbox": [ 105, 678, 505, 691 ], "spans": [ { "bbox": [ 105, 678, 505, 691 ], "score": 1.0, "content": "parameters similar across all models we compare. For the T5-Large equivalent model, we increase", "type": "text" } ], "index": 37 }, { "bbox": [ 107, 689, 506, 701 ], "spans": [ { "bbox": [ 107, 689, 118, 700 ], "score": 0.87, "content": "d _ { \\mathrm { f f } }", "type": "inline_equation" }, { "bbox": [ 119, 689, 259, 701 ], "score": 1.0, "content": "from 4096 to 6144. With increased", "type": "text" }, { "bbox": [ 260, 689, 271, 700 ], "score": 0.88, "content": "d _ { \\mathrm { f f } }", "type": "inline_equation" }, { "bbox": [ 271, 689, 506, 701 ], "score": 1.0, "content": ", decoding time in the feedforward layer increases and thus,", "type": "text" } ], "index": 38 }, { "bbox": [ 105, 699, 505, 712 ], "spans": [ { "bbox": [ 105, 699, 505, 712 ], "score": 1.0, "content": "Sparse QKV layers alone do not speed up the model. However, when we combine Sparse QKV", "type": "text" } ], "index": 39 }, { "bbox": [ 105, 711, 505, 723 ], "spans": [ { "bbox": [ 105, 711, 259, 723 ], "score": 1.0, "content": "layers with sparse FF layers, we get a", "type": "text" }, { "bbox": [ 259, 711, 283, 721 ], "score": 0.76, "content": "3 . 0 5 \\mathrm { x }", "type": "inline_equation" }, { "bbox": [ 284, 711, 505, 723 ], "score": 1.0, "content": "speedup in decoding time of each decoding block with", "type": "text" } ], "index": 40 } ], "index": 37.5 } ], "page_idx": 5, "page_size": [ 612, 792 ], "discarded_blocks": [ { "type": "discarded", "bbox": [ 302, 742, 308, 750 ], "lines": [ { "bbox": [ 302, 741, 309, 752 ], "spans": [ { "bbox": [ 302, 741, 309, 752 ], "score": 1.0, "content": "6", "type": "text" } ] } ] } ], "para_blocks": [ { "type": "image", "bbox": [ 111, 72, 491, 209 ], "blocks": [ { "type": "image_body", "bbox": [ 111, 72, 491, 209 ], "group_id": 0, "lines": [ { "bbox": [ 111, 72, 491, 209 ], "spans": [ { "bbox": [ 111, 72, 491, 209 ], "score": 0.973, "type": "image", "image_path": "ed65a04b556b2c7f59046221bc1abec14f54e58c97b0ccf5209a23b0145f85a8.jpg" } ] } ], "index": 1, "virtual_lines": [ { "bbox": [ 111, 72, 491, 117.66666666666666 ], "spans": [], "index": 0 }, { "bbox": [ 111, 117.66666666666666, 491, 163.33333333333331 ], "spans": [], "index": 1 }, { "bbox": [ 111, 163.33333333333331, 491, 208.99999999999997 ], "spans": [], "index": 2 } ] }, { "type": "image_caption", "bbox": [ 107, 221, 503, 253 ], "group_id": 0, "lines": [ { "bbox": [ 105, 222, 506, 234 ], "spans": [ { "bbox": [ 105, 222, 506, 234 ], "score": 1.0, "content": "Figure 4: (a) Multiplicative layer can represent an arbitrary permutation, but has fewer parameters and reduced", "type": "text" } ], "index": 3 }, { "bbox": [ 105, 232, 505, 244 ], "spans": [ { "bbox": [ 105, 232, 397, 244 ], "score": 1.0, "content": "computation time compared to a dense layer. (b) Sparse QKV layer replaces", "type": "text" }, { "bbox": [ 397, 232, 417, 242 ], "score": 0.35, "content": "Q , K ,", "type": "inline_equation" }, { "bbox": [ 417, 232, 436, 244 ], "score": 1.0, "content": ", and", "type": "text" }, { "bbox": [ 437, 232, 444, 241 ], "score": 0.57, "content": "V", "type": "inline_equation" }, { "bbox": [ 445, 232, 505, 244 ], "score": 1.0, "content": "dense layers by", "type": "text" } ], "index": 4 }, { "bbox": [ 105, 242, 504, 254 ], "spans": [ { "bbox": [ 105, 242, 504, 254 ], "score": 1.0, "content": "composing multiplicative and convolutional layers and reducing the number of parameters and decoding time.", "type": "text" } ], "index": 5 } ], "index": 4 } ], "index": 2.5 }, { "type": "text", "bbox": [ 107, 275, 503, 298 ], "lines": [], "index": 6.5, "bbox_fs": [ 105, 275, 504, 299 ], "lines_deleted": true }, { "type": "text", "bbox": [ 107, 302, 505, 369 ], "lines": [ { "bbox": [ 105, 301, 503, 316 ], "spans": [ { "bbox": [ 105, 301, 415, 316 ], "score": 1.0, "content": "The output of this layer has the same shape as the input. The optimal value of", "type": "text" }, { "bbox": [ 416, 303, 423, 313 ], "score": 0.82, "content": "S", "type": "inline_equation" }, { "bbox": [ 424, 301, 470, 316 ], "score": 1.0, "content": "is less than", "type": "text" }, { "bbox": [ 471, 302, 503, 314 ], "score": 0.91, "content": "\\sqrt { d _ { \\mathrm { m o d e l } } }", "type": "inline_equation" } ], "index": 8 }, { "bbox": [ 106, 314, 505, 326 ], "spans": [ { "bbox": [ 106, 314, 184, 326 ], "score": 1.0, "content": "Empirically we set", "type": "text" }, { "bbox": [ 184, 315, 193, 324 ], "score": 0.83, "content": "F", "type": "inline_equation" }, { "bbox": [ 193, 314, 214, 326 ], "score": 1.0, "content": "to 3,", "type": "text" }, { "bbox": [ 214, 314, 223, 324 ], "score": 0.74, "content": "S", "type": "inline_equation" }, { "bbox": [ 223, 314, 469, 326 ], "score": 1.0, "content": "equal to the number of heads in the attention mechanism and", "type": "text" }, { "bbox": [ 470, 315, 482, 324 ], "score": 0.81, "content": "M", "type": "inline_equation" }, { "bbox": [ 482, 314, 505, 326 ], "score": 1.0, "content": "to be", "type": "text" } ], "index": 9 }, { "bbox": [ 106, 325, 505, 336 ], "spans": [ { "bbox": [ 106, 325, 505, 336 ], "score": 1.0, "content": "the dimensionality of a single attention head. In this case, we can feed the output of the convolution", "type": "text" } ], "index": 10 }, { "bbox": [ 105, 335, 505, 348 ], "spans": [ { "bbox": [ 105, 335, 505, 348 ], "score": 1.0, "content": "directly to the attention mechanism without reshaping the output. This convolutional layer has", "type": "text" } ], "index": 11 }, { "bbox": [ 105, 344, 505, 360 ], "spans": [ { "bbox": [ 105, 344, 177, 360 ], "score": 1.0, "content": "fewer parameters", "type": "text" }, { "bbox": [ 177, 346, 355, 358 ], "score": 0.92, "content": "( 9 M ^ { 2 } + M = F ^ { 2 } ( d _ { \\mathrm { m o d e l } } / S ) ^ { 2 } + ( \\bar { d } _ { \\mathrm { m o d e l } } / S ) )", "type": "inline_equation" }, { "bbox": [ 355, 344, 505, 360 ], "score": 1.0, "content": ", and lower computational complexity", "type": "text" } ], "index": 12 }, { "bbox": [ 107, 356, 380, 372 ], "spans": [ { "bbox": [ 107, 357, 163, 370 ], "score": 0.89, "content": "( O ( d _ { \\mathrm { m o d e l } } ^ { 2 } / S ) )", "type": "inline_equation" }, { "bbox": [ 163, 356, 298, 372 ], "score": 1.0, "content": "). Unless stated otherwise, we use", "type": "text" }, { "bbox": [ 298, 358, 329, 368 ], "score": 0.88, "content": "S = 1 6", "type": "inline_equation" }, { "bbox": [ 330, 356, 347, 372 ], "score": 1.0, "content": "and", "type": "text" }, { "bbox": [ 347, 358, 374, 368 ], "score": 0.9, "content": "F = 3", "type": "inline_equation" }, { "bbox": [ 375, 356, 380, 372 ], "score": 1.0, "content": ".", "type": "text" } ], "index": 13 } ], "index": 10.5, "bbox_fs": [ 105, 301, 505, 372 ] }, { "type": "text", "bbox": [ 107, 382, 506, 483 ], "lines": [ { "bbox": [ 106, 382, 505, 396 ], "spans": [ { "bbox": [ 106, 382, 505, 396 ], "score": 1.0, "content": "Combining multiplicative and convolutional layers. There are four dense layers to replace in", "type": "text" } ], "index": 14 }, { "bbox": [ 105, 393, 506, 406 ], "spans": [ { "bbox": [ 105, 393, 506, 406 ], "score": 1.0, "content": "the original attention mechanism: Q, K, V, and output. As shown in Figure 4(b), we replace Q, K,", "type": "text" } ], "index": 15 }, { "bbox": [ 106, 405, 506, 417 ], "spans": [ { "bbox": [ 106, 405, 123, 417 ], "score": 1.0, "content": "and", "type": "text" }, { "bbox": [ 123, 405, 132, 415 ], "score": 0.49, "content": "\\mathrm { v }", "type": "inline_equation" }, { "bbox": [ 133, 405, 506, 417 ], "score": 1.0, "content": "dense layers by composing multiplicative and convolutional layers, but with a multiplicative", "type": "text" } ], "index": 16 }, { "bbox": [ 105, 414, 506, 429 ], "spans": [ { "bbox": [ 105, 414, 226, 429 ], "score": 1.0, "content": "layer shared across all three:", "type": "text" }, { "bbox": [ 227, 416, 315, 428 ], "score": 0.87, "content": "Q = \\mathsf { c o n v } _ { Q } ( \\mathsf { m u l t } ( x ) )", "type": "inline_equation" }, { "bbox": [ 315, 414, 319, 429 ], "score": 1.0, "content": ",", "type": "text" }, { "bbox": [ 319, 416, 410, 428 ], "score": 0.76, "content": "K = \\operatorname { c o n v } _ { K } ( \\operatorname { m u l t } ( x ) )", "type": "inline_equation" }, { "bbox": [ 410, 414, 414, 429 ], "score": 1.0, "content": ",", "type": "text" }, { "bbox": [ 414, 415, 502, 428 ], "score": 0.84, "content": "V = \\mathrm { c o n v } _ { V } ( \\bar { \\mathrm { m u l t } } ( x ) )", "type": "inline_equation" }, { "bbox": [ 503, 414, 506, 429 ], "score": 1.0, "content": ".", "type": "text" } ], "index": 17 }, { "bbox": [ 105, 425, 506, 439 ], "spans": [ { "bbox": [ 105, 425, 506, 439 ], "score": 1.0, "content": "We remove the output dense layer. Note that the combined multiplicative-convolutional variant has", "type": "text" } ], "index": 18 }, { "bbox": [ 105, 437, 506, 451 ], "spans": [ { "bbox": [ 105, 437, 506, 451 ], "score": 1.0, "content": "the output dense layer removed, while the other variants have it replaced with their respective sparse", "type": "text" } ], "index": 19 }, { "bbox": [ 106, 448, 506, 461 ], "spans": [ { "bbox": [ 106, 448, 485, 461 ], "score": 1.0, "content": "layers. Including this output layer negatively impacts decoding time. We can set the parameter √", "type": "text" }, { "bbox": [ 486, 449, 494, 458 ], "score": 0.82, "content": "S", "type": "inline_equation" }, { "bbox": [ 494, 448, 506, 461 ], "score": 1.0, "content": "to", "type": "text" } ], "index": 20 }, { "bbox": [ 104, 457, 507, 475 ], "spans": [ { "bbox": [ 104, 457, 137, 475 ], "score": 1.0, "content": "around", "type": "text" }, { "bbox": [ 137, 459, 173, 470 ], "score": 0.92, "content": "\\sqrt { d _ { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 173, 457, 434, 475 ], "score": 1.0, "content": ", getting the number of layer parameters to scale proportionally to", "type": "text" }, { "bbox": [ 434, 459, 462, 471 ], "score": 0.91, "content": "d _ { m o d e l } ^ { 1 . 5 }", "type": "inline_equation" }, { "bbox": [ 462, 457, 507, 475 ], "score": 1.0, "content": "compared", "type": "text" } ], "index": 21 }, { "bbox": [ 104, 468, 243, 488 ], "spans": [ { "bbox": [ 104, 468, 117, 488 ], "score": 1.0, "content": "to", "type": "text" }, { "bbox": [ 117, 470, 145, 483 ], "score": 0.91, "content": "d _ { m o d e l } ^ { 2 }", "type": "inline_equation" }, { "bbox": [ 145, 468, 243, 488 ], "score": 1.0, "content": "of standard QKV layer.", "type": "text" } ], "index": 22 } ], "index": 18, "bbox_fs": [ 104, 382, 507, 488 ] }, { "type": "text", "bbox": [ 106, 496, 505, 584 ], "lines": [ { "bbox": [ 106, 497, 505, 509 ], "spans": [ { "bbox": [ 106, 497, 346, 509 ], "score": 1.0, "content": "Interpretation of QKV layer. Note that when parameter", "type": "text" }, { "bbox": [ 346, 497, 354, 507 ], "score": 0.81, "content": "S", "type": "inline_equation" }, { "bbox": [ 354, 497, 505, 509 ], "score": 1.0, "content": "in convolutional layer is equal to the", "type": "text" } ], "index": 23 }, { "bbox": [ 105, 507, 506, 519 ], "spans": [ { "bbox": [ 105, 507, 506, 519 ], "score": 1.0, "content": "number of heads in the attention mechanism, which is the case in our experiments, then each of the S", "type": "text" } ], "index": 24 }, { "bbox": [ 105, 518, 505, 531 ], "spans": [ { "bbox": [ 105, 518, 505, 531 ], "score": 1.0, "content": "modules corresponds to a single attention head. Therefore, the model uses the convolution to process", "type": "text" } ], "index": 25 }, { "bbox": [ 106, 530, 505, 542 ], "spans": [ { "bbox": [ 106, 530, 505, 542 ], "score": 1.0, "content": "each head using the same linear projection. Without the multiplicative layer this projection would", "type": "text" } ], "index": 26 }, { "bbox": [ 105, 540, 506, 553 ], "spans": [ { "bbox": [ 105, 540, 506, 553 ], "score": 1.0, "content": "operate on a predetermined part of the embedding layer for each head. However, by adding it the", "type": "text" } ], "index": 27 }, { "bbox": [ 105, 550, 505, 564 ], "spans": [ { "bbox": [ 105, 550, 505, 564 ], "score": 1.0, "content": "model can perform arbitrary permutation of dimensions, so each head can have access to arbitrary", "type": "text" } ], "index": 28 }, { "bbox": [ 104, 560, 506, 576 ], "spans": [ { "bbox": [ 104, 560, 506, 576 ], "score": 1.0, "content": "subset of embedding dimensions, not a predetermined subset of them. This fact helps with keeping", "type": "text" } ], "index": 29 }, { "bbox": [ 106, 573, 444, 585 ], "spans": [ { "bbox": [ 106, 573, 444, 585 ], "score": 1.0, "content": "the expressibility of resulting QKV layer despite the reduced number of parameters.", "type": "text" } ], "index": 30 } ], "index": 26.5, "bbox_fs": [ 104, 497, 506, 585 ] }, { "type": "text", "bbox": [ 107, 598, 505, 642 ], "lines": [ { "bbox": [ 105, 597, 505, 611 ], "spans": [ { "bbox": [ 105, 597, 505, 611 ], "score": 1.0, "content": "Ablations. We investigate the impact of sparse QKV layers on the model equivalent to T5-large in", "type": "text" } ], "index": 31 }, { "bbox": [ 105, 609, 505, 621 ], "spans": [ { "bbox": [ 105, 609, 245, 621 ], "score": 1.0, "content": "Figure 5. We increase the value of", "type": "text" }, { "bbox": [ 246, 609, 257, 620 ], "score": 0.89, "content": "d _ { \\mathrm { f f } }", "type": "inline_equation" }, { "bbox": [ 258, 609, 505, 621 ], "score": 1.0, "content": "from 4096 to 6144 to preserve the number of parameters (see", "type": "text" } ], "index": 32 }, { "bbox": [ 105, 621, 505, 632 ], "spans": [ { "bbox": [ 105, 621, 505, 632 ], "score": 1.0, "content": "the next subsection for details). The decoding time with sparse QKV layer variants is similar to the", "type": "text" } ], "index": 33 }, { "bbox": [ 105, 631, 450, 643 ], "spans": [ { "bbox": [ 105, 631, 450, 643 ], "score": 1.0, "content": "baseline because it is dominated by the dense feedforward layer (details in appendix).", "type": "text" } ], "index": 34 } ], "index": 32.5, "bbox_fs": [ 105, 597, 505, 643 ] }, { "type": "text", "bbox": [ 107, 655, 505, 722 ], "lines": [ { "bbox": [ 106, 655, 505, 668 ], "spans": [ { "bbox": [ 106, 655, 505, 668 ], "score": 1.0, "content": "Combined feedforward and QKV sparsity. Sparse QKV layers lower the total number of model", "type": "text" } ], "index": 35 }, { "bbox": [ 105, 667, 506, 679 ], "spans": [ { "bbox": [ 105, 667, 401, 679 ], "score": 1.0, "content": "parameters. To keep the model size matched to the baseline, we increase", "type": "text" }, { "bbox": [ 401, 667, 414, 678 ], "score": 0.87, "content": "d _ { \\mathrm { f f } }", "type": "inline_equation" }, { "bbox": [ 414, 667, 506, 679 ], "score": 1.0, "content": "to keep the number of", "type": "text" } ], "index": 36 }, { "bbox": [ 105, 678, 505, 691 ], "spans": [ { "bbox": [ 105, 678, 505, 691 ], "score": 1.0, "content": "parameters similar across all models we compare. For the T5-Large equivalent model, we increase", "type": "text" } ], "index": 37 }, { "bbox": [ 107, 689, 506, 701 ], "spans": [ { "bbox": [ 107, 689, 118, 700 ], "score": 0.87, "content": "d _ { \\mathrm { f f } }", "type": "inline_equation" }, { "bbox": [ 119, 689, 259, 701 ], "score": 1.0, "content": "from 4096 to 6144. With increased", "type": "text" }, { "bbox": [ 260, 689, 271, 700 ], "score": 0.88, "content": "d _ { \\mathrm { f f } }", "type": "inline_equation" }, { "bbox": [ 271, 689, 506, 701 ], "score": 1.0, "content": ", decoding time in the feedforward layer increases and thus,", "type": "text" } ], "index": 38 }, { "bbox": [ 105, 699, 505, 712 ], "spans": [ { "bbox": [ 105, 699, 505, 712 ], "score": 1.0, "content": "Sparse QKV layers alone do not speed up the model. However, when we combine Sparse QKV", "type": "text" } ], "index": 39 }, { "bbox": [ 105, 711, 505, 723 ], "spans": [ { "bbox": [ 105, 711, 259, 723 ], "score": 1.0, "content": "layers with sparse FF layers, we get a", "type": "text" }, { "bbox": [ 259, 711, 283, 721 ], "score": 0.76, "content": "3 . 0 5 \\mathrm { x }", "type": "inline_equation" }, { "bbox": [ 284, 711, 505, 723 ], "score": 1.0, "content": "speedup in decoding time of each decoding block with", "type": "text" } ], "index": 40 }, { "bbox": [ 106, 340, 506, 353 ], "spans": [ { "bbox": [ 106, 340, 506, 353 ], "score": 1.0, "content": "comparable perplexity (see Table 1 and Figure 1). While the baseline these is a vanilla Transformer,", "type": "text", "cross_page": true } ], "index": 17 }, { "bbox": [ 106, 350, 383, 363 ], "spans": [ { "bbox": [ 106, 350, 383, 363 ], "score": 1.0, "content": "the decoding speed is almost the same for a Reformer model as well.", "type": "text", "cross_page": true } ], "index": 18 } ], "index": 37.5, "bbox_fs": [ 105, 655, 506, 723 ] } ] }, { "preproc_blocks": [ { "type": "image", "bbox": [ 189, 78, 423, 196 ], "blocks": [ { "type": "image_body", "bbox": [ 189, 78, 423, 196 ], "group_id": 0, "lines": [ { "bbox": [ 189, 78, 423, 196 ], "spans": [ { "bbox": [ 189, 78, 423, 196 ], "score": 0.962, "type": "image", "image_path": "d213ea3b0b9120e322632b738ce67e83f4326db02f5b68b218cc93b00f9e0dff.jpg" } ] } ], "index": 4, "virtual_lines": [ { "bbox": [ 189, 78, 423, 91.11111111111111 ], "spans": [], "index": 0 }, { "bbox": [ 189, 91.11111111111111, 423, 104.22222222222223 ], "spans": [], "index": 1 }, { "bbox": [ 189, 104.22222222222223, 423, 117.33333333333334 ], "spans": [], "index": 2 }, { "bbox": [ 189, 117.33333333333334, 423, 130.44444444444446 ], "spans": [], "index": 3 }, { "bbox": [ 189, 130.44444444444446, 423, 143.55555555555557 ], "spans": [], "index": 4 }, { "bbox": [ 189, 143.55555555555557, 423, 156.66666666666669 ], "spans": [], "index": 5 }, { "bbox": [ 189, 156.66666666666669, 423, 169.7777777777778 ], "spans": [], "index": 6 }, { "bbox": [ 189, 169.7777777777778, 423, 182.8888888888889 ], "spans": [], "index": 7 }, { "bbox": [ 189, 182.8888888888889, 423, 196.00000000000003 ], "spans": [], "index": 8 } ] } ], "index": 4 }, { "type": "table", "bbox": [ 108, 242, 505, 279 ], "blocks": [ { "type": "table_caption", "bbox": [ 106, 210, 504, 231 ], "group_id": 0, "lines": [ { "bbox": [ 105, 210, 506, 222 ], "spans": [ { "bbox": [ 105, 210, 506, 222 ], "score": 1.0, "content": "Figure 5: Log-perplexity of Scaling Transformers with Sparse QKV with different sparsity levels (S) and kernel", "type": "text" } ], "index": 9 }, { "bbox": [ 105, 220, 471, 233 ], "spans": [ { "bbox": [ 105, 220, 471, 233 ], "score": 1.0, "content": "sizes (F) is very similar to dense baseline within variance while multi-layer even improves perplexity.", "type": "text" } ], "index": 10 } ], "index": 9.5 }, { "type": "table_body", "bbox": [ 108, 242, 505, 279 ], "group_id": 0, "lines": [ { "bbox": [ 108, 242, 505, 279 ], "spans": [ { "bbox": [ 108, 242, 505, 279 ], "score": 0.961, "html": "
RTEMRPCSST-2QNLIMNLI-mQQP
Baseline Transformer (dense)70.1 ± 1.183.6±0.7292.6±0.8588.6±0.578.5 ± 0.4185.2±0.6
Scaling Transformer (Sparse FF+QKV)68.481.291.690.182.989.9
Terraformer (Sparse FF+QKV)66.184.692.388.379.185.5
", "type": "table", "image_path": "acdb8d778534c3dacf7860f8e945aa587869fa165f5ff181904a258d7e683be8.jpg" } ] } ], "index": 12, "virtual_lines": [ { "bbox": [ 108, 242, 505, 254.33333333333334 ], "spans": [], "index": 11 }, { "bbox": [ 108, 254.33333333333334, 505, 266.6666666666667 ], "spans": [], "index": 12 }, { "bbox": [ 108, 266.6666666666667, 505, 279.0 ], "spans": [], "index": 13 } ] }, { "type": "table_caption", "bbox": [ 106, 287, 505, 318 ], "group_id": 0, "lines": [ { "bbox": [ 105, 287, 505, 299 ], "spans": [ { "bbox": [ 105, 287, 407, 299 ], "score": 1.0, "content": "Table 3: Accuracy of Scaling Transformer model and Terraformer model with sparse", "type": "text" }, { "bbox": [ 407, 288, 443, 298 ], "score": 0.86, "content": "Q K V + F F", "type": "inline_equation" }, { "bbox": [ 443, 287, 505, 299 ], "score": 1.0, "content": "is comparable to", "type": "text" } ], "index": 14 }, { "bbox": [ 106, 298, 505, 308 ], "spans": [ { "bbox": [ 106, 298, 505, 308 ], "score": 1.0, "content": "the baseline Transformer within variance. The results are obtained by fine-tuning on selected downstream tasks", "type": "text" } ], "index": 15 }, { "bbox": [ 105, 308, 256, 318 ], "spans": [ { "bbox": [ 105, 308, 256, 318 ], "score": 1.0, "content": "from the GLUE dataset (validation split).", "type": "text" } ], "index": 16 } ], "index": 15 } ], "index": 12 }, { "type": "text", "bbox": [ 107, 339, 505, 362 ], "lines": [ { "bbox": [ 106, 340, 506, 353 ], "spans": [ { "bbox": [ 106, 340, 506, 353 ], "score": 1.0, "content": "comparable perplexity (see Table 1 and Figure 1). While the baseline these is a vanilla Transformer,", "type": "text" } ], "index": 17 }, { "bbox": [ 106, 350, 383, 363 ], "spans": [ { "bbox": [ 106, 350, 383, 363 ], "score": 1.0, "content": "the decoding speed is almost the same for a Reformer model as well.", "type": "text" } ], "index": 18 } ], "index": 17.5 }, { "type": "text", "bbox": [ 106, 367, 504, 389 ], "lines": [ { "bbox": [ 106, 367, 506, 379 ], "spans": [ { "bbox": [ 106, 367, 506, 379 ], "score": 1.0, "content": "Table 3 shows the accuracy of fine-tuning the model for downstream tasks from the GLUE dataset.", "type": "text" } ], "index": 19 }, { "bbox": [ 105, 377, 440, 390 ], "spans": [ { "bbox": [ 105, 377, 244, 390 ], "score": 1.0, "content": "Note that the model with sparseFF", "type": "text" }, { "bbox": [ 245, 379, 251, 388 ], "score": 0.3, "content": "^ +", "type": "inline_equation" }, { "bbox": [ 251, 377, 440, 390 ], "score": 1.0, "content": "QKV achieves accuracy similar to the baseline.", "type": "text" } ], "index": 20 } ], "index": 19.5 }, { "type": "title", "bbox": [ 107, 403, 202, 414 ], "lines": [ { "bbox": [ 105, 401, 204, 417 ], "spans": [ { "bbox": [ 105, 401, 204, 417 ], "score": 1.0, "content": "3.3 Sparse loss layer.", "type": "text" } ], "index": 21 } ], "index": 21 }, { "type": "text", "bbox": [ 107, 423, 505, 466 ], "lines": [ { "bbox": [ 105, 423, 505, 434 ], "spans": [ { "bbox": [ 105, 423, 505, 434 ], "score": 1.0, "content": "A final dense layer maps the model embedding into vocabulary size to compute the loss. We can", "type": "text" } ], "index": 22 }, { "bbox": [ 105, 434, 505, 446 ], "spans": [ { "bbox": [ 105, 434, 505, 446 ], "score": 1.0, "content": "sparsify this part of the model by replacing the dense layer with a multiplicative layer similar to", "type": "text" } ], "index": 23 }, { "bbox": [ 105, 445, 505, 458 ], "spans": [ { "bbox": [ 105, 445, 505, 458 ], "score": 1.0, "content": "previous sections; this speeds up decoding time but may degrade perplexity. The results are presented", "type": "text" } ], "index": 24 }, { "bbox": [ 104, 456, 159, 468 ], "spans": [ { "bbox": [ 104, 456, 159, 468 ], "score": 1.0, "content": "in appendix.", "type": "text" } ], "index": 25 } ], "index": 23.5 }, { "type": "title", "bbox": [ 107, 482, 271, 496 ], "lines": [ { "bbox": [ 104, 480, 273, 500 ], "spans": [ { "bbox": [ 104, 480, 273, 500 ], "score": 1.0, "content": "4 Sparsity for Long Sequences", "type": "text" } ], "index": 26 } ], "index": 26 }, { "type": "text", "bbox": [ 107, 507, 505, 573 ], "lines": [ { "bbox": [ 106, 507, 506, 520 ], "spans": [ { "bbox": [ 106, 507, 506, 520 ], "score": 1.0, "content": "The above gains from sparsifying the dense layers are encouraging, but we omitted one fundamental", "type": "text" } ], "index": 27 }, { "bbox": [ 105, 519, 505, 531 ], "spans": [ { "bbox": [ 105, 519, 505, 531 ], "score": 1.0, "content": "issue. When applied to longer sequences, the gains would effectively be lost, as the decoding time", "type": "text" } ], "index": 28 }, { "bbox": [ 105, 528, 506, 543 ], "spans": [ { "bbox": [ 105, 528, 506, 543 ], "score": 1.0, "content": "will be dominated by attention operations. Luckily, a number of methods have been proposed to", "type": "text" } ], "index": 29 }, { "bbox": [ 106, 541, 505, 553 ], "spans": [ { "bbox": [ 106, 541, 505, 553 ], "score": 1.0, "content": "solve this problem for Transformers, see [41] for a survey. We focus on the LSH (Locality-Sensitive", "type": "text" } ], "index": 30 }, { "bbox": [ 105, 550, 506, 564 ], "spans": [ { "bbox": [ 105, 550, 506, 564 ], "score": 1.0, "content": "Hashing) attention from Reformer [19] and show how to integrate this sparse attention mechanism,", "type": "text" } ], "index": 31 }, { "bbox": [ 105, 562, 427, 575 ], "spans": [ { "bbox": [ 105, 562, 427, 575 ], "score": 1.0, "content": "as well as recurrent blocks, into a Scaling Transformer, yielding a Terraformer.", "type": "text" } ], "index": 32 } ], "index": 29.5 }, { "type": "title", "bbox": [ 108, 586, 270, 598 ], "lines": [ { "bbox": [ 105, 585, 272, 601 ], "spans": [ { "bbox": [ 105, 585, 272, 601 ], "score": 1.0, "content": "4.1 Architecture for Long Sequences", "type": "text" } ], "index": 33 } ], "index": 33 }, { "type": "text", "bbox": [ 106, 606, 505, 695 ], "lines": [ { "bbox": [ 105, 606, 505, 620 ], "spans": [ { "bbox": [ 105, 606, 505, 620 ], "score": 1.0, "content": "While integrating sparse attention layers into a Scaling Transformer, we notice that the architecture", "type": "text" } ], "index": 34 }, { "bbox": [ 105, 617, 506, 630 ], "spans": [ { "bbox": [ 105, 617, 506, 630 ], "score": 1.0, "content": "of the Transformer decoder block is suboptimal and can be redesigned to make a better use of these", "type": "text" } ], "index": 35 }, { "bbox": [ 105, 628, 506, 642 ], "spans": [ { "bbox": [ 105, 628, 506, 642 ], "score": 1.0, "content": "layers. In particular, separating decoder self-attention and encoder-decoder attention is not necessary", "type": "text" } ], "index": 36 }, { "bbox": [ 105, 640, 506, 652 ], "spans": [ { "bbox": [ 105, 640, 506, 652 ], "score": 1.0, "content": "any more from the perspective of efficiency. We therefore remove the encoder-decoder attention, but", "type": "text" } ], "index": 37 }, { "bbox": [ 104, 651, 505, 663 ], "spans": [ { "bbox": [ 104, 651, 505, 663 ], "score": 1.0, "content": "just concatenate the encoder representations before the decoder tokens. Doing this alone isn’t enough", "type": "text" } ], "index": 38 }, { "bbox": [ 105, 661, 505, 674 ], "spans": [ { "bbox": [ 105, 661, 505, 674 ], "score": 1.0, "content": "though, since we took away one attention mechanism (encoder-decoder attention). We remedy this", "type": "text" } ], "index": 39 }, { "bbox": [ 106, 673, 506, 685 ], "spans": [ { "bbox": [ 106, 673, 506, 685 ], "score": 1.0, "content": "by having two attention mechanisms before the feedforward block. This simple architecture is as fast", "type": "text" } ], "index": 40 }, { "bbox": [ 106, 684, 327, 695 ], "spans": [ { "bbox": [ 106, 684, 327, 695 ], "score": 1.0, "content": "as the baseline Transformer while giving better results.", "type": "text" } ], "index": 41 } ], "index": 37.5 }, { "type": "text", "bbox": [ 106, 700, 504, 722 ], "lines": [ { "bbox": [ 106, 699, 505, 712 ], "spans": [ { "bbox": [ 106, 699, 203, 712 ], "score": 1.0, "content": "Putting this together, if", "type": "text" }, { "bbox": [ 203, 702, 222, 711 ], "score": 0.88, "content": "v _ { e n c }", "type": "inline_equation" }, { "bbox": [ 222, 699, 351, 712 ], "score": 1.0, "content": "are the encoder activations and", "type": "text" }, { "bbox": [ 352, 702, 370, 711 ], "score": 0.87, "content": "v _ { d e c }", "type": "inline_equation" }, { "bbox": [ 370, 699, 505, 712 ], "score": 1.0, "content": "are the decoder embeddings, the", "type": "text" } ], "index": 42 }, { "bbox": [ 105, 709, 502, 725 ], "spans": [ { "bbox": [ 105, 709, 218, 725 ], "score": 1.0, "content": "input to the decoder block", "type": "text" }, { "bbox": [ 218, 713, 226, 721 ], "score": 0.78, "content": "x", "type": "inline_equation" }, { "bbox": [ 226, 709, 456, 725 ], "score": 1.0, "content": "is their concatenation on the length axis, LengthConcat", "type": "text" }, { "bbox": [ 456, 711, 502, 723 ], "score": 0.89, "content": "( v _ { e n c } , v _ { d e c } )", "type": "inline_equation" } ], "index": 43 } ], "index": 42.5 } ], "page_idx": 6, "page_size": [ 612, 792 ], "discarded_blocks": [ { "type": "discarded", "bbox": [ 302, 741, 309, 750 ], "lines": [ { "bbox": [ 302, 741, 309, 752 ], "spans": [ { "bbox": [ 302, 741, 309, 752 ], "score": 1.0, "content": "7", "type": "text" } ] } ] } ], "para_blocks": [ { "type": "image", "bbox": [ 189, 78, 423, 196 ], "blocks": [ { "type": "image_body", "bbox": [ 189, 78, 423, 196 ], "group_id": 0, "lines": [ { "bbox": [ 189, 78, 423, 196 ], "spans": [ { "bbox": [ 189, 78, 423, 196 ], "score": 0.962, "type": "image", "image_path": "d213ea3b0b9120e322632b738ce67e83f4326db02f5b68b218cc93b00f9e0dff.jpg" } ] } ], "index": 4, "virtual_lines": [ { "bbox": [ 189, 78, 423, 91.11111111111111 ], "spans": [], "index": 0 }, { "bbox": [ 189, 91.11111111111111, 423, 104.22222222222223 ], "spans": [], "index": 1 }, { "bbox": [ 189, 104.22222222222223, 423, 117.33333333333334 ], "spans": [], "index": 2 }, { "bbox": [ 189, 117.33333333333334, 423, 130.44444444444446 ], "spans": [], "index": 3 }, { "bbox": [ 189, 130.44444444444446, 423, 143.55555555555557 ], "spans": [], "index": 4 }, { "bbox": [ 189, 143.55555555555557, 423, 156.66666666666669 ], "spans": [], "index": 5 }, { "bbox": [ 189, 156.66666666666669, 423, 169.7777777777778 ], "spans": [], "index": 6 }, { "bbox": [ 189, 169.7777777777778, 423, 182.8888888888889 ], "spans": [], "index": 7 }, { "bbox": [ 189, 182.8888888888889, 423, 196.00000000000003 ], "spans": [], "index": 8 } ] } ], "index": 4 }, { "type": "table", "bbox": [ 108, 242, 505, 279 ], "blocks": [ { "type": "table_caption", "bbox": [ 106, 210, 504, 231 ], "group_id": 0, "lines": [ { "bbox": [ 105, 210, 506, 222 ], "spans": [ { "bbox": [ 105, 210, 506, 222 ], "score": 1.0, "content": "Figure 5: Log-perplexity of Scaling Transformers with Sparse QKV with different sparsity levels (S) and kernel", "type": "text" } ], "index": 9 }, { "bbox": [ 105, 220, 471, 233 ], "spans": [ { "bbox": [ 105, 220, 471, 233 ], "score": 1.0, "content": "sizes (F) is very similar to dense baseline within variance while multi-layer even improves perplexity.", "type": "text" } ], "index": 10 } ], "index": 9.5 }, { "type": "table_body", "bbox": [ 108, 242, 505, 279 ], "group_id": 0, "lines": [ { "bbox": [ 108, 242, 505, 279 ], "spans": [ { "bbox": [ 108, 242, 505, 279 ], "score": 0.961, "html": "
RTEMRPCSST-2QNLIMNLI-mQQP
Baseline Transformer (dense)70.1 ± 1.183.6±0.7292.6±0.8588.6±0.578.5 ± 0.4185.2±0.6
Scaling Transformer (Sparse FF+QKV)68.481.291.690.182.989.9
Terraformer (Sparse FF+QKV)66.184.692.388.379.185.5
", "type": "table", "image_path": "acdb8d778534c3dacf7860f8e945aa587869fa165f5ff181904a258d7e683be8.jpg" } ] } ], "index": 12, "virtual_lines": [ { "bbox": [ 108, 242, 505, 254.33333333333334 ], "spans": [], "index": 11 }, { "bbox": [ 108, 254.33333333333334, 505, 266.6666666666667 ], "spans": [], "index": 12 }, { "bbox": [ 108, 266.6666666666667, 505, 279.0 ], "spans": [], "index": 13 } ] }, { "type": "table_caption", "bbox": [ 106, 287, 505, 318 ], "group_id": 0, "lines": [ { "bbox": [ 105, 287, 505, 299 ], "spans": [ { "bbox": [ 105, 287, 407, 299 ], "score": 1.0, "content": "Table 3: Accuracy of Scaling Transformer model and Terraformer model with sparse", "type": "text" }, { "bbox": [ 407, 288, 443, 298 ], "score": 0.86, "content": "Q K V + F F", "type": "inline_equation" }, { "bbox": [ 443, 287, 505, 299 ], "score": 1.0, "content": "is comparable to", "type": "text" } ], "index": 14 }, { "bbox": [ 106, 298, 505, 308 ], "spans": [ { "bbox": [ 106, 298, 505, 308 ], "score": 1.0, "content": "the baseline Transformer within variance. The results are obtained by fine-tuning on selected downstream tasks", "type": "text" } ], "index": 15 }, { "bbox": [ 105, 308, 256, 318 ], "spans": [ { "bbox": [ 105, 308, 256, 318 ], "score": 1.0, "content": "from the GLUE dataset (validation split).", "type": "text" } ], "index": 16 } ], "index": 15 } ], "index": 12 }, { "type": "text", "bbox": [ 107, 339, 505, 362 ], "lines": [], "index": 17.5, "bbox_fs": [ 106, 340, 506, 363 ], "lines_deleted": true }, { "type": "list", "bbox": [ 106, 367, 504, 389 ], "lines": [ { "bbox": [ 106, 367, 506, 379 ], "spans": [ { "bbox": [ 106, 367, 506, 379 ], "score": 1.0, "content": "Table 3 shows the accuracy of fine-tuning the model for downstream tasks from the GLUE dataset.", "type": "text" } ], "index": 19, "is_list_end_line": true }, { "bbox": [ 105, 377, 440, 390 ], "spans": [ { "bbox": [ 105, 377, 244, 390 ], "score": 1.0, "content": "Note that the model with sparseFF", "type": "text" }, { "bbox": [ 245, 379, 251, 388 ], "score": 0.3, "content": "^ +", "type": "inline_equation" }, { "bbox": [ 251, 377, 440, 390 ], "score": 1.0, "content": "QKV achieves accuracy similar to the baseline.", "type": "text" } ], "index": 20, "is_list_start_line": true, "is_list_end_line": true } ], "index": 19.5, "bbox_fs": [ 105, 367, 506, 390 ] }, { "type": "title", "bbox": [ 107, 403, 202, 414 ], "lines": [ { "bbox": [ 105, 401, 204, 417 ], "spans": [ { "bbox": [ 105, 401, 204, 417 ], "score": 1.0, "content": "3.3 Sparse loss layer.", "type": "text" } ], "index": 21 } ], "index": 21 }, { "type": "text", "bbox": [ 107, 423, 505, 466 ], "lines": [ { "bbox": [ 105, 423, 505, 434 ], "spans": [ { "bbox": [ 105, 423, 505, 434 ], "score": 1.0, "content": "A final dense layer maps the model embedding into vocabulary size to compute the loss. We can", "type": "text" } ], "index": 22 }, { "bbox": [ 105, 434, 505, 446 ], "spans": [ { "bbox": [ 105, 434, 505, 446 ], "score": 1.0, "content": "sparsify this part of the model by replacing the dense layer with a multiplicative layer similar to", "type": "text" } ], "index": 23 }, { "bbox": [ 105, 445, 505, 458 ], "spans": [ { "bbox": [ 105, 445, 505, 458 ], "score": 1.0, "content": "previous sections; this speeds up decoding time but may degrade perplexity. The results are presented", "type": "text" } ], "index": 24 }, { "bbox": [ 104, 456, 159, 468 ], "spans": [ { "bbox": [ 104, 456, 159, 468 ], "score": 1.0, "content": "in appendix.", "type": "text" } ], "index": 25 } ], "index": 23.5, "bbox_fs": [ 104, 423, 505, 468 ] }, { "type": "title", "bbox": [ 107, 482, 271, 496 ], "lines": [ { "bbox": [ 104, 480, 273, 500 ], "spans": [ { "bbox": [ 104, 480, 273, 500 ], "score": 1.0, "content": "4 Sparsity for Long Sequences", "type": "text" } ], "index": 26 } ], "index": 26 }, { "type": "text", "bbox": [ 107, 507, 505, 573 ], "lines": [ { "bbox": [ 106, 507, 506, 520 ], "spans": [ { "bbox": [ 106, 507, 506, 520 ], "score": 1.0, "content": "The above gains from sparsifying the dense layers are encouraging, but we omitted one fundamental", "type": "text" } ], "index": 27 }, { "bbox": [ 105, 519, 505, 531 ], "spans": [ { "bbox": [ 105, 519, 505, 531 ], "score": 1.0, "content": "issue. When applied to longer sequences, the gains would effectively be lost, as the decoding time", "type": "text" } ], "index": 28 }, { "bbox": [ 105, 528, 506, 543 ], "spans": [ { "bbox": [ 105, 528, 506, 543 ], "score": 1.0, "content": "will be dominated by attention operations. Luckily, a number of methods have been proposed to", "type": "text" } ], "index": 29 }, { "bbox": [ 106, 541, 505, 553 ], "spans": [ { "bbox": [ 106, 541, 505, 553 ], "score": 1.0, "content": "solve this problem for Transformers, see [41] for a survey. We focus on the LSH (Locality-Sensitive", "type": "text" } ], "index": 30 }, { "bbox": [ 105, 550, 506, 564 ], "spans": [ { "bbox": [ 105, 550, 506, 564 ], "score": 1.0, "content": "Hashing) attention from Reformer [19] and show how to integrate this sparse attention mechanism,", "type": "text" } ], "index": 31 }, { "bbox": [ 105, 562, 427, 575 ], "spans": [ { "bbox": [ 105, 562, 427, 575 ], "score": 1.0, "content": "as well as recurrent blocks, into a Scaling Transformer, yielding a Terraformer.", "type": "text" } ], "index": 32 } ], "index": 29.5, "bbox_fs": [ 105, 507, 506, 575 ] }, { "type": "title", "bbox": [ 108, 586, 270, 598 ], "lines": [ { "bbox": [ 105, 585, 272, 601 ], "spans": [ { "bbox": [ 105, 585, 272, 601 ], "score": 1.0, "content": "4.1 Architecture for Long Sequences", "type": "text" } ], "index": 33 } ], "index": 33 }, { "type": "text", "bbox": [ 106, 606, 505, 695 ], "lines": [ { "bbox": [ 105, 606, 505, 620 ], "spans": [ { "bbox": [ 105, 606, 505, 620 ], "score": 1.0, "content": "While integrating sparse attention layers into a Scaling Transformer, we notice that the architecture", "type": "text" } ], "index": 34 }, { "bbox": [ 105, 617, 506, 630 ], "spans": [ { "bbox": [ 105, 617, 506, 630 ], "score": 1.0, "content": "of the Transformer decoder block is suboptimal and can be redesigned to make a better use of these", "type": "text" } ], "index": 35 }, { "bbox": [ 105, 628, 506, 642 ], "spans": [ { "bbox": [ 105, 628, 506, 642 ], "score": 1.0, "content": "layers. In particular, separating decoder self-attention and encoder-decoder attention is not necessary", "type": "text" } ], "index": 36 }, { "bbox": [ 105, 640, 506, 652 ], "spans": [ { "bbox": [ 105, 640, 506, 652 ], "score": 1.0, "content": "any more from the perspective of efficiency. We therefore remove the encoder-decoder attention, but", "type": "text" } ], "index": 37 }, { "bbox": [ 104, 651, 505, 663 ], "spans": [ { "bbox": [ 104, 651, 505, 663 ], "score": 1.0, "content": "just concatenate the encoder representations before the decoder tokens. Doing this alone isn’t enough", "type": "text" } ], "index": 38 }, { "bbox": [ 105, 661, 505, 674 ], "spans": [ { "bbox": [ 105, 661, 505, 674 ], "score": 1.0, "content": "though, since we took away one attention mechanism (encoder-decoder attention). We remedy this", "type": "text" } ], "index": 39 }, { "bbox": [ 106, 673, 506, 685 ], "spans": [ { "bbox": [ 106, 673, 506, 685 ], "score": 1.0, "content": "by having two attention mechanisms before the feedforward block. This simple architecture is as fast", "type": "text" } ], "index": 40 }, { "bbox": [ 106, 684, 327, 695 ], "spans": [ { "bbox": [ 106, 684, 327, 695 ], "score": 1.0, "content": "as the baseline Transformer while giving better results.", "type": "text" } ], "index": 41 } ], "index": 37.5, "bbox_fs": [ 104, 606, 506, 695 ] }, { "type": "text", "bbox": [ 106, 700, 504, 722 ], "lines": [ { "bbox": [ 106, 699, 505, 712 ], "spans": [ { "bbox": [ 106, 699, 203, 712 ], "score": 1.0, "content": "Putting this together, if", "type": "text" }, { "bbox": [ 203, 702, 222, 711 ], "score": 0.88, "content": "v _ { e n c }", "type": "inline_equation" }, { "bbox": [ 222, 699, 351, 712 ], "score": 1.0, "content": "are the encoder activations and", "type": "text" }, { "bbox": [ 352, 702, 370, 711 ], "score": 0.87, "content": "v _ { d e c }", "type": "inline_equation" }, { "bbox": [ 370, 699, 505, 712 ], "score": 1.0, "content": "are the decoder embeddings, the", "type": "text" } ], "index": 42 }, { "bbox": [ 105, 709, 502, 725 ], "spans": [ { "bbox": [ 105, 709, 218, 725 ], "score": 1.0, "content": "input to the decoder block", "type": "text" }, { "bbox": [ 218, 713, 226, 721 ], "score": 0.78, "content": "x", "type": "inline_equation" }, { "bbox": [ 226, 709, 456, 725 ], "score": 1.0, "content": "is their concatenation on the length axis, LengthConcat", "type": "text" }, { "bbox": [ 456, 711, 502, 723 ], "score": 0.89, "content": "( v _ { e n c } , v _ { d e c } )", "type": "inline_equation" } ], "index": 43 } ], "index": 42.5, "bbox_fs": [ 105, 699, 505, 725 ] } ] }, { "preproc_blocks": [ { "type": "image", "bbox": [ 168, 79, 437, 139 ], "blocks": [ { "type": "image_body", "bbox": [ 168, 79, 437, 139 ], "group_id": 0, "lines": [ { "bbox": [ 168, 79, 437, 139 ], "spans": [ { "bbox": [ 168, 79, 437, 139 ], "score": 0.965, "type": "image", "image_path": "c33fc9a375a89405da213d5f7e099e81d61fcb06b416d970b6743d31d5fa33ad.jpg" } ] } ], "index": 1, "virtual_lines": [ { "bbox": [ 168, 79, 437, 99.0 ], "spans": [], "index": 0 }, { "bbox": [ 168, 99.0, 437, 119.0 ], "spans": [], "index": 1 }, { "bbox": [ 168, 119.0, 437, 139.0 ], "spans": [], "index": 2 } ] }, { "type": "image_caption", "bbox": [ 214, 149, 397, 160 ], "group_id": 0, "lines": [ { "bbox": [ 213, 149, 398, 162 ], "spans": [ { "bbox": [ 213, 149, 398, 162 ], "score": 1.0, "content": "Figure 6: Reversible decoder block in Terraformer.", "type": "text" } ], "index": 3 } ], "index": 3 } ], "index": 2.0 }, { "type": "text", "bbox": [ 106, 183, 277, 195 ], "lines": [ { "bbox": [ 105, 181, 278, 197 ], "spans": [ { "bbox": [ 105, 181, 278, 197 ], "score": 1.0, "content": "Each decoder block can be represented as:", "type": "text" } ], "index": 4 } ], "index": 4 }, { "type": "interline_equation", "bbox": [ 206, 200, 403, 249 ], "lines": [ { "bbox": [ 206, 200, 403, 249 ], "spans": [ { "bbox": [ 206, 200, 403, 249 ], "score": 0.91, "content": "\\begin{array} { r l } & { y _ { 1 } = \\ x + \\mathrm { D r o p o u t } ( \\mathrm { A t t e n t i o n } ( \\mathrm { L a y e r N o r m } ( x ) ) ) } \\\\ & { y _ { 2 } = y _ { 1 } + \\mathrm { D r o p o u t } ( \\mathrm { A t t e n t i o n } ( \\mathrm { L a y e r N o r m } ( y _ { 1 } ) ) ) } \\\\ & { \\ y = y _ { 2 } + \\mathrm { F F N } ( y _ { 2 } ) } \\end{array}", "type": "interline_equation", "image_path": "8792900ca13c55513b8088015fa99c740c6efdeac6dbaedfa5ff05d5be190eb1.jpg" } ] } ], "index": 6, "virtual_lines": [ { "bbox": [ 206, 200, 403, 216.33333333333334 ], "spans": [], "index": 5 }, { "bbox": [ 206, 216.33333333333334, 403, 232.66666666666669 ], "spans": [], "index": 6 }, { "bbox": [ 206, 232.66666666666669, 403, 249.00000000000003 ], "spans": [], "index": 7 } ] }, { "type": "text", "bbox": [ 108, 254, 503, 276 ], "lines": [ { "bbox": [ 106, 254, 505, 267 ], "spans": [ { "bbox": [ 106, 254, 133, 267 ], "score": 1.0, "content": "where", "type": "text" }, { "bbox": [ 134, 257, 141, 266 ], "score": 0.8, "content": "y", "type": "inline_equation" }, { "bbox": [ 141, 254, 505, 267 ], "score": 1.0, "content": "becomes the input to the next decoder layer. See the appendix for a full diagram of the", "type": "text" } ], "index": 8 }, { "bbox": [ 106, 265, 196, 277 ], "spans": [ { "bbox": [ 106, 265, 196, 277 ], "score": 1.0, "content": "resulting architecture.", "type": "text" } ], "index": 9 } ], "index": 8.5 }, { "type": "title", "bbox": [ 108, 291, 283, 303 ], "lines": [ { "bbox": [ 105, 289, 284, 306 ], "spans": [ { "bbox": [ 105, 289, 284, 306 ], "score": 1.0, "content": "4.2 Reversibility for Memory Efficiency", "type": "text" } ], "index": 10 } ], "index": 10 }, { "type": "text", "bbox": [ 108, 312, 505, 344 ], "lines": [ { "bbox": [ 105, 311, 505, 325 ], "spans": [ { "bbox": [ 105, 311, 505, 325 ], "score": 1.0, "content": "To enable training Terraformer with large batches, and to fine-tune even large models on single", "type": "text" } ], "index": 11 }, { "bbox": [ 106, 323, 505, 335 ], "spans": [ { "bbox": [ 106, 323, 505, 335 ], "score": 1.0, "content": "machines, we apply ideas from the Reformer [19], in particular, reversible layers for the encoder and", "type": "text" } ], "index": 12 }, { "bbox": [ 106, 333, 172, 345 ], "spans": [ { "bbox": [ 106, 333, 172, 345 ], "score": 1.0, "content": "decoder blocks.", "type": "text" } ], "index": 13 } ], "index": 12 }, { "type": "text", "bbox": [ 107, 349, 505, 394 ], "lines": [ { "bbox": [ 106, 350, 504, 361 ], "spans": [ { "bbox": [ 106, 350, 504, 361 ], "score": 1.0, "content": "The original Reformer decoder block contained feedforward and attention layers in a 1-1 ratio. In the", "type": "text" } ], "index": 14 }, { "bbox": [ 106, 360, 505, 372 ], "spans": [ { "bbox": [ 106, 360, 505, 372 ], "score": 1.0, "content": "Terraformer architecture, as described above, there are two attention layers in the decoder block, so", "type": "text" } ], "index": 15 }, { "bbox": [ 105, 372, 506, 384 ], "spans": [ { "bbox": [ 105, 372, 506, 384 ], "score": 1.0, "content": "there are three swaps in the reversible layers in the decoder block (see Figure 6). In our experiments,", "type": "text" } ], "index": 16 }, { "bbox": [ 106, 383, 271, 395 ], "spans": [ { "bbox": [ 106, 383, 271, 395 ], "score": 1.0, "content": "this significantly improved performance.", "type": "text" } ], "index": 17 } ], "index": 15.5 }, { "type": "text", "bbox": [ 107, 398, 505, 454 ], "lines": [ { "bbox": [ 106, 399, 505, 411 ], "spans": [ { "bbox": [ 106, 399, 505, 411 ], "score": 1.0, "content": "Another issue with reversibility is that it is only formally correct for continuous functions. We find", "type": "text" } ], "index": 18 }, { "bbox": [ 106, 411, 505, 423 ], "spans": [ { "bbox": [ 106, 411, 505, 423 ], "score": 1.0, "content": "that this is not just a formal issue, but an important problem in practice. To make reversible layers", "type": "text" } ], "index": 19 }, { "bbox": [ 105, 420, 506, 434 ], "spans": [ { "bbox": [ 105, 420, 506, 434 ], "score": 1.0, "content": "train well with sparsity, we need to store the discrete decisions—i.e., the integers saying which rows", "type": "text" } ], "index": 20 }, { "bbox": [ 105, 430, 506, 444 ], "spans": [ { "bbox": [ 105, 430, 506, 444 ], "score": 1.0, "content": "to select—and use them for reversing. Recalculating these decisions on the backwards pass leads to", "type": "text" } ], "index": 21 }, { "bbox": [ 105, 443, 162, 453 ], "spans": [ { "bbox": [ 105, 443, 162, 453 ], "score": 1.0, "content": "worse results.", "type": "text" } ], "index": 22 } ], "index": 20 }, { "type": "title", "bbox": [ 108, 468, 260, 480 ], "lines": [ { "bbox": [ 106, 468, 261, 481 ], "spans": [ { "bbox": [ 106, 468, 261, 481 ], "score": 1.0, "content": "4.3 Recurrence for Generalization", "type": "text" } ], "index": 23 } ], "index": 23 }, { "type": "text", "bbox": [ 107, 489, 506, 533 ], "lines": [ { "bbox": [ 105, 489, 507, 502 ], "spans": [ { "bbox": [ 105, 489, 507, 502 ], "score": 1.0, "content": "In addition to incorporating sparse attention and reversibility, we also add recurrence to the feedfor-", "type": "text" } ], "index": 24 }, { "bbox": [ 106, 500, 505, 512 ], "spans": [ { "bbox": [ 106, 500, 505, 512 ], "score": 1.0, "content": "ward block of Terraformer. Recurrent layers allow information to propagate in time, even in a single", "type": "text" } ], "index": 25 }, { "bbox": [ 105, 511, 507, 525 ], "spans": [ { "bbox": [ 105, 511, 507, 525 ], "score": 1.0, "content": "decoder block. It is challenging though to use them without decreasing model speed, esp. in training.", "type": "text" } ], "index": 26 }, { "bbox": [ 105, 521, 464, 536 ], "spans": [ { "bbox": [ 105, 521, 464, 536 ], "score": 1.0, "content": "For that reason, we use simple recurrent units [20] which parallelize well during training.", "type": "text" } ], "index": 27 } ], "index": 25.5 }, { "type": "text", "bbox": [ 107, 538, 505, 594 ], "lines": [ { "bbox": [ 106, 539, 505, 551 ], "spans": [ { "bbox": [ 106, 539, 505, 551 ], "score": 1.0, "content": "SRUs contain dense layers, so their use could negate the benefits of sparsity elsewhere. We tried a few", "type": "text" } ], "index": 28 }, { "bbox": [ 106, 550, 506, 561 ], "spans": [ { "bbox": [ 106, 550, 506, 561 ], "score": 1.0, "content": "methods to alleviate that, but it turns out that simply reducing the dimensionality of the SRUs works.", "type": "text" } ], "index": 29 }, { "bbox": [ 105, 559, 506, 574 ], "spans": [ { "bbox": [ 105, 559, 201, 574 ], "score": 1.0, "content": "So we first project from", "type": "text" }, { "bbox": [ 202, 560, 226, 571 ], "score": 0.9, "content": "d _ { \\mathrm { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 226, 559, 506, 574 ], "score": 1.0, "content": "to a small dimension (32 in our experiments), then apply the SRU, and", "type": "text" } ], "index": 30 }, { "bbox": [ 106, 571, 505, 585 ], "spans": [ { "bbox": [ 106, 571, 186, 585 ], "score": 1.0, "content": "then project back to", "type": "text" }, { "bbox": [ 186, 572, 211, 582 ], "score": 0.9, "content": "d _ { \\mathrm { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 211, 571, 505, 585 ], "score": 1.0, "content": "and add the result to the feedforward block. This low-rank recurrence is in", "type": "text" } ], "index": 31 }, { "bbox": [ 106, 582, 506, 594 ], "spans": [ { "bbox": [ 106, 582, 506, 594 ], "score": 1.0, "content": "our experiments sufficient to transfer enough information through time for the network to generalize.", "type": "text" } ], "index": 32 } ], "index": 30 }, { "type": "text", "bbox": [ 107, 598, 505, 665 ], "lines": [ { "bbox": [ 106, 597, 506, 611 ], "spans": [ { "bbox": [ 106, 597, 506, 611 ], "score": 1.0, "content": "Since the effects of SRUs on C4 are minimal (as the training and evaluation data are very similar),", "type": "text" } ], "index": 33 }, { "bbox": [ 104, 608, 506, 623 ], "spans": [ { "bbox": [ 104, 608, 506, 623 ], "score": 1.0, "content": "we use synthetic tasks to investigate out-of-distribution generalization. We train the models on long", "type": "text" } ], "index": 34 }, { "bbox": [ 105, 619, 506, 633 ], "spans": [ { "bbox": [ 105, 619, 506, 633 ], "score": 1.0, "content": "addition and on the task of copying a decimal digit. We train on inputs with at most 128 digits and", "type": "text" } ], "index": 35 }, { "bbox": [ 106, 631, 506, 644 ], "spans": [ { "bbox": [ 106, 631, 319, 644 ], "score": 1.0, "content": "evaluate on inputs lengths from 256 to 300, so over", "type": "text" }, { "bbox": [ 320, 632, 331, 642 ], "score": 0.67, "content": "2 \\mathbf { x }", "type": "inline_equation" }, { "bbox": [ 332, 631, 506, 644 ], "score": 1.0, "content": "longer. As can be seen in the table below,", "type": "text" } ], "index": 36 }, { "bbox": [ 105, 641, 505, 655 ], "spans": [ { "bbox": [ 105, 641, 505, 655 ], "score": 1.0, "content": "the baseline Transformer does not generalize well, while Terraformer manages to get a large portion", "type": "text" } ], "index": 37 }, { "bbox": [ 106, 653, 344, 666 ], "spans": [ { "bbox": [ 106, 653, 344, 666 ], "score": 1.0, "content": "correctly, even if it is not perfect like the Neural GPU [16].", "type": "text" } ], "index": 38 } ], "index": 35.5 }, { "type": "title", "bbox": [ 107, 678, 185, 690 ], "lines": [ { "bbox": [ 105, 677, 186, 693 ], "spans": [ { "bbox": [ 105, 677, 186, 693 ], "score": 1.0, "content": "4.4 Experiments", "type": "text" } ], "index": 39 } ], "index": 39 }, { "type": "text", "bbox": [ 107, 700, 503, 722 ], "lines": [ { "bbox": [ 105, 699, 505, 713 ], "spans": [ { "bbox": [ 105, 699, 505, 713 ], "score": 1.0, "content": "We designed Terraformer so that the benefits from sparsity would not be lost on long sequences, nor", "type": "text" } ], "index": 40 }, { "bbox": [ 105, 710, 505, 723 ], "spans": [ { "bbox": [ 105, 710, 505, 723 ], "score": 1.0, "content": "on downstream finetuning tasks. To test this, we chose the task of summarizing scientific papers", "type": "text" } ], "index": 41 } ], "index": 40.5 } ], "page_idx": 7, "page_size": [ 612, 792 ], "discarded_blocks": [ { "type": "discarded", "bbox": [ 302, 742, 308, 750 ], "lines": [ { "bbox": [ 301, 740, 310, 752 ], "spans": [ { "bbox": [ 301, 740, 310, 752 ], "score": 1.0, "content": "", "type": "text", "height": 12, "width": 9 } ] } ] } ], "para_blocks": [ { "type": "image", "bbox": [ 168, 79, 437, 139 ], "blocks": [ { "type": "image_body", "bbox": [ 168, 79, 437, 139 ], "group_id": 0, "lines": [ { "bbox": [ 168, 79, 437, 139 ], "spans": [ { "bbox": [ 168, 79, 437, 139 ], "score": 0.965, "type": "image", "image_path": "c33fc9a375a89405da213d5f7e099e81d61fcb06b416d970b6743d31d5fa33ad.jpg" } ] } ], "index": 1, "virtual_lines": [ { "bbox": [ 168, 79, 437, 99.0 ], "spans": [], "index": 0 }, { "bbox": [ 168, 99.0, 437, 119.0 ], "spans": [], "index": 1 }, { "bbox": [ 168, 119.0, 437, 139.0 ], "spans": [], "index": 2 } ] }, { "type": "image_caption", "bbox": [ 214, 149, 397, 160 ], "group_id": 0, "lines": [ { "bbox": [ 213, 149, 398, 162 ], "spans": [ { "bbox": [ 213, 149, 398, 162 ], "score": 1.0, "content": "Figure 6: Reversible decoder block in Terraformer.", "type": "text" } ], "index": 3 } ], "index": 3 } ], "index": 2.0 }, { "type": "text", "bbox": [ 106, 183, 277, 195 ], "lines": [ { "bbox": [ 105, 181, 278, 197 ], "spans": [ { "bbox": [ 105, 181, 278, 197 ], "score": 1.0, "content": "Each decoder block can be represented as:", "type": "text" } ], "index": 4 } ], "index": 4, "bbox_fs": [ 105, 181, 278, 197 ] }, { "type": "interline_equation", "bbox": [ 206, 200, 403, 249 ], "lines": [ { "bbox": [ 206, 200, 403, 249 ], "spans": [ { "bbox": [ 206, 200, 403, 249 ], "score": 0.91, "content": "\\begin{array} { r l } & { y _ { 1 } = \\ x + \\mathrm { D r o p o u t } ( \\mathrm { A t t e n t i o n } ( \\mathrm { L a y e r N o r m } ( x ) ) ) } \\\\ & { y _ { 2 } = y _ { 1 } + \\mathrm { D r o p o u t } ( \\mathrm { A t t e n t i o n } ( \\mathrm { L a y e r N o r m } ( y _ { 1 } ) ) ) } \\\\ & { \\ y = y _ { 2 } + \\mathrm { F F N } ( y _ { 2 } ) } \\end{array}", "type": "interline_equation", "image_path": "8792900ca13c55513b8088015fa99c740c6efdeac6dbaedfa5ff05d5be190eb1.jpg" } ] } ], "index": 6, "virtual_lines": [ { "bbox": [ 206, 200, 403, 216.33333333333334 ], "spans": [], "index": 5 }, { "bbox": [ 206, 216.33333333333334, 403, 232.66666666666669 ], "spans": [], "index": 6 }, { "bbox": [ 206, 232.66666666666669, 403, 249.00000000000003 ], "spans": [], "index": 7 } ] }, { "type": "text", "bbox": [ 108, 254, 503, 276 ], "lines": [ { "bbox": [ 106, 254, 505, 267 ], "spans": [ { "bbox": [ 106, 254, 133, 267 ], "score": 1.0, "content": "where", "type": "text" }, { "bbox": [ 134, 257, 141, 266 ], "score": 0.8, "content": "y", "type": "inline_equation" }, { "bbox": [ 141, 254, 505, 267 ], "score": 1.0, "content": "becomes the input to the next decoder layer. See the appendix for a full diagram of the", "type": "text" } ], "index": 8 }, { "bbox": [ 106, 265, 196, 277 ], "spans": [ { "bbox": [ 106, 265, 196, 277 ], "score": 1.0, "content": "resulting architecture.", "type": "text" } ], "index": 9 } ], "index": 8.5, "bbox_fs": [ 106, 254, 505, 277 ] }, { "type": "title", "bbox": [ 108, 291, 283, 303 ], "lines": [ { "bbox": [ 105, 289, 284, 306 ], "spans": [ { "bbox": [ 105, 289, 284, 306 ], "score": 1.0, "content": "4.2 Reversibility for Memory Efficiency", "type": "text" } ], "index": 10 } ], "index": 10 }, { "type": "text", "bbox": [ 108, 312, 505, 344 ], "lines": [ { "bbox": [ 105, 311, 505, 325 ], "spans": [ { "bbox": [ 105, 311, 505, 325 ], "score": 1.0, "content": "To enable training Terraformer with large batches, and to fine-tune even large models on single", "type": "text" } ], "index": 11 }, { "bbox": [ 106, 323, 505, 335 ], "spans": [ { "bbox": [ 106, 323, 505, 335 ], "score": 1.0, "content": "machines, we apply ideas from the Reformer [19], in particular, reversible layers for the encoder and", "type": "text" } ], "index": 12 }, { "bbox": [ 106, 333, 172, 345 ], "spans": [ { "bbox": [ 106, 333, 172, 345 ], "score": 1.0, "content": "decoder blocks.", "type": "text" } ], "index": 13 } ], "index": 12, "bbox_fs": [ 105, 311, 505, 345 ] }, { "type": "text", "bbox": [ 107, 349, 505, 394 ], "lines": [ { "bbox": [ 106, 350, 504, 361 ], "spans": [ { "bbox": [ 106, 350, 504, 361 ], "score": 1.0, "content": "The original Reformer decoder block contained feedforward and attention layers in a 1-1 ratio. In the", "type": "text" } ], "index": 14 }, { "bbox": [ 106, 360, 505, 372 ], "spans": [ { "bbox": [ 106, 360, 505, 372 ], "score": 1.0, "content": "Terraformer architecture, as described above, there are two attention layers in the decoder block, so", "type": "text" } ], "index": 15 }, { "bbox": [ 105, 372, 506, 384 ], "spans": [ { "bbox": [ 105, 372, 506, 384 ], "score": 1.0, "content": "there are three swaps in the reversible layers in the decoder block (see Figure 6). In our experiments,", "type": "text" } ], "index": 16 }, { "bbox": [ 106, 383, 271, 395 ], "spans": [ { "bbox": [ 106, 383, 271, 395 ], "score": 1.0, "content": "this significantly improved performance.", "type": "text" } ], "index": 17 } ], "index": 15.5, "bbox_fs": [ 105, 350, 506, 395 ] }, { "type": "text", "bbox": [ 107, 398, 505, 454 ], "lines": [ { "bbox": [ 106, 399, 505, 411 ], "spans": [ { "bbox": [ 106, 399, 505, 411 ], "score": 1.0, "content": "Another issue with reversibility is that it is only formally correct for continuous functions. We find", "type": "text" } ], "index": 18 }, { "bbox": [ 106, 411, 505, 423 ], "spans": [ { "bbox": [ 106, 411, 505, 423 ], "score": 1.0, "content": "that this is not just a formal issue, but an important problem in practice. To make reversible layers", "type": "text" } ], "index": 19 }, { "bbox": [ 105, 420, 506, 434 ], "spans": [ { "bbox": [ 105, 420, 506, 434 ], "score": 1.0, "content": "train well with sparsity, we need to store the discrete decisions—i.e., the integers saying which rows", "type": "text" } ], "index": 20 }, { "bbox": [ 105, 430, 506, 444 ], "spans": [ { "bbox": [ 105, 430, 506, 444 ], "score": 1.0, "content": "to select—and use them for reversing. Recalculating these decisions on the backwards pass leads to", "type": "text" } ], "index": 21 }, { "bbox": [ 105, 443, 162, 453 ], "spans": [ { "bbox": [ 105, 443, 162, 453 ], "score": 1.0, "content": "worse results.", "type": "text" } ], "index": 22 } ], "index": 20, "bbox_fs": [ 105, 399, 506, 453 ] }, { "type": "title", "bbox": [ 108, 468, 260, 480 ], "lines": [ { "bbox": [ 106, 468, 261, 481 ], "spans": [ { "bbox": [ 106, 468, 261, 481 ], "score": 1.0, "content": "4.3 Recurrence for Generalization", "type": "text" } ], "index": 23 } ], "index": 23 }, { "type": "text", "bbox": [ 107, 489, 506, 533 ], "lines": [ { "bbox": [ 105, 489, 507, 502 ], "spans": [ { "bbox": [ 105, 489, 507, 502 ], "score": 1.0, "content": "In addition to incorporating sparse attention and reversibility, we also add recurrence to the feedfor-", "type": "text" } ], "index": 24 }, { "bbox": [ 106, 500, 505, 512 ], "spans": [ { "bbox": [ 106, 500, 505, 512 ], "score": 1.0, "content": "ward block of Terraformer. Recurrent layers allow information to propagate in time, even in a single", "type": "text" } ], "index": 25 }, { "bbox": [ 105, 511, 507, 525 ], "spans": [ { "bbox": [ 105, 511, 507, 525 ], "score": 1.0, "content": "decoder block. It is challenging though to use them without decreasing model speed, esp. in training.", "type": "text" } ], "index": 26 }, { "bbox": [ 105, 521, 464, 536 ], "spans": [ { "bbox": [ 105, 521, 464, 536 ], "score": 1.0, "content": "For that reason, we use simple recurrent units [20] which parallelize well during training.", "type": "text" } ], "index": 27 } ], "index": 25.5, "bbox_fs": [ 105, 489, 507, 536 ] }, { "type": "text", "bbox": [ 107, 538, 505, 594 ], "lines": [ { "bbox": [ 106, 539, 505, 551 ], "spans": [ { "bbox": [ 106, 539, 505, 551 ], "score": 1.0, "content": "SRUs contain dense layers, so their use could negate the benefits of sparsity elsewhere. We tried a few", "type": "text" } ], "index": 28 }, { "bbox": [ 106, 550, 506, 561 ], "spans": [ { "bbox": [ 106, 550, 506, 561 ], "score": 1.0, "content": "methods to alleviate that, but it turns out that simply reducing the dimensionality of the SRUs works.", "type": "text" } ], "index": 29 }, { "bbox": [ 105, 559, 506, 574 ], "spans": [ { "bbox": [ 105, 559, 201, 574 ], "score": 1.0, "content": "So we first project from", "type": "text" }, { "bbox": [ 202, 560, 226, 571 ], "score": 0.9, "content": "d _ { \\mathrm { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 226, 559, 506, 574 ], "score": 1.0, "content": "to a small dimension (32 in our experiments), then apply the SRU, and", "type": "text" } ], "index": 30 }, { "bbox": [ 106, 571, 505, 585 ], "spans": [ { "bbox": [ 106, 571, 186, 585 ], "score": 1.0, "content": "then project back to", "type": "text" }, { "bbox": [ 186, 572, 211, 582 ], "score": 0.9, "content": "d _ { \\mathrm { m o d e l } }", "type": "inline_equation" }, { "bbox": [ 211, 571, 505, 585 ], "score": 1.0, "content": "and add the result to the feedforward block. This low-rank recurrence is in", "type": "text" } ], "index": 31 }, { "bbox": [ 106, 582, 506, 594 ], "spans": [ { "bbox": [ 106, 582, 506, 594 ], "score": 1.0, "content": "our experiments sufficient to transfer enough information through time for the network to generalize.", "type": "text" } ], "index": 32 } ], "index": 30, "bbox_fs": [ 105, 539, 506, 594 ] }, { "type": "text", "bbox": [ 107, 598, 505, 665 ], "lines": [ { "bbox": [ 106, 597, 506, 611 ], "spans": [ { "bbox": [ 106, 597, 506, 611 ], "score": 1.0, "content": "Since the effects of SRUs on C4 are minimal (as the training and evaluation data are very similar),", "type": "text" } ], "index": 33 }, { "bbox": [ 104, 608, 506, 623 ], "spans": [ { "bbox": [ 104, 608, 506, 623 ], "score": 1.0, "content": "we use synthetic tasks to investigate out-of-distribution generalization. We train the models on long", "type": "text" } ], "index": 34 }, { "bbox": [ 105, 619, 506, 633 ], "spans": [ { "bbox": [ 105, 619, 506, 633 ], "score": 1.0, "content": "addition and on the task of copying a decimal digit. We train on inputs with at most 128 digits and", "type": "text" } ], "index": 35 }, { "bbox": [ 106, 631, 506, 644 ], "spans": [ { "bbox": [ 106, 631, 319, 644 ], "score": 1.0, "content": "evaluate on inputs lengths from 256 to 300, so over", "type": "text" }, { "bbox": [ 320, 632, 331, 642 ], "score": 0.67, "content": "2 \\mathbf { x }", "type": "inline_equation" }, { "bbox": [ 332, 631, 506, 644 ], "score": 1.0, "content": "longer. As can be seen in the table below,", "type": "text" } ], "index": 36 }, { "bbox": [ 105, 641, 505, 655 ], "spans": [ { "bbox": [ 105, 641, 505, 655 ], "score": 1.0, "content": "the baseline Transformer does not generalize well, while Terraformer manages to get a large portion", "type": "text" } ], "index": 37 }, { "bbox": [ 106, 653, 344, 666 ], "spans": [ { "bbox": [ 106, 653, 344, 666 ], "score": 1.0, "content": "correctly, even if it is not perfect like the Neural GPU [16].", "type": "text" } ], "index": 38 } ], "index": 35.5, "bbox_fs": [ 104, 597, 506, 666 ] }, { "type": "title", "bbox": [ 107, 678, 185, 690 ], "lines": [ { "bbox": [ 105, 677, 186, 693 ], "spans": [ { "bbox": [ 105, 677, 186, 693 ], "score": 1.0, "content": "4.4 Experiments", "type": "text" } ], "index": 39 } ], "index": 39 }, { "type": "text", "bbox": [ 107, 700, 503, 722 ], "lines": [ { "bbox": [ 105, 699, 505, 713 ], "spans": [ { "bbox": [ 105, 699, 505, 713 ], "score": 1.0, "content": "We designed Terraformer so that the benefits from sparsity would not be lost on long sequences, nor", "type": "text" } ], "index": 40 }, { "bbox": [ 105, 710, 505, 723 ], "spans": [ { "bbox": [ 105, 710, 505, 723 ], "score": 1.0, "content": "on downstream finetuning tasks. To test this, we chose the task of summarizing scientific papers", "type": "text" } ], "index": 41 } ], "index": 40.5, "bbox_fs": [ 105, 699, 505, 723 ] } ] }, { "preproc_blocks": [ { "type": "table", "bbox": [ 183, 70, 425, 106 ], "blocks": [ { "type": "table_body", "bbox": [ 183, 70, 425, 106 ], "group_id": 0, "lines": [ { "bbox": [ 183, 70, 425, 106 ], "spans": [ { "bbox": [ 183, 70, 425, 106 ], "score": 0.936, "html": "
Modelcopycopy (seq)addadd (seq)
Transformer79.8%0%36.4%0%
Terraformer99.9%93.9%86.9%32.4%
", "type": "table", "image_path": "5b402f71e1a8108260a392fd130b1cc89a4c8a8025c6a16fa6b1629bde782a15.jpg" } ] } ], "index": 1, "virtual_lines": [ { "bbox": [ 183, 70, 425, 82.0 ], "spans": [], "index": 0 }, { "bbox": [ 183, 82.0, 425, 94.0 ], "spans": [], "index": 1 }, { "bbox": [ 183, 94.0, 425, 106.0 ], "spans": [], "index": 2 } ] }, { "type": "table_caption", "bbox": [ 107, 119, 506, 150 ], "group_id": 0, "lines": [ { "bbox": [ 105, 119, 505, 131 ], "spans": [ { "bbox": [ 105, 119, 505, 131 ], "score": 1.0, "content": "Table 4: Comparison of out-of-distribution generalization for Terraformer and Transformer on two toy tasks,", "type": "text" } ], "index": 3 }, { "bbox": [ 105, 129, 505, 141 ], "spans": [ { "bbox": [ 105, 129, 505, 141 ], "score": 1.0, "content": "long addition and copying on decimal numbers. Under (seq) we report the number of fully correct sequences", "type": "text" } ], "index": 4 }, { "bbox": [ 105, 140, 189, 150 ], "spans": [ { "bbox": [ 105, 140, 189, 150 ], "score": 1.0, "content": "generated as answers.", "type": "text" } ], "index": 5 } ], "index": 4 } ], "index": 2.5 }, { "type": "table", "bbox": [ 184, 163, 426, 237 ], "blocks": [ { "type": "table_body", "bbox": [ 184, 163, 426, 237 ], "group_id": 1, "lines": [ { "bbox": [ 184, 163, 426, 237 ], "spans": [ { "bbox": [ 184, 163, 426, 237 ], "score": 0.979, "html": "
ModelR-1R-2R-LSumR-LSent
Terraformer45.4017.8641.2126.33
DANCERRUM42.7016.5438.44
BIGBIRD-RoBERTa41.2216.4336.961
Pegasus Large (C4)44.2116.9538.8325.67
DANCERPEGASUS45.0117.640.56
BIGBIRD-Pegasus46.6319.0241.77
", "type": "table", "image_path": "385b7cb35fdaa484871228f77deeb89fed297e56fcc529694413f749e767a27e.jpg" } ] } ], "index": 8.5, "virtual_lines": [ { "bbox": [ 184, 163, 426, 175.33333333333334 ], "spans": [], "index": 6 }, { "bbox": [ 184, 175.33333333333334, 426, 187.66666666666669 ], "spans": [], "index": 7 }, { "bbox": [ 184, 187.66666666666669, 426, 200.00000000000003 ], "spans": [], "index": 8 }, { "bbox": [ 184, 200.00000000000003, 426, 212.33333333333337 ], "spans": [], "index": 9 }, { "bbox": [ 184, 212.33333333333337, 426, 224.6666666666667 ], "spans": [], "index": 10 }, { "bbox": [ 184, 224.6666666666667, 426, 237.00000000000006 ], "spans": [], "index": 11 } ] } ], "index": 8.5 }, { "type": "text", "bbox": [ 106, 243, 504, 273 ], "lines": [ { "bbox": [ 105, 243, 505, 255 ], "spans": [ { "bbox": [ 105, 243, 505, 255 ], "score": 1.0, "content": "Table 5: Terraformer is competitive with strong baselines [46, 45, 10] on the ArXiv summarization task, without", "type": "text" } ], "index": 12 }, { "bbox": [ 106, 254, 505, 264 ], "spans": [ { "bbox": [ 106, 254, 505, 264 ], "score": 1.0, "content": "using the Pegasus loss and without beam search. On R-1, R-2 and R-LSum, Terraformer outperforms all previous", "type": "text" } ], "index": 13 }, { "bbox": [ 106, 263, 236, 275 ], "spans": [ { "bbox": [ 106, 263, 236, 275 ], "score": 1.0, "content": "models except for BigBird-Pegasus.", "type": "text" } ], "index": 14 } ], "index": 13 }, { "type": "text", "bbox": [ 107, 297, 505, 429 ], "lines": [ { "bbox": [ 105, 297, 505, 312 ], "spans": [ { "bbox": [ 105, 297, 505, 312 ], "score": 1.0, "content": "using the dataset of scientific papers from arXiv3[6]. In this task, the input is a whole paper—a long", "type": "text" } ], "index": 15 }, { "bbox": [ 106, 309, 505, 321 ], "spans": [ { "bbox": [ 106, 309, 505, 321 ], "score": 1.0, "content": "sequence—and the model is asked to output its abstract. Several recent papers studied this dataset and", "type": "text" } ], "index": 16 }, { "bbox": [ 106, 320, 505, 332 ], "spans": [ { "bbox": [ 106, 320, 505, 332 ], "score": 1.0, "content": "tasks and it has been shown [46, 45] that pretraining on C4 yields significant improvements on this", "type": "text" } ], "index": 17 }, { "bbox": [ 106, 331, 505, 343 ], "spans": [ { "bbox": [ 106, 331, 505, 343 ], "score": 1.0, "content": "task. We also pretrain Terraformer on C4 (like in all experiments in this paper) and fine-tuned it on", "type": "text" } ], "index": 18 }, { "bbox": [ 106, 342, 506, 354 ], "spans": [ { "bbox": [ 106, 342, 506, 354 ], "score": 1.0, "content": "the arXiv summarization task. We find that Terraformer is competitive with the above baselines, even", "type": "text" } ], "index": 19 }, { "bbox": [ 106, 353, 506, 365 ], "spans": [ { "bbox": [ 106, 353, 506, 365 ], "score": 1.0, "content": "though we mask single words (we do not use the Pegasus sentence loss) and decode the answers in a", "type": "text" } ], "index": 20 }, { "bbox": [ 105, 363, 506, 376 ], "spans": [ { "bbox": [ 105, 363, 506, 376 ], "score": 1.0, "content": "greedy way (no beam search). Note that ROUGE scores are computed using open-source scorer4 with", "type": "text" } ], "index": 21 }, { "bbox": [ 106, 374, 506, 386 ], "spans": [ { "bbox": [ 106, 374, 506, 386 ], "score": 1.0, "content": "the metrics described in its documentation5. We also observe certain confusion between ROUGE-L", "type": "text" } ], "index": 22 }, { "bbox": [ 106, 385, 506, 398 ], "spans": [ { "bbox": [ 106, 385, 506, 398 ], "score": 1.0, "content": "metrics reported. As noted in the open-source scorer, there are two versions of ROUGEL-Sentence-", "type": "text" } ], "index": 23 }, { "bbox": [ 106, 396, 505, 408 ], "spans": [ { "bbox": [ 106, 396, 505, 408 ], "score": 1.0, "content": "Level (R-LSent) and ROUGEL-Summary-Level (R-LSum). For clarity, we report both of these", "type": "text" } ], "index": 24 }, { "bbox": [ 106, 407, 506, 420 ], "spans": [ { "bbox": [ 106, 407, 506, 420 ], "score": 1.0, "content": "metrics. Furthermore we only report the F1 measure of any ROUGE metric. We include a few", "type": "text" } ], "index": 25 }, { "bbox": [ 105, 419, 316, 430 ], "spans": [ { "bbox": [ 105, 419, 316, 430 ], "score": 1.0, "content": "examples of the generated abstracts in the appendix.", "type": "text" } ], "index": 26 } ], "index": 20.5 }, { "type": "text", "bbox": [ 107, 434, 505, 511 ], "lines": [ { "bbox": [ 105, 434, 505, 448 ], "spans": [ { "bbox": [ 105, 434, 505, 448 ], "score": 1.0, "content": "We pretrained Terraformer in the same way as all other baselines reported in this paper with the", "type": "text" } ], "index": 27 }, { "bbox": [ 105, 446, 505, 458 ], "spans": [ { "bbox": [ 105, 446, 505, 458 ], "score": 1.0, "content": "same number of parameters (800M), the same dimensions as mentioned before, and loss sparsity 4", "type": "text" } ], "index": 28 }, { "bbox": [ 105, 456, 506, 468 ], "spans": [ { "bbox": [ 105, 456, 506, 468 ], "score": 1.0, "content": "to get the fastest model. Compared to the sparse Transformer model from the previous section that", "type": "text" } ], "index": 29 }, { "bbox": [ 105, 468, 506, 480 ], "spans": [ { "bbox": [ 105, 468, 506, 480 ], "score": 1.0, "content": "achieves a decoding speed of 0.061s, Terraformer achieves a decoding speed of 0.086s with a similar", "type": "text" } ], "index": 30 }, { "bbox": [ 105, 478, 505, 490 ], "spans": [ { "bbox": [ 105, 478, 505, 490 ], "score": 1.0, "content": "performance in terms of perplexity (see appendix for details). We also observe that the Terraformer", "type": "text" } ], "index": 31 }, { "bbox": [ 105, 489, 505, 501 ], "spans": [ { "bbox": [ 105, 489, 505, 501 ], "score": 1.0, "content": "model achieves accuracy similar to the Transformer model in Table 3 for selected downstream tasks", "type": "text" } ], "index": 32 }, { "bbox": [ 106, 501, 181, 511 ], "spans": [ { "bbox": [ 106, 501, 181, 511 ], "score": 1.0, "content": "on GLUE dataset.", "type": "text" } ], "index": 33 } ], "index": 30 }, { "type": "text", "bbox": [ 106, 516, 504, 538 ], "lines": [ { "bbox": [ 106, 516, 505, 529 ], "spans": [ { "bbox": [ 106, 516, 505, 529 ], "score": 1.0, "content": "Table 6 shows the speedup in decoding with sparse layers when we scale up Terraformer to 17B", "type": "text" } ], "index": 34 }, { "bbox": [ 105, 527, 434, 541 ], "spans": [ { "bbox": [ 105, 527, 329, 541 ], "score": 1.0, "content": "parameters. Note that sparsifying all the layers gives us", "type": "text" }, { "bbox": [ 330, 528, 346, 538 ], "score": 0.75, "content": "3 7 \\mathrm { x }", "type": "inline_equation" }, { "bbox": [ 347, 527, 434, 541 ], "score": 1.0, "content": "speedup in decoding.", "type": "text" } ], "index": 35 } ], "index": 34.5 }, { "type": "title", "bbox": [ 107, 557, 183, 570 ], "lines": [ { "bbox": [ 104, 554, 185, 573 ], "spans": [ { "bbox": [ 104, 554, 185, 573 ], "score": 1.0, "content": "5 Conclusion", "type": "text" } ], "index": 36 } ], "index": 36 }, { "type": "text", "bbox": [ 107, 583, 505, 617 ], "lines": [ { "bbox": [ 105, 583, 505, 596 ], "spans": [ { "bbox": [ 105, 583, 505, 596 ], "score": 1.0, "content": "When starting to investigate sparse variants of Transformers, we assumed that there would be a price", "type": "text" } ], "index": 37 }, { "bbox": [ 105, 594, 505, 608 ], "spans": [ { "bbox": [ 105, 594, 505, 608 ], "score": 1.0, "content": "to pay for sparsity—that a sparse model would always underperform a dense one with the same", "type": "text" } ], "index": 38 }, { "bbox": [ 106, 606, 415, 618 ], "spans": [ { "bbox": [ 106, 606, 415, 618 ], "score": 1.0, "content": "number of parameters. To our surprise, this is not the case: sparse is enough!", "type": "text" } ], "index": 39 } ], "index": 38 }, { "type": "text", "bbox": [ 107, 622, 505, 666 ], "lines": [ { "bbox": [ 106, 622, 506, 633 ], "spans": [ { "bbox": [ 106, 622, 506, 633 ], "score": 1.0, "content": "In our experiments with large models on the C4 dataset, the sparse models match the performance of", "type": "text" } ], "index": 40 }, { "bbox": [ 105, 631, 506, 646 ], "spans": [ { "bbox": [ 105, 631, 506, 646 ], "score": 1.0, "content": "their dense counterparts while being many times faster at inference. And, when scaling the models up,", "type": "text" } ], "index": 41 }, { "bbox": [ 105, 644, 505, 656 ], "spans": [ { "bbox": [ 105, 644, 505, 656 ], "score": 1.0, "content": "the benefits of sparsity become even larger. This promises to put Transformers back on a sustainable", "type": "text" } ], "index": 42 }, { "bbox": [ 106, 655, 275, 667 ], "spans": [ { "bbox": [ 106, 655, 275, 667 ], "score": 1.0, "content": "track and make large models more useful.", "type": "text" } ], "index": 43 } ], "index": 41.5 } ], "page_idx": 8, "page_size": [ 612, 792 ], "discarded_blocks": [ { "type": "discarded", "bbox": [ 107, 680, 505, 722 ], "lines": [ { "bbox": [ 117, 677, 506, 694 ], "spans": [ { "bbox": [ 117, 677, 506, 694 ], "score": 1.0, "content": "3We provide full details of our datasets, hyperparameters, and everything needed to reproduce the results in", "type": "text" } ] }, { "bbox": [ 106, 689, 480, 702 ], "spans": [ { "bbox": [ 106, 689, 480, 702 ], "score": 1.0, "content": "the appendix. The code is open-sourced as part of Trax 1.4.0 at https://github.com/google/trax.", "type": "text" } ] }, { "bbox": [ 118, 699, 300, 714 ], "spans": [ { "bbox": [ 118, 699, 300, 714 ], "score": 1.0, "content": "4https://pypi.org/project/rouge-score/", "type": "text" } ] }, { "bbox": [ 118, 709, 447, 726 ], "spans": [ { "bbox": [ 118, 709, 447, 726 ], "score": 1.0, "content": "5https://github.com/google-research/google-research/tree/master/rouge", "type": "text" } ] } ] }, { "type": "discarded", "bbox": [ 302, 742, 308, 750 ], "lines": [ { "bbox": [ 302, 741, 309, 752 ], "spans": [ { "bbox": [ 302, 741, 309, 752 ], "score": 1.0, "content": "9", "type": "text" } ] } ] } ], "para_blocks": [ { "type": "table", "bbox": [ 183, 70, 425, 106 ], "blocks": [ { "type": "table_body", "bbox": [ 183, 70, 425, 106 ], "group_id": 0, "lines": [ { "bbox": [ 183, 70, 425, 106 ], "spans": [ { "bbox": [ 183, 70, 425, 106 ], "score": 0.936, "html": "
Modelcopycopy (seq)addadd (seq)
Transformer79.8%0%36.4%0%
Terraformer99.9%93.9%86.9%32.4%
", "type": "table", "image_path": "5b402f71e1a8108260a392fd130b1cc89a4c8a8025c6a16fa6b1629bde782a15.jpg" } ] } ], "index": 1, "virtual_lines": [ { "bbox": [ 183, 70, 425, 82.0 ], "spans": [], "index": 0 }, { "bbox": [ 183, 82.0, 425, 94.0 ], "spans": [], "index": 1 }, { "bbox": [ 183, 94.0, 425, 106.0 ], "spans": [], "index": 2 } ] }, { "type": "table_caption", "bbox": [ 107, 119, 506, 150 ], "group_id": 0, "lines": [ { "bbox": [ 105, 119, 505, 131 ], "spans": [ { "bbox": [ 105, 119, 505, 131 ], "score": 1.0, "content": "Table 4: Comparison of out-of-distribution generalization for Terraformer and Transformer on two toy tasks,", "type": "text" } ], "index": 3 }, { "bbox": [ 105, 129, 505, 141 ], "spans": [ { "bbox": [ 105, 129, 505, 141 ], "score": 1.0, "content": "long addition and copying on decimal numbers. Under (seq) we report the number of fully correct sequences", "type": "text" } ], "index": 4 }, { "bbox": [ 105, 140, 189, 150 ], "spans": [ { "bbox": [ 105, 140, 189, 150 ], "score": 1.0, "content": "generated as answers.", "type": "text" } ], "index": 5 } ], "index": 4 } ], "index": 2.5 }, { "type": "table", "bbox": [ 184, 163, 426, 237 ], "blocks": [ { "type": "table_body", "bbox": [ 184, 163, 426, 237 ], "group_id": 1, "lines": [ { "bbox": [ 184, 163, 426, 237 ], "spans": [ { "bbox": [ 184, 163, 426, 237 ], "score": 0.979, "html": "
ModelR-1R-2R-LSumR-LSent
Terraformer45.4017.8641.2126.33
DANCERRUM42.7016.5438.44
BIGBIRD-RoBERTa41.2216.4336.961
Pegasus Large (C4)44.2116.9538.8325.67
DANCERPEGASUS45.0117.640.56
BIGBIRD-Pegasus46.6319.0241.77
", "type": "table", "image_path": "385b7cb35fdaa484871228f77deeb89fed297e56fcc529694413f749e767a27e.jpg" } ] } ], "index": 8.5, "virtual_lines": [ { "bbox": [ 184, 163, 426, 175.33333333333334 ], "spans": [], "index": 6 }, { "bbox": [ 184, 175.33333333333334, 426, 187.66666666666669 ], "spans": [], "index": 7 }, { "bbox": [ 184, 187.66666666666669, 426, 200.00000000000003 ], "spans": [], "index": 8 }, { "bbox": [ 184, 200.00000000000003, 426, 212.33333333333337 ], "spans": [], "index": 9 }, { "bbox": [ 184, 212.33333333333337, 426, 224.6666666666667 ], "spans": [], "index": 10 }, { "bbox": [ 184, 224.6666666666667, 426, 237.00000000000006 ], "spans": [], "index": 11 } ] } ], "index": 8.5 }, { "type": "text", "bbox": [ 106, 243, 504, 273 ], "lines": [ { "bbox": [ 105, 243, 505, 255 ], "spans": [ { "bbox": [ 105, 243, 505, 255 ], "score": 1.0, "content": "Table 5: Terraformer is competitive with strong baselines [46, 45, 10] on the ArXiv summarization task, without", "type": "text" } ], "index": 12 }, { "bbox": [ 106, 254, 505, 264 ], "spans": [ { "bbox": [ 106, 254, 505, 264 ], "score": 1.0, "content": "using the Pegasus loss and without beam search. On R-1, R-2 and R-LSum, Terraformer outperforms all previous", "type": "text" } ], "index": 13 }, { "bbox": [ 106, 263, 236, 275 ], "spans": [ { "bbox": [ 106, 263, 236, 275 ], "score": 1.0, "content": "models except for BigBird-Pegasus.", "type": "text" } ], "index": 14 } ], "index": 13, "bbox_fs": [ 105, 243, 505, 275 ] }, { "type": "text", "bbox": [ 107, 297, 505, 429 ], "lines": [ { "bbox": [ 105, 297, 505, 312 ], "spans": [ { "bbox": [ 105, 297, 505, 312 ], "score": 1.0, "content": "using the dataset of scientific papers from arXiv3[6]. In this task, the input is a whole paper—a long", "type": "text" } ], "index": 15 }, { "bbox": [ 106, 309, 505, 321 ], "spans": [ { "bbox": [ 106, 309, 505, 321 ], "score": 1.0, "content": "sequence—and the model is asked to output its abstract. Several recent papers studied this dataset and", "type": "text" } ], "index": 16 }, { "bbox": [ 106, 320, 505, 332 ], "spans": [ { "bbox": [ 106, 320, 505, 332 ], "score": 1.0, "content": "tasks and it has been shown [46, 45] that pretraining on C4 yields significant improvements on this", "type": "text" } ], "index": 17 }, { "bbox": [ 106, 331, 505, 343 ], "spans": [ { "bbox": [ 106, 331, 505, 343 ], "score": 1.0, "content": "task. We also pretrain Terraformer on C4 (like in all experiments in this paper) and fine-tuned it on", "type": "text" } ], "index": 18 }, { "bbox": [ 106, 342, 506, 354 ], "spans": [ { "bbox": [ 106, 342, 506, 354 ], "score": 1.0, "content": "the arXiv summarization task. We find that Terraformer is competitive with the above baselines, even", "type": "text" } ], "index": 19 }, { "bbox": [ 106, 353, 506, 365 ], "spans": [ { "bbox": [ 106, 353, 506, 365 ], "score": 1.0, "content": "though we mask single words (we do not use the Pegasus sentence loss) and decode the answers in a", "type": "text" } ], "index": 20 }, { "bbox": [ 105, 363, 506, 376 ], "spans": [ { "bbox": [ 105, 363, 506, 376 ], "score": 1.0, "content": "greedy way (no beam search). Note that ROUGE scores are computed using open-source scorer4 with", "type": "text" } ], "index": 21 }, { "bbox": [ 106, 374, 506, 386 ], "spans": [ { "bbox": [ 106, 374, 506, 386 ], "score": 1.0, "content": "the metrics described in its documentation5. We also observe certain confusion between ROUGE-L", "type": "text" } ], "index": 22 }, { "bbox": [ 106, 385, 506, 398 ], "spans": [ { "bbox": [ 106, 385, 506, 398 ], "score": 1.0, "content": "metrics reported. As noted in the open-source scorer, there are two versions of ROUGEL-Sentence-", "type": "text" } ], "index": 23 }, { "bbox": [ 106, 396, 505, 408 ], "spans": [ { "bbox": [ 106, 396, 505, 408 ], "score": 1.0, "content": "Level (R-LSent) and ROUGEL-Summary-Level (R-LSum). For clarity, we report both of these", "type": "text" } ], "index": 24 }, { "bbox": [ 106, 407, 506, 420 ], "spans": [ { "bbox": [ 106, 407, 506, 420 ], "score": 1.0, "content": "metrics. Furthermore we only report the F1 measure of any ROUGE metric. We include a few", "type": "text" } ], "index": 25 }, { "bbox": [ 105, 419, 316, 430 ], "spans": [ { "bbox": [ 105, 419, 316, 430 ], "score": 1.0, "content": "examples of the generated abstracts in the appendix.", "type": "text" } ], "index": 26 } ], "index": 20.5, "bbox_fs": [ 105, 297, 506, 430 ] }, { "type": "text", "bbox": [ 107, 434, 505, 511 ], "lines": [ { "bbox": [ 105, 434, 505, 448 ], "spans": [ { "bbox": [ 105, 434, 505, 448 ], "score": 1.0, "content": "We pretrained Terraformer in the same way as all other baselines reported in this paper with the", "type": "text" } ], "index": 27 }, { "bbox": [ 105, 446, 505, 458 ], "spans": [ { "bbox": [ 105, 446, 505, 458 ], "score": 1.0, "content": "same number of parameters (800M), the same dimensions as mentioned before, and loss sparsity 4", "type": "text" } ], "index": 28 }, { "bbox": [ 105, 456, 506, 468 ], "spans": [ { "bbox": [ 105, 456, 506, 468 ], "score": 1.0, "content": "to get the fastest model. Compared to the sparse Transformer model from the previous section that", "type": "text" } ], "index": 29 }, { "bbox": [ 105, 468, 506, 480 ], "spans": [ { "bbox": [ 105, 468, 506, 480 ], "score": 1.0, "content": "achieves a decoding speed of 0.061s, Terraformer achieves a decoding speed of 0.086s with a similar", "type": "text" } ], "index": 30 }, { "bbox": [ 105, 478, 505, 490 ], "spans": [ { "bbox": [ 105, 478, 505, 490 ], "score": 1.0, "content": "performance in terms of perplexity (see appendix for details). We also observe that the Terraformer", "type": "text" } ], "index": 31 }, { "bbox": [ 105, 489, 505, 501 ], "spans": [ { "bbox": [ 105, 489, 505, 501 ], "score": 1.0, "content": "model achieves accuracy similar to the Transformer model in Table 3 for selected downstream tasks", "type": "text" } ], "index": 32 }, { "bbox": [ 106, 501, 181, 511 ], "spans": [ { "bbox": [ 106, 501, 181, 511 ], "score": 1.0, "content": "on GLUE dataset.", "type": "text" } ], "index": 33 } ], "index": 30, "bbox_fs": [ 105, 434, 506, 511 ] }, { "type": "text", "bbox": [ 106, 516, 504, 538 ], "lines": [ { "bbox": [ 106, 516, 505, 529 ], "spans": [ { "bbox": [ 106, 516, 505, 529 ], "score": 1.0, "content": "Table 6 shows the speedup in decoding with sparse layers when we scale up Terraformer to 17B", "type": "text" } ], "index": 34 }, { "bbox": [ 105, 527, 434, 541 ], "spans": [ { "bbox": [ 105, 527, 329, 541 ], "score": 1.0, "content": "parameters. Note that sparsifying all the layers gives us", "type": "text" }, { "bbox": [ 330, 528, 346, 538 ], "score": 0.75, "content": "3 7 \\mathrm { x }", "type": "inline_equation" }, { "bbox": [ 347, 527, 434, 541 ], "score": 1.0, "content": "speedup in decoding.", "type": "text" } ], "index": 35 } ], "index": 34.5, "bbox_fs": [ 105, 516, 505, 541 ] }, { "type": "title", "bbox": [ 107, 557, 183, 570 ], "lines": [ { "bbox": [ 104, 554, 185, 573 ], "spans": [ { "bbox": [ 104, 554, 185, 573 ], "score": 1.0, "content": "5 Conclusion", "type": "text" } ], "index": 36 } ], "index": 36 }, { "type": "text", "bbox": [ 107, 583, 505, 617 ], "lines": [ { "bbox": [ 105, 583, 505, 596 ], "spans": [ { "bbox": [ 105, 583, 505, 596 ], "score": 1.0, "content": "When starting to investigate sparse variants of Transformers, we assumed that there would be a price", "type": "text" } ], "index": 37 }, { "bbox": [ 105, 594, 505, 608 ], "spans": [ { "bbox": [ 105, 594, 505, 608 ], "score": 1.0, "content": "to pay for sparsity—that a sparse model would always underperform a dense one with the same", "type": "text" } ], "index": 38 }, { "bbox": [ 106, 606, 415, 618 ], "spans": [ { "bbox": [ 106, 606, 415, 618 ], "score": 1.0, "content": "number of parameters. To our surprise, this is not the case: sparse is enough!", "type": "text" } ], "index": 39 } ], "index": 38, "bbox_fs": [ 105, 583, 505, 618 ] }, { "type": "text", "bbox": [ 107, 622, 505, 666 ], "lines": [ { "bbox": [ 106, 622, 506, 633 ], "spans": [ { "bbox": [ 106, 622, 506, 633 ], "score": 1.0, "content": "In our experiments with large models on the C4 dataset, the sparse models match the performance of", "type": "text" } ], "index": 40 }, { "bbox": [ 105, 631, 506, 646 ], "spans": [ { "bbox": [ 105, 631, 506, 646 ], "score": 1.0, "content": "their dense counterparts while being many times faster at inference. And, when scaling the models up,", "type": "text" } ], "index": 41 }, { "bbox": [ 105, 644, 505, 656 ], "spans": [ { "bbox": [ 105, 644, 505, 656 ], "score": 1.0, "content": "the benefits of sparsity become even larger. This promises to put Transformers back on a sustainable", "type": "text" } ], "index": 42 }, { "bbox": [ 106, 655, 275, 667 ], "spans": [ { "bbox": [ 106, 655, 275, 667 ], "score": 1.0, "content": "track and make large models more useful.", "type": "text" } ], "index": 43 } ], "index": 41.5, "bbox_fs": [ 105, 622, 506, 667 ] } ] }, { "preproc_blocks": [ { "type": "table", "bbox": [ 108, 64, 305, 123 ], "blocks": [ { "type": "table_body", "bbox": [ 108, 64, 305, 123 ], "group_id": 0, "lines": [ { "bbox": [ 108, 64, 305, 123 ], "spans": [ { "bbox": [ 108, 64, 305, 123 ], "score": 0.971, "html": "
TerraformerDec. timeSpeedup
dense3.651s1x
Sparse FF1.595s2.29x
SparseFF+QKV0.183s19.98x
SparseFF+QKV+loss0.097s37.64x
", "type": "table", "image_path": "832a4fde51386ccebbdd0945dd7d0afffafeb70294fa0994b36e0b4c24bac53b.jpg" } ] } ], "index": 1.5, "virtual_lines": [ { "bbox": [ 108, 64, 305, 78.75 ], "spans": [], "index": 0 }, { "bbox": [ 108, 78.75, 305, 93.5 ], "spans": [], "index": 1 }, { "bbox": [ 108, 93.5, 305, 108.25 ], "spans": [], "index": 2 }, { "bbox": [ 108, 108.25, 305, 123.0 ], "spans": [], "index": 3 } ] }, { "type": "table_caption", "bbox": [ 106, 135, 307, 186 ], "group_id": 0, "lines": [ { "bbox": [ 106, 135, 308, 146 ], "spans": [ { "bbox": [ 106, 135, 308, 146 ], "score": 1.0, "content": "Table 6: Decoding speed of a single token for Ter-", "type": "text" } ], "index": 4 }, { "bbox": [ 106, 146, 307, 156 ], "spans": [ { "bbox": [ 106, 146, 223, 156 ], "score": 1.0, "content": "raformer with 17B parameters is", "type": "text" }, { "bbox": [ 223, 146, 238, 155 ], "score": 0.55, "content": "3 7 x", "type": "inline_equation" }, { "bbox": [ 238, 146, 307, 156 ], "score": 1.0, "content": "faster than a dense", "type": "text" } ], "index": 5 }, { "bbox": [ 106, 156, 308, 167 ], "spans": [ { "bbox": [ 106, 156, 308, 167 ], "score": 1.0, "content": "baseline model, requiring less than 100ms/token for in-", "type": "text" } ], "index": 6 }, { "bbox": [ 105, 165, 307, 177 ], "spans": [ { "bbox": [ 105, 165, 228, 177 ], "score": 1.0, "content": "ference. Here attention-sparsity", "type": "text" }, { "bbox": [ 228, 166, 252, 176 ], "score": 0.83, "content": "= ~ 6 4", "type": "inline_equation" }, { "bbox": [ 253, 165, 255, 177 ], "score": 1.0, "content": ",", "type": "text" }, { "bbox": [ 255, 166, 264, 176 ], "score": 0.44, "content": "\\mathcal { H }", "type": "inline_equation" }, { "bbox": [ 264, 165, 295, 177 ], "score": 1.0, "content": "-sparsity", "type": "text" }, { "bbox": [ 296, 166, 307, 175 ], "score": 0.73, "content": "=", "type": "inline_equation" } ], "index": 7 }, { "bbox": [ 106, 176, 207, 186 ], "spans": [ { "bbox": [ 106, 176, 187, 186 ], "score": 1.0, "content": "256, and loss-sparsity", "type": "text" }, { "bbox": [ 187, 176, 204, 185 ], "score": 0.84, "content": "= 4", "type": "inline_equation" }, { "bbox": [ 204, 176, 207, 186 ], "score": 1.0, "content": ".", "type": "text" } ], "index": 8 } ], "index": 6 } ], "index": 3.75 }, { "type": "text", "bbox": [ 315, 73, 505, 182 ], "lines": [ { "bbox": [ 315, 73, 506, 84 ], "spans": [ { "bbox": [ 315, 73, 506, 84 ], "score": 1.0, "content": "The current results have a number of limitations.", "type": "text" } ], "index": 9 }, { "bbox": [ 313, 83, 505, 96 ], "spans": [ { "bbox": [ 313, 83, 505, 96 ], "score": 1.0, "content": "For one, the practical speedups we see are only", "type": "text" } ], "index": 10 }, { "bbox": [ 313, 94, 505, 106 ], "spans": [ { "bbox": [ 313, 94, 505, 106 ], "score": 1.0, "content": "for inference, not at training time. Moreover, we", "type": "text" } ], "index": 11 }, { "bbox": [ 313, 105, 505, 116 ], "spans": [ { "bbox": [ 313, 105, 505, 116 ], "score": 1.0, "content": "consider unbatched inference on CPUs, while", "type": "text" } ], "index": 12 }, { "bbox": [ 314, 116, 506, 128 ], "spans": [ { "bbox": [ 314, 116, 506, 128 ], "score": 1.0, "content": "often inference is ran in batched mode on GPUs.", "type": "text" } ], "index": 13 }, { "bbox": [ 313, 126, 505, 140 ], "spans": [ { "bbox": [ 313, 126, 505, 140 ], "score": 1.0, "content": "We believe with more work sparsity can bring", "type": "text" } ], "index": 14 }, { "bbox": [ 313, 139, 506, 149 ], "spans": [ { "bbox": [ 313, 139, 506, 149 ], "score": 1.0, "content": "improvements in these settings too, as our funda-", "type": "text" } ], "index": 15 }, { "bbox": [ 313, 149, 505, 160 ], "spans": [ { "bbox": [ 313, 149, 505, 160 ], "score": 1.0, "content": "mental result shows that the sparse models reach", "type": "text" } ], "index": 16 }, { "bbox": [ 313, 160, 505, 172 ], "spans": [ { "bbox": [ 313, 160, 505, 172 ], "score": 1.0, "content": "the same perplexity as their dense counterparts", "type": "text" } ], "index": 17 }, { "bbox": [ 313, 170, 465, 183 ], "spans": [ { "bbox": [ 313, 170, 465, 183 ], "score": 1.0, "content": "with the same number of parameters.", "type": "text" } ], "index": 18 } ], "index": 13.5 }, { "type": "text", "bbox": [ 314, 187, 504, 209 ], "lines": [ { "bbox": [ 315, 187, 506, 199 ], "spans": [ { "bbox": [ 315, 187, 506, 199 ], "score": 1.0, "content": "So while we demonstrate that Scaling Trans-", "type": "text" } ], "index": 19 }, { "bbox": [ 313, 198, 506, 211 ], "spans": [ { "bbox": [ 313, 198, 506, 211 ], "score": 1.0, "content": "formers are possible, we consider this paper as a", "type": "text" } ], "index": 20 } ], "index": 19.5 }, { "type": "text", "bbox": [ 107, 209, 505, 275 ], "lines": [ { "bbox": [ 105, 209, 505, 221 ], "spans": [ { "bbox": [ 105, 209, 505, 221 ], "score": 1.0, "content": "first step on the way to sustainable large models. There are numerous techniques for making models", "type": "text" } ], "index": 21 }, { "bbox": [ 105, 220, 506, 232 ], "spans": [ { "bbox": [ 105, 220, 506, 232 ], "score": 1.0, "content": "faster that could greatly benefit Terraformer and other Scaling Transformers. For example, we did", "type": "text" } ], "index": 22 }, { "bbox": [ 105, 231, 506, 243 ], "spans": [ { "bbox": [ 105, 231, 506, 243 ], "score": 1.0, "content": "not study quantization and we believe that it can make Scaling Transformers even faster. We also", "type": "text" } ], "index": 23 }, { "bbox": [ 105, 241, 506, 254 ], "spans": [ { "bbox": [ 105, 241, 506, 254 ], "score": 1.0, "content": "focused on inference speed and did not get improvements in training speed. The main reason is", "type": "text" } ], "index": 24 }, { "bbox": [ 105, 253, 505, 265 ], "spans": [ { "bbox": [ 105, 253, 505, 265 ], "score": 1.0, "content": "our use of Gumbel-Softmax when training the feedforward block (see Section 3.1). Fedus et al. [8]", "type": "text" } ], "index": 25 }, { "bbox": [ 106, 264, 473, 276 ], "spans": [ { "bbox": [ 106, 264, 473, 276 ], "score": 1.0, "content": "already provide a promising alternative, and we look forward to exploring it in future work.", "type": "text" } ], "index": 26 } ], "index": 23.5 }, { "type": "text", "bbox": [ 107, 280, 505, 357 ], "lines": [ { "bbox": [ 105, 280, 505, 292 ], "spans": [ { "bbox": [ 105, 280, 505, 292 ], "score": 1.0, "content": "Further, we hope that the community will take inspiration from Scaling Transformers and tune them", "type": "text" } ], "index": 27 }, { "bbox": [ 105, 290, 506, 304 ], "spans": [ { "bbox": [ 105, 290, 506, 304 ], "score": 1.0, "content": "for their needs. We ran experiments using layer sizes and hyperparameters borrowed from dense", "type": "text" } ], "index": 28 }, { "bbox": [ 105, 301, 505, 315 ], "spans": [ { "bbox": [ 105, 301, 505, 315 ], "score": 1.0, "content": "Transformers and they are most probably not optimal for Scaling Transformer. With proper tuning", "type": "text" } ], "index": 29 }, { "bbox": [ 105, 313, 505, 325 ], "spans": [ { "bbox": [ 105, 313, 505, 325 ], "score": 1.0, "content": "and further improvements we believe one could train a Scaling Transformer to match GPT-3 in", "type": "text" } ], "index": 30 }, { "bbox": [ 105, 324, 505, 336 ], "spans": [ { "bbox": [ 105, 324, 505, 336 ], "score": 1.0, "content": "accuracy but also run inference in reasonable time on a laptop. We put it as a fascinating challenge", "type": "text" } ], "index": 31 }, { "bbox": [ 105, 335, 506, 347 ], "spans": [ { "bbox": [ 105, 335, 506, 347 ], "score": 1.0, "content": "to the community, since such Scaling Transformers will not only be more sustainable but will also", "type": "text" } ], "index": 32 }, { "bbox": [ 105, 345, 278, 358 ], "spans": [ { "bbox": [ 105, 345, 278, 358 ], "score": 1.0, "content": "make large models accessible to everyone.", "type": "text" } ], "index": 33 } ], "index": 30 }, { "type": "title", "bbox": [ 107, 372, 163, 385 ], "lines": [ { "bbox": [ 106, 370, 165, 387 ], "spans": [ { "bbox": [ 106, 370, 165, 387 ], "score": 1.0, "content": "References", "type": "text" } ], "index": 34 } ], "index": 34 }, { "type": "text", "bbox": [ 110, 390, 506, 722 ], "lines": [ { "bbox": [ 111, 390, 247, 404 ], "spans": [ { "bbox": [ 111, 390, 247, 404 ], "score": 1.0, "content": "[1] Nvidia Ampere Architecture.", "type": "text" } ], "index": 35 }, { "bbox": [ 127, 401, 416, 415 ], "spans": [ { "bbox": [ 127, 401, 416, 415 ], "score": 1.0, "content": "https://developer.nvidia.com/blog/nvidia-ampere-architecture-in-depth/.", "type": "text" } ], "index": 36 }, { "bbox": [ 111, 420, 505, 433 ], "spans": [ { "bbox": [ 111, 420, 505, 433 ], "score": 1.0, "content": "[2] Christopher Brix, Parnia Bahar, and Hermann Ney. Successfully applying the stabilized lottery", "type": "text" } ], "index": 37 }, { "bbox": [ 127, 430, 486, 444 ], "spans": [ { "bbox": [ 127, 430, 486, 444 ], "score": 1.0, "content": "ticket hypothesis to the transformer architecture. arXiv preprint arXiv:2005.03454, 2020.", "type": "text" } ], "index": 38 }, { "bbox": [ 111, 449, 506, 462 ], "spans": [ { "bbox": [ 111, 449, 506, 462 ], "score": 1.0, "content": "[3] Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal,", "type": "text" } ], "index": 39 }, { "bbox": [ 127, 460, 505, 473 ], "spans": [ { "bbox": [ 127, 460, 505, 473 ], "score": 1.0, "content": "Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are", "type": "text" } ], "index": 40 }, { "bbox": [ 127, 471, 365, 484 ], "spans": [ { "bbox": [ 127, 471, 365, 484 ], "score": 1.0, "content": "few-shot learners. arXiv preprint arXiv:2005.14165, 2020.", "type": "text" } ], "index": 41 }, { "bbox": [ 111, 489, 505, 502 ], "spans": [ { "bbox": [ 111, 489, 505, 502 ], "score": 1.0, "content": "[4] Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with", "type": "text" } ], "index": 42 }, { "bbox": [ 127, 501, 374, 513 ], "spans": [ { "bbox": [ 127, 501, 374, 513 ], "score": 1.0, "content": "sparse transformers. arXiv preprint arXiv:1904.10509, 2019.", "type": "text" } ], "index": 43 }, { "bbox": [ 111, 518, 506, 532 ], "spans": [ { "bbox": [ 111, 518, 506, 532 ], "score": 1.0, "content": "[5] Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane,", "type": "text" } ], "index": 44 }, { "bbox": [ 126, 528, 505, 543 ], "spans": [ { "bbox": [ 126, 528, 505, 543 ], "score": 1.0, "content": "Tamas Sarlos, Peter Hawkins, Jared Davis, Afroz Mohiuddin, Lukasz Kaiser, et al. Rethinking", "type": "text" } ], "index": 45 }, { "bbox": [ 127, 540, 397, 552 ], "spans": [ { "bbox": [ 127, 540, 397, 552 ], "score": 1.0, "content": "attention with performers. arXiv preprint arXiv:2009.14794, 2020.", "type": "text" } ], "index": 46 }, { "bbox": [ 110, 558, 506, 572 ], "spans": [ { "bbox": [ 110, 558, 506, 572 ], "score": 1.0, "content": "[6] Arman Cohan, Franck Dernoncourt, Doo Soon Kim, Trung Bui, Seokhwan Kim, Walter Chang,", "type": "text" } ], "index": 47 }, { "bbox": [ 127, 569, 506, 581 ], "spans": [ { "bbox": [ 127, 569, 506, 581 ], "score": 1.0, "content": "and Nazli Goharian. A discourse-aware attention model for abstractive summarization of", "type": "text" } ], "index": 48 }, { "bbox": [ 127, 579, 506, 593 ], "spans": [ { "bbox": [ 127, 579, 506, 593 ], "score": 1.0, "content": "long documents. Proceedings of the 2018 Conference of the North American Chapter of", "type": "text" } ], "index": 49 }, { "bbox": [ 126, 590, 507, 605 ], "spans": [ { "bbox": [ 126, 590, 507, 605 ], "score": 1.0, "content": "the Association for Computational Linguistics: Human Language Technologies, Volume 2", "type": "text" } ], "index": 50 }, { "bbox": [ 127, 602, 505, 614 ], "spans": [ { "bbox": [ 127, 602, 505, 614 ], "score": 1.0, "content": "(Short Papers), 2018. doi: 10.18653/v1/n18-2097. URL http://dx.doi.org/10.18653/", "type": "text" } ], "index": 51 }, { "bbox": [ 127, 613, 191, 624 ], "spans": [ { "bbox": [ 127, 613, 191, 624 ], "score": 1.0, "content": "v1/n18-2097.", "type": "text" } ], "index": 52 }, { "bbox": [ 110, 631, 506, 644 ], "spans": [ { "bbox": [ 110, 631, 506, 644 ], "score": 1.0, "content": "[7] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of", "type": "text" } ], "index": 53 }, { "bbox": [ 127, 642, 506, 654 ], "spans": [ { "bbox": [ 127, 642, 506, 654 ], "score": 1.0, "content": "deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805,", "type": "text" } ], "index": 54 }, { "bbox": [ 127, 652, 153, 664 ], "spans": [ { "bbox": [ 127, 652, 153, 664 ], "score": 1.0, "content": "2018.", "type": "text" } ], "index": 55 }, { "bbox": [ 111, 671, 505, 684 ], "spans": [ { "bbox": [ 111, 671, 505, 684 ], "score": 1.0, "content": "[8] William Fedus, Barret Zoph, and Noam Shazeer. Switch transformers: Scaling to trillion", "type": "text" } ], "index": 56 }, { "bbox": [ 127, 682, 502, 694 ], "spans": [ { "bbox": [ 127, 682, 502, 694 ], "score": 1.0, "content": "parameter models with simple and efficient sparsity. arXiv preprint arXiv:2101.03961, 2021.", "type": "text" } ], "index": 57 }, { "bbox": [ 111, 700, 505, 713 ], "spans": [ { "bbox": [ 111, 700, 505, 713 ], "score": 1.0, "content": "[9] Trevor Gale, Erich Elsen, and Sara Hooker. The state of sparsity in deep neural networks. arXiv", "type": "text" } ], "index": 58 }, { "bbox": [ 126, 712, 266, 723 ], "spans": [ { "bbox": [ 126, 712, 266, 723 ], "score": 1.0, "content": "preprint arXiv:1902.09574, 2019.", "type": "text" } ], "index": 59 } ], "index": 47 } ], "page_idx": 9, "page_size": [ 612, 792 ], "discarded_blocks": [ { "type": "discarded", "bbox": [ 300, 741, 311, 750 ], "lines": [ { "bbox": [ 299, 740, 313, 754 ], "spans": [ { "bbox": [ 299, 740, 313, 754 ], "score": 1.0, "content": "10", "type": "text" } ] } ] } ], "para_blocks": [ { "type": "table", "bbox": [ 108, 64, 305, 123 ], "blocks": [ { "type": "table_body", "bbox": [ 108, 64, 305, 123 ], "group_id": 0, "lines": [ { "bbox": [ 108, 64, 305, 123 ], "spans": [ { "bbox": [ 108, 64, 305, 123 ], "score": 0.971, "html": "
TerraformerDec. timeSpeedup
dense3.651s1x
Sparse FF1.595s2.29x
SparseFF+QKV0.183s19.98x
SparseFF+QKV+loss0.097s37.64x
", "type": "table", "image_path": "832a4fde51386ccebbdd0945dd7d0afffafeb70294fa0994b36e0b4c24bac53b.jpg" } ] } ], "index": 1.5, "virtual_lines": [ { "bbox": [ 108, 64, 305, 78.75 ], "spans": [], "index": 0 }, { "bbox": [ 108, 78.75, 305, 93.5 ], "spans": [], "index": 1 }, { "bbox": [ 108, 93.5, 305, 108.25 ], "spans": [], "index": 2 }, { "bbox": [ 108, 108.25, 305, 123.0 ], "spans": [], "index": 3 } ] }, { "type": "table_caption", "bbox": [ 106, 135, 307, 186 ], "group_id": 0, "lines": [ { "bbox": [ 106, 135, 308, 146 ], "spans": [ { "bbox": [ 106, 135, 308, 146 ], "score": 1.0, "content": "Table 6: Decoding speed of a single token for Ter-", "type": "text" } ], "index": 4 }, { "bbox": [ 106, 146, 307, 156 ], "spans": [ { "bbox": [ 106, 146, 223, 156 ], "score": 1.0, "content": "raformer with 17B parameters is", "type": "text" }, { "bbox": [ 223, 146, 238, 155 ], "score": 0.55, "content": "3 7 x", "type": "inline_equation" }, { "bbox": [ 238, 146, 307, 156 ], "score": 1.0, "content": "faster than a dense", "type": "text" } ], "index": 5 }, { "bbox": [ 106, 156, 308, 167 ], "spans": [ { "bbox": [ 106, 156, 308, 167 ], "score": 1.0, "content": "baseline model, requiring less than 100ms/token for in-", "type": "text" } ], "index": 6 }, { "bbox": [ 105, 165, 307, 177 ], "spans": [ { "bbox": [ 105, 165, 228, 177 ], "score": 1.0, "content": "ference. Here attention-sparsity", "type": "text" }, { "bbox": [ 228, 166, 252, 176 ], "score": 0.83, "content": "= ~ 6 4", "type": "inline_equation" }, { "bbox": [ 253, 165, 255, 177 ], "score": 1.0, "content": ",", "type": "text" }, { "bbox": [ 255, 166, 264, 176 ], "score": 0.44, "content": "\\mathcal { H }", "type": "inline_equation" }, { "bbox": [ 264, 165, 295, 177 ], "score": 1.0, "content": "-sparsity", "type": "text" }, { "bbox": [ 296, 166, 307, 175 ], "score": 0.73, "content": "=", "type": "inline_equation" } ], "index": 7 }, { "bbox": [ 106, 176, 207, 186 ], "spans": [ { "bbox": [ 106, 176, 187, 186 ], "score": 1.0, "content": "256, and loss-sparsity", "type": "text" }, { "bbox": [ 187, 176, 204, 185 ], "score": 0.84, "content": "= 4", "type": "inline_equation" }, { "bbox": [ 204, 176, 207, 186 ], "score": 1.0, "content": ".", "type": "text" } ], "index": 8 } ], "index": 6 } ], "index": 3.75 }, { "type": "text", "bbox": [ 315, 73, 505, 182 ], "lines": [ { "bbox": [ 315, 73, 506, 84 ], "spans": [ { "bbox": [ 315, 73, 506, 84 ], "score": 1.0, "content": "The current results have a number of limitations.", "type": "text" } ], "index": 9 }, { "bbox": [ 313, 83, 505, 96 ], "spans": [ { "bbox": [ 313, 83, 505, 96 ], "score": 1.0, "content": "For one, the practical speedups we see are only", "type": "text" } ], "index": 10 }, { "bbox": [ 313, 94, 505, 106 ], "spans": [ { "bbox": [ 313, 94, 505, 106 ], "score": 1.0, "content": "for inference, not at training time. Moreover, we", "type": "text" } ], "index": 11 }, { "bbox": [ 313, 105, 505, 116 ], "spans": [ { "bbox": [ 313, 105, 505, 116 ], "score": 1.0, "content": "consider unbatched inference on CPUs, while", "type": "text" } ], "index": 12 }, { "bbox": [ 314, 116, 506, 128 ], "spans": [ { "bbox": [ 314, 116, 506, 128 ], "score": 1.0, "content": "often inference is ran in batched mode on GPUs.", "type": "text" } ], "index": 13 }, { "bbox": [ 313, 126, 505, 140 ], "spans": [ { "bbox": [ 313, 126, 505, 140 ], "score": 1.0, "content": "We believe with more work sparsity can bring", "type": "text" } ], "index": 14 }, { "bbox": [ 313, 139, 506, 149 ], "spans": [ { "bbox": [ 313, 139, 506, 149 ], "score": 1.0, "content": "improvements in these settings too, as our funda-", "type": "text" } ], "index": 15 }, { "bbox": [ 313, 149, 505, 160 ], "spans": [ { "bbox": [ 313, 149, 505, 160 ], "score": 1.0, "content": "mental result shows that the sparse models reach", "type": "text" } ], "index": 16 }, { "bbox": [ 313, 160, 505, 172 ], "spans": [ { "bbox": [ 313, 160, 505, 172 ], "score": 1.0, "content": "the same perplexity as their dense counterparts", "type": "text" } ], "index": 17 }, { "bbox": [ 313, 170, 465, 183 ], "spans": [ { "bbox": [ 313, 170, 465, 183 ], "score": 1.0, "content": "with the same number of parameters.", "type": "text" } ], "index": 18 } ], "index": 13.5, "bbox_fs": [ 313, 73, 506, 183 ] }, { "type": "text", "bbox": [ 314, 187, 504, 209 ], "lines": [ { "bbox": [ 315, 187, 506, 199 ], "spans": [ { "bbox": [ 315, 187, 506, 199 ], "score": 1.0, "content": "So while we demonstrate that Scaling Trans-", "type": "text" } ], "index": 19 }, { "bbox": [ 313, 198, 506, 211 ], "spans": [ { "bbox": [ 313, 198, 506, 211 ], "score": 1.0, "content": "formers are possible, we consider this paper as a", "type": "text" } ], "index": 20 } ], "index": 19.5, "bbox_fs": [ 313, 187, 506, 211 ] }, { "type": "text", "bbox": [ 107, 209, 505, 275 ], "lines": [ { "bbox": [ 105, 209, 505, 221 ], "spans": [ { "bbox": [ 105, 209, 505, 221 ], "score": 1.0, "content": "first step on the way to sustainable large models. There are numerous techniques for making models", "type": "text" } ], "index": 21 }, { "bbox": [ 105, 220, 506, 232 ], "spans": [ { "bbox": [ 105, 220, 506, 232 ], "score": 1.0, "content": "faster that could greatly benefit Terraformer and other Scaling Transformers. For example, we did", "type": "text" } ], "index": 22 }, { "bbox": [ 105, 231, 506, 243 ], "spans": [ { "bbox": [ 105, 231, 506, 243 ], "score": 1.0, "content": "not study quantization and we believe that it can make Scaling Transformers even faster. We also", "type": "text" } ], "index": 23 }, { "bbox": [ 105, 241, 506, 254 ], "spans": [ { "bbox": [ 105, 241, 506, 254 ], "score": 1.0, "content": "focused on inference speed and did not get improvements in training speed. The main reason is", "type": "text" } ], "index": 24 }, { "bbox": [ 105, 253, 505, 265 ], "spans": [ { "bbox": [ 105, 253, 505, 265 ], "score": 1.0, "content": "our use of Gumbel-Softmax when training the feedforward block (see Section 3.1). Fedus et al. [8]", "type": "text" } ], "index": 25 }, { "bbox": [ 106, 264, 473, 276 ], "spans": [ { "bbox": [ 106, 264, 473, 276 ], "score": 1.0, "content": "already provide a promising alternative, and we look forward to exploring it in future work.", "type": "text" } ], "index": 26 } ], "index": 23.5, "bbox_fs": [ 105, 209, 506, 276 ] }, { "type": "text", "bbox": [ 107, 280, 505, 357 ], "lines": [ { "bbox": [ 105, 280, 505, 292 ], "spans": [ { "bbox": [ 105, 280, 505, 292 ], "score": 1.0, "content": "Further, we hope that the community will take inspiration from Scaling Transformers and tune them", "type": "text" } ], "index": 27 }, { "bbox": [ 105, 290, 506, 304 ], "spans": [ { "bbox": [ 105, 290, 506, 304 ], "score": 1.0, "content": "for their needs. We ran experiments using layer sizes and hyperparameters borrowed from dense", "type": "text" } ], "index": 28 }, { "bbox": [ 105, 301, 505, 315 ], "spans": [ { "bbox": [ 105, 301, 505, 315 ], "score": 1.0, "content": "Transformers and they are most probably not optimal for Scaling Transformer. With proper tuning", "type": "text" } ], "index": 29 }, { "bbox": [ 105, 313, 505, 325 ], "spans": [ { "bbox": [ 105, 313, 505, 325 ], "score": 1.0, "content": "and further improvements we believe one could train a Scaling Transformer to match GPT-3 in", "type": "text" } ], "index": 30 }, { "bbox": [ 105, 324, 505, 336 ], "spans": [ { "bbox": [ 105, 324, 505, 336 ], "score": 1.0, "content": "accuracy but also run inference in reasonable time on a laptop. We put it as a fascinating challenge", "type": "text" } ], "index": 31 }, { "bbox": [ 105, 335, 506, 347 ], "spans": [ { "bbox": [ 105, 335, 506, 347 ], "score": 1.0, "content": "to the community, since such Scaling Transformers will not only be more sustainable but will also", "type": "text" } ], "index": 32 }, { "bbox": [ 105, 345, 278, 358 ], "spans": [ { "bbox": [ 105, 345, 278, 358 ], "score": 1.0, "content": "make large models accessible to everyone.", "type": "text" } ], "index": 33 } ], "index": 30, "bbox_fs": [ 105, 280, 506, 358 ] }, { "type": "title", "bbox": [ 107, 372, 163, 385 ], "lines": [ { "bbox": [ 106, 370, 165, 387 ], "spans": [ { "bbox": [ 106, 370, 165, 387 ], "score": 1.0, "content": "References", "type": "text" } ], "index": 34 } ], "index": 34 }, { "type": "list", "bbox": [ 110, 390, 506, 722 ], "lines": [ { "bbox": [ 111, 390, 247, 404 ], "spans": [ { "bbox": [ 111, 390, 247, 404 ], "score": 1.0, "content": "[1] Nvidia Ampere Architecture.", "type": "text" } ], "index": 35, "is_list_start_line": true, "is_list_end_line": true }, { "bbox": [ 127, 401, 416, 415 ], "spans": [ { "bbox": [ 127, 401, 416, 415 ], "score": 1.0, "content": "https://developer.nvidia.com/blog/nvidia-ampere-architecture-in-depth/.", "type": "text" } ], "index": 36, "is_list_end_line": true }, { "bbox": [ 111, 420, 505, 433 ], "spans": [ { "bbox": [ 111, 420, 505, 433 ], "score": 1.0, "content": "[2] Christopher Brix, Parnia Bahar, and Hermann Ney. Successfully applying the stabilized lottery", "type": "text" } ], "index": 37, "is_list_start_line": true }, { "bbox": [ 127, 430, 486, 444 ], "spans": [ { "bbox": [ 127, 430, 486, 444 ], "score": 1.0, "content": "ticket hypothesis to the transformer architecture. arXiv preprint arXiv:2005.03454, 2020.", "type": "text" } ], "index": 38, "is_list_end_line": true }, { "bbox": [ 111, 449, 506, 462 ], "spans": [ { "bbox": [ 111, 449, 506, 462 ], "score": 1.0, "content": "[3] Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal,", "type": "text" } ], "index": 39, "is_list_start_line": true }, { "bbox": [ 127, 460, 505, 473 ], "spans": [ { "bbox": [ 127, 460, 505, 473 ], "score": 1.0, "content": "Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are", "type": "text" } ], "index": 40 }, { "bbox": [ 127, 471, 365, 484 ], "spans": [ { "bbox": [ 127, 471, 365, 484 ], "score": 1.0, "content": "few-shot learners. arXiv preprint arXiv:2005.14165, 2020.", "type": "text" } ], "index": 41, "is_list_end_line": true }, { "bbox": [ 111, 489, 505, 502 ], "spans": [ { "bbox": [ 111, 489, 505, 502 ], "score": 1.0, "content": "[4] Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with", "type": "text" } ], "index": 42, "is_list_start_line": true }, { "bbox": [ 127, 501, 374, 513 ], "spans": [ { "bbox": [ 127, 501, 374, 513 ], "score": 1.0, "content": "sparse transformers. arXiv preprint arXiv:1904.10509, 2019.", "type": "text" } ], "index": 43, "is_list_end_line": true }, { "bbox": [ 111, 518, 506, 532 ], "spans": [ { "bbox": [ 111, 518, 506, 532 ], "score": 1.0, "content": "[5] Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane,", "type": "text" } ], "index": 44, "is_list_start_line": true }, { "bbox": [ 126, 528, 505, 543 ], "spans": [ { "bbox": [ 126, 528, 505, 543 ], "score": 1.0, "content": "Tamas Sarlos, Peter Hawkins, Jared Davis, Afroz Mohiuddin, Lukasz Kaiser, et al. Rethinking", "type": "text" } ], "index": 45 }, { "bbox": [ 127, 540, 397, 552 ], "spans": [ { "bbox": [ 127, 540, 397, 552 ], "score": 1.0, "content": "attention with performers. arXiv preprint arXiv:2009.14794, 2020.", "type": "text" } ], "index": 46, "is_list_end_line": true }, { "bbox": [ 110, 558, 506, 572 ], "spans": [ { "bbox": [ 110, 558, 506, 572 ], "score": 1.0, "content": "[6] Arman Cohan, Franck Dernoncourt, Doo Soon Kim, Trung Bui, Seokhwan Kim, Walter Chang,", "type": "text" } ], "index": 47, "is_list_start_line": true }, { "bbox": [ 127, 569, 506, 581 ], "spans": [ { "bbox": [ 127, 569, 506, 581 ], "score": 1.0, "content": "and Nazli Goharian. A discourse-aware attention model for abstractive summarization of", "type": "text" } ], "index": 48 }, { "bbox": [ 127, 579, 506, 593 ], "spans": [ { "bbox": [ 127, 579, 506, 593 ], "score": 1.0, "content": "long documents. Proceedings of the 2018 Conference of the North American Chapter of", "type": "text" } ], "index": 49 }, { "bbox": [ 126, 590, 507, 605 ], "spans": [ { "bbox": [ 126, 590, 507, 605 ], "score": 1.0, "content": "the Association for Computational Linguistics: Human Language Technologies, Volume 2", "type": "text" } ], "index": 50 }, { "bbox": [ 127, 602, 505, 614 ], "spans": [ { "bbox": [ 127, 602, 505, 614 ], "score": 1.0, "content": "(Short Papers), 2018. doi: 10.18653/v1/n18-2097. URL http://dx.doi.org/10.18653/", "type": "text" } ], "index": 51 }, { "bbox": [ 127, 613, 191, 624 ], "spans": [ { "bbox": [ 127, 613, 191, 624 ], "score": 1.0, "content": "v1/n18-2097.", "type": "text" } ], "index": 52, "is_list_end_line": true }, { "bbox": [ 110, 631, 506, 644 ], "spans": [ { "bbox": [ 110, 631, 506, 644 ], "score": 1.0, "content": "[7] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of", "type": "text" } ], "index": 53, "is_list_start_line": true }, { "bbox": [ 127, 642, 506, 654 ], "spans": [ { "bbox": [ 127, 642, 506, 654 ], "score": 1.0, "content": "deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805,", "type": "text" } ], "index": 54 }, { "bbox": [ 127, 652, 153, 664 ], "spans": [ { "bbox": [ 127, 652, 153, 664 ], "score": 1.0, "content": "2018.", "type": "text" } ], "index": 55, "is_list_end_line": true }, { "bbox": [ 111, 671, 505, 684 ], "spans": [ { "bbox": [ 111, 671, 505, 684 ], "score": 1.0, "content": "[8] William Fedus, Barret Zoph, and Noam Shazeer. Switch transformers: Scaling to trillion", "type": "text" } ], "index": 56, "is_list_start_line": true }, { "bbox": [ 127, 682, 502, 694 ], "spans": [ { "bbox": [ 127, 682, 502, 694 ], "score": 1.0, "content": "parameter models with simple and efficient sparsity. arXiv preprint arXiv:2101.03961, 2021.", "type": "text" } ], "index": 57 }, { "bbox": [ 111, 700, 505, 713 ], "spans": [ { "bbox": [ 111, 700, 505, 713 ], "score": 1.0, "content": "[9] Trevor Gale, Erich Elsen, and Sara Hooker. The state of sparsity in deep neural networks. arXiv", "type": "text" } ], "index": 58, "is_list_start_line": true }, { "bbox": [ 126, 712, 266, 723 ], "spans": [ { "bbox": [ 126, 712, 266, 723 ], "score": 1.0, "content": "preprint arXiv:1902.09574, 2019.", "type": "text" } ], "index": 59, "is_list_end_line": true }, { "bbox": [ 106, 72, 507, 86 ], "spans": [ { "bbox": [ 106, 72, 507, 86 ], "score": 1.0, "content": "[10] A. Gidiotis and G. Tsoumakas. A divide-and-conquer approach to the summarization of", "type": "text", "cross_page": true } ], "index": 0, "is_list_start_line": true }, { "bbox": [ 127, 84, 506, 98 ], "spans": [ { "bbox": [ 127, 84, 506, 98 ], "score": 1.0, "content": "long documents. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 28:", "type": "text", "cross_page": true } ], "index": 1 }, { "bbox": [ 127, 93, 351, 108 ], "spans": [ { "bbox": [ 127, 93, 351, 108 ], "score": 1.0, "content": "3029–3040, 2020. doi: 10.1109/TASLP.2020.3037401.", "type": "text", "cross_page": true } ], "index": 2, "is_list_end_line": true }, { "bbox": [ 105, 113, 507, 128 ], "spans": [ { "bbox": [ 105, 113, 507, 128 ], "score": 1.0, "content": "[11] Manish Gupta and Puneet Agrawal. Compression of deep learning models for text: A survey.", "type": "text", "cross_page": true } ], "index": 3, "is_list_start_line": true }, { "bbox": [ 127, 125, 290, 139 ], "spans": [ { "bbox": [ 127, 125, 290, 139 ], "score": 1.0, "content": "arXiv preprint arXiv:2008.05221, 2020.", "type": "text", "cross_page": true } ], "index": 4, "is_list_end_line": true }, { "bbox": [ 105, 144, 505, 158 ], "spans": [ { "bbox": [ 105, 144, 505, 158 ], "score": 1.0, "content": "[12] Tianyu He, Xu Tan, Yingce Xia, Di He, Tao Qin, Zhibo Chen, and Tie-Yan Liu. Layer-wise", "type": "text", "cross_page": true } ], "index": 5, "is_list_start_line": true }, { "bbox": [ 127, 155, 507, 169 ], "spans": [ { "bbox": [ 127, 155, 507, 169 ], "score": 1.0, "content": "coordination between encoder and decoder for neural machine translation. In S. Bengio,", "type": "text", "cross_page": true } ], "index": 6 }, { "bbox": [ 127, 167, 505, 178 ], "spans": [ { "bbox": [ 127, 167, 505, 178 ], "score": 1.0, "content": "H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in", "type": "text", "cross_page": true } ], "index": 7 }, { "bbox": [ 126, 177, 363, 191 ], "spans": [ { "bbox": [ 126, 177, 363, 191 ], "score": 1.0, "content": "Neural Information Processing Systems, volume 31, 2018.", "type": "text", "cross_page": true } ], "index": 8, "is_list_end_line": true }, { "bbox": [ 106, 196, 506, 210 ], "spans": [ { "bbox": [ 106, 196, 506, 210 ], "score": 1.0, "content": "[13] Forrest N Iandola, Albert E Shaw, Ravi Krishna, and Kurt W Keutzer. Squeezebert: What can", "type": "text", "cross_page": true } ], "index": 9, "is_list_start_line": true }, { "bbox": [ 127, 207, 507, 221 ], "spans": [ { "bbox": [ 127, 207, 507, 221 ], "score": 1.0, "content": "computer vision teach nlp about efficient neural networks? arXiv preprint arXiv:2006.11316,", "type": "text", "cross_page": true } ], "index": 10 }, { "bbox": [ 126, 217, 155, 232 ], "spans": [ { "bbox": [ 126, 217, 155, 232 ], "score": 1.0, "content": "2020.", "type": "text", "cross_page": true } ], "index": 11, "is_list_end_line": true }, { "bbox": [ 104, 236, 507, 252 ], "spans": [ { "bbox": [ 104, 236, 507, 252 ], "score": 1.0, "content": "[14] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax.", "type": "text", "cross_page": true } ], "index": 12, "is_list_start_line": true }, { "bbox": [ 126, 249, 291, 263 ], "spans": [ { "bbox": [ 126, 249, 291, 263 ], "score": 1.0, "content": "arXiv preprint arXiv:1611.01144, 2016.", "type": "text", "cross_page": true } ], "index": 13, "is_list_end_line": true }, { "bbox": [ 105, 267, 506, 282 ], "spans": [ { "bbox": [ 105, 267, 506, 282 ], "score": 1.0, "content": "[15] Łukasz Kaiser and Samy Bengio. Discrete autoencoders for sequence models. arXiv preprint", "type": "text", "cross_page": true } ], "index": 14, "is_list_start_line": true }, { "bbox": [ 125, 278, 230, 291 ], "spans": [ { "bbox": [ 125, 278, 230, 291 ], "score": 1.0, "content": "arXiv:1801.09797, 2018.", "type": "text", "cross_page": true } ], "index": 15, "is_list_end_line": true }, { "bbox": [ 105, 298, 506, 312 ], "spans": [ { "bbox": [ 105, 298, 506, 312 ], "score": 1.0, "content": "[16] Łukasz Kaiser and Ilya Sutskever. Neural gpus learn algorithms. arXiv preprint", "type": "text", "cross_page": true } ], "index": 16, "is_list_start_line": true }, { "bbox": [ 125, 309, 232, 322 ], "spans": [ { "bbox": [ 125, 309, 232, 322 ], "score": 1.0, "content": "arXiv:1511.08228, 2015.", "type": "text", "cross_page": true } ], "index": 17, "is_list_end_line": true }, { "bbox": [ 104, 327, 507, 343 ], "spans": [ { "bbox": [ 104, 327, 507, 343 ], "score": 1.0, "content": "[17] Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child,", "type": "text", "cross_page": true } ], "index": 18, "is_list_start_line": true }, { "bbox": [ 125, 338, 506, 355 ], "spans": [ { "bbox": [ 125, 338, 506, 355 ], "score": 1.0, "content": "Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language", "type": "text", "cross_page": true } ], "index": 19 }, { "bbox": [ 127, 350, 325, 364 ], "spans": [ { "bbox": [ 127, 350, 325, 364 ], "score": 1.0, "content": "models. arXiv preprint arXiv:2001.08361, 2020.", "type": "text", "cross_page": true } ], "index": 20, "is_list_end_line": true }, { "bbox": [ 105, 369, 505, 383 ], "spans": [ { "bbox": [ 105, 369, 505, 383 ], "score": 1.0, "content": "[18] Young Jin Kim and Hany Hassan Awadalla. Fastformers: Highly efficient transformer models", "type": "text", "cross_page": true } ], "index": 21, "is_list_start_line": true }, { "bbox": [ 127, 381, 435, 395 ], "spans": [ { "bbox": [ 127, 381, 435, 395 ], "score": 1.0, "content": "for natural language understanding. arXiv preprint arXiv:2010.13382, 2020.", "type": "text", "cross_page": true } ], "index": 22, "is_list_end_line": true }, { "bbox": [ 106, 399, 507, 413 ], "spans": [ { "bbox": [ 106, 399, 507, 413 ], "score": 1.0, "content": "[19] Nikita Kitaev, Łukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer.", "type": "text", "cross_page": true } ], "index": 23, "is_list_start_line": true }, { "bbox": [ 125, 411, 291, 424 ], "spans": [ { "bbox": [ 125, 411, 291, 424 ], "score": 1.0, "content": "arXiv preprint arXiv:2001.04451, 2020.", "type": "text", "cross_page": true } ], "index": 24, "is_list_end_line": true }, { "bbox": [ 106, 430, 507, 444 ], "spans": [ { "bbox": [ 106, 430, 507, 444 ], "score": 1.0, "content": "[20] Tao Lei, Yu Zhang, and Yoav Artzi. Training rnns as fast as cnns. CoRR, abs/1709.02755, 2017.", "type": "text", "cross_page": true } ], "index": 25, "is_list_start_line": true }, { "bbox": [ 127, 441, 318, 455 ], "spans": [ { "bbox": [ 127, 441, 318, 455 ], "score": 1.0, "content": "URL http://arxiv.org/abs/1709.02755.", "type": "text", "cross_page": true } ], "index": 26, "is_list_end_line": true }, { "bbox": [ 105, 460, 507, 476 ], "spans": [ { "bbox": [ 105, 460, 507, 476 ], "score": 1.0, "content": "[21] Dmitry Lepikhin, HyoukJoong Lee, Yuanzhong Xu, Dehao Chen, Orhan Firat, Yanping Huang,", "type": "text", "cross_page": true } ], "index": 27, "is_list_start_line": true }, { "bbox": [ 126, 470, 506, 486 ], "spans": [ { "bbox": [ 126, 470, 506, 486 ], "score": 1.0, "content": "Maxim Krikun, Noam Shazeer, and Zhifeng Chen. Gshard: Scaling giant models with condi-", "type": "text", "cross_page": true } ], "index": 28 }, { "bbox": [ 127, 483, 467, 497 ], "spans": [ { "bbox": [ 127, 483, 467, 497 ], "score": 1.0, "content": "tional computation and automatic sharding. arXiv preprint arXiv:2006.16668, 2020.", "type": "text", "cross_page": true } ], "index": 29, "is_list_end_line": true }, { "bbox": [ 106, 502, 507, 516 ], "spans": [ { "bbox": [ 106, 502, 507, 516 ], "score": 1.0, "content": "[22] Bingbing Li, Zhenglun Kong, Tianyun Zhang, Ji Li, Zhengang Li, Hang Liu, and Caiwen Ding.", "type": "text", "cross_page": true } ], "index": 30, "is_list_start_line": true }, { "bbox": [ 127, 513, 506, 527 ], "spans": [ { "bbox": [ 127, 513, 506, 527 ], "score": 1.0, "content": "Efficient transformer-based large scale language representations using hardware-friendly block", "type": "text", "cross_page": true } ], "index": 31 }, { "bbox": [ 127, 524, 370, 538 ], "spans": [ { "bbox": [ 127, 524, 370, 538 ], "score": 1.0, "content": "structured pruning. arXiv preprint arXiv:2009.08065, 2020.", "type": "text", "cross_page": true } ], "index": 32, "is_list_end_line": true }, { "bbox": [ 105, 543, 505, 557 ], "spans": [ { "bbox": [ 105, 543, 505, 557 ], "score": 1.0, "content": "[23] Shiyang Li, Xiaoyong Jin, Yao Xuan, Xiyou Zhou, Wenhu Chen, Yu-Xiang Wang, and Xifeng", "type": "text", "cross_page": true } ], "index": 33, "is_list_start_line": true }, { "bbox": [ 126, 552, 506, 569 ], "spans": [ { "bbox": [ 126, 552, 506, 569 ], "score": 1.0, "content": "Yan. Enhancing the locality and breaking the memory bottleneck of transformer on time series", "type": "text", "cross_page": true } ], "index": 34 }, { "bbox": [ 127, 565, 341, 579 ], "spans": [ { "bbox": [ 127, 565, 341, 579 ], "score": 1.0, "content": "forecasting. arXiv preprint arXiv:1907.00235, 2019.", "type": "text", "cross_page": true } ], "index": 35, "is_list_end_line": true }, { "bbox": [ 106, 584, 506, 598 ], "spans": [ { "bbox": [ 106, 584, 506, 598 ], "score": 1.0, "content": "[24] Zhuohan Li, Eric Wallace, Sheng Shen, Kevin Lin, Kurt Keutzer, Dan Klein, and Joey Gon-", "type": "text", "cross_page": true } ], "index": 36, "is_list_start_line": true }, { "bbox": [ 127, 595, 507, 609 ], "spans": [ { "bbox": [ 127, 595, 507, 609 ], "score": 1.0, "content": "zalez. Train big, then compress: Rethinking model size for efficient training and inference of", "type": "text", "cross_page": true } ], "index": 37 }, { "bbox": [ 127, 606, 507, 620 ], "spans": [ { "bbox": [ 127, 606, 507, 620 ], "score": 1.0, "content": "transformers. In International Conference on Machine Learning, pages 5958–5968. PMLR,", "type": "text", "cross_page": true } ], "index": 38 }, { "bbox": [ 127, 617, 154, 631 ], "spans": [ { "bbox": [ 127, 617, 154, 631 ], "score": 1.0, "content": "2020.", "type": "text", "cross_page": true } ], "index": 39, "is_list_end_line": true }, { "bbox": [ 104, 636, 507, 651 ], "spans": [ { "bbox": [ 104, 636, 507, 651 ], "score": 1.0, "content": "[25] Krzysztof Maziarz, Efi Kokiopoulou, Andrea Gesmundo, Luciano Sbaiz, Gabor Bartok,", "type": "text", "cross_page": true } ], "index": 40, "is_list_start_line": true }, { "bbox": [ 126, 646, 506, 663 ], "spans": [ { "bbox": [ 126, 646, 506, 663 ], "score": 1.0, "content": "and Jesse Berent. Gumbel-matrix routing for flexible multi-task learning. arXiv preprint", "type": "text", "cross_page": true } ], "index": 41 }, { "bbox": [ 127, 658, 231, 672 ], "spans": [ { "bbox": [ 127, 658, 231, 672 ], "score": 1.0, "content": "arXiv:1910.04915, 2019.", "type": "text", "cross_page": true } ], "index": 42, "is_list_end_line": true }, { "bbox": [ 104, 676, 507, 693 ], "spans": [ { "bbox": [ 104, 676, 507, 693 ], "score": 1.0, "content": "[26] Sharan Narang, Hyung Won Chung, Yi Tay, William Fedus, Thibault Fevry, Michael Matena,", "type": "text", "cross_page": true } ], "index": 43, "is_list_start_line": true }, { "bbox": [ 126, 688, 506, 703 ], "spans": [ { "bbox": [ 126, 688, 506, 703 ], "score": 1.0, "content": "Karishma Malkan, Noah Fiedel, Noam Shazeer, Zhenzhong Lan, Yanqi Zhou, Wei Li, Nan", "type": "text", "cross_page": true } ], "index": 44 }, { "bbox": [ 127, 699, 506, 713 ], "spans": [ { "bbox": [ 127, 699, 506, 713 ], "score": 1.0, "content": "Ding, Jake Marcus, Adam Roberts, and Colin Raffel. Do transformer modifications transfer", "type": "text", "cross_page": true } ], "index": 45 }, { "bbox": [ 127, 711, 460, 725 ], "spans": [ { "bbox": [ 127, 711, 460, 725 ], "score": 1.0, "content": "across implementations and applications? arXiv preprint arXiv:2102.11972, 2021.", "type": "text", "cross_page": true } ], "index": 46, "is_list_end_line": true } ], "index": 47, "bbox_fs": [ 110, 390, 507, 723 ] } ] }, { "preproc_blocks": [ { "type": "text", "bbox": [ 105, 63, 507, 731 ], "lines": [ { "bbox": [ 106, 72, 507, 86 ], "spans": [ { "bbox": [ 106, 72, 507, 86 ], "score": 1.0, "content": "[10] A. Gidiotis and G. Tsoumakas. A divide-and-conquer approach to the summarization of", "type": "text" } ], "index": 0 }, { "bbox": [ 127, 84, 506, 98 ], "spans": [ { "bbox": [ 127, 84, 506, 98 ], "score": 1.0, "content": "long documents. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 28:", "type": "text" } ], "index": 1 }, { "bbox": [ 127, 93, 351, 108 ], "spans": [ { "bbox": [ 127, 93, 351, 108 ], "score": 1.0, "content": "3029–3040, 2020. doi: 10.1109/TASLP.2020.3037401.", "type": "text" } ], "index": 2 }, { "bbox": [ 105, 113, 507, 128 ], "spans": [ { "bbox": [ 105, 113, 507, 128 ], "score": 1.0, "content": "[11] Manish Gupta and Puneet Agrawal. Compression of deep learning models for text: A survey.", "type": "text" } ], "index": 3 }, { "bbox": [ 127, 125, 290, 139 ], "spans": [ { "bbox": [ 127, 125, 290, 139 ], "score": 1.0, "content": "arXiv preprint arXiv:2008.05221, 2020.", "type": "text" } ], "index": 4 }, { "bbox": [ 105, 144, 505, 158 ], "spans": [ { "bbox": [ 105, 144, 505, 158 ], "score": 1.0, "content": "[12] Tianyu He, Xu Tan, Yingce Xia, Di He, Tao Qin, Zhibo Chen, and Tie-Yan Liu. Layer-wise", "type": "text" } ], "index": 5 }, { "bbox": [ 127, 155, 507, 169 ], "spans": [ { "bbox": [ 127, 155, 507, 169 ], "score": 1.0, "content": "coordination between encoder and decoder for neural machine translation. In S. Bengio,", "type": "text" } ], "index": 6 }, { "bbox": [ 127, 167, 505, 178 ], "spans": [ { "bbox": [ 127, 167, 505, 178 ], "score": 1.0, "content": "H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in", "type": "text" } ], "index": 7 }, { "bbox": [ 126, 177, 363, 191 ], "spans": [ { "bbox": [ 126, 177, 363, 191 ], "score": 1.0, "content": "Neural Information Processing Systems, volume 31, 2018.", "type": "text" } ], "index": 8 }, { "bbox": [ 106, 196, 506, 210 ], "spans": [ { "bbox": [ 106, 196, 506, 210 ], "score": 1.0, "content": "[13] Forrest N Iandola, Albert E Shaw, Ravi Krishna, and Kurt W Keutzer. Squeezebert: What can", "type": "text" } ], "index": 9 }, { "bbox": [ 127, 207, 507, 221 ], "spans": [ { "bbox": [ 127, 207, 507, 221 ], "score": 1.0, "content": "computer vision teach nlp about efficient neural networks? arXiv preprint arXiv:2006.11316,", "type": "text" } ], "index": 10 }, { "bbox": [ 126, 217, 155, 232 ], "spans": [ { "bbox": [ 126, 217, 155, 232 ], "score": 1.0, "content": "2020.", "type": "text" } ], "index": 11 }, { "bbox": [ 104, 236, 507, 252 ], "spans": [ { "bbox": [ 104, 236, 507, 252 ], "score": 1.0, "content": "[14] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax.", "type": "text" } ], "index": 12 }, { "bbox": [ 126, 249, 291, 263 ], "spans": [ { "bbox": [ 126, 249, 291, 263 ], "score": 1.0, "content": "arXiv preprint arXiv:1611.01144, 2016.", "type": "text" } ], "index": 13 }, { "bbox": [ 105, 267, 506, 282 ], "spans": [ { "bbox": [ 105, 267, 506, 282 ], "score": 1.0, "content": "[15] Łukasz Kaiser and Samy Bengio. Discrete autoencoders for sequence models. arXiv preprint", "type": "text" } ], "index": 14 }, { "bbox": [ 125, 278, 230, 291 ], "spans": [ { "bbox": [ 125, 278, 230, 291 ], "score": 1.0, "content": "arXiv:1801.09797, 2018.", "type": "text" } ], "index": 15 }, { "bbox": [ 105, 298, 506, 312 ], "spans": [ { "bbox": [ 105, 298, 506, 312 ], "score": 1.0, "content": "[16] Łukasz Kaiser and Ilya Sutskever. Neural gpus learn algorithms. arXiv preprint", "type": "text" } ], "index": 16 }, { "bbox": [ 125, 309, 232, 322 ], "spans": [ { "bbox": [ 125, 309, 232, 322 ], "score": 1.0, "content": "arXiv:1511.08228, 2015.", "type": "text" } ], "index": 17 }, { "bbox": [ 104, 327, 507, 343 ], "spans": [ { "bbox": [ 104, 327, 507, 343 ], "score": 1.0, "content": "[17] Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child,", "type": "text" } ], "index": 18 }, { "bbox": [ 125, 338, 506, 355 ], "spans": [ { "bbox": [ 125, 338, 506, 355 ], "score": 1.0, "content": "Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language", "type": "text" } ], "index": 19 }, { "bbox": [ 127, 350, 325, 364 ], "spans": [ { "bbox": [ 127, 350, 325, 364 ], "score": 1.0, "content": "models. arXiv preprint arXiv:2001.08361, 2020.", "type": "text" } ], "index": 20 }, { "bbox": [ 105, 369, 505, 383 ], "spans": [ { "bbox": [ 105, 369, 505, 383 ], "score": 1.0, "content": "[18] Young Jin Kim and Hany Hassan Awadalla. Fastformers: Highly efficient transformer models", "type": "text" } ], "index": 21 }, { "bbox": [ 127, 381, 435, 395 ], "spans": [ { "bbox": [ 127, 381, 435, 395 ], "score": 1.0, "content": "for natural language understanding. arXiv preprint arXiv:2010.13382, 2020.", "type": "text" } ], "index": 22 }, { "bbox": [ 106, 399, 507, 413 ], "spans": [ { "bbox": [ 106, 399, 507, 413 ], "score": 1.0, "content": "[19] Nikita Kitaev, Łukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer.", "type": "text" } ], "index": 23 }, { "bbox": [ 125, 411, 291, 424 ], "spans": [ { "bbox": [ 125, 411, 291, 424 ], "score": 1.0, "content": "arXiv preprint arXiv:2001.04451, 2020.", "type": "text" } ], "index": 24 }, { "bbox": [ 106, 430, 507, 444 ], "spans": [ { "bbox": [ 106, 430, 507, 444 ], "score": 1.0, "content": "[20] Tao Lei, Yu Zhang, and Yoav Artzi. Training rnns as fast as cnns. CoRR, abs/1709.02755, 2017.", "type": "text" } ], "index": 25 }, { "bbox": [ 127, 441, 318, 455 ], "spans": [ { "bbox": [ 127, 441, 318, 455 ], "score": 1.0, "content": "URL http://arxiv.org/abs/1709.02755.", "type": "text" } ], "index": 26 }, { "bbox": [ 105, 460, 507, 476 ], "spans": [ { "bbox": [ 105, 460, 507, 476 ], "score": 1.0, "content": "[21] Dmitry Lepikhin, HyoukJoong Lee, Yuanzhong Xu, Dehao Chen, Orhan Firat, Yanping Huang,", "type": "text" } ], "index": 27 }, { "bbox": [ 126, 470, 506, 486 ], "spans": [ { "bbox": [ 126, 470, 506, 486 ], "score": 1.0, "content": "Maxim Krikun, Noam Shazeer, and Zhifeng Chen. Gshard: Scaling giant models with condi-", "type": "text" } ], "index": 28 }, { "bbox": [ 127, 483, 467, 497 ], "spans": [ { "bbox": [ 127, 483, 467, 497 ], "score": 1.0, "content": "tional computation and automatic sharding. arXiv preprint arXiv:2006.16668, 2020.", "type": "text" } ], "index": 29 }, { "bbox": [ 106, 502, 507, 516 ], "spans": [ { "bbox": [ 106, 502, 507, 516 ], "score": 1.0, "content": "[22] Bingbing Li, Zhenglun Kong, Tianyun Zhang, Ji Li, Zhengang Li, Hang Liu, and Caiwen Ding.", "type": "text" } ], "index": 30 }, { "bbox": [ 127, 513, 506, 527 ], "spans": [ { "bbox": [ 127, 513, 506, 527 ], "score": 1.0, "content": "Efficient transformer-based large scale language representations using hardware-friendly block", "type": "text" } ], "index": 31 }, { "bbox": [ 127, 524, 370, 538 ], "spans": [ { "bbox": [ 127, 524, 370, 538 ], "score": 1.0, "content": "structured pruning. arXiv preprint arXiv:2009.08065, 2020.", "type": "text" } ], "index": 32 }, { "bbox": [ 105, 543, 505, 557 ], "spans": [ { "bbox": [ 105, 543, 505, 557 ], "score": 1.0, "content": "[23] Shiyang Li, Xiaoyong Jin, Yao Xuan, Xiyou Zhou, Wenhu Chen, Yu-Xiang Wang, and Xifeng", "type": "text" } ], "index": 33 }, { "bbox": [ 126, 552, 506, 569 ], "spans": [ { "bbox": [ 126, 552, 506, 569 ], "score": 1.0, "content": "Yan. Enhancing the locality and breaking the memory bottleneck of transformer on time series", "type": "text" } ], "index": 34 }, { "bbox": [ 127, 565, 341, 579 ], "spans": [ { "bbox": [ 127, 565, 341, 579 ], "score": 1.0, "content": "forecasting. arXiv preprint arXiv:1907.00235, 2019.", "type": "text" } ], "index": 35 }, { "bbox": [ 106, 584, 506, 598 ], "spans": [ { "bbox": [ 106, 584, 506, 598 ], "score": 1.0, "content": "[24] Zhuohan Li, Eric Wallace, Sheng Shen, Kevin Lin, Kurt Keutzer, Dan Klein, and Joey Gon-", "type": "text" } ], "index": 36 }, { "bbox": [ 127, 595, 507, 609 ], "spans": [ { "bbox": [ 127, 595, 507, 609 ], "score": 1.0, "content": "zalez. Train big, then compress: Rethinking model size for efficient training and inference of", "type": "text" } ], "index": 37 }, { "bbox": [ 127, 606, 507, 620 ], "spans": [ { "bbox": [ 127, 606, 507, 620 ], "score": 1.0, "content": "transformers. In International Conference on Machine Learning, pages 5958–5968. PMLR,", "type": "text" } ], "index": 38 }, { "bbox": [ 127, 617, 154, 631 ], "spans": [ { "bbox": [ 127, 617, 154, 631 ], "score": 1.0, "content": "2020.", "type": "text" } ], "index": 39 }, { "bbox": [ 104, 636, 507, 651 ], "spans": [ { "bbox": [ 104, 636, 507, 651 ], "score": 1.0, "content": "[25] Krzysztof Maziarz, Efi Kokiopoulou, Andrea Gesmundo, Luciano Sbaiz, Gabor Bartok,", "type": "text" } ], "index": 40 }, { "bbox": [ 126, 646, 506, 663 ], "spans": [ { "bbox": [ 126, 646, 506, 663 ], "score": 1.0, "content": "and Jesse Berent. Gumbel-matrix routing for flexible multi-task learning. arXiv preprint", "type": "text" } ], "index": 41 }, { "bbox": [ 127, 658, 231, 672 ], "spans": [ { "bbox": [ 127, 658, 231, 672 ], "score": 1.0, "content": "arXiv:1910.04915, 2019.", "type": "text" } ], "index": 42 }, { "bbox": [ 104, 676, 507, 693 ], "spans": [ { "bbox": [ 104, 676, 507, 693 ], "score": 1.0, "content": "[26] Sharan Narang, Hyung Won Chung, Yi Tay, William Fedus, Thibault Fevry, Michael Matena,", "type": "text" } ], "index": 43 }, { "bbox": [ 126, 688, 506, 703 ], "spans": [ { "bbox": [ 126, 688, 506, 703 ], "score": 1.0, "content": "Karishma Malkan, Noah Fiedel, Noam Shazeer, Zhenzhong Lan, Yanqi Zhou, Wei Li, Nan", "type": "text" } ], "index": 44 }, { "bbox": [ 127, 699, 506, 713 ], "spans": [ { "bbox": [ 127, 699, 506, 713 ], "score": 1.0, "content": "Ding, Jake Marcus, Adam Roberts, and Colin Raffel. Do transformer modifications transfer", "type": "text" } ], "index": 45 }, { "bbox": [ 127, 711, 460, 725 ], "spans": [ { "bbox": [ 127, 711, 460, 725 ], "score": 1.0, "content": "across implementations and applications? arXiv preprint arXiv:2102.11972, 2021.", "type": "text" } ], "index": 46 } ], "index": 23 } ], "page_idx": 10, "page_size": [ 612, 792 ], "discarded_blocks": [ { "type": "discarded", "bbox": [ 300, 741, 310, 750 ], "lines": [ { "bbox": [ 299, 740, 312, 755 ], "spans": [ { "bbox": [ 299, 740, 312, 755 ], "score": 1.0, "content": "", "type": "text", "height": 15, "width": 13 } ] } ] } ], "para_blocks": [ { "type": "list", "bbox": [ 105, 63, 507, 731 ], "lines": [], "index": 23, "bbox_fs": [ 104, 72, 507, 725 ], "lines_deleted": true } ] }, { "preproc_blocks": [ { "type": "text", "bbox": [ 105, 72, 504, 106 ], "lines": [ { "bbox": [ 105, 72, 505, 86 ], "spans": [ { "bbox": [ 105, 72, 505, 86 ], "score": 1.0, "content": "[27] David Patterson, Joseph Gonzalez, Quoc Le, Chen Liang, Lluis-Miquel Munguia, Daniel", "type": "text" } ], "index": 0 }, { "bbox": [ 127, 84, 506, 96 ], "spans": [ { "bbox": [ 127, 84, 506, 96 ], "score": 1.0, "content": "Rothchild, David So, Maud Texier, and Jeff Dean. Carbon emissions and large neural network", "type": "text" } ], "index": 1 }, { "bbox": [ 127, 95, 328, 106 ], "spans": [ { "bbox": [ 127, 95, 328, 106 ], "score": 1.0, "content": "training. arXiv preprint arXiv:2104.10350, 2021.", "type": "text" } ], "index": 2 } ], "index": 1 }, { "type": "text", "bbox": [ 105, 114, 505, 137 ], "lines": [ { "bbox": [ 106, 114, 505, 127 ], "spans": [ { "bbox": [ 106, 114, 505, 127 ], "score": 1.0, "content": "[28] Gabriele Prato, Ella Charlaix, and Mehdi Rezagholizadeh. Fully quantized transformer for", "type": "text" } ], "index": 3 }, { "bbox": [ 127, 125, 375, 137 ], "spans": [ { "bbox": [ 127, 125, 375, 137 ], "score": 1.0, "content": "machine translation. arXiv preprint arXiv:1910.10485, 2019.", "type": "text" } ], "index": 4 } ], "index": 3.5 }, { "type": "text", "bbox": [ 106, 145, 503, 168 ], "lines": [ { "bbox": [ 106, 144, 505, 159 ], "spans": [ { "bbox": [ 106, 144, 505, 159 ], "score": 1.0, "content": "[29] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever.", "type": "text" } ], "index": 5 }, { "bbox": [ 127, 156, 373, 169 ], "spans": [ { "bbox": [ 127, 156, 373, 169 ], "score": 1.0, "content": "Language models are unsupervised multitask learners. 2019.", "type": "text" } ], "index": 6 } ], "index": 5.5 }, { "type": "text", "bbox": [ 106, 176, 504, 210 ], "lines": [ { "bbox": [ 105, 175, 506, 190 ], "spans": [ { "bbox": [ 105, 175, 506, 190 ], "score": 1.0, "content": "[30] Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena,", "type": "text" } ], "index": 7 }, { "bbox": [ 128, 187, 506, 200 ], "spans": [ { "bbox": [ 128, 187, 506, 200 ], "score": 1.0, "content": "Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified", "type": "text" } ], "index": 8 }, { "bbox": [ 127, 199, 450, 211 ], "spans": [ { "bbox": [ 127, 199, 450, 211 ], "score": 1.0, "content": "text-to-text transformer. Journal of Machine Learning Research, 21:1–67, 2020.", "type": "text" } ], "index": 9 } ], "index": 8 }, { "type": "text", "bbox": [ 106, 218, 506, 241 ], "lines": [ { "bbox": [ 105, 218, 505, 231 ], "spans": [ { "bbox": [ 105, 218, 505, 231 ], "score": 1.0, "content": "[31] Aurko Roy, Mohammad Saffar, Ashish Vaswani, and David Grangier. Efficient content-based", "type": "text" } ], "index": 10 }, { "bbox": [ 127, 230, 462, 242 ], "spans": [ { "bbox": [ 127, 230, 462, 242 ], "score": 1.0, "content": "sparse attention with routing transformers. arXiv preprint arXiv:2003.05997, 2020.", "type": "text" } ], "index": 11 } ], "index": 10.5 }, { "type": "text", "bbox": [ 105, 249, 505, 273 ], "lines": [ { "bbox": [ 106, 249, 505, 262 ], "spans": [ { "bbox": [ 106, 249, 505, 262 ], "score": 1.0, "content": "[32] Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf. Distilbert, a distilled version", "type": "text" } ], "index": 12 }, { "bbox": [ 127, 260, 465, 272 ], "spans": [ { "bbox": [ 127, 260, 465, 272 ], "score": 1.0, "content": "of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108, 2019.", "type": "text" } ], "index": 13 } ], "index": 12.5 }, { "type": "text", "bbox": [ 107, 280, 505, 314 ], "lines": [ { "bbox": [ 106, 280, 506, 294 ], "spans": [ { "bbox": [ 106, 280, 506, 294 ], "score": 1.0, "content": "[33] Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton,", "type": "text" } ], "index": 14 }, { "bbox": [ 127, 291, 505, 304 ], "spans": [ { "bbox": [ 127, 291, 505, 304 ], "score": 1.0, "content": "and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts", "type": "text" } ], "index": 15 }, { "bbox": [ 128, 302, 316, 315 ], "spans": [ { "bbox": [ 128, 302, 316, 315 ], "score": 1.0, "content": "layer. arXiv preprint arXiv:1701.06538, 2017.", "type": "text" } ], "index": 16 } ], "index": 15 }, { "type": "text", "bbox": [ 106, 322, 506, 367 ], "lines": [ { "bbox": [ 106, 322, 507, 335 ], "spans": [ { "bbox": [ 106, 322, 507, 335 ], "score": 1.0, "content": "[34] Noam Shazeer, Youlong Cheng, Niki Parmar, Dustin Tran, Ashish Vaswani, Penporn Koanan-", "type": "text" } ], "index": 17 }, { "bbox": [ 127, 333, 507, 346 ], "spans": [ { "bbox": [ 127, 333, 507, 346 ], "score": 1.0, "content": "takool, Peter Hawkins, HyoukJoong Lee, Mingsheng Hong, Cliff Young, et al. Mesh-tensorflow:", "type": "text" } ], "index": 18 }, { "bbox": [ 127, 344, 507, 358 ], "spans": [ { "bbox": [ 127, 344, 507, 358 ], "score": 1.0, "content": "Deep learning for supercomputers. In Advances in Neural Information Processing Systems,", "type": "text" } ], "index": 19 }, { "bbox": [ 126, 356, 238, 367 ], "spans": [ { "bbox": [ 126, 356, 238, 367 ], "score": 1.0, "content": "pages 10414–10423, 2018.", "type": "text" } ], "index": 20 } ], "index": 18.5 }, { "type": "text", "bbox": [ 106, 374, 505, 420 ], "lines": [ { "bbox": [ 105, 375, 506, 387 ], "spans": [ { "bbox": [ 105, 375, 506, 387 ], "score": 1.0, "content": "[35] Sheng Shen, Zhen Dong, Jiayu Ye, Linjian Ma, Zhewei Yao, Amir Gholami, Michael W", "type": "text" } ], "index": 21 }, { "bbox": [ 127, 387, 505, 398 ], "spans": [ { "bbox": [ 127, 387, 505, 398 ], "score": 1.0, "content": "Mahoney, and Kurt Keutzer. Q-bert: Hessian based ultra low precision quantization of bert. In", "type": "text" } ], "index": 22 }, { "bbox": [ 127, 397, 507, 410 ], "spans": [ { "bbox": [ 127, 397, 507, 410 ], "score": 1.0, "content": "Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 8815–8821,", "type": "text" } ], "index": 23 }, { "bbox": [ 126, 407, 154, 420 ], "spans": [ { "bbox": [ 126, 407, 154, 420 ], "score": 1.0, "content": "2020.", "type": "text" } ], "index": 24 } ], "index": 22.5 }, { "type": "text", "bbox": [ 105, 427, 505, 451 ], "lines": [ { "bbox": [ 106, 428, 505, 441 ], "spans": [ { "bbox": [ 106, 428, 505, 441 ], "score": 1.0, "content": "[36] Emma Strubell, Ananya Ganesh, and Andrew McCallum. Energy and policy considerations for", "type": "text" } ], "index": 25 }, { "bbox": [ 127, 439, 376, 451 ], "spans": [ { "bbox": [ 127, 439, 376, 451 ], "score": 1.0, "content": "deep learning in nlp. arXiv preprint arXiv:1906.02243, 2019.", "type": "text" } ], "index": 26 } ], "index": 25.5 }, { "type": "text", "bbox": [ 106, 458, 505, 482 ], "lines": [ { "bbox": [ 105, 457, 505, 473 ], "spans": [ { "bbox": [ 105, 457, 505, 473 ], "score": 1.0, "content": "[37] Sainbayar Sukhbaatar, Edouard Grave, Piotr Bojanowski, and Armand Joulin. Adaptive attention", "type": "text" } ], "index": 27 }, { "bbox": [ 127, 470, 378, 482 ], "spans": [ { "bbox": [ 127, 470, 378, 482 ], "score": 1.0, "content": "span in transformers. arXiv preprint arXiv:1905.07799, 2019.", "type": "text" } ], "index": 28 } ], "index": 27.5 }, { "type": "text", "bbox": [ 106, 489, 506, 534 ], "lines": [ { "bbox": [ 105, 489, 507, 504 ], "spans": [ { "bbox": [ 105, 489, 507, 504 ], "score": 1.0, "content": "[38] Xiao Sun, Jungwook Choi, Chia-Yu Chen, Naigang Wang, Swagath Venkataramani, Vijay-", "type": "text" } ], "index": 29 }, { "bbox": [ 127, 501, 506, 513 ], "spans": [ { "bbox": [ 127, 501, 506, 513 ], "score": 1.0, "content": "alakshmi Viji Srinivasan, Xiaodong Cui, Wei Zhang, and Kailash Gopalakrishnan. Hybrid", "type": "text" } ], "index": 30 }, { "bbox": [ 127, 512, 506, 525 ], "spans": [ { "bbox": [ 127, 512, 506, 525 ], "score": 1.0, "content": "8-bit floating point (hfp8) training and inference for deep neural networks. Advances in neural", "type": "text" } ], "index": 31 }, { "bbox": [ 127, 523, 346, 535 ], "spans": [ { "bbox": [ 127, 523, 346, 535 ], "score": 1.0, "content": "information processing systems, 32:4900–4909, 2019.", "type": "text" } ], "index": 32 } ], "index": 30.5 }, { "type": "text", "bbox": [ 106, 542, 504, 577 ], "lines": [ { "bbox": [ 106, 542, 506, 556 ], "spans": [ { "bbox": [ 106, 542, 506, 556 ], "score": 1.0, "content": "[39] Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, and Denny Zhou. Mo-", "type": "text" } ], "index": 33 }, { "bbox": [ 128, 554, 505, 566 ], "spans": [ { "bbox": [ 128, 554, 505, 566 ], "score": 1.0, "content": "bilebert: a compact task-agnostic bert for resource-limited devices. In Proceedings of the 58th", "type": "text" } ], "index": 34 }, { "bbox": [ 126, 565, 492, 577 ], "spans": [ { "bbox": [ 126, 565, 492, 577 ], "score": 1.0, "content": "Annual Meeting of the Association for Computational Linguistics, pages 2158–2170, 2020.", "type": "text" } ], "index": 35 } ], "index": 34 }, { "type": "text", "bbox": [ 106, 584, 504, 607 ], "lines": [ { "bbox": [ 105, 583, 506, 599 ], "spans": [ { "bbox": [ 105, 583, 506, 599 ], "score": 1.0, "content": "[40] Yi Tay, Dara Bahri, Liu Yang, Donald Metzler, and Da-Cheng Juan. Sparse sinkhorn attention,", "type": "text" } ], "index": 36 }, { "bbox": [ 127, 595, 154, 608 ], "spans": [ { "bbox": [ 127, 595, 154, 608 ], "score": 1.0, "content": "2020.", "type": "text" } ], "index": 37 } ], "index": 36.5 }, { "type": "text", "bbox": [ 103, 615, 506, 639 ], "lines": [ { "bbox": [ 105, 614, 507, 630 ], "spans": [ { "bbox": [ 105, 614, 507, 630 ], "score": 1.0, "content": "[41] Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. Efficient transformers: A survey.", "type": "text" } ], "index": 38 }, { "bbox": [ 127, 627, 290, 638 ], "spans": [ { "bbox": [ 127, 627, 290, 638 ], "score": 1.0, "content": "arXiv preprint arXiv:2009.06732, 2020.", "type": "text" } ], "index": 39 } ], "index": 38.5 }, { "type": "text", "bbox": [ 105, 646, 505, 680 ], "lines": [ { "bbox": [ 106, 645, 506, 660 ], "spans": [ { "bbox": [ 106, 645, 506, 660 ], "score": 1.0, "content": "[42] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez,", "type": "text" } ], "index": 40 }, { "bbox": [ 126, 657, 506, 670 ], "spans": [ { "bbox": [ 126, 657, 506, 670 ], "score": 1.0, "content": "Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762,", "type": "text" } ], "index": 41 }, { "bbox": [ 126, 667, 156, 682 ], "spans": [ { "bbox": [ 126, 667, 156, 682 ], "score": 1.0, "content": "2017.", "type": "text" } ], "index": 42 } ], "index": 41 }, { "type": "text", "bbox": [ 107, 688, 506, 722 ], "lines": [ { "bbox": [ 105, 688, 507, 702 ], "spans": [ { "bbox": [ 105, 688, 507, 702 ], "score": 1.0, "content": "[43] Hanrui Wang, Zhanghao Wu, Zhijian Liu, Han Cai, Ligeng Zhu, Chuang Gan, and Song Han.", "type": "text" } ], "index": 43 }, { "bbox": [ 127, 699, 505, 713 ], "spans": [ { "bbox": [ 127, 699, 505, 713 ], "score": 1.0, "content": "Hat: Hardware-aware transformers for efficient natural language processing. arXiv preprint", "type": "text" } ], "index": 44 }, { "bbox": [ 127, 711, 230, 721 ], "spans": [ { "bbox": [ 127, 711, 230, 721 ], "score": 1.0, "content": "arXiv:2005.14187, 2020.", "type": "text" } ], "index": 45 } ], "index": 44 } ], "page_idx": 11, "page_size": [ 612, 792 ], "discarded_blocks": [ { "type": "discarded", "bbox": [ 300, 741, 311, 750 ], "lines": [ { "bbox": [ 299, 740, 313, 754 ], "spans": [ { "bbox": [ 299, 740, 313, 754 ], "score": 1.0, "content": "12", "type": "text" } ] } ] } ], "para_blocks": [ { "type": "text", "bbox": [ 105, 72, 504, 106 ], "lines": [ { "bbox": [ 105, 72, 505, 86 ], "spans": [ { "bbox": [ 105, 72, 505, 86 ], "score": 1.0, "content": "[27] David Patterson, Joseph Gonzalez, Quoc Le, Chen Liang, Lluis-Miquel Munguia, Daniel", "type": "text" } ], "index": 0 }, { "bbox": [ 127, 84, 506, 96 ], "spans": [ { "bbox": [ 127, 84, 506, 96 ], "score": 1.0, "content": "Rothchild, David So, Maud Texier, and Jeff Dean. Carbon emissions and large neural network", "type": "text" } ], "index": 1 }, { "bbox": [ 127, 95, 328, 106 ], "spans": [ { "bbox": [ 127, 95, 328, 106 ], "score": 1.0, "content": "training. arXiv preprint arXiv:2104.10350, 2021.", "type": "text" } ], "index": 2 } ], "index": 1, "bbox_fs": [ 105, 72, 506, 106 ] }, { "type": "text", "bbox": [ 105, 114, 505, 137 ], "lines": [ { "bbox": [ 106, 114, 505, 127 ], "spans": [ { "bbox": [ 106, 114, 505, 127 ], "score": 1.0, "content": "[28] Gabriele Prato, Ella Charlaix, and Mehdi Rezagholizadeh. Fully quantized transformer for", "type": "text" } ], "index": 3 }, { "bbox": [ 127, 125, 375, 137 ], "spans": [ { "bbox": [ 127, 125, 375, 137 ], "score": 1.0, "content": "machine translation. arXiv preprint arXiv:1910.10485, 2019.", "type": "text" } ], "index": 4 } ], "index": 3.5, "bbox_fs": [ 106, 114, 505, 137 ] }, { "type": "text", "bbox": [ 106, 145, 503, 168 ], "lines": [ { "bbox": [ 106, 144, 505, 159 ], "spans": [ { "bbox": [ 106, 144, 505, 159 ], "score": 1.0, "content": "[29] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever.", "type": "text" } ], "index": 5 }, { "bbox": [ 127, 156, 373, 169 ], "spans": [ { "bbox": [ 127, 156, 373, 169 ], "score": 1.0, "content": "Language models are unsupervised multitask learners. 2019.", "type": "text" } ], "index": 6 } ], "index": 5.5, "bbox_fs": [ 106, 144, 505, 169 ] }, { "type": "text", "bbox": [ 106, 176, 504, 210 ], "lines": [ { "bbox": [ 105, 175, 506, 190 ], "spans": [ { "bbox": [ 105, 175, 506, 190 ], "score": 1.0, "content": "[30] Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena,", "type": "text" } ], "index": 7 }, { "bbox": [ 128, 187, 506, 200 ], "spans": [ { "bbox": [ 128, 187, 506, 200 ], "score": 1.0, "content": "Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified", "type": "text" } ], "index": 8 }, { "bbox": [ 127, 199, 450, 211 ], "spans": [ { "bbox": [ 127, 199, 450, 211 ], "score": 1.0, "content": "text-to-text transformer. Journal of Machine Learning Research, 21:1–67, 2020.", "type": "text" } ], "index": 9 } ], "index": 8, "bbox_fs": [ 105, 175, 506, 211 ] }, { "type": "text", "bbox": [ 106, 218, 506, 241 ], "lines": [ { "bbox": [ 105, 218, 505, 231 ], "spans": [ { "bbox": [ 105, 218, 505, 231 ], "score": 1.0, "content": "[31] Aurko Roy, Mohammad Saffar, Ashish Vaswani, and David Grangier. Efficient content-based", "type": "text" } ], "index": 10 }, { "bbox": [ 127, 230, 462, 242 ], "spans": [ { "bbox": [ 127, 230, 462, 242 ], "score": 1.0, "content": "sparse attention with routing transformers. arXiv preprint arXiv:2003.05997, 2020.", "type": "text" } ], "index": 11 } ], "index": 10.5, "bbox_fs": [ 105, 218, 505, 242 ] }, { "type": "text", "bbox": [ 105, 249, 505, 273 ], "lines": [ { "bbox": [ 106, 249, 505, 262 ], "spans": [ { "bbox": [ 106, 249, 505, 262 ], "score": 1.0, "content": "[32] Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf. Distilbert, a distilled version", "type": "text" } ], "index": 12 }, { "bbox": [ 127, 260, 465, 272 ], "spans": [ { "bbox": [ 127, 260, 465, 272 ], "score": 1.0, "content": "of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108, 2019.", "type": "text" } ], "index": 13 } ], "index": 12.5, "bbox_fs": [ 106, 249, 505, 272 ] }, { "type": "text", "bbox": [ 107, 280, 505, 314 ], "lines": [ { "bbox": [ 106, 280, 506, 294 ], "spans": [ { "bbox": [ 106, 280, 506, 294 ], "score": 1.0, "content": "[33] Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton,", "type": "text" } ], "index": 14 }, { "bbox": [ 127, 291, 505, 304 ], "spans": [ { "bbox": [ 127, 291, 505, 304 ], "score": 1.0, "content": "and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts", "type": "text" } ], "index": 15 }, { "bbox": [ 128, 302, 316, 315 ], "spans": [ { "bbox": [ 128, 302, 316, 315 ], "score": 1.0, "content": "layer. arXiv preprint arXiv:1701.06538, 2017.", "type": "text" } ], "index": 16 } ], "index": 15, "bbox_fs": [ 106, 280, 506, 315 ] }, { "type": "text", "bbox": [ 106, 322, 506, 367 ], "lines": [ { "bbox": [ 106, 322, 507, 335 ], "spans": [ { "bbox": [ 106, 322, 507, 335 ], "score": 1.0, "content": "[34] Noam Shazeer, Youlong Cheng, Niki Parmar, Dustin Tran, Ashish Vaswani, Penporn Koanan-", "type": "text" } ], "index": 17 }, { "bbox": [ 127, 333, 507, 346 ], "spans": [ { "bbox": [ 127, 333, 507, 346 ], "score": 1.0, "content": "takool, Peter Hawkins, HyoukJoong Lee, Mingsheng Hong, Cliff Young, et al. Mesh-tensorflow:", "type": "text" } ], "index": 18 }, { "bbox": [ 127, 344, 507, 358 ], "spans": [ { "bbox": [ 127, 344, 507, 358 ], "score": 1.0, "content": "Deep learning for supercomputers. In Advances in Neural Information Processing Systems,", "type": "text" } ], "index": 19 }, { "bbox": [ 126, 356, 238, 367 ], "spans": [ { "bbox": [ 126, 356, 238, 367 ], "score": 1.0, "content": "pages 10414–10423, 2018.", "type": "text" } ], "index": 20 } ], "index": 18.5, "bbox_fs": [ 106, 322, 507, 367 ] }, { "type": "text", "bbox": [ 106, 374, 505, 420 ], "lines": [ { "bbox": [ 105, 375, 506, 387 ], "spans": [ { "bbox": [ 105, 375, 506, 387 ], "score": 1.0, "content": "[35] Sheng Shen, Zhen Dong, Jiayu Ye, Linjian Ma, Zhewei Yao, Amir Gholami, Michael W", "type": "text" } ], "index": 21 }, { "bbox": [ 127, 387, 505, 398 ], "spans": [ { "bbox": [ 127, 387, 505, 398 ], "score": 1.0, "content": "Mahoney, and Kurt Keutzer. Q-bert: Hessian based ultra low precision quantization of bert. In", "type": "text" } ], "index": 22 }, { "bbox": [ 127, 397, 507, 410 ], "spans": [ { "bbox": [ 127, 397, 507, 410 ], "score": 1.0, "content": "Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 8815–8821,", "type": "text" } ], "index": 23 }, { "bbox": [ 126, 407, 154, 420 ], "spans": [ { "bbox": [ 126, 407, 154, 420 ], "score": 1.0, "content": "2020.", "type": "text" } ], "index": 24 } ], "index": 22.5, "bbox_fs": [ 105, 375, 507, 420 ] }, { "type": "text", "bbox": [ 105, 427, 505, 451 ], "lines": [ { "bbox": [ 106, 428, 505, 441 ], "spans": [ { "bbox": [ 106, 428, 505, 441 ], "score": 1.0, "content": "[36] Emma Strubell, Ananya Ganesh, and Andrew McCallum. Energy and policy considerations for", "type": "text" } ], "index": 25 }, { "bbox": [ 127, 439, 376, 451 ], "spans": [ { "bbox": [ 127, 439, 376, 451 ], "score": 1.0, "content": "deep learning in nlp. arXiv preprint arXiv:1906.02243, 2019.", "type": "text" } ], "index": 26 } ], "index": 25.5, "bbox_fs": [ 106, 428, 505, 451 ] }, { "type": "text", "bbox": [ 106, 458, 505, 482 ], "lines": [ { "bbox": [ 105, 457, 505, 473 ], "spans": [ { "bbox": [ 105, 457, 505, 473 ], "score": 1.0, "content": "[37] Sainbayar Sukhbaatar, Edouard Grave, Piotr Bojanowski, and Armand Joulin. Adaptive attention", "type": "text" } ], "index": 27 }, { "bbox": [ 127, 470, 378, 482 ], "spans": [ { "bbox": [ 127, 470, 378, 482 ], "score": 1.0, "content": "span in transformers. arXiv preprint arXiv:1905.07799, 2019.", "type": "text" } ], "index": 28 } ], "index": 27.5, "bbox_fs": [ 105, 457, 505, 482 ] }, { "type": "text", "bbox": [ 106, 489, 506, 534 ], "lines": [ { "bbox": [ 105, 489, 507, 504 ], "spans": [ { "bbox": [ 105, 489, 507, 504 ], "score": 1.0, "content": "[38] Xiao Sun, Jungwook Choi, Chia-Yu Chen, Naigang Wang, Swagath Venkataramani, Vijay-", "type": "text" } ], "index": 29 }, { "bbox": [ 127, 501, 506, 513 ], "spans": [ { "bbox": [ 127, 501, 506, 513 ], "score": 1.0, "content": "alakshmi Viji Srinivasan, Xiaodong Cui, Wei Zhang, and Kailash Gopalakrishnan. Hybrid", "type": "text" } ], "index": 30 }, { "bbox": [ 127, 512, 506, 525 ], "spans": [ { "bbox": [ 127, 512, 506, 525 ], "score": 1.0, "content": "8-bit floating point (hfp8) training and inference for deep neural networks. Advances in neural", "type": "text" } ], "index": 31 }, { "bbox": [ 127, 523, 346, 535 ], "spans": [ { "bbox": [ 127, 523, 346, 535 ], "score": 1.0, "content": "information processing systems, 32:4900–4909, 2019.", "type": "text" } ], "index": 32 } ], "index": 30.5, "bbox_fs": [ 105, 489, 507, 535 ] }, { "type": "text", "bbox": [ 106, 542, 504, 577 ], "lines": [ { "bbox": [ 106, 542, 506, 556 ], "spans": [ { "bbox": [ 106, 542, 506, 556 ], "score": 1.0, "content": "[39] Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, and Denny Zhou. Mo-", "type": "text" } ], "index": 33 }, { "bbox": [ 128, 554, 505, 566 ], "spans": [ { "bbox": [ 128, 554, 505, 566 ], "score": 1.0, "content": "bilebert: a compact task-agnostic bert for resource-limited devices. In Proceedings of the 58th", "type": "text" } ], "index": 34 }, { "bbox": [ 126, 565, 492, 577 ], "spans": [ { "bbox": [ 126, 565, 492, 577 ], "score": 1.0, "content": "Annual Meeting of the Association for Computational Linguistics, pages 2158–2170, 2020.", "type": "text" } ], "index": 35 } ], "index": 34, "bbox_fs": [ 106, 542, 506, 577 ] }, { "type": "text", "bbox": [ 106, 584, 504, 607 ], "lines": [ { "bbox": [ 105, 583, 506, 599 ], "spans": [ { "bbox": [ 105, 583, 506, 599 ], "score": 1.0, "content": "[40] Yi Tay, Dara Bahri, Liu Yang, Donald Metzler, and Da-Cheng Juan. Sparse sinkhorn attention,", "type": "text" } ], "index": 36 }, { "bbox": [ 127, 595, 154, 608 ], "spans": [ { "bbox": [ 127, 595, 154, 608 ], "score": 1.0, "content": "2020.", "type": "text" } ], "index": 37 } ], "index": 36.5, "bbox_fs": [ 105, 583, 506, 608 ] }, { "type": "text", "bbox": [ 103, 615, 506, 639 ], "lines": [ { "bbox": [ 105, 614, 507, 630 ], "spans": [ { "bbox": [ 105, 614, 507, 630 ], "score": 1.0, "content": "[41] Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. Efficient transformers: A survey.", "type": "text" } ], "index": 38 }, { "bbox": [ 127, 627, 290, 638 ], "spans": [ { "bbox": [ 127, 627, 290, 638 ], "score": 1.0, "content": "arXiv preprint arXiv:2009.06732, 2020.", "type": "text" } ], "index": 39 } ], "index": 38.5, "bbox_fs": [ 105, 614, 507, 638 ] }, { "type": "text", "bbox": [ 105, 646, 505, 680 ], "lines": [ { "bbox": [ 106, 645, 506, 660 ], "spans": [ { "bbox": [ 106, 645, 506, 660 ], "score": 1.0, "content": "[42] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez,", "type": "text" } ], "index": 40 }, { "bbox": [ 126, 657, 506, 670 ], "spans": [ { "bbox": [ 126, 657, 506, 670 ], "score": 1.0, "content": "Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762,", "type": "text" } ], "index": 41 }, { "bbox": [ 126, 667, 156, 682 ], "spans": [ { "bbox": [ 126, 667, 156, 682 ], "score": 1.0, "content": "2017.", "type": "text" } ], "index": 42 } ], "index": 41, "bbox_fs": [ 106, 645, 506, 682 ] }, { "type": "text", "bbox": [ 107, 688, 506, 722 ], "lines": [ { "bbox": [ 105, 688, 507, 702 ], "spans": [ { "bbox": [ 105, 688, 507, 702 ], "score": 1.0, "content": "[43] Hanrui Wang, Zhanghao Wu, Zhijian Liu, Han Cai, Ligeng Zhu, Chuang Gan, and Song Han.", "type": "text" } ], "index": 43 }, { "bbox": [ 127, 699, 505, 713 ], "spans": [ { "bbox": [ 127, 699, 505, 713 ], "score": 1.0, "content": "Hat: Hardware-aware transformers for efficient natural language processing. arXiv preprint", "type": "text" } ], "index": 44 }, { "bbox": [ 127, 711, 230, 721 ], "spans": [ { "bbox": [ 127, 711, 230, 721 ], "score": 1.0, "content": "arXiv:2005.14187, 2020.", "type": "text" } ], "index": 45 } ], "index": 44, "bbox_fs": [ 105, 688, 507, 721 ] } ] }, { "preproc_blocks": [ { "type": "text", "bbox": [ 104, 72, 507, 228 ], "lines": [ { "bbox": [ 105, 72, 506, 87 ], "spans": [ { "bbox": [ 105, 72, 506, 87 ], "score": 1.0, "content": "[44] Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant,", "type": "text" } ], "index": 0 }, { "bbox": [ 127, 84, 506, 97 ], "spans": [ { "bbox": [ 127, 84, 506, 97 ], "score": 1.0, "content": "Aditya Barua, and Colin Raffel. mt5: A massively multilingual pre-trained text-to-text trans-", "type": "text" } ], "index": 1 }, { "bbox": [ 128, 95, 184, 106 ], "spans": [ { "bbox": [ 128, 95, 184, 106 ], "score": 1.0, "content": "former, 2020.", "type": "text" } ], "index": 2 }, { "bbox": [ 105, 112, 505, 128 ], "spans": [ { "bbox": [ 105, 112, 505, 128 ], "score": 1.0, "content": "[45] Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago", "type": "text" } ], "index": 3 }, { "bbox": [ 127, 124, 506, 138 ], "spans": [ { "bbox": [ 127, 124, 506, 138 ], "score": 1.0, "content": "Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, et al. Big bird: Transformers for", "type": "text" } ], "index": 4 }, { "bbox": [ 127, 135, 365, 148 ], "spans": [ { "bbox": [ 127, 135, 365, 148 ], "score": 1.0, "content": "longer sequences. arXiv preprint arXiv:2007.14062, 2020.", "type": "text" } ], "index": 5 }, { "bbox": [ 106, 154, 505, 167 ], "spans": [ { "bbox": [ 106, 154, 505, 167 ], "score": 1.0, "content": "[46] Jingqing Zhang, Yao Zhao, Mohammad Saleh, and Peter J. Liu. Pegasus: Pre-training with", "type": "text" } ], "index": 6 }, { "bbox": [ 127, 165, 374, 177 ], "spans": [ { "bbox": [ 127, 165, 374, 177 ], "score": 1.0, "content": "extracted gap-sentences for abstractive summarization, 2020.", "type": "text" } ], "index": 7 }, { "bbox": [ 105, 183, 506, 197 ], "spans": [ { "bbox": [ 105, 183, 506, 197 ], "score": 1.0, "content": "[47] Aojun Zhou, Yukun Ma, Junnan Zhu, Jianbo Liu, Zhijie Zhang, Kun Yuan, Wenxiu Sun, and", "type": "text" } ], "index": 8 }, { "bbox": [ 126, 195, 506, 207 ], "spans": [ { "bbox": [ 126, 195, 506, 207 ], "score": 1.0, "content": "Hongsheng Li. Learning n:m fine-grained structured sparse neural networks from scratch. In", "type": "text" } ], "index": 9 }, { "bbox": [ 126, 205, 508, 219 ], "spans": [ { "bbox": [ 126, 205, 508, 219 ], "score": 1.0, "content": "International Conference on Learning Representations, 2021. URL https://openreview.", "type": "text" } ], "index": 10 }, { "bbox": [ 126, 216, 254, 230 ], "spans": [ { "bbox": [ 126, 216, 254, 230 ], "score": 1.0, "content": "net/forum?id=K9bw7vqp_s.", "type": "text" } ], "index": 11 } ], "index": 5.5 } ], "page_idx": 12, "page_size": [ 612, 792 ], "discarded_blocks": [ { "type": "discarded", "bbox": [ 300, 741, 311, 750 ], "lines": [ { "bbox": [ 299, 740, 312, 754 ], "spans": [ { "bbox": [ 299, 740, 312, 754 ], "score": 1.0, "content": "13", "type": "text" } ] } ] } ], "para_blocks": [ { "type": "list", "bbox": [ 104, 72, 507, 228 ], "lines": [ { "bbox": [ 105, 72, 506, 87 ], "spans": [ { "bbox": [ 105, 72, 506, 87 ], "score": 1.0, "content": "[44] Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant,", "type": "text" } ], "index": 0, "is_list_start_line": true }, { "bbox": [ 127, 84, 506, 97 ], "spans": [ { "bbox": [ 127, 84, 506, 97 ], "score": 1.0, "content": "Aditya Barua, and Colin Raffel. mt5: A massively multilingual pre-trained text-to-text trans-", "type": "text" } ], "index": 1 }, { "bbox": [ 128, 95, 184, 106 ], "spans": [ { "bbox": [ 128, 95, 184, 106 ], "score": 1.0, "content": "former, 2020.", "type": "text" } ], "index": 2, "is_list_end_line": true }, { "bbox": [ 105, 112, 505, 128 ], "spans": [ { "bbox": [ 105, 112, 505, 128 ], "score": 1.0, "content": "[45] Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago", "type": "text" } ], "index": 3, "is_list_start_line": true }, { "bbox": [ 127, 124, 506, 138 ], "spans": [ { "bbox": [ 127, 124, 506, 138 ], "score": 1.0, "content": "Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, et al. Big bird: Transformers for", "type": "text" } ], "index": 4 }, { "bbox": [ 127, 135, 365, 148 ], "spans": [ { "bbox": [ 127, 135, 365, 148 ], "score": 1.0, "content": "longer sequences. arXiv preprint arXiv:2007.14062, 2020.", "type": "text" } ], "index": 5, "is_list_end_line": true }, { "bbox": [ 106, 154, 505, 167 ], "spans": [ { "bbox": [ 106, 154, 505, 167 ], "score": 1.0, "content": "[46] Jingqing Zhang, Yao Zhao, Mohammad Saleh, and Peter J. Liu. Pegasus: Pre-training with", "type": "text" } ], "index": 6, "is_list_start_line": true }, { "bbox": [ 127, 165, 374, 177 ], "spans": [ { "bbox": [ 127, 165, 374, 177 ], "score": 1.0, "content": "extracted gap-sentences for abstractive summarization, 2020.", "type": "text" } ], "index": 7, "is_list_end_line": true }, { "bbox": [ 105, 183, 506, 197 ], "spans": [ { "bbox": [ 105, 183, 506, 197 ], "score": 1.0, "content": "[47] Aojun Zhou, Yukun Ma, Junnan Zhu, Jianbo Liu, Zhijie Zhang, Kun Yuan, Wenxiu Sun, and", "type": "text" } ], "index": 8, "is_list_start_line": true }, { "bbox": [ 126, 195, 506, 207 ], "spans": [ { "bbox": [ 126, 195, 506, 207 ], "score": 1.0, "content": "Hongsheng Li. Learning n:m fine-grained structured sparse neural networks from scratch. In", "type": "text" } ], "index": 9 }, { "bbox": [ 126, 205, 508, 219 ], "spans": [ { "bbox": [ 126, 205, 508, 219 ], "score": 1.0, "content": "International Conference on Learning Representations, 2021. URL https://openreview.", "type": "text" } ], "index": 10 }, { "bbox": [ 126, 216, 254, 230 ], "spans": [ { "bbox": [ 126, 216, 254, 230 ], "score": 1.0, "content": "net/forum?id=K9bw7vqp_s.", "type": "text" } ], "index": 11, "is_list_end_line": true } ], "index": 5.5, "bbox_fs": [ 105, 72, 508, 230 ] } ] } ], "_backend": "pipeline", "_version_name": "2.2.2" }