<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>TadaoYamaoka</author_name>
  <author_url>https://blog.hatena.ne.jp/TadaoYamaoka/</author_url>
  <blog_title>TadaoYamaokaの開発日記</blog_title>
  <blog_url>https://tadaoyamaoka.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>前回、単純なTransformerで学習を試した。 出力層を全てのトークンの全結合としていたため、パラメータ数の半分近くを占めており効率が悪かった。 今回は、出力層の全結合の前に、カーネルサイズ1の畳み込み層を追加することで、チャンネル方向に圧縮を行い、学習が効率化できるか試した。トークンの方向に圧縮する場合と、埋め込みの次元方向に圧縮する場合の2パターンを試した。 トークン方向に圧縮 方策と価値の出力層の全結合の前に、カーネルサイズ1のConv1dを追加し、トークンを16に圧縮する。 def __init__(self, ntoken=96, d_model=256, nhead=8, di…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftadaoyamaoka.hatenablog.com%2Fentry%2F2024%2F05%2F26%2F172910&quot; title=&quot;大規模言語モデルで将棋AIを作る その３（出力層の構成） - TadaoYamaokaの開発日記&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-05-26 17:29:10</published>
  <title>大規模言語モデルで将棋AIを作る その３（出力層の構成）</title>
  <type>rich</type>
  <url>https://tadaoyamaoka.hatenablog.com/entry/2024/05/26/172910</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
