LLMアーキテクチャを理解するための私のワークフロー
本文の状態
日本語全文を表示中
詳細モードで約2分の本文を読めます。
著者が記事や講演、LLM-Galleryで使用するLLMアーキテクチャの図面作成ワークフローを公開した。公式技術文書から始めるが、最近の論文は詳細不足のため、公開されたモデル重みから推測する手法を説明している。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
ここ数ヶ月、多くの方から、私の記事や講演、LLM-Galleryで使用しているLLMアーキテクチャのスケッチや図の作成ワークフローを共有してほしいとのリクエストを受けました。そこで、私が通常行っているプロセスを記録しておくと役立つだろうと考えました。
簡単に言えば、私は通常、公式の技術報告書から始めます。しかし昨今の論文は、以前に比べて詳細が乏しくなることが多く、特に産業界の研究所から発表されるほとんどのオープンウェイトモデルにおいてその傾向が顕著です。
幸いな点は、Hugging Face Model Hubで重みが公開され、かつPythonのtransformersライブラリでサポートされているモデルであれば、通常、設定ファイルとリファレンス実装を直接調査することで、アーキテクチャの詳細に関するより多くの情報を得られることです。そして、「動作する」コードは嘘をつきません。

図1: このワークフローの基本的な動機は、昨今の論文は詳細に欠けることが多い一方で、動作するリファレンス実装は具体的な調査対象を提供してくれることです。
また、これは主にオープンウェイトモデル向けのワークフローであることも付記しておきます。ChatGPT、Claude、Geminiのように、重みや詳細がプロプライエタリなモデルには、基本的には適用できません。
さらに、このプロセスは意図的に手作業を多めにしています。一部を自動化することも可能でしょう。しかし、これらのアーキテクチャの仕組みを学ぶことが目的なら、いくつかを手作業で行うことは、今でも最良の学習方法の一つだと私は考えています。

図2: 大まかに言えば、このワークフローは設定ファイルとコードから始まり、アーキテクチャに関する洞察へと至ります。
続きを読む
原文を表示
Many people asked me over the past months to share my workflow for how I come up with the LLM architecture sketches and drawings in my articles, talks, and the LLM-Gallery. So I thought it would be useful to document the process I usually follow.
The short version is that I usually start with the official technical reports, but these days, papers are often less detailed than they used to be, especially for most open-weight models from industry labs.
The good part is that if the weights are shared on the Hugging Face Model Hub and the model is supported in the Python transformers library, we can usually inspect the config file and the reference implementation directly to get more information about the architecture details. And “working” code doesn’t lie.

Figure 1: The basic motivation for this workflow is that papers are often less detailed these days, but a working reference implementation gives us something concrete to inspect.
I should also say that this is mainly a workflow for open-weight models. It doesn’t really apply to models like ChatGPT, Claude, or Gemini, where the weights and details are proprietary.
Also, this is intentionally a fairly manual process. You could automate parts of it. But if the goal is to learn how these architectures work, then doing a few of these by hand is, in my opinion, still one of the best exercises.

Figure 2: At a high level, the workflow goes from config files and code to architecture insights.
Read more
同じ出来事を2媒体で確認
同じ出来事を扱う別媒体の記事です。見出しと公開時刻を比較できます。
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み