{
  "source_file": "0930",
  "source_platform": "个人博客",
  "author": "Jay Alammar",
  "title_listed": "Visualizing A Neural Machine Translation Model (Mechanics of Seq2seq Models With Attention)",
  "keywords": "seq2seq,注意力,机器翻译",
  "domain": "文本处理",
  "content_type": "图解教程",
  "is_paid_flag": "否",
  "url": "https://jalammar.github.io/visualizing-neural-machine-translation-mechanics-of-seq2seq-models-with-attention/",
  "publish_date": "2018-05",
  "corpus_stage": "预训练/SFT",
  "notes": "神经机器翻译seq2seq可视化",
  "id": "92529bf0f33a",
  "collected_at": "2026-10-02T14:20:51",
  "title": "Visualizing A Neural Machine Translation Model (Mechanics of Seq2seq Models With Attention) – Jay Alammar – Visualizing machine learning one concept at a time.",
  "body_markdown": "Visualizing A Neural Machine Translation Model (Mechanics of Seq2seq Models With Attention)\nTranslations:\nChinese (Simplified)\n,\nFrench\n,\nJapanese\n,\nKorean\n,\nPersian\n,\nRussian\n,\nTurkish\n,\nUzbek\nWatch: MIT’s\nDeep Learning State of the Art\nlecture referencing this post\nMay 25th update:\nNew graphics (RNN animation, word embedding graph), color coding, elaborated on the final attention example.\nNote:\nThe animations below are videos. Touch or hover on them (if you’re using a mouse) to get play controls so you can pause if needed.\nSequence-to-sequence models are deep learning models that have achieved a lot of success in tasks like machine translation, text summarization, and image captioning. Google Translate started\nusing\nsuch a model in production in late 2016. These models are explained in the two pioneering papers (\nSutskever et al., 2014\n,\nCho et al., 2014\n).\nI found, however, that understanding the model well enough to implement it requires unraveling a series of concepts that build on top of each other. I thought that a bunch of these ideas would be more accessible if expressed visually. That’s what I aim to do in this post. You’ll need some previous understanding of deep learning to get through this post. I hope it can be a useful companion to reading the papers mentioned above (and the attention papers linked later in the post).\nA sequence-to-sequence model is a model that takes a sequence of items (words, letters, features of an images…etc) and outputs another sequence of items. A trained model would work like this:\nYour browser does not support the video tag.\nIn neural machine translation, a sequence is a series of words, processed one after another. The output is, likewise, a series of words:\nYour browser does not support the video tag.\nLooking under the hood\nUnder the hood, the model is composed of an\nencoder\nand a\ndecoder\n.\nThe\nencoder\nprocesses each item in the input sequence, it compiles the information it captures into a vector (called the\ncontext\n). After processing the entire input sequence, the\nencoder\nsends the\ncontext\nover to the\ndecoder\n, which begins producing the output sequence item by item.\nYour browser does not support the video tag.\nThe same applies in the case of machine translation.\nYour browser does not support the video tag.\nThe\ncontext\nis a vector (an array of numbers, basically) in the case of machine translation. The\nencoder\nand\ndecoder\ntend to both be recurrent neural networks (Be sure to check out Luis Serrano’s\nA friendly introduction to Recurrent Neural Networks\nfor an intro to RNNs).\nThe\ncontext\nis a vector of floats. Later in this post we will visualize vectors in color by assigning brighter colors to the cells with higher values.\nYou can set the size of the\ncontext\nvector when you set up your model. It is basically the number of hidden units in the\nencoder\nRNN. These visualizations show a vector of size 4, but in real world applications the\ncontext\nvector would be of a size like 256, 512, or 1024.\nBy design, a RNN takes two inputs at each time step: an input (in the case of the encoder, one word from the input sentence), and a hidden state. The word, however, needs to be represented by a vector. To transform a word into a vector, we turn to the class of methods called “\nword embedding\n” algorithms. These turn words into vector spaces that capture a lot of the meaning/semantic information of the words (e.g.\nking - man + woman = queen\n).\nWe need to turn the input words into vectors before processing them. That transformation is done using a\nword embedding\nalgorithm. We can use\npre-trained embeddings\nor train our own embedding on our dataset. Embedding vectors of size 200 or 300 are typical, we're showing a vector of size four for simplicity.\nNow that we’ve introduced our main vectors/tensors, let’s recap the mechanics of an RNN and establish a visual language to describe these models:\nYour browser does not support the video tag.\nThe next RNN step takes the second input vector and hidden state #1 to create the output of that time step. Later in the post, we’ll use an animation like this to describe the vectors inside a neural machine translation model.\nIn the following visualization, each pulse for the\nencoder\nor\ndecoder\nis that RNN processing its inputs and generating an output for that time step. Since the\nencoder\nand\ndecoder\nare both RNNs, each time step one of the RNNs does some processing, it updates its\nhidden state\nbased on its inputs and previous inputs it has seen.\nLet’s look at the\nhidden states\nfor the\nencoder\n. Notice how the last\nhidden state\nis actually the\ncontext\nwe pass along to the\ndecoder\n.\nYour browser does not support the video tag.\nThe\ndecoder\nalso maintains a\nhidden state\nthat it passes from one time step to the next. We just didn’t visualize it in this graphic because we’re concerned with the major parts of the model for now.\nLet’s now look at another way to visualize a sequence-to-sequence model. This animation will make it easier to understand the static graphics that describe these models. This is called an “unrolled” view where instead of showing the one\ndecoder\n, we show a copy of it for each time step. This way we can look at the inputs and outputs of each time step.\nYour browser does not support the video tag.\nLet’s Pay Attention Now\nThe\ncontext\nvector turned out to be a bottleneck for these types of models. It made it challenging for the models to deal with long sentences. A solution was proposed in\nBahdanau et al., 2014\nand\nLuong et al., 2015\n. These papers introduced and refined a technique called “Attention”, which highly improved the quality of machine translation systems. Attention allows the model to focus on the relevant parts of the input sequence as needed.\nAt time step 7, the attention mechanism enables the\ndecoder\nto focus on the word \"étudiant\" (\"student\" in french) before it generates the English translation. This ability to amplify the signal from the relevant part of the input sequence makes attention models produce better results than models without attention.\nLet’s continue looking at attention models at this high level of abstraction. An attention model differs from a classic sequence-to-sequence model in two main ways:\nFirst, the\nencoder\npasses a lot more data to the\ndecoder\n. Instead of passing the last hidden state of the encoding stage, the\nencoder\npasses\nall\nthe\nhidden states\nto the\ndecoder\n:\nYour browser does not support the video tag.\nSecond, an attention\ndecoder\ndoes an extra step before producing its output. In order to focus on the parts of the input that are relevant to this decoding time step, the\ndecoder\ndoes the following:\nLook at the set of encoder\nhidden states\nit received – each\nencoder hidden state\nis most associated with a certain word in the input sentence\nGive each\nhidden state\na score (let’s ignore how the scoring is done for now)\nMultiply each\nhidden state\nby its softmaxed score, thus amplifying\nhidden states\nwith high scores, and drowning out\nhidden states\nwith low scores\nYour browser does not support the video tag.\nThis scoring exercise is done at each time step on the\ndecoder\nside.\nLet us now bring the whole thing together in the following visualization and look at how the attention process works:\nThe attention decoder RNN takes in the embedding of the\n<END>\ntoken, and an\ninitial decoder hidden state\n.\nThe RNN processes its inputs, producing an output and a\nnew hidden state\nvector (\nh\n4\n). The output is discarded.\nAttention Step: We use the\nencoder hidden states\nand the\nh\n4\nvector to calculate a context vector (\nC\n4\n) for this time step.\nWe concatenate\nh\n4\nand\nC\n4\ninto one vector.\nWe pass this vector through a\nfeedforward neural network\n(one trained jointly with the model).\nThe\noutput\nof the feedforward neural networks indicates the output word of this time step.\nRepeat for the next time steps\nYour browser does not support the video tag.\nThis is another way to look at which part of the input sentence we’re paying attention to at each decoding step:\nYour browser does not support the video tag.\nNote that the model isn’t just mindless aligning the first word at the output with the first word from the input. It actually learned from the training phase how to align words in that language pair (French and English in our example). An example for how precise this mechanism can be comes from the attention papers listed above:\nYou can see how the model paid attention correctly when outputing \"European Economic Area\". In French, the order of these words is reversed (\"européenne économique zone\") as compared to English. Every other word in the sentence is in similar order.\nIf you feel you’re ready to learn the implementation, be sure to check TensorFlow’s\nNeural Machine Translation (seq2seq) Tutorial\n.\nI hope you’ve found this useful. These visuals are early iterations of a lesson on attention that is part of the Udacity\nNatural Language Processing Nanodegree Program\n. We go into more details in the lesson, including discussing applications and touching on more recent attention methods like the Transformer model from\nAttention Is All You Need\n.\nCheck out the trailer of the\nNLP Nanodegree Program\n:\nI’ve also created a few lessons as a part of Udacity’s\nMachine Learning Nanodegree Program\n. The lessons I’ve created cover Unsupervised Learning, as well as a jupyter notebook on movie recommendations using collaborative filtering.\nI’d love any feedback you may have. Please reach me at\n@JayAlammmar\n.\nWritten on May  9, 2018",
  "metadata": {
    "title": "Visualizing A Neural Machine Translation Model (Mechanics of Seq2seq Models With Attention) – Jay Alammar – Visualizing machine learning one concept at a time.",
    "description": "Translations: Chinese (Simplified), French, Japanese, Korean, Persian, Russian, Turkish, Uzbek\n\nWatch: MIT’s Deep Learning State of the Art lecture referencing this post\n\nMay 25th update: New graphics (RNN animation, word embedding graph), color coding, elaborated on the final attention example.\n\nNote: The animations below are videos. Touch or hover on them (if you’re using a mouse) to get play controls so you can pause if needed.\n\nSequence-to-sequence models are deep learning models that have achieved a lot of success in tasks like machine translation, text summarization, and image captioning. Google Translate started using such a model in production in late 2016. These models are explained in the two pioneering papers (Sutskever et al., 2014, Cho et al., 2014).\n\nI found, however, that understanding the model well enough to implement it requires unraveling a series of concepts that build on top of each other. I thought that a bunch of these ideas would be more accessible if expressed visually. That’s what I aim to do in this post. You’ll need some previous understanding of deep learning to get through this post. I hope it can be a useful companion to reading the papers mentioned above (and the attention papers linked later in the post).\n\nA sequence-to-sequence model is a model that takes a sequence of items (words, letters, features of an images…etc) and outputs another sequence of items. A trained model would work like this:\n\n  \n  Your browser does not support the video tag.",
    "keywords": null,
    "author": "Jay Alammar",
    "og:description": "Translations: Chinese (Simplified), French, Japanese, Korean, Persian, Russian, Turkish, Uzbek\n\nWatch: MIT’s Deep Learning State of the Art lecture referencing this post\n\nMay 25th update: New graphics (RNN animation, word embedding graph), color coding, elaborated on the final attention example.\n\nNote: The animations below are videos. Touch or hover on them (if you’re using a mouse) to get play controls so you can pause if needed.\n\nSequence-to-sequence models are deep learning models that have achieved a lot of success in tasks like machine translation, text summarization, and image captioning. Google Translate started using such a model in production in late 2016. These models are explained in the two pioneering papers (Sutskever et al., 2014, Cho et al., 2014).\n\nI found, however, that understanding the model well enough to implement it requires unraveling a series of concepts that build on top of each other. I thought that a bunch of these ideas would be more accessible if expressed visually. That’s what I aim to do in this post. You’ll need some previous understanding of deep learning to get through this post. I hope it can be a useful companion to reading the papers mentioned above (and the attention papers linked later in the post).\n\nA sequence-to-sequence model is a model that takes a sequence of items (words, letters, features of an images…etc) and outputs another sequence of items. A trained model would work like this:\n\n  \n  Your browser does not support the video tag.",
    "og:title": "Visualizing A Neural Machine Translation Model (Mechanics of Seq2seq Models With Attention)"
  },
  "paywall": {
    "listed_paid": false,
    "detected": false,
    "marker": "",
    "public_only": false,
    "policy": "付费/会员内容只保留页面公开可见部分，不绕过付费墙"
  },
  "crawl": {
    "success": true,
    "status_code": 200,
    "error": ""
  },
  "code_blocks": [],
  "images": [
    {
      "status": "ok",
      "url": "https://jalammar.github.io/images/context.png",
      "bytes": 20402,
      "reused": false,
      "local_path": "attachments/92529bf0f33a/images/body-cc4f782e5d6e31fe44da.png",
      "src": "https://jalammar.github.io/images/context.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://jalammar.github.io/images/embedding.png",
      "bytes": 41024,
      "reused": false,
      "local_path": "attachments/92529bf0f33a/images/body-67b7e05eb8b13f033552.png",
      "src": "https://jalammar.github.io/images/embedding.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://jalammar.github.io/images/attention.png",
      "bytes": 73300,
      "reused": false,
      "local_path": "attachments/92529bf0f33a/images/body-294c06810a211322702e.png",
      "src": "https://jalammar.github.io/images/attention.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://jalammar.github.io/images/attention_sentence.png",
      "bytes": 54758,
      "reused": false,
      "local_path": "attachments/92529bf0f33a/images/body-ff329c5c507392413327.png",
      "src": "https://jalammar.github.io/images/attention_sentence.png",
      "alt": "",
      "downloaded": true
    }
  ],
  "audio": [],
  "videos": [
    {
      "url": "https://www.youtube.com/watch?v=53YvP6gdD7U",
      "src": "https://youtu.be/53YvP6gdD7U?t=335",
      "status": "ok",
      "kind": "single_video",
      "local_path": "attachments/92529bf0f33a/videos/repair-53YvP6gdD7U.mp4",
      "bytes": 456212790,
      "valid": true,
      "height": 1080,
      "width": 1920,
      "duration": "2784.741000",
      "reused": false
    },
    {
      "url": "https://jalammar.github.io/images/seq2seq_1.mp4",
      "src": "https://jalammar.github.io/images/seq2seq_1.mp4",
      "status": "invalid_or_wrong_resolution",
      "kind": "direct_video",
      "bytes": 400726,
      "reused": true,
      "content_type": "video/mp4",
      "valid": true,
      "height": 432,
      "width": 1440,
      "duration": "8.566333",
      "local_path": "attachments/92529bf0f33a/videos/repair-632ea1db54676e0db8e0.mp4",
      "title": "",
      "retried_at": "2026-10-20T17:55:02Z"
    },
    {
      "url": "https://jalammar.github.io/images/seq2seq_2.mp4",
      "src": "https://jalammar.github.io/images/seq2seq_2.mp4",
      "status": "invalid_or_wrong_resolution",
      "kind": "direct_video",
      "bytes": 464393,
      "reused": true,
      "content_type": "video/mp4",
      "valid": true,
      "height": 432,
      "width": 1440,
      "duration": "8.733000",
      "local_path": "attachments/92529bf0f33a/videos/repair-68e03abb0adad505ce9b.mp4",
      "title": "",
      "retried_at": "2026-10-20T17:55:02Z"
    },
    {
      "url": "https://jalammar.github.io/images/seq2seq_3.mp4",
      "src": "https://jalammar.github.io/images/seq2seq_3.mp4",
      "status": "invalid_or_wrong_resolution",
      "kind": "direct_video",
      "bytes": 317788,
      "reused": true,
      "content_type": "video/mp4",
      "valid": true,
      "height": 384,
      "width": 1440,
      "duration": "9.099667",
      "local_path": "attachments/92529bf0f33a/videos/repair-9756ba50839774663e36.mp4",
      "title": "",
      "retried_at": "2026-10-20T17:55:02Z"
    },
    {
      "url": "https://jalammar.github.io/images/seq2seq_4.mp4",
      "src": "https://jalammar.github.io/images/seq2seq_4.mp4",
      "status": "invalid_or_wrong_resolution",
      "kind": "direct_video",
      "bytes": 408204,
      "reused": true,
      "content_type": "video/mp4",
      "valid": true,
      "height": 384,
      "width": 1440,
      "duration": "10.433000",
      "local_path": "attachments/92529bf0f33a/videos/repair-4cdcf4a506b7db942090.mp4",
      "title": "",
      "retried_at": "2026-10-20T17:55:02Z"
    },
    {
      "url": "https://www.youtube.com/watch?v=UNmqTiOnRfg",
      "src": "https://www.youtube.com/watch?v=UNmqTiOnRfg",
      "status": "ok",
      "kind": "single_video",
      "local_path": "attachments/92529bf0f33a/videos/repair-UNmqTiOnRfg.mp4",
      "bytes": 30590515,
      "valid": true,
      "height": 720,
      "width": 1280,
      "duration": "1363.201000",
      "reused": false
    },
    {
      "url": "https://jalammar.github.io/images/RNN_1.mp4",
      "src": "https://jalammar.github.io/images/RNN_1.mp4",
      "status": "invalid_or_wrong_resolution",
      "kind": "direct_video",
      "bytes": 401149,
      "reused": true,
      "content_type": "video/mp4",
      "valid": true,
      "height": 614,
      "width": 1016,
      "duration": "13.599667",
      "local_path": "attachments/92529bf0f33a/videos/repair-fdca2507e9f12821920e.mp4",
      "title": "",
      "retried_at": "2026-10-20T17:55:02Z"
    },
    {
      "url": "https://jalammar.github.io/images/seq2seq_5.mp4",
      "src": "https://jalammar.github.io/images/seq2seq_5.mp4",
      "status": "invalid_or_wrong_resolution",
      "kind": "direct_video",
      "bytes": 795634,
      "reused": true,
      "content_type": "video/mp4",
      "valid": true,
      "height": 616,
      "width": 1440,
      "duration": "19.100000",
      "local_path": "attachments/92529bf0f33a/videos/repair-7a349c8f47e82c038c26.mp4",
      "title": "",
      "retried_at": "2026-10-20T17:55:02Z"
    },
    {
      "url": "https://jalammar.github.io/images/seq2seq_6.mp4",
      "src": "https://jalammar.github.io/images/seq2seq_6.mp4",
      "status": "invalid_or_wrong_resolution",
      "kind": "direct_video",
      "bytes": 635440,
      "reused": true,
      "content_type": "video/mp4",
      "valid": true,
      "height": 636,
      "width": 1440,
      "duration": "17.300000",
      "local_path": "attachments/92529bf0f33a/videos/repair-1ed95801190100135f80.mp4",
      "title": "",
      "retried_at": "2026-10-20T17:55:02Z"
    },
    {
      "url": "https://jalammar.github.io/images/seq2seq_7.mp4",
      "src": "https://jalammar.github.io/images/seq2seq_7.mp4",
      "status": "invalid_or_wrong_resolution",
      "kind": "direct_video",
      "bytes": 825335,
      "reused": true,
      "content_type": "video/mp4",
      "valid": true,
      "height": 628,
      "width": 1432,
      "duration": "16.466333",
      "local_path": "attachments/92529bf0f33a/videos/repair-a1dc605cecc78c1079cb.mp4",
      "title": "",
      "retried_at": "2026-10-20T17:55:02Z"
    },
    {
      "url": "https://jalammar.github.io/images/attention_process.mp4",
      "src": "https://jalammar.github.io/images/attention_process.mp4",
      "status": "invalid_or_wrong_resolution",
      "kind": "direct_video",
      "bytes": 804800,
      "reused": true,
      "content_type": "video/mp4",
      "valid": true,
      "height": 784,
      "width": 1440,
      "duration": "18.033333",
      "local_path": "attachments/92529bf0f33a/videos/repair-df1492ced1c1900f07fd.mp4",
      "title": "",
      "retried_at": "2026-10-20T17:55:02Z"
    },
    {
      "url": "https://jalammar.github.io/images/attention_tensor_dance.mp4",
      "src": "https://jalammar.github.io/images/attention_tensor_dance.mp4",
      "status": "invalid_or_wrong_resolution",
      "kind": "direct_video",
      "bytes": 1553050,
      "reused": true,
      "content_type": "video/mp4",
      "valid": true,
      "height": 792,
      "width": 1440,
      "duration": "31.033333",
      "local_path": "attachments/92529bf0f33a/videos/repair-5c9e22a03f9294b87035.mp4",
      "title": "",
      "retried_at": "2026-10-20T17:55:02Z"
    },
    {
      "url": "https://jalammar.github.io/images/seq2seq_9.mp4",
      "src": "https://jalammar.github.io/images/seq2seq_9.mp4",
      "status": "invalid_or_wrong_resolution",
      "kind": "direct_video",
      "bytes": 198000,
      "reused": true,
      "content_type": "video/mp4",
      "valid": true,
      "height": 444,
      "width": 1020,
      "duration": "10.399667",
      "local_path": "attachments/92529bf0f33a/videos/repair-6b08cb7f1b3c383b1ca8.mp4",
      "title": "",
      "retried_at": "2026-10-20T17:55:02Z"
    },
    {
      "url": "https://www.youtube.com/watch?v=FggN0VtWYTk",
      "src": "https://www.youtube.com/embed/FggN0VtWYTk",
      "status": "ok",
      "kind": "single_video",
      "local_path": "attachments/92529bf0f33a/videos/repair-FggN0VtWYTk.mp4",
      "bytes": 16408602,
      "valid": true,
      "height": 1080,
      "width": 1920,
      "duration": "80.481000",
      "reused": false
    }
  ],
  "links": [
    {
      "href": "https://blog.csdn.net/qq_41664845/article/details/84245520",
      "label": "Chinese (Simplified)",
      "type": "a"
    },
    {
      "href": "https://lbourdois.github.io/blog/nlp/Seq2seq-et-attention/",
      "label": "French",
      "type": "a"
    },
    {
      "href": "https://tips-memo.com/translation-jayalmmar-attention",
      "label": "Japanese",
      "type": "a"
    },
    {
      "href": "https://nlpinkorean.github.io/visualizing-neural-machine-translation-mechanics-of-seq2seq-models-with-attention/",
      "label": "Korean",
      "type": "a"
    },
    {
      "href": "http://dml.qom.ac.ir/2021/10/03/visualizing-a-neural-machine-translation-model/",
      "label": "Persian",
      "type": "a"
    },
    {
      "href": "https://habr.com/ru/post/486158/",
      "label": "Russian",
      "type": "a"
    },
    {
      "href": "https://medium.com/@SenemAktas/n%C3%B6ral-makine-%C3%A7eviri-modelini-g%C3%B6rselle%C5%9Ftirme-seq2seq-modelinin-attention-mekanizmas%C4%B1-b12581b5a1df",
      "label": "Turkish",
      "type": "a"
    },
    {
      "href": "https://murodbek.substack.com/p/neyron-mashinaviy-tarjima-modellarini",
      "label": "Uzbek",
      "type": "a"
    },
    {
      "href": "https://youtu.be/53YvP6gdD7U?t=335",
      "label": "Deep Learning State of the Art",
      "type": "a"
    },
    {
      "href": "https://blog.google/products/translate/found-translation-more-accurate-fluent-sentences-google-translate/",
      "label": "using",
      "type": "a"
    },
    {
      "href": "https://papers.nips.cc/paper/5346-sequence-to-sequence-learning-with-neural-networks.pdf",
      "label": "Sutskever et al., 2014",
      "type": "a"
    },
    {
      "href": "http://emnlp2014.org/papers/pdf/EMNLP2014179.pdf",
      "label": "Cho et al., 2014",
      "type": "a"
    },
    {
      "href": "https://jalammar.github.io/images/seq2seq_1.mp4",
      "label": "",
      "type": "source"
    },
    {
      "href": "https://jalammar.github.io/images/seq2seq_2.mp4",
      "label": "",
      "type": "source"
    },
    {
      "href": "https://jalammar.github.io/images/seq2seq_3.mp4",
      "label": "",
      "type": "source"
    },
    {
      "href": "https://jalammar.github.io/images/seq2seq_4.mp4",
      "label": "",
      "type": "source"
    },
    {
      "href": "https://www.youtube.com/watch?v=UNmqTiOnRfg",
      "label": "A friendly introduction to Recurrent Neural Networks",
      "type": "a"
    },
    {
      "href": "https://machinelearningmastery.com/what-are-word-embeddings/",
      "label": "word embedding",
      "type": "a"
    },
    {
      "href": "http://p.migdal.pl/2017/01/06/king-man-woman-queen-why.html",
      "label": "king - man + woman = queen",
      "type": "a"
    },
    {
      "href": "https://en.wikipedia.org/wiki/Word_embedding",
      "label": "word embedding",
      "type": "a"
    },
    {
      "href": "http://ahogrammer.com/2017/01/20/the-list-of-pretrained-word-embeddings/",
      "label": "pre-trained embeddings",
      "type": "a"
    },
    {
      "href": "https://jalammar.github.io/images/RNN_1.mp4",
      "label": "",
      "type": "source"
    },
    {
      "href": "https://jalammar.github.io/images/seq2seq_5.mp4",
      "label": "",
      "type": "source"
    },
    {
      "href": "https://jalammar.github.io/images/seq2seq_6.mp4",
      "label": "",
      "type": "source"
    },
    {
      "href": "https://arxiv.org/abs/1409.0473",
      "label": "Bahdanau et al., 2014",
      "type": "a"
    },
    {
      "href": "https://arxiv.org/abs/1508.04025",
      "label": "Luong et al., 2015",
      "type": "a"
    },
    {
      "href": "https://jalammar.github.io/images/seq2seq_7.mp4",
      "label": "",
      "type": "source"
    },
    {
      "href": "https://jalammar.github.io/images/attention_process.mp4",
      "label": "",
      "type": "source"
    },
    {
      "href": "https://jalammar.github.io/images/attention_tensor_dance.mp4",
      "label": "",
      "type": "source"
    },
    {
      "href": "https://jalammar.github.io/images/seq2seq_9.mp4",
      "label": "",
      "type": "source"
    },
    {
      "href": "https://github.com/tensorflow/nmt",
      "label": "Neural Machine Translation (seq2seq) Tutorial",
      "type": "a"
    },
    {
      "href": "https://www.udacity.com/course/natural-language-processing-nanodegree--nd892",
      "label": "Natural Language Processing Nanodegree Program",
      "type": "a"
    },
    {
      "href": "https://arxiv.org/abs/1706.03762",
      "label": "Attention Is All You Need",
      "type": "a"
    },
    {
      "href": "https://www.youtube.com/embed/FggN0VtWYTk",
      "label": "",
      "type": "iframe"
    },
    {
      "href": "https://www.udacity.com/course/machine-learning-engineer-nanodegree--nd009t",
      "label": "Machine Learning Nanodegree Program",
      "type": "a"
    },
    {
      "href": "https://twitter.com/JayAlammar",
      "label": "@JayAlammmar",
      "type": "a"
    }
  ],
  "repair_version": 2,
  "repaired_at": "2026-10-14T10:52:30Z",
  "source_url": "https://jalammar.github.io/visualizing-neural-machine-translation-mechanics-of-seq2seq-models-with-attention/",
  "papers": [
    {
      "status": "ok",
      "url": "https://papers.nips.cc/paper/5346-sequence-to-sequence-learning-with-neural-networks.pdf",
      "bytes": 142950,
      "reused": true,
      "local_path": "papers/repair/3cc5c95987280b914097.pdf"
    },
    {
      "status": "ok",
      "url": "http://emnlp2014.org/papers/pdf/EMNLP2014179.pdf",
      "bytes": 620380,
      "reused": false,
      "content_type": "application/pdf",
      "local_path": "attachments/92529bf0f33a/retry-20261019/papers/84f8ee3034dc6e265595.pdf",
      "retried_at": "2026-10-18T17:20:42Z"
    },
    {
      "status": "ok",
      "url": "https://arxiv.org/pdf/1409.0473",
      "bytes": 444482,
      "reused": true,
      "local_path": "papers/repair/b6909588ff7b9ebf375f.pdf"
    },
    {
      "status": "ok",
      "url": "https://arxiv.org/pdf/1508.04025",
      "bytes": 249825,
      "reused": true,
      "local_path": "papers/repair/94d3d49016ad40753c67.pdf"
    },
    {
      "status": "ok",
      "url": "https://arxiv.org/pdf/1706.03762",
      "bytes": 2215244,
      "reused": true,
      "local_path": "papers/repair/c3ab01e47e614fe3cf33.pdf"
    }
  ],
  "actual_video_files": [],
  "body_chars": 9496,
  "expected_body_images": 4,
  "discovery_status": "ok",
  "delivery_status": "partial",
  "missing_reason": "invalid_or_wrong_resolution",
  "raw_html": "attachments/92529bf0f33a/pages/source.html",
  "local_html": "attachments/92529bf0f33a/pages/article.html",
  "body_base_path": "attachments/92529bf0f33a/pages/",
  "body_markdown_path": "attachments/92529bf0f33a/pages/article.md"
}