Knowledge base
Find answers and trace them to the source
Read PDFs and EPUBs in PDF Craft for desktop. Search for relevant passages or ask AI to explain the document. Open a search result or citation to check the original text.
How does the Transformer replace recurrence?
AI Q&A
The Transformer eschews recurrence and relies entirely on an attention mechanism to draw global dependencies between input and output.
Multi-head attention projects queries, keys, and values into multiple subspaces so the model can attend to different positions jointly.
Original text
1. Introduction
Recurrent neural networks, long short-term memory and gated recurrent neural networks in particular, have been firmly established as state of the art approaches in sequence modeling and transduction problems such as language modeling and machine translation. Numerous efforts have since continued to push the boundaries of recurrent language models and encoder-decoder architectures.
Recurrent models typically factor computation along the symbol positions of the input and output sequences. Aligning the positions to steps in computation time, they generate a sequence of hidden states h_t, as a function of the previous hidden state h_{t-1} and the input for position t. This inherently sequential nature precludes parallelization within training examples, which becomes critical at longer sequence lengths, as memory constraints limit batching across examples.
Attention mechanisms have become an integral part of compelling sequence modeling and transduction models in various tasks, allowing modeling of dependencies without regard to their distance in the input or output sequences. In all but a few cases, however, such attention mechanisms are used in conjunction with a recurrent network.
In this work we propose the Transformer, a model architecture eschewing recurrence and instead relying entirely on an attention mechanism to draw global dependencies between input and output. The Transformer allows for significantly more parallelization and can reach a new state of the art in translation quality after being trained for as little as twelve hours on eight P100 GPUs.
How Wiki Graph preserves sources
PDF Craft uses Wiki Graph to organize document content and keep it linked to the original passages. Search finds relevant passages, AI connects them in an answer, and citations let you check each point.
The .wikg format can store source text, chapter structure, and indexes. The standalone Wiki Graph CLI can also extract public entities and relationships from prepared text and link them to supporting passages.
View the .wikg format specificationOpen your documents in PDF Craft for desktop
Read PDFs and EPUBs in PDF Craft for desktop. Search for relevant passages or ask AI to explain the document. Open a search result or citation to check the original text.
