rights reserved. 本セッションをご覧頂きありがとうございます。スライド閲覧にあたり 以下の注意事項を理解した上で読み進めて頂くようお願いします: 1. 作成時期: 本スライドは 2023/6/23 開催の AWS Dev Day 2023 登壇資料のため、それ以前の情報に基づき作成されています 2. 対象者: 流⾏りの技術トレンドを⼀歩踏み込んで理解したい AWS Dev Day 参加者層 (アプリケーション開発者) 向けです 3. 内容: LLM の技術的背景を理解するセッションであり、機械学習の 前提知識が必要な内容も含まれます。Generative AI, LLM の全体像 については AWS Dev Day General Session 2 でも触れています はじめに
rights reserved. Holistic Evaluation of Language Models (HELM) • 幅広いシナリオ、 複数メトリクスでの測定、 標準化に重点を置き、 透明性を⾼めた ⾔語モデルの全体評価 • 例: Core scenarios Accuracy https://crfm.stanford.edu/helm/ S t a n f o r d C e n t e r f o r R e s e a r c h o n F o u n d a t i o n M o d e l s ( C R F M )
rights reserved. LMSYS Org 3つの指標で評価 • Chatbot Arena Elo • チェスやスポーツなどの対戦型競技で⽤いられる イロレーティング (Elo rating) による相対評価。 “Chatbot Arena” UI で投票 • MT-Bench score [Zheng et al., 2023] • MMLU [Hendrycks et al., 2021] https://lmsys.org/blog/2023-06-22-leaderboard/ U C B e r k e l e y w t h U C S D & C M U Table 1. LLM Leaderboard (Timeframe: April 24 - June 19, 2023). The latest and detailed version here.
rights reserved. オープンソースの⽇本語 LLM • Rinna § GPT-NeoX (3.6B Pre-trained, Instruction “SFT v2”, RLHF “PPO”), GPT-2, GPT, etc. – License: MIT • CyberAgent § OpenCALM (Small, Medium, Large, 1.4B “1B”, 2.7B “3B”, 6.8B “7B”) – License: CC BY-SA 4.0 • ABEJA § GPT-NeoX (2.7B), GPT-2 – License: MIT • Retrieva § T5 (Small - XL) – License: CC BY-SA 4.0 • 関連情報 § よく使われるデータセット – Common Crawl • mC4 (ja): 160B tokens • CC-100 (ja): 10B tokens – Wikipedia (ja): 0.5B tokens § Stability AI による⽇本語 LLM 評価 – https://github.com/Stability-AI/lm-evaluation- harness/tree/jp-stable H u g g i n g F a c e H u b
rights reserved. References • Stanford CS224N: Natural Language Processing with Deep Learning https://web.stanford.edu/class/cs224n/ • Lecture 9. Pretraining (by John Hewitt) [slides] • Lecture 11. Prompting, Reinforcement Learning from Human Feedback (by Jesse Mu) [slides] • Hugging Face Blog: Illustrating Reinforcement Learning from Human Feedback (RLHF) https://huggingface.co/blog/rlhf
rights reserved. AWS 上での実装例 (Self-managed) • Training a 1 Trillion Parameter Model With PyTorch Fully Sharded Data Parallel (FSDP) on AWS ParallelCluster § https://medium.com/pytorch/training-a-1-trillion-parameter-model-with- pytorch-fully-sharded-data-parallel-on-aws-3ac13aa96cff • Distributed training with Amazon EKS and Torch Distributed Elastic § https://aws.amazon.com/blogs/machine-learning/distributed-training-with- amazon-eks-and-torch-distributed-elastic/
rights reserved. AWS 上での実装例 (Amazon SageMaker) • Deploy Falcon-40B with large model inference DLCs on Amazon SageMaker § https://aws.amazon.com/blogs/machine-learning/deploy-falcon-40b-with- large-model-inference-dlcs-on-amazon-sagemaker/ • Run text generation with Bloom and GPT models on Amazon SageMaker JumpStart § https://aws.amazon.com/blogs/machine-learning/run-text-generation-with- gpt-and-bloom-models-on-amazon-sagemaker-jumpstart/ • Amazon SageMaker でファインチューニング (⽇本語 LLM あり) § https://github.com/aws-samples/aws-ml-jp/tree/main/tasks/generative- ai/text-to-text/fine-tuning/instruction-tuning
rights reserved. AWS 上での実装例 (Amazon SageMaker) • Train EleutherAI GPT-J with PyTorch 1.8.1 and Pipeline Parallelism Using the SageMaker Model Parallelism Library § https://github.com/aws/amazon-sagemaker- examples/blob/main/training/distributed_training/pytorch/model_parallel/gp t-j/01_train_gptj_smp_notebook.ipynb • Train and Deploy GPT-J-6B model using Tensor Parallelism approach within SageMaker Model Parallel Library § https://github.com/aws/amazon-sagemaker- examples/blob/main/training/distributed_training/pytorch/model_parallel/gp t-j/11_train_gptj_smp_tensor_parallel_notebook.ipynb
rights reserved. AWS 上での実装例 (Amazon SageMaker) • Train GPT-2 with PyTorch 1.12 and Tensor Parallelism Using the SageMaker Model Parallelism Library § https://github.com/aws/amazon-sagemaker- examples/blob/main/training/distributed_training/pytorch/model_parallel/gp t2/smp-train-gpt-simple.ipynb • Build flexible and scalable distributed training architectures using Kubeflow on AWS and Amazon SageMaker § https://aws.amazon.com/blogs/machine-learning/build-flexible-and-scalable- distributed-training-architectures-using-kubeflow-on-aws-and-amazon- sagemaker/
rights reserved. Amazon Bedrock • AWS re:Inforce 2023 – Securely build generative AI apps & control data with Amazon Bedrock § https://www.youtube.com/watch?v=5EDOTtYmkmI
rights reserved. AWS 上での基盤モデル構築 (公開事例) • Technology Innovation Institute trains the state-of-the-art Falcon LLM 40B foundation model on Amazon SageMaker § https://aws.amazon.com/blogs/machine-learning/technology-innovation- institute-trains-the-state-of-the-art-falcon-llm-40b-foundation-model-on- amazon-sagemaker/ • AWS re:Invent 2022 - How Stable Diffusion was built: Tips & tricks to train large AI models § https://www.youtube.com/watch?v=7I854do63Lg • Stability AI builds foundation models on Amazon SageMaker § https://aws.amazon.com/blogs/machine-learning/stability-ai-builds- foundation-models-on-amazon-sagemaker/