Skip to Content
AWSではじめる生成AI ―RAGアプリケーション開発から、基盤モデルの微調整、マルチモーダルAI活用までを試して学ぶ
book

AWSではじめる生成AI ―RAGアプリケーション開発から、基盤モデルの微調整、マルチモーダルAI活用までを試して学ぶ

by Chris Fregly, Antje Barth, Shelbee Eigenbrode, 久富木 隆一, 本橋 和貴, 久保 隆宏
July 2024
Intermediate to advanced
352 pages
5h 19m
Japanese
O'Reilly Japan, Inc.
Content preview from AWSではじめる生成AI ―RAGアプリケーション開発から、基盤モデルの微調整、マルチモーダルAI活用までを試して学ぶ

4章メモリーと計算リソースの最適化

3章では、基盤モデルを使って実験してみた上で、ユースケースに合ったモデルを選択するための、ベストプラクティスを探りました。通常、次の段階となるのは、特定の要求とデータセットに合わせてモデルをカスタマイズすることです。そのようなカスタマイズとして、微調整(fine-tuning)と呼ばれるテクニックを使い、データセット向けにモデルを調整することもあります。微調整については、5章で詳しく説明します。大規模な基盤モデルの学習や微調整を行う場合、計算リソース上の課題に直面することがよくあります。特に、大規模モデルをGPUメモリー上にどうやって収めるかという点が問題となります。

この章では、メモリーの制限を克服する助けとなるテクニックを探ります。必要なGPU RAM(Random Access Memory)容量を最小化するために量子化と分散学習を適用する方法と、大きめのモデル用に、モデルの学習を水平方向にスケールさせ、複数GPUで並列実行する方法を学びます。

例えば、最初の400億(40B)パラメーターFalconモデルは、48個のml.p4d.24xlarge†1のクラスター(384個のNVIDIA A100 GPU、15TBのGPU RAM、55TBのCPU RAMで構成)で学習が行われました。もっと新しいバージョンのFalconは、392個のml.p4d.24xlargeのクラスター(3,136個のNVIDIA A100 GPU、125TBのGPU RAM、450TBのCPU RAMで構成)で学習されました。Falconモデル並みの規模と複雑性ともなると、GPUクラスターを必要とする一方で、(62ページで説明する)量子化も有効な手段です。

[†1] ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

ベタープログラマ ―優れたプログラマになるための38の考え方とテクニック

ベタープログラマ ―優れたプログラマになるための38の考え方とテクニック

Pete Goodliffe, 柴田 芳樹

Publisher Resources

ISBN: 9784814400720Publisher Website