HAQM Web Services ブログ
Pixtral Large が HAQM Bedrock で利用可能になりました
この記事は Pixtral Large is now available in HAQM Bedrock (記事公開日: 2025年4月10日) を翻訳したものです。
Mistral AI の Pixtral Large 基盤モデル (FM) が HAQM Bedrock で一般提供開始となったことをお知らせします。この発表により、Mistral の最先端マルチモーダルモデルを活用して、AWS 上で生成 AI のアイデアを構築、実験、そして責任を持って拡張することが可能になります。AWS は Pixtral Large を完全マネージド型サーバーレスモデルとして提供する初めての主要クラウドプロバイダーです。
この記事では、Pixtral Large の機能とその活用例について説明します。
Pixtral Large の概要
Pixtral Large は、Mistral AI によって開発された 1240 億パラメータを持つ高度なマルチモーダルモデルです。このモデルは 1230 億パラメータの強力なマルチモーダルデコーダーと、特殊な 10 億パラメータのビジョンエンコーダーを組み合わせています。複雑な視覚的およびテキストタスクをシームレスに処理しながら、前身の Mistral Large 2 の優れた言語処理能力を継承しています。
Pixtral Large の特筆すべき機能は、128,000 トークンの広大なコンテキストウィンドウであり、大量のテキストデータと共に複数の画像を同時に処理することができます。この能力により、文書、詳細なチャート、グラフ、自然画像の分析において特に効果的であり、幅広い実用的なアプリケーションに対応しています。
Pixtral Large の主な機能は以下の通りです:
- 多言語テキスト分析 – Pixtral Large は画像や文書から複数言語にわたる書かれた情報を正確に解釈・抽出します。これは特に、レシートや請求書の自動処理などのタスクに有益で、計算やコンテキストを考慮した評価を実行し、経費追跡や財務分析などのプロセスを効率化します。
- チャートや可視化されたデータの解釈 – このモデルは複雑な視覚的データ表現を理解する優れた能力を示します。可視化されたグラフ内のトレンド、異常、主要なデータポイントを容易に識別できます。例えば、Pixtral Large はトレーニング損失曲線やパフォーマンス指標内の不規則性や洞察力のあるトレンドを特定するのに非常に効果的で、データ駆動型の意思決定の精度を向上させます。
- 一般的な視覚分析とコンテキスト理解 – Pixtral Large はスクリーンショットや写真などの一般的な視覚データを分析し、微妙なニュアンスまで読み取り、画像内容に基づくクエリに効果的に応答する能力に長けています。この機能は、プレゼンテーション内の視覚的コンテキストの説明からコンテンツモデレーションの自動化やコンテキスト画像検索まで、さまざまなシナリオをサポートでき、その使用可能性を大幅に広げています。
追加のモデル詳細は以下の通りです:
- クロスリージョン推論は以下のリージョンで利用可能です:
us-east-2
us-west-2
us-east-1
eu-west-1
eu-west-3
eu-north-1
eu-central-1
- モデル ID:
us
またはeu
、その後にmistral.pixtral-large-2502-v1:0
- コンテキストウィンドウ:
128,000
HAQM Bedrock で Pixtral Large を使用する
Mistral AI モデルを初めて使用する場合は、HAQM Bedrock コンソールでモデルアクセスをリクエストできます。詳細については、HAQM Bedrock 基盤モデルへのアクセスをご覧ください。
HAQM Bedrock コンソールで Pixtral Large をテストするには、ナビゲーションペインの Playgrounds の下にある Text または Chat を選択します。次に、Select model を選択し、カテゴリとして Mistral を、モデルとして Pixtral Large を選択します。
View API を選択することで、AWS コマンドラインインターフェイス (AWS CLI) や AWS SDK のコード例を使用してモデルにアクセスすることもできます。以下のコードのように、mistral.mistral-large-2407-v1:0
などのモデル ID を使用できます:
$ aws bedrock-runtime invoke-model \ --model-id mistral.pixtral-large-2502-v1:0 \ --body "{\"prompt\":\"<s>[INST] this is where you place your input text [/INST]\", \"max_tokens\":200, \"temperature\":0.5, \"top_p\":0.9, \"top_k\":50}" \ --cli-binary-format raw-in-base64-out \ --region eu-north-1 \ invoke-model-output.txt
以下のセクションでは、Pixtral Large の機能について詳しく説明します。
Pixtral Large のユースケース
このセクションでは、サンプルプロンプトを使用して Pixtral Large のユースケース例を紹介します。Pixtral Large は Mistral Large 2 をベースにしているため、ネイティブ JSON 出力モードを含んでいます。この機能により、開発者はモデルのレスポンスを構造化された読みやすい形式で受け取ることができ、さまざまなアプリケーションやシステムにシームレスに統合できます。JSON は広く使用されているデータ交換標準であるため、この機能によりモデル出力の処理プロセスが効率化され、異なる産業やユースケースにわたる開発者にとってよりアクセスしやすく実用的になっています。Converse API を使用した JSON の生成の詳細については、HAQM Bedrock Converse API を使用した JSON の生成を参照してください。
さらに、Pixtral Large は Converse API と ツールの使用をサポートしています。HAQM Bedrock API を使用することで、送信するメッセージへのレスポンス生成をサポートするツールへのアクセス権をモデルに付与できます。
データベースエンティティ関係図からの SQL コードの生成
エンティティ関係 (ER) 図は、データベース設計で使用される視覚的表現で、エンティティとその属性の関係を示します。これは概念的モデリングの重要なツールであり、開発者やアナリストがデータベース内のデータ構造を理解し伝えるのに役立ちます。
この例では、エンティティとその関係を作成するための PostgreSQL 互換の SQL CREATE TABLE
ステートメントを生成するモデルの能力をテストします。
以下のプロンプトを使用します:
prompt = """ You are a database designer. You have created an ER diagram. You need to generate PostgreSQL compatible SQL statements to create the tables" """
日本語訳(翻訳者追記)
prompt = """ あなたはデータベース設計者です。ERダイアグラムを作成しました。このERダイアグラムに基づいてPostgreSQLと互換性のあるテーブル作成用のSQLステートメントを生成する必要があります。" """
以下の ER 図を入力します。
モデルの応答は以下の通りです:
Sure! Below are the SQL statements to create the tables based on the provided ER diagram for a PostgreSQL database. -- Create the Airport table CREATE TABLE Airport ( Airport_ID SERIAL PRIMARY KEY, AirportCity VARCHAR(255), AirportCountry VARCHAR(255) ); -- Create the Calendar table CREATE TABLE Calendar ( Day_Date DATE PRIMARY KEY, Business_Day_YN BOOLEAN ); -- Create the Flight_Details table CREATE TABLE Flight_Details ( Flight_ID SERIAL PRIMARY KEY, Source_Airport_ID INT REFERENCES Airport(Airport_ID), Destination_Airport_ID INT REFERENCES Airport(Airport_ID), Departure_Date_Time TIMESTAMP, Arrival_Date_Time TIMESTAMP, Airplane_Type VARCHAR(255) ); -- Create the Travel_Class table CREATE TABLE Travel_Class ( Travel_Class_ID SERIAL PRIMARY KEY, Travel_Class_Name VARCHAR(255), Travel_Class_Capacity INT ); -- Create the Seat_Details table CREATE TABLE Seat_Details ( Seat_ID SERIAL PRIMARY KEY, Travel_Class_ID INT REFERENCES Travel_Class(Travel_Class_ID), Flight_ID INT REFERENCES Flight_Details(Flight_ID) ); -- Create the Flight_Cost table CREATE TABLE Flight_Cost ( Seat_ID INT REFERENCES Seat_Details(Seat_ID), Valid_From_Date DATE, Cost DECIMAL(10, 2), Valid_To_Date DATE, PRIMARY KEY (Seat_ID, Valid_From_Date) ); -- Create the Flight_Service table CREATE TABLE Flight_Service ( Service_ID SERIAL PRIMARY KEY, Service_Name VARCHAR(255) ); -- Create the Service_Offering table CREATE TABLE Service_Offering ( Travel_Class_ID INT REFERENCES Travel_Class(Travel_Class_ID), Service_ID INT REFERENCES Flight_Service(Service_ID), Offered_YN BOOLEAN, From_Date DATE, To_Date DATE, PRIMARY KEY (Travel_Class_ID, Service_ID) ); -- Create the Passenger table CREATE TABLE Passenger ( Passenger_ID SERIAL PRIMARY KEY, P_FirstName VARCHAR(255), P_LastName VARCHAR(255), P_Email VARCHAR(255), P_PhoneNumber VARCHAR(255), P_Address VARCHAR(255), P_City VARCHAR(255), P_State VARCHAR(255), P_Zipcode VARCHAR(255), P_Country VARCHAR(255) ); -- Create the Reservation table CREATE TABLE Reservation ( Reservation_ID SERIAL PRIMARY KEY, Passenger_ID INT REFERENCES Passenger(Passenger_ID), Seat_ID INT REFERENCES Seat_Details(Seat_ID), Date_Of_Reservation DATE ); -- Create the Payment_Status table CREATE TABLE Payment_Status ( Payment_ID SERIAL PRIMARY KEY, Payment_Status_YN BOOLEAN, Payment_Due_Date DATE, Payment_Amount DECIMAL(10, 2), Reservation_ID INT REFERENCES Reservation(Reservation_ID) ); These SQL statements will create the tables as per the ER diagram you provided. Make sure to run these statements in the order they are listed to ensure that foreign key constraints are satisfied.
日本語訳(翻訳者追記)
もちろんです!下記は提供された ER ダイヤグラムに基づいて PostgreSQL データベース用のテーブルを作成するための SQL ステートメントです。 -- 省略-- これらの SQL ステートメントは提供された ER ダイヤグラムに沿ってテーブルを作成します。外部キー制約が満たされるよう、これらの SQL ステートメントは必ず記載された順序で実行するようにしてください。
組織階層の構造化テキストへの変換
Pixtral Large は組織構造を理解し、構造化された出力を生成する能力を持っています。組織図でテストしてみましょう。
以下のプロンプトを使用します:
prompt = """ Extract organization hierarchy from the given org structure. provide response in a structured json format with below: - role - name - reporting_manager """
日本語訳(翻訳者追記)
prompt = """ 与えられた組織図から階層構造を抽出してください。以下の項目を含む JSON 形式でレスポンスを提供してください: - 役職 - 氏名 - 報告先の管理者 """
以下の組織図を入力します。
Here is the organization hierarchy extracted from the given org structure in a structured JSON format: [ { "role": "President", "name": "John Smith", "reporting_manager": null }, { "role": "VP Marketing", "name": "Susan Jones", "reporting_manager": "John Smith" }, { "role": "VP Sales", "name": "Rachel Parker", "reporting_manager": "John Smith" }, { "role": "VP Production", "name": "Tom Allen", "reporting_manager": "John Smith" }, { "role": "Manager", "name": "Alice Johnson", "reporting_manager": "Susan Jones" }, { "role": "Manager", "name": "Tim Moore", "reporting_manager": "Susan Jones" }, { "role": "Manager", "name": "Michael Gross", "reporting_manager": "Rachel Parker" }, { "role": "Manager", "name": "Kim Dole", "reporting_manager": "Rachel Parker" }, { "role": "Manager", "name": "Kathy Roberts", "reporting_manager": "Tom Allen" }, { "role": "Manager", "name": "Betsy Foster", "reporting_manager": "Tom Allen" } ]
日本語訳(翻訳者追記)
こちらが入力された組織図から抽出した、JSON 形式の階層構造です。 -- 省略 --
チャート理解と推論
Pixtral Large はチャートやグラフを理解し、推論する能力を持っています。世界各国のオートバイ所有率の可視化データを使って Pixtral Large をテストしてみましょう。
以下のプロンプトを使用します:
prompt = """Examine this visualization: 1. First, describe what this visualization represents: - What information is being shown? - How is the data displayed? - What do the different components represent? - What does the size variation indicate? 2. Analyze specific patterns: - Which region shows the highest proportion of the first category? - Which region shows the highest proportion of the second category? - Where do you observe the largest total values? - Which areas show the most balanced distribution? 3. Compare regional trends: - How do the proportions differ between continents? - What patterns emerge between different hemispheres? - Are there clear differences between different economic zones? 4. Identify interesting outliers: - Which regions stand out from their neighbors? - Can you identify any unexpected patterns? - Where do you notice significant data variations? 5. Consider geographical and demographic factors: - How might local conditions influence these patterns? - What socioeconomic factors might explain the variations? - Can you identify any correlation between size and proportions? 6. Make comparisons between: - Different geographical zones - Various population densities - Different economic development levels"""
日本語訳(翻訳者追記)
prompt = """この画像を調査してください: 1. まず、この可視化されたデータが何を表しているか説明してください: - どのような情報が表示されていますか? - データはどのように表示されていますか? - 異なるコンポーネントは何を表していますか? - サイズの違いは何を示していますか? 2. 特定のパターンを分析してください: - どの地域が最初のカテゴリの最も高い割合を示していますか? - どの地域が2番目のカテゴリの最も高い割合を示していますか? - どこで最大の合計値が観察されますか? - どの地域が最もバランスの取れた分布を示していますか? 3. 地域的傾向を比較してください: - 大陸間で割合はどのように異なりますか? - 異なる半球間でどのようなパターンの違いが現れますか? - 異なる経済圏間に明確な違いはありますか? 4. 特徴的な外れ値を特定してください: - どの地域が周囲と比べて際立っていますか? - 予期しないパターンを特定できますか? - どこで重要なデータの変動に気づきますか? 5. 地理的および人口統計的要因を考慮してください: - 地域の状況がこれらのパターンにどのように影響する可能性がありますか? - これらの違いを説明する社会経済的要因は何が考えられますか? - サイズと割合の間に相関関係を特定できますか? 6. 以下の間で比較を行ってください: - 異なる地理的ゾーン - さまざまな人口密度 - 異なる経済発展レベル"""
以下の画像を入力します。
By Dennis Bratland – Own work, CC BY-SA 3.0, http://commons.wikimedia.org/w/index.php?curid=15186498
モデルの応答は以下の通りです:
Description of the Visualization: Information Shown: The visualization presents data on the population (in millions) and the proportion of vehicles (cars and motorcycles) across various regions worldwide. Display Method: The data is displayed using pie charts overlaid on a world map. The size of each pie chart corresponds to the population of the region, with larger pies indicating larger populations. Components: Pie Charts: Each pie chart is divided into two segments representing the proportion of cars (light blue) and motorcycles (dark blue). Size Variation: The size of the pie charts indicates the total population of the region, with larger pies representing higher populations. Specific Patterns: Highest Proportion of Cars: Regions like the United States and parts of Europe show a higher proportion of cars. Highest Proportion of Motorcycles: Southeast Asian countries like Indonesia and Vietnam show a higher proportion of motorcycles. Largest Total Values: Large pie charts are observed in highly populated regions like India, China, and parts of Southeast Asia. Most Balanced Distribution: Some regions in Europe and South America show a more balanced distribution of cars and motorcycles. Regional Trends: Continental Differences: North America: Predominantly cars. Europe: A mix with a slight preference for cars. Africa: Generally lower total values with varied proportions. Asia: High population with a significant proportion of motorcycles in Southeast Asia. Hemispheric Patterns: The Northern Hemisphere has more densely populated regions with varied vehicle proportions, while the Southern Hemisphere shows lower population densities and more balanced distributions. Economic Zones: Developed regions tend to have higher car proportions, while developing regions, especially in Asia, show higher motorcycle usage. Interesting Outliers: Indonesia: Stands out with a very high proportion of motorcycles compared to neighboring regions. United States: Shows a predominantly high proportion of cars, distinct from other regions. Unexpected Patterns: Some smaller African countries show unexpectedly high proportions of motorcycles despite lower populations. Geographical and Demographic Factors: Local Conditions: Urbanization and infrastructure development influence vehicle preferences. Socioeconomic Factors: Economic status and affordability play significant roles in vehicle choices. Correlation: Larger populations in developing regions often correlate with higher motorcycle usage due to affordability and convenience. Comparisons: Geographical Zones: Urban areas in developed countries show higher car usage, while rural and developing regions favor motorcycles. Population Densities: Highly populated areas in Asia show a preference for motorcycles due to traffic congestion and affordability. Economic Development: Developed economies have higher car proportions, while developing economies rely more on motorcycles.
日本語訳(翻訳者追記)
可視化されたデータの説明: 表示されている情報:この可視化されたデータは世界各地の人口(百万人単位)と車両(自動車とオートバイ)の割合に関するデータを示しています。 表示方法:データは世界地図上に円グラフでオーバーレイ表示されています。各円グラフのサイズはその地域の人口に対応し、より大きな円はより大きな人口を示しています。 構成要素: 円グラフ:各円グラフは自動車(水色)とオートバイ(濃紺)の割合を表す2つのセグメントに分割されています。 サイズの変化:円グラフのサイズはその地域の総人口を示し、より大きな円はより高い人口を表しています。 特定のパターン: 自動車の最高割合:アメリカ合衆国やヨーロッパの一部などの地域では自動車の割合が高くなっています。 オートバイの最高割合:インドネシアやベトナムなどの東南アジア諸国ではオートバイの割合が高くなっています。 最大の総数:インド、中国、東南アジアの一部など、人口の多い地域で大きな円グラフが観察されます。 最もバランスの取れた分布:ヨーロッパや南米の一部の地域では自動車とオートバイのより均衡のとれた分布を示しています。 地域的傾向: 大陸間の違い: 北米:主に自動車が中心。 ヨーロッパ:自動車をやや好む混合。 アフリカ:一般的に総数が低く、さまざまな割合。 アジア:高い人口で、東南アジアでは著しいオートバイの割合。 半球間のパターン:北半球には多様な車両割合を持つ人口密度の高い地域があり、南半球では人口密度が低く、よりバランスの取れた分布を示しています。 経済圏:先進地域では自動車の割合が高い傾向があり、特にアジアの発展途上地域ではオートバイの使用率が高くなっています。 特徴的な外れ値: インドネシア:近隣地域と比較して非常に高いオートバイの割合が目立っています。 アメリカ合衆国:他の地域とは異なり、圧倒的に高い自動車の割合を示しています。 予想外のパターン:一部のアフリカの小国では、人口が少ないにもかかわらず、予想外に高いオートバイの割合を示しています。 地理的・人口統計学的要因: 地域条件:都市化とインフラ開発が車両選択に影響します。 社会経済的要因:経済状況と手頃な価格が車両選択において重要な役割を果たします。 相関関係:発展途上地域の大規模な人口は、手頃な価格と利便性から、多くの場合、オートバイの高い使用率と相関しています。 比較: 地理的ゾーン:先進国の都市部では自動車の使用率が高く、農村部や発展途上地域ではオートバイが好まれています。 人口密度:アジアの人口密集地域では、交通渋滞と手頃な価格のため、オートバイが好まれています。 経済発展:先進経済国では自動車の割合が高く、発展途上経済国ではオートバイへの依存度が高くなっています。
まとめ
この記事では、HAQM Bedrock での Pixtral Large モデルの使用開始方法を紹介しました。Pixtral Large マルチモーダルモデルを使用すると、文書理解、論理的推論、手書き認識、画像比較、エンティティ抽出、スキャンした画像から構造化データの抽出、キャプション生成など、さまざまなユースケースに対応できます。これらの機能は、eコマース(小売)、マーケティング、金融サービスなど、多数の企業アプリケーション全体の生産性を向上させることができます。
Mistral AI の Pixtral Large FM が HAQM Bedrock で利用可能になりました。HAQM Bedrock で Pixtral Large の使用を開始するには、HAQM Bedrock コンソールにアクセスしてください。
さらに詳しく知りたい方は、Mistral-on-AWS リポジトリをご覧ください。HAQM Bedrock で利用可能な Mistral AI モデルについて詳しくは、Mistral AI モデルが HAQM Bedrock で利用可能にを参照してください。
作者情報
本記事の翻訳はソリューションアーキテクトの伊勢田氷琴が担当しました。