#author("2024-04-10T00:56:47+09:00","default:irrp","irrp")
#author("2024-04-10T12:42:40+09:00","default:irrp","irrp")
→AI/機械学習

→ディープラーニング

→自然言語処理

→画像認識/検出/トラッキング
→画像認識/検出/トラッキング<Visiotn Transformer(ViT)についてはこちら

→大規模言語モデル

#contents


*サブトピック [#j46a83ff]
-GPT関連


* Transformer一般 [#e422cd4b]
-[[Transformersでマスクされたトークンを予測してみる(MLM:Masked Language Modeling) - CLOVER🍀>https://kazuhira-r.hatenablog.com/entry/2024/01/03/221331]] 2024.1
-[[TransformersやDatasetsといったHugging Faceのライブラリーを使った時に、モデルやデータセットがどこにダウンロードされるのかを確認する - CLOVER🍀>https://kazuhira-r.hatenablog.com/entry/2024/01/03/154909]] 2024.1
-[[Transformersでテキスト生成を試してみる - CLOVER🍀>https://kazuhira-r.hatenablog.com/entry/2024/01/03/152245]] 2024.1

-[[[書評] 機械学習エンジニアのためのTransformers ー 自然言語のTransformerについてより知りたい人向けな一冊 - まったり勉強ノート>https://www.mattari-benkyo-note.com/2023/05/08/transformers_book_review/]] 2023.5
--[[【書籍】機械学習エンジニアのためのTransformers ―最先端の自然言語処理ライブラリによるモデル開発>https://amzn.to/3VJ3yZ9]] 

-[[[輪講資料] LoRA: Low-Rank Adaptation of
Large Language Models - Speaker Deck>https://speakerdeck.com/hpprc/lun-jiang-zi-liao-lora-low-rank-adaptation-of-large-language-models]] 2023.4

-[[BERT-to-GPT Catch Up Survey - Speaker Deck>https://speakerdeck.com/karakurist/bert-to-gpt-catch-up-survey]] 2023.4

-[[Transformerをゼロから実装する | One Tech Blog>https://tech.gmogshd.com/transformer/]] 2023.3

-[[Hugging Face Pipelineを使ったお手軽AIプログラミング | IIJ Engineers Blog>https://eng-blog.iij.ad.jp/archives/17980]] 2023.2

-[[画像や文章の生成などを行う「ジェネレーティブAI」はなぜ急に発展したのか? - GIGAZINE>https://gigazine.net/news/20230202-generative-ai-revolution/]] 2023.2
--プログラミング言語としてのトレーニングから、自然言語処理(NLP)を用いた「コードではなく言語を理解」する学習法に推移していく段階でRNNやLSTMが用いられていましたが、近年まで「言語の処理では単語の順序が重要な違いを生む」点や、「適切なトレーニングデータを取得するのが難しい」という点で、長い文章の処理を行えなかった
--そこで突破口となったのがGoogleの「Transformer」で、RNNよりも言語理解タスクに秀でたニューラルネットワークアーキテクチャとして質の高い翻訳に成功しました。翻訳には言語ごとの語順が重要で、それがTransformerには当然に組み込まれていたため、Transformerが用いた「位置エンコーディング」「マルチヘッドアテンション」という処理法が言語処理のブレイクスルーとして機能した
--言語モデルにおける大きな転換点は、翻訳のために作られた驚くべきモデルを利用する事で、言語処理タスクが抱えていた問題を翻訳の問題に変換する方法を見つけ出したこと
--Transformerはある言語から別の言語に変換する翻訳モデルとして発明されましたが、画像など他のパラメータを言語と同様の方法で表現する方法を理解できれば、そこにあるルールを見つけ出して別の言語にマッピングするTransformerの能力を訓練して、翻訳を行うことができます。こうして「画像から特徴を抽出し、潜在表現と呼ばれる低次元表現に圧縮し、細かいポイントを軸として座標に表す」といったアプローチが可能になりました。

-[[Vision Transformer入門をもっと楽しむために - Speaker Deck>https://speakerdeck.com/sei88888/vision-transformerru-men-womotutole-simutameni]] 2022.12
--[[【書籍】Vision Transformer入門>https://amzn.to/3jZsugl]]

-[[Transformerのモデル、"T5"について調べてみました! - CCCMKホールディングス TECH Labの Tech Blog>https://techblog.cccmk.co.jp/entry/2022/12/13/125045]] 2022.12

-[[CS25 I Stanford Seminar - Transformers United: DL Models that have revolutionized NLP, CV, RL - YouTube>https://www.youtube.com/watch?v=P127jhj-8-Y&list=PLoROMvodv4rNiJRchCzutFw5ItR_Z27CM]] 2022.7

-[[作って理解する Transformer / Attention - Qiita>https://qiita.com/halhorn/items/c91497522be27bde17ce]] 2018


**概要 [#v94495bb]
-時系列処理が必要なRNNは並列化と相性が悪いのでAttentionに全振りしたのがTransformer
-自己注意機能により系列データを一括同時処理可能になった。RNNでは逐次計算が必要、また離れた単語の関係づけできず長文理解が難しかった。
--GPUフレンドリで容易に並列化可能→学習の高速化、劇的な学習時間短縮を実現
--入力シーケンス全体を考慮可能
--CV(Computer Vision)タスクへの応用もあり→画像認識/検出/トラッキング


*理論的な解説 [#g2b6b0dd]
-[[Transformersによる自然言語処理の実践 - YouTube>https://www.youtube.com/watch?v=uFz3s6NcUNg]] 2024.4

-[[注目の可視化、変幻自在の心臓|第6章 ディープ・ラーニング - YouTube>https://www.youtube.com/watch?v=eMlx5fFNoYc]] 2024.4
-[[しかし、GPTとは何なのか? トランスフォーマーのビジュアル入門|ディープラーニング・第5章 - YouTube>https://www.youtube.com/watch?v=wjZofJX0v4M]] 2024.4

-[[ASCII.jp:「ExcelでChatGPTを再現するシート」が想像以上に素晴らしかった (1/4)>https://ascii.jp/elem/000/004/187/4187763/]] 2024.3
-[[大規模言語モデルの動作をExcelで完全に再現することでプログラミングをせずにAIの構造を学習できるシートが登場 - GIGAZINE>https://gigazine.net/news/20240302-excel-gpt-2/]] 2024.3

-[[大規模言語モデル第二回 Transformer - Speaker Deck>https://speakerdeck.com/m7142yosuke/da-gui-mo-yan-yu-moderudi-er-hui-transformer]] 2024.1

-[[Transformerとは何か? 「ChatGPT」や「Gemini」を生み出した超重要技術の進化 |ビジネス+IT>https://www.sbbit.jp/article/cont1/130017]] 2024.1

-[[Python(PyTorch)で自作して理解するTransformer>https://zenn.dev/yukiyada/articles/59f3b820c52571]] 2022

-[[[上級編]LLMへ至る道~TransoformerのEncoderって何をエンコードするの?~[17日目] | DevelopersIO>https://dev.classmethod.jp/articles/road-to-llm-advent-calendar-2023-17/]] 2023.12

-[[[上級編]LLMへ至る道~Transformerは何をするのか~[15日目] | DevelopersIO>https://dev.classmethod.jp/articles/road-to-llm-advent-calendar-2023-15/]] 2023.12

-[[Transformer メタサーベイ | PPT>https://www.slideshare.net/cvpaperchallenge/transformer-247407256]] 2021

-[[AI界を席巻する「Transformer」をゆっくり解説(1日目) 〜Abstract編〜>https://zenn.dev/attentionplease/articles/2d4b2b55ba396e]] 2021
--[[AI界を席巻する「Transformer」をゆっくり解説(3日目) 〜Model Architecture編 1〜>https://zenn.dev/attentionplease/articles/5b4133a4956578]] 

-[[大規模言語モデル - Speaker Deck>https://speakerdeck.com/chokkan/llm]] 2023.9

-[[ChatGPT の仕組みを理解する(前編) - ABEJA Tech Blog>https://tech-blog.abeja.asia/entry/chat-gpt-first-half-202307]] 2023.7
--[[ChatGPT の仕組みを理解する(後編) - ABEJA Tech Blog>https://tech-blog.abeja.asia/entry/chat-gpt-second-half-202307]] 2023.7

-[[深層学習の革命児!Transformer を今こそ理解しよう | キカガクの技術ブログ>https://blog.kikagaku.co.jp/deep-learning-transformer]] 2023.6

-[[ChatGPTにも使われる機械学習モデル「Transformer」が自然な文章を生成する仕組みとは? - GIGAZINE>https://gigazine.net/news/20230423-transformer-model/]] 2023.4

-[[Transformerの構造を理解したい - Qiita>https://qiita.com/ski2_1116/items/45052a55ea8b9dc5984a]] 2023.4

-[[【5分で解説】AI進化のきっかけになったTransformerとは!?Attention層とは?|スタビジ>https://toukei-lab.com/transformer#GPT]] 2023.3

-[[GPTの仕組みと限界についての考察(2.1) - conceptualization>https://isobe324649.hatenablog.com/entry/2023/03/27/064121]] 2023.3
--[[GPTの解説記事を読んだ上での個人的補足とChatGPTの手軽な利用例について触れてみた | DevelopersIO>https://dev.classmethod.jp/articles/memo-for-commentary-blog-gpt-by-japanese/]] 2023.3

-[[全力解説!Transformer>https://www.slideshare.net/ArithmerInc/transformer-248613529]] 2023.3

-[[A Gentle Introduction to Positional Encoding in Transformer Models, Part 1 - MachineLearningMastery.com>https://machinelearningmastery.com/a-gentle-introduction-to-positional-encoding-in-transformer-models-part-1/]] 2023.3
--前処理で行っている単語位置情報のエンコーディング

-[[(数式を使わない) Transformer の直感的な説明 / 真面目なプログラマのためのディープラーニング入門>https://euske.github.io/introdl/transformer/index.html]] 2023.2

-[[【図解】誰でもわかるTransformer入門!凄さ・仕組みをわかりやすく解説 - すえつぐのNLP&G>https://nlpillustration.tech/?p=2171]] 2023.2

-[[ネットワーク分析から直感的に理解するTransformerの仕組みと処理の流れ - あつまれ統計の森>https://www.hello-statisticians.com/ml/deeplearning/transformer1.html]] 2023.2

-[[30分で完全理解するTransformerの世界>https://zenn.dev/zenkigen/articles/2023-01-shimizu]] 2023.2
--※一見入門ぽいタイトルだが本格的な説明であり入門解説ではない。ある程度分かっている人の復習用

-[[「Transformer」の仕組み──AIによる画像・動画生成や自然言語処理で話題の深層学習モデルを理解する (1/3)|CodeZine(コードジン)>https://codezine.jp/article/detail/16860]] 2022.12
--&ref(Transformerよくある図.png);

-[[Transformerの最前線 〜 畳込みニューラルネットワークの先へ 〜 - Speaker Deck>https://speakerdeck.com/yushiku/20220608_ssii_transformer]] 2022.7

-[[[2207.09238] Formal Algorithms for Transformers>https://arxiv.org/abs/2207.09238]] 2022.7

-[[最近のDeep Learning (NLP) 界隈におけるAttention事情>https://www.slideshare.net/yutakikuchi927/deep-learning-nlp-attention]] 2022.3

-[[自然言語処理の必須知識 Transformer を徹底解説! | DeepSquare>https://deepsquare.jp/2020/07/transformer/]] 2022.3

-[[Hugging Face Courseで学ぶ自然言語処理とTransformer 【part1】>https://zenn.dev/ttya16/articles/ce89dcab833d32cadb39]] 2021.6
--[[Hugging Face Courseで学ぶ自然言語処理とTransformer 【part2】>https://zenn.dev/ttya16/articles/329ec9e7c79634893271]] 2021.6
--[[Hugging Face Courseで学ぶ自然言語処理とTransformer 【part3】>https://zenn.dev/ttya16/articles/8b9d19d87065c579bccb]] 2021.7
--[[Hugging Face Courseで学ぶ自然言語処理とTransformer 【part4】>https://zenn.dev/ttya16/articles/3c51001f9e6d4b0ecc0b]] 2021.7
--[[Hugging Face Courseで学ぶ自然言語処理とTransformer 【part5】>https://zenn.dev/ttya16/articles/0e3e1bff645f161fb4d7]] 2021.7

-[[図で理解するTransformer - Qiita>https://qiita.com/birdwatcher/items/b3e4428f63f708db37b7]] 2021.5

-[[深層学習界の大前提Transformerの論文解説! - Qiita>https://qiita.com/omiita/items/07e69aef6c156d23c538]] 2019
--Transformerは基本的な大枠はエンコーダ-デコーダモデルでself-attention層とPosition-wise全結合層を使用していることが特徴。
--つまり、以下の3つ(+2つ)のことが分かればモデル構造が理解できる
---エンコーダー-デコーダモデル
---Attention
---Position-wise全結合層
---文字の埋め込みとソフトマックス
---位置エンコーディング
--NLPの最近のSoTAたち(BERT,XLNet,GPT-2など)のベースとなるモデル だから理解必須

-[[作って理解する Transformer / Attention - Qiita>https://qiita.com/halhorn/items/c91497522be27bde17ce]] 2018

-[[The Illustrated Transformer>http://jalammar.github.io/illustrated-transformer/]] 2018

-[[【論文】"Attention is all you need"の解説>https://www.acceluniverse.com/blog/developers/2019/08/attention.html]] 2019

-[[論文解説 Attention Is All You Need (Transformer) - ディープラーニングブログ>https://deeplearning.hatenablog.com/entry/transformer]] 2017
--[[[1706.03762] Attention Is All You Need>https://arxiv.org/abs/1706.03762]] 2017


**Attention [#mdbef216]
-[[注目の可視化、変幻自在の心臓|第6章 ディープ・ラーニング - YouTube>https://www.youtube.com/watch?v=eMlx5fFNoYc]] 2024.4

-[[[上級編]LLMへ至る道~画期的な機構!Attentionさん~[16日目] | DevelopersIO>https://dev.classmethod.jp/articles/road-to-llm-advent-calendar-2023-16/]] 2023.12

-[[ChatGPTなどの対話型AIの基礎となっている「Attention」を可視化した「Attention Viz」 - GIGAZINE>https://gigazine.net/news/20230520-attention-viz/]] 2023.5
--http://attentionviz.com/

-[[ChatGPT先生に教わりながら「Transformerの肝」である「注意機構(Attention機構)」を可視化する | 豆蔵デベロッパーサイト>https://developer.mamezou-tech.com/blogs/2023/03/26/using-transformer-03/]] 2023.3

-[[ざっくり理解する分散表現, Attention, Self Attention, Transformer - Qiita>https://qiita.com/norihitoishida/items/2fead107792b504eaccf]] 2020

-[[【深層学習】Transformer - Multi-Head Attentionを理解してやろうじゃないの【ディープラーニングの世界vol.28】#106 #VRアカデミア #DeepLearning - YouTube>https://www.youtube.com/watch?v=50XvMaWhiTY]] 2023.3

-[[【深層学習】Attention - 全領域に応用され最高精度を叩き出す注意機構の仕組み【ディープラーニングの世界 vol. 24】#095 #VRアカデミア #DeepLearning - YouTube>https://www.youtube.com/watch?v=bPdyuIebXWM]] 2021

-[[Pay Attention To 生成モデル - Qiita>https://qiita.com/maechanneler/items/7fa7255e73c02bff490e]] 2022.9

-[[Deep Learning入門:Attention(注意) - YouTube>https://www.youtube.com/watch?v=g5DSLeJozdw]] 2020



* BERT (Bidirectional Encoder Representations from Transformers) [#x3a29000]
-[[[上級編]LLMへ至る道~BERTはよく聞くけど実は~[19日目] | DevelopersIO>https://dev.classmethod.jp/articles/road-to-llm-advent-calendar-2023-19/]] 2023.12

-[[高性能・高速・軽量な日本語言語モデル LINE DistilBERTを公開しました>https://engineering.linecorp.com/ja/blog/line-distilbert-high-performance-fast-lightweight-japanese-language-model]] 2023.3

-[[BERTのFine-Tuningの方法を安定させる方法を試してみました! - CCCMKホールディングス TECH Labの Tech Blog>https://techblog.cccmk.co.jp/entry/2023/03/07/104156]] 2023.3

-[[BERTで自殺ツイートを検出する試み 〜?EDAとルールベースでの検出〜 - Qiita>https://qiita.com/harunan0913/items/b8d6a7414898e691da40]] 2023.2

-[[自然言語処理モデル(BERT)で文の意味上の類似度を計算 | GMOアドパートナーズ TECH BLOG byGMO>https://techblog.gmo-ap.jp/2022/12/21/bert_calc_sentence_similarity/]] 2022.12

-[[BERT 自然言語解析手法の変遷について - MONEX ENGINEER BLOG │マネックス エンジニアブログ>https://blog.tech-monex.com/entry/2022/08/19/183846]] 2022.8

-[[【やってみた】BERTにブログの特徴を教えてもらってみた - 神戸のデータ活用塾!KDL Data Blog>https://kdl-di.hatenablog.com/entry/2022/08/08/090000]] 2022.8

-[[文章からLGTM数を予測して「バズる記事」を判別してみた - Qiita>https://qiita.com/pyopp8128/items/2cb0edabaf94e9385871]] 2022.6
--BERTのファインチューニングにより、Qiita中の記事がLGTM>100かどうか判別する2クラス分類深層学習モデルを作成したよ

-[[BERT入門>https://www.slideshare.net/matsukenbook/bert-217710964]] 2022.6

-[[BERT Research - Ep. 1 - Key Concepts & Sources - YouTube>https://www.youtube.com/watch?v=FKlPCK1uFrc]] 2019
-[[自然言語処理モデル「BERT」の日本語版事前学習モデルが無償公開 商用利用も可>https://ledge.ai/bert-free-learning-model-in-japanese/]] 2022.4
--[[インフォマティクス、BERT日本語版事前学習モデルを公開|株式会社インフォマティクスのプレスリリース>https://prtimes.jp/main/html/rd/p/000000068.000034332.html]] 2022.4
--[[GitHub - informatix-inc/bert>https://github.com/informatix-inc/bert]]

-[[BERTとベクトル検索を用いたYahoo!ショッピングの製品名寄せ作業の効率化検証 - Yahoo! JAPAN Tech Blog>https://techblog.yahoo.co.jp/entry/2022040630294096/]] 2022.4
-[[BERTを用いて文章の穴埋め問題を解く - Qiita>https://qiita.com/kai_notebook/items/58048b027ae48cb700cb]] 2022.3

-[[プロ棋士の谷合廣紀四段がBERTを使った将棋ソフトを作られました>http://yaneuraou.yaneu.com/2021/05/15/bert-mcts/]] 2021
--[[GitHub - nyoki-mtl/bert-mcts-youtube>https://github.com/nyoki-mtl/bert-mcts-youtube]]


**BERTの理論的な話 [#dce24e5a]
-[[【深層学習】BERT - 実務家必修。実務で超応用されまくっている自然言語処理モデル【ディープラーニングの世界vol.32】#110 #VRアカデミア #DeepLearning - YouTube>https://www.youtube.com/watch?v=IaTCGRL41_k]] 2021

-通常のDLでは一気に高精度モデルを作る。そのために大量の教師付きデータが必要。大量の計算資源も必要
--大量の汎用テキストデータで言語ベースを事前学習(Pre-Training)→タスクに合わせて追加学習(Fine-Tuning)
--Pre-Training済みのモデルを提供してもらえれば、追加学習は少ない計算資源で可能になった。
--文章のマスクと復元という自己教師学習によりラベルなし文章を学習に適用可能

-双方向モデル、単語の前後から文脈を把握
--問題文と選択肢、などのように文章を2つ入力する。
--Segment Vector EA or EBを入力ベクタへ足す

-Pre-Training
--1.Masked Language Model(Close Test)
---入力の15%をマスクし、単語穴埋め問題を解く
--2.Next Sentence Prediction
---2文のつながりを予測させる→文脈の理解


*LLaMA [#e84ef279]
-[[GPT-3に匹敵するチャットAIモデル「LLaMA」をiPhoneやPixelなどのスマホで動かすことに成功 - GIGAZINE>https://gigazine.net/news/20230314-llama-iphone-pixel/]] 2023.3

-[[チャットAI「LLaMA」を一発でローカルにインストールして「文章の続きを書く機能」を試せる「Dalai」使い方まとめ - GIGAZINE>https://gigazine.net/news/20230314-dalai-llama/]] 2023.3

-[[Metaが大規模言語モデル「LLaMA」を発表、GPT-3に匹敵する性能ながら単体のGPUでも動作可能 - GIGAZINE>https://gigazine.net/news/20230227-llama-large-language-model-meta-ai/]] 2023.3

-[[「たった2行のコードで、自分のコンピューターでGPT-3、Chinchilla、PaLM級のモデル「LLaMa」を実行する方法が公開 / Twitter>https://twitter.com/Yamkaz/status/1635101889766494210]] 2023.3

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS