送った言葉はAIの中でどうなる? LLMの仕組みを最初から最後まで
LearningNote\News
0:00 / 0:00
送った言葉はAIの中でどうなる? LLMの仕組みを最初から最後まで
32 просмотра · 1 дн. назад
LearningNote\News
2 подписчика
32 просмотра · 1 дн. назад
ChatGPTやClaudeに送った「日本で一番高い山は?」という一言が、回答になるまでの全工程を追いかけます。
文章の組み立て、トークン、ベクトル、注意、層、学習、確率、生成の繰り返し、ツール呼び出しまでを、数式なしで説明します。プロンプトが効く理由と、AIが間違える理由も構造から整理します。
各社の最新モデルの細かい構造は公開されていないため、公開されている標準的な構造に基づいて説明しています。温度の図の数字は説明用の架空の値です。トークン分割は OpenAI Tokenizer で 2026-11-02 に実測しました。
【出典】
Attention Is All You Need (2017): https://arxiv.org/abs/1706.03762
Efficient Estimation of Word Representations in Vector Space (2013): https://arxiv.org/abs/1301.3781
Language Models are Few-Shot Learners (2020): https://arxiv.org/abs/2005.14165
The Curious Case of Neural Text Degeneration (2019): https://arxiv.org/abs/1904.09751
Meta Llama 3.1 発表 (2024): https://ai.meta.com/blog/meta-llama-3-1/
Llama モデル設定: https://github.com/meta-llama/llama-m...
Google ML Crash Course Transformers: https://developers.google.com/machine...
Google ML Crash Course Gradient descent: https://developers.google.com/machine...
Hugging Face Chat templates: https://huggingface.co/docs/transform...
Hugging Face Generation strategies: https://huggingface.co/docs/transform...
Hugging Face How to generate text: https://huggingface.co/blog/how-to-ge...
Hugging Face Caching: https://huggingface.co/docs/transform...
Claude Docs Context windows: https://platform.claude.com/docs/en/b...
Claude Docs Messages: https://platform.claude.com/docs/en/a...
Claude Docs System prompts: https://platform.claude.com/docs/en/r...
Claude Docs Prompting best practices: https://platform.claude.com/docs/en/b...
Claude Docs Tool use: https://platform.claude.com/docs/en/a...
OpenAI Tokenizer: https://platform.openai.com/tokenizer
OpenAI Help What are tokens: https://help.openai.com/en/articles/4...
OWASP LLM01:2025 Prompt Injection: https://genai.owasp.org/llmrisk/llm01...
Anthropic Tracing the thoughts of a large language model (2025): https://www.anthropic.com/research/tr...
Anthropic Mapping the Mind of a Large Language Model (2024): https://www.anthropic.com/research/ma...
【目次】
0:00 導入
1:10 全体の地図
2:43 文章の組み立て
4:58 トークン
6:51 ベクトル
8:11 注意
10:05 層
11:14 学習
12:28 確率
13:49 繰り返しとツール
15:19 プロンプトとAIの限界、まとめ
【クレジット】
VOICEVOX:四国めたん
VOICEVOX:ずんだもん
立ち絵:akihiyo