<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>inarizuuuushi</author_name>
  <author_url>https://blog.hatena.ne.jp/inarizuuuushi/</author_url>
  <blog_title>Sabrou-mal サブロウ丸</blog_title>
  <blog_url>https://inarizuuuushi.hatenablog.com/</blog_url>
  <categories>
    <anon>Transformer自作</anon>
  </categories>
  <description>本稿ではMulti-head Attentionについて実装を行います。 Multi-head Attention Q, K, Vを分割してそれぞれでscaled dot-product attentionを実行、結果を集約(concat) こちらの方が精度が良い(理由は分からんけども; 複数の文脈を取り出せるという効果も) それぞれのattentionを並列実行できるという利点 コード attention mask attentionのに対する特徴量算出式を思い出そう。(参考: Attention - Speaker Deck ) mask生成部分のコード transformer内のforw…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Finarizuuuushi.hatenablog.com%2Fentry%2F2022%2F06%2F20%2F090000&quot; title=&quot;Transformerによる翻訳システム自作; part3 Multi-head Attention - Sabrou-mal サブロウ丸&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/i/inarizuuuushi/20220612/20220612105107.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-06-20 09:00:00</published>
  <title>Transformerによる翻訳システム自作; part3 Multi-head Attention</title>
  <type>rich</type>
  <url>https://inarizuuuushi.hatenablog.com/entry/2022/06/20/090000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
