1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ゼロから作るLLM - 目次

1
Last updated at Posted at 2025-12-21

シリーズについて

本シリーズ「ゼロから作るLLM」では、大学生の筆者がLLMをゼロから実装していきます。

レギュレーション

PyTorchを用いて実装を進めていきますが、LLMの仕組みを理解することが目的なので次のような制約を設けることにしました。

  • nn.Linear, nn.Dropout 等の基本レイヤーは使用可
  • torch.nn.functional の基本関数(softmax, relu等)は使用可
  • DataLoader は使用可
  • nn.Transformer, nn.MultiheadAttention 等の高レベルモジュールは使用せず、自作する

前提知識

  • ニューラルネットワークと自然言語処理の基本概念
    • ゼロから作るディープラーニングの1と2を読むのがおすすめです
  • PyTorch の基本的な使い方

Part 1: BPEトークナイザーの実装

BPEトークナイザーをゼロから実装します。

Part 2: Transformerモデルの実装

Attention Is All You Needの論文に基づいてTransformerモデルを実装します。

Part 3: Transformerで英日翻訳

実装したTransformerモデルを使って実際の翻訳タスクに挑戦します。

Part 4: GPT-2の実装

GPT-2の実装について解説します。

Part 5: Attention計算の効率化(予定)

Part 6: LLaMAの実装(予定)

Part 7以降: 未定

リポジトリ

コードはGitHub上で公開しています。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?