プリンキピア

第13章ハイブリッドマルチクラウドのデジタルソリューション開発

THINK IT THROUGH考えてみよう
Using Avatars in Virtual-Reality Environments仮想現実の環境でアバターを使う
Avatars are a popular way to represent ourselves graphically online.
アバターは、オンラインで自分を図像として表す一般的な方法である。
Can avatars in the metaverse’s virtual-reality environment make use of big cloud PaaS capabilities to operate semi-autonomously? If they’re semi-autonomous, they’ll be able to act independently, with limited control from users. What ethical consequences could this pose?
英語のヒント
メタバースの仮想現実環境にいるアバターは、大手クラウドのPaaS機能を使い、半自律的に動けるだろうか。半自律的なら、利用者の限定的な制御を受けながら、独立して行動できる。どのような倫理的影響が考えられるだろうか。
Streaming Big Data Analytics Servicesストリーミングによるビッグデータ分析サービス
Vendors provide various services to facilitate streaming big data analytics in the cloud, such as Spark Structured Streaming, Amazon Kinesis Data Firehose and Kinesis, Azure Stream Analytics, and Google Dataflow (based on Apache Beam). Spark Structured Streaming also provides another high-level concept called the DStream, which represents a continuous stream of data as a sequence of RDD fragments with windowed computations. Spark Structured Streaming leverages Spark Core and its fast scheduling engine to perform streaming analytics.
英語のヒント
事業者は、クラウド上のストリーミングによるビッグデータ分析を容易にするサービスを提供する。Spark Structured Streaming、Amazon Kinesis Data FirehoseとKinesis、Azure Stream Analytics、Apache Beamに基づくGoogle Dataflowなどである。Spark Structured Streamingには、DStreamという別の高水準概念もある。連続するデータの流れを、ウィンドウを用いた計算を伴うRDD断片の列として表す。Spark Coreとその高速なスケジューリングエンジンを利用して、ストリーミング分析を実行する。
Amazon Firehose, which is designed for extreme scale, can load data directly into Amazon S3 or other Amazon services. Kinesis Data Analytics for SQL applications provides SQL-based tools for real-time analysis of streaming data from Kinesis Data Streams or Firehose. Kinesis Data Streams provides ordered, replayable, real-time streaming data. Various open-source frameworks, such as Kafka, Storm, RisingWave, Apache Spark, Apache Flume, Apache Beam, and Apache Flink, are also available to process streaming data on local machines. Table 13.2 compares Firehose to Kinesis Data Streams. The two primary components of the Azure Stream Analytics are the Azure Event Hubs service and Stream Analytics engine.
英語のヒント
きわめて大規模な処理向けに設計されたAmazon Firehoseは、Amazon S3などのAmazonサービスへ直接データを読み込める。SQLアプリケーション向けKinesis Data Analyticsは、Kinesis Data StreamsやFirehoseからのストリーミングデータをリアルタイムに分析するSQLベースのツールを提供する。Kinesis Data Streamsは、順序が保たれ、再生可能なリアルタイムのストリーミングデータを提供する。ローカル端末での処理には、Kafka、Storm、RisingWave、Apache Spark、Apache Flume、Apache Beam、Apache Flinkなどのオープンソースフレームワークも利用できる。表13.2でFirehoseとKinesis Data Streamsを比較する。Azure Stream Analyticsの主要な構成要素は、Azure Event HubsサービスとStream Analyticsエンジンの2つである。
Feature
機能
Firehose
Kinesis Data Streams
Purpose
目的
Service for transferring data into third-party tools
第三者のツールへデータを転送するサービス
Streaming service
ストリーミングサービス
Provisioning
プロビジョニング
Fully managed and has no administration
全面的に管理されており、管理作業は不要
Managed but requires shards configuration
管理済みだが、シャードの設定が必要
Scaling
規模の調整
Automated scaling based on demand
需要に基づく自動的な規模調整
Manual scaling
手動で規模を調整
Data storage
データの保存
Data storage not included
データの保存は含まれない
Offers data storage that can be configured from 1 to 365 days
1〜365日で設定できるデータ保存機能を提供
Replay capability
再生機能
No, replay capability is not supported
なし。再生機能は非対応
Yes, replay capability is supported
あり。再生機能に対応
Message propagation
メッセージの伝播
Almost real-time, depending on buffer size or time
バッファーのサイズや時間によって、ほぼリアルタイム
Real-time
リアルタイム
Table 13.2 Firehose versus Kinesis Data Streams
表13.2 FirehoseとKinesis Data Streamsの比較
Apache Beam is the open-source release of the Google Cloud Dataflow system. Beam treats the batch and streaming cases uniformly and supports pipelines to encapsulate computations, as well as PCollections, which represent data as they move through a pipeline. Beam enables computational transformations that operate on PCollections, produces PCollections, and relies on sources and sinks, from which data are read and to which data are written, respectively.
英語のヒント
Apache Beamは、Google Cloud Dataflowシステムをオープンソースとして公開したものである。バッチ処理とストリーミング処理を統一的に扱い、計算を包み込むパイプラインと、パイプライン内を移動するデータを表すPCollectionに対応する。PCollectionを入力として処理し、新しいPCollectionを生成する変換を可能にする。データを読み取るソースと、データを書き込むシンクに依存している。
Deep Learning and Generative AI Services深層学習と生成AIのサービス
All the big clouds today provide integrated machine learning services that use various techniques to create models that leverage prior experience and make it possible to improve the ability of machines to perform tasks. These services may be used as part of big data analytics and streaming big data analytics techniques, as explained in the previous subsections. Deep learning (DL) is another technique that leverages artificial neural networks (e.g., RNNs, CNNs, GANs) to create models that perform predictive tasks requiring special training and the ability to relate to a vast combination of labels/patterns (e.g., image recognition, speech recognition, language translation). There are various types of deep learning improvements that include reinforcement learning and transfer learning among others. Artificial intelligence (AI) is also a technique that leverages ML to enable computers to mimic human intelligence. Generative AI (GenAI) is a subset of AI that uses techniques such as deep learning and transformers to generate new content (e.g., create images, text, or audio) that matches a request. Transformers are special types of ML model architectures that are suited for solving problems that contain sequences such as text or time-series data.
英語のヒント
現在の大手クラウドはすべて、さまざまな手法で過去の経験を生かすモデルを作り、機械がタスクを行う能力を改善できる、統合された機械学習サービスを提供している。前の小節で説明したように、これらはビッグデータ分析やストリーミング分析の一部として使える。深層学習(DL)は、人工ニューラルネットワーク(RNN、CNN、GANなど)を用いる別の手法である。特別な学習と、膨大なラベルやパターンの組み合わせを関連づける能力が必要な予測タスクを行うモデルを作る。画像認識、音声認識、言語翻訳などが例である。深層学習の改善には、強化学習や転移学習など、さまざまな種類がある。人工知能(AI)も、機械学習を利用してコンピューターに人間の知能を模倣させる技術である。生成AI(GenAI)はその一部で、深層学習やトランスフォーマーなどによって、要求に合う画像、文章、音声などの新しい内容を生成する。トランスフォーマーは、文章や時系列データのような順序を含む問題の解決に適した、特定の種類の機械学習モデル構造である。
Transformers have been used recently to solve natural language processing problems (e.g., translation, text generation, question answering, text summarization), and various transformer implementations have been quite successful, including the bidirectional encoder representations from transformers (BERT) and the generative pre-trained transformers (GPTs). ML models that support GenAI are referred to as large language models (LLMs) and/or foundation models (FMs). LLMs are typically tuned toward specific conversational applications and require more parameters and data-intensive training. Foundation models (FMs) are more general-purpose than LLMs and less data-intensive. Examples of LLMs include OpenAI’s ChatGPT, Google Gemini, Meta M2M-100 and LlaMA, IBM’s Granite model, Anthropic’s Claude models, Mistral AI’s models, and many others. LLMs (and FMs) can be augmented using retrieval augmented generation (RAG) AI frameworks that supplement the FMs internal representation of information to improve the quality of the LLM-generated responses.
英語のヒント
近年、トランスフォーマーは、翻訳、文章生成、質問応答、要約などの自然言語処理の問題に使われている。BERT(トランスフォーマーによる双方向のエンコーダー表現)やGPT(生成的事前学習トランスフォーマー)を含め、さまざまな実装が大きな成果を上げている。生成AIを支える機械学習モデルは、大規模言語モデル(LLM)や基盤モデル(FM)と呼ばれる。LLMは通常、特定の対話用途向けに調整され、より多くのパラメーターと、大量のデータを使う学習が必要になる。基盤モデルはLLMより汎用的で、データへの依存が小さい。LLMの例には、OpenAIのChatGPT、Google Gemini、MetaのM2M-100とLlaMA、IBMのGranite、AnthropicのClaude、Mistral AIのモデルなど、多数がある。LLMとFMは、検索拡張生成(RAG)のAIフレームワークで拡張できる。RAGは、モデル内部の情報表現を補い、LLMが生成する応答の質を改善する。
Cloud vendors provide DL services in the form of programming frameworks that help implement deep learning applications using differentiable programming. GenAI services provided by the big clouds and other vendors are prompt interfaces that are specially engineered to allow users to get the most out of an LLM by including a sufficient amount of information in the prompts they create.
英語のヒント
クラウド事業者は、微分可能プログラミングを使って深層学習アプリケーションを実装するのを助ける、プログラミングフレームワークとしてDLサービスを提供する。大手クラウドや他の事業者の生成AIサービスは、プロンプトを入力するためのインターフェースである。利用者が作るプロンプトに十分な情報を含めることで、LLMの能力を最大限引き出せるよう、特別に設計されている。
The following provides a nonexhaustive list of DL services provided by some of the big clouds:
大手クラウドの一部が提供する深層学習サービスを、網羅的ではないが以下に挙げる。
• Amazon AWS deep learning services:
・Amazon AWSの深層学習サービス:
◦ Amazon Deep Learning AMIs (DLAMIs). Amazon DLAMIs are customized machine images that may be used for deep learning in the cloud. They can be deployed on various types of Amazon VMs (i.e., EC2 instances), including CPU-only instances or the latest high-powered multi-GPU instances. DLAMIs come preconfigured with NVIDIA CUDA and NVIDIA cuDNN and the latest releases of the most popular deep learning frameworks. Amazon released the Amazon Deep Learning AMI with Conda, which uses Conda virtual environments to isolate each framework, allowing you to switch between them at will without their dependencies conflicting. The full list of supported frameworks by Amazon Deep Learning AMI with Conda includes PyTorch, TensorFlow 2, and Apache MXNet (now retired but can still be accessed and used). Starting with the v18 release, Amazon Deep Learning AMI with Conda no longer includes the CNTK, Caffe, Caffe2, Theano, Chainer, or Keras Conda environments. Configuring the Amazon DLAMIs to use Jupyter is easy; go to the Amazon Marketplace on the EC2 portal and search for “deep learning.” You will find the DLAMIs, then select the server type you would like to use. If you simply want to experiment, it works well with a no-GPU option; when the VM comes up, log in with ssh, and configure Jupyter for remote access.
英語のヒント
◦ Amazon Deep Learning AMI(DLAMI)。クラウドでの深層学習に使える、調整済みのマシンイメージである。CPUだけのインスタンスから最新の強力な複数GPUのインスタンスまで、さまざまなAmazonのVM(EC2インスタンス)へ配置できる。NVIDIA CUDA、NVIDIA cuDNN、広く使われる深層学習フレームワークの最新版が、あらかじめ設定されている。Amazonが公開したConda付きのDeep Learning AMIは、Condaの仮想環境で各フレームワークを分離する。依存関係を衝突させず、自由に切り替えて使える。対応するフレームワークの全リストには、PyTorch、TensorFlow 2、Apache MXNetがある。MXNetは現在廃止されているが、引き続きアクセスし利用できる。バージョン18以降、Conda付きのDeep Learning AMIには、CNTK、Caffe、Caffe2、Theano、Chainer、KerasのConda環境は含まれない。DLAMIでJupyterを使う設定は簡単だ。EC2ポータルのAmazon Marketplaceで「deep learning」を検索し、見つかったDLAMIで使用したいサーバーの種類を選ぶ。試すだけならGPUなしの選択肢でも十分動く。VMが起動したらsshでログインし、Jupyterを遠隔から使えるよう設定する。
◦ Amazon Lex. Amazon Lex is an IA chatbot that allows users to incorporate voice input and conversational interfaces into applications. It is an extension of Amazon’s Echo product, a networked device with a speaker and microphone that you can ask questions through the Alexa service (e.g., questions about the weather, event scheduling, news, and music). It is possible to associate Echo voice commands with the launching of an Amazon Lambda function that executes a cloud application.
英語のヒント
◦ Amazon Lex。音声入力と対話型インターフェースをアプリケーションへ組み込めるIAチャットボットである。Amazon Echoという、スピーカーとマイクを備えたネットワーク接続機器の拡張に当たる。EchoではAlexaサービスを通じ、天気、予定の設定、ニュース、音楽などを質問できる。Echoへの音声命令を、クラウドアプリケーションを実行するAmazon Lambda関数の起動と関連づけることも可能だ。
◦ Amazon Polly. Amazon Polly is the opposite of Lex; it turns text into speech for dozens of languages with a variety of voices and uses the Speech Synthesis Markup Language (SSML) to control pronunciation and intonation.
英語のヒント
◦ Amazon Polly。Lexとは逆に、テキストを数十の言語のさまざまな声による音声へ変換する。音声合成マークアップ言語(SSML)を用いて、発音と抑揚を制御する。
◦ Amazon Rekognition. Amazon Rekognition is at the cutting edge of deep learning applications. It takes an image as input and returns a textual description of the items that it sees in that image. This includes objects, landmarks, dominant colors, activities, and faces. It also performs detailed facial analysis and comparisons and can identify inappropriate content that appears in images.
英語のヒント
◦ Amazon Rekognition。深層学習アプリケーションの最先端に位置する。画像を入力として受け取り、画像中に認められる物体、ランドマーク、主要な色、活動、顔などを、文章で説明して返す。詳しい顔の分析や比較も行い、画像内の不適切な内容を特定できる。
• Microsoft Azure deep learning services:
・Microsoft Azureの深層学習サービス:
◦ Azure Data Science VMs (DSVMs). Azure DSVMs are Azure Virtual Machine images, preinstalled, configured, and tested with several popular tools that are commonly used for data analytics, machine learning, and AI development and training.
◦ Azure Data Science VM(DSVM)。データ分析、機械学習、AIの開発と学習によく使う複数のツールを、インストール・設定・テスト済みの状態で備えたAzure Virtual Machineのイメージである。
◦ Azure Machine Learning (ML). Azure ML is a cloud service that is designed to help accelerate and manage machine learning project life cycles. It can be used to train and deploy ML models and manage machine learning operations (via MLOps). You can create a model in Microsoft ML or use a model built from an open-source platform, such as PyTorch, TensorFlow, or scikit-learn. MLOps tools help you monitor, retrain, and redeploy models. As noted earlier, Azure also provides the ML.NET machine learning framework.
英語のヒント
◦ Azure Machine Learning(ML)。機械学習プロジェクトのライフサイクルの促進と管理を助けるクラウドサービスで、モデルの学習・配置や、MLOpsを使った機械学習の運用管理に利用できる。Microsoft ML内でモデルを作ることも、PyTorch、TensorFlow、scikit-learnなどのオープンソース基盤で作ったモデルを使うこともできる。MLOpsのツールは、モデルの監視、再学習、再配置を助ける。前述のとおり、AzureはML.NETという機械学習フレームワークも提供する。
◦ Azure AI services. Azure AI services are APIs/SDKs that can be used to build applications that support natural methods of communication (i.e., see, hear, speak, understand, and interpret user needs). These services include support for vision (e.g., object detection, face recognition, optical character recognition), speech (e.g., speech-to-text, text-to-speech, speaker recognition), languages (e.g., translation, sentiment analysis, key phrase extraction, language understanding), and decision (e.g., anomaly detection, content moderation, reinforcement learning).
英語のヒント
◦ Azure AIサービス。見る、聞く、話す、理解する、利用者の必要を読み取るといった、自然な意思疎通を支えるアプリケーションを作るAPI/SDKである。視覚(物体検出、顔認識、光学文字認識など)、音声(音声から文字、文字から音声への変換、話者認識など)、言語(翻訳、感情分析、重要語句の抽出、言語理解など)、判断(異常検知、コンテンツの適正化、強化学習など)を支えるサービスが含まれる。
• Google deep learning services:
・Googleの深層学習サービス:
◦ Deep learning VMs. Deep learning VM images are virtual machine images optimized for data science and machine learning tasks. All images include preinstalled ML frameworks and tools and can be used on VM instances with GPUs to accelerate data processing tasks. ML frameworks supported include TensorFlow and PyTorch.
◦ 深層学習VM。データサイエンスと機械学習のタスクに最適化された仮想マシンイメージである。どのイメージにも機械学習のフレームワークとツールがインストール済みで、GPU付きVMインスタンスでデータ処理を加速できる。TensorFlowやPyTorchなどに対応する。
◦ Google machine learning APIs. Google provides various APIs to services that can be used to build applications that support natural methods of communication, including Cloud Vision to understand the content of an image, Cloud Speech-to-Text to transcribe audio to text, Cloud Translation to translate an arbitrary string to any supported language, and Cloud Natural Language to extract information from text.
英語のヒント
◦ Googleの機械学習API。自然な意思疎通を支えるアプリケーションを作れる各種サービスへのAPIを提供する。画像の内容を理解するCloud Vision、音声を文字へ起こすCloud Speech-to-Text、任意の文字列を対応言語へ翻訳するCloud Translation、テキストから情報を取り出すCloud Natural Languageなどがある。
The following provides more information related to GenAI services provided by the big clouds:
次に、大手クラウドが提供する生成AIサービスを詳しく見ていく。
• AWS GenAI services. Amazon AWS provides various GenAI tools, including the Amazon Q AI-powered assistance and the Amazon Bedrock suite of LLMs, FMs, and generative AI tools. Amazon SageMaker may be used to build, train, and deploy FM models at scale.
英語のヒント
・AWSの生成AIサービス。Amazon AWSは、AIによる支援を行うAmazon Qや、LLM、FM、生成AIツールをまとめたAmazon Bedrockなどを提供する。Amazon SageMakerでは、基盤モデルを大規模に構築・学習・配置できる。
• Microsoft Azure GenAI services. The Azure OpenAI service and the Azure AI studio can be used to create custom copilot and generative AI applications. Microsoft has partnered with OpenAI, the company that is developing ChatGPT. It also provides the Phi family of small language models (SLMs) that are low-cost and low-latency alternatives to LLMs in some cases.
英語のヒント
・Microsoft Azureの生成AIサービス。Azure OpenAIサービスとAzure AI Studioを使い、独自のコパイロットや生成AIアプリケーションを作れる。MicrosoftはChatGPTを開発するOpenAIと提携している。また、小規模言語モデル(SLM)のPhiシリーズも提供しており、場合によってはLLMより低費用・低遅延の選択肢になる。
• Google GCP GenAI services. Vertex AI, Generative AI Studio, and Vertex AI Model Garden are various solutions that Google provides to support the creation of generative AI applications. Google also provides the Gemini family of generative AI models that are capable of processing information from multiple modalities, including images, videos, and text.
英語のヒント
・Google GCPの生成AIサービス。Googleは、生成AIアプリケーションの作成を支えるVertex AI、Generative AI Studio、Vertex AI Model Gardenなどを提供する。画像、動画、文章など、複数の形式の情報を処理できる生成AIモデルのGeminiシリーズもある。
• IBM Cloud GenAI services. IBM Watsonx.ai AI studio brings together generative AI capabilities that are powered by FMs and ML. It provides tools to tune and guide models based on enterprise data as well as build and refine prompts. IBM also develops custom Granite AI foundation models that are cost-efficient and enterprise-grade.
英語のヒント
・IBM Cloudの生成AIサービス。IBM Watsonx.ai AI Studioは、基盤モデルと機械学習による生成AIの機能をまとめたものだ。企業データに基づいてモデルを調整・誘導し、プロンプトを作成・洗練するツールを提供する。IBMは、費用効率が高く企業向けの品質を持つ、独自のGranite AI基盤モデルも開発している。
• Other GenAI services. In addition to the GenAI services and tools mentioned here, many other vendors focus on the creation of LLMs, SLMs, and FMs. Here are a few of them:
・その他の生成AIサービス。ここで挙げたサービスやツール以外にも、LLM、SLM、FMの作成に注力する事業者は多い。その一部を示す。
◦ OpenAI’s ChatGPT
◦ OpenAIのChatGPT
◦ Meta LlaMA
◦ Meta LlaMA
◦ Anthropic Claude
◦ Anthropic Claude
◦ Mistral AI
◦ Mistral AI