TII の Falcon 180B 基礎モデルが Amazon SageMaker JumpStart | 経由で入手できるようになりました。 アマゾン ウェブ サービス

TII の Falcon 180B 基礎モデルが Amazon SageMaker JumpStart | 経由で入手できるようになりました。 アマゾン ウェブ サービス

本日、Technology Innovation Institute (TII) によって開発され、Amazon SageMaker でトレーニングされた Falcon 180B 基礎モデルが、以下を通じてお客様に提供されることを発表できることを嬉しく思います。 Amazon SageMaker ジャンプスタート ワンクリックでデプロイして推論を実行できます。 Falcon 180B は、パラメータ サイズが 3.5 億で、180 兆トークンの大規模なデータセットでトレーニングされた、オープンにアクセス可能な重みを備えた最大かつ最もパフォーマンスの高いモデルの 180 つです。 このモデルを SageMaker JumpStart で試すことができます。SageMaker JumpStart は、アルゴリズム、モデル、ML ソリューションへのアクセスを提供する機械学習 (ML) ハブであり、ML をすぐに始めることができます。 この投稿では、SageMaker JumpStart を介して Falcon XNUMXB モデルを検出してデプロイする方法を説明します。

ファルコン180Bとは

Falcon 180Bは、から発売されたモデルです。 IIT これは、Falcon ファミリーの以前のリリースに続くものです。 これは Falcon 40B のスケールアップ バージョンであり、スケーラビリティを向上させるためにマルチクエリ アテンションを使用します。 これは、最適化されたトランスフォーマー アーキテクチャを使用する自動回帰言語モデルです。 これは、主に次の Web データで構成される 3.5 兆 XNUMX 億のデータ トークンでトレーニングされました。 洗練されたウェブ (約85%)。 このモデルには、180B と 180B-Chat の 180 つのバージョンがあります。 180B は未加工の事前トレーニング済みモデルであり、ほとんどのユースケースに合わせてさらに微調整する必要があります。 XNUMXB-Chat は、一般的な指示を受けるのに適しています。 チャット モデルは、チャットと指示のデータセットといくつかの大規模な会話データセットで微調整されています。

モデルは以下で利用可能です Falcon-180B TII ライセンス および Acceptable Use Policy.

ファルコン 180B は TII によって訓練されました。 アマゾンセージメーカー、約 4K A100 GPU のクラスター上にあります。 これは、ZeRO との 3D 並列処理を使用する Gigatron という名前のカスタム分散トレーニング コードベースと、カスタムの高性能 Triton カーネルを使用しました。 使用される分散トレーニング アーキテクチャ Amazon シンプル ストレージ サービス (Amazon S3) は、データのロードとチェックポイントの書き込みと読み取りのための唯一の統合サービスであり、特にワークロードの信頼性と運用の簡素化に貢献しました。

SageMaker JumpStart とは

SageMaker JumpStart を使用すると、ML 実践者は、増え続ける最高のパフォーマンスの基盤モデルのリストから選択できます。 ML 実践者は、ネットワーク分離された環境内の専用の SageMaker インスタンスに基盤モデルをデプロイし、モデルのトレーニングとデプロイのために Amazon SageMaker を使用してモデルをカスタマイズできます。

数回クリックするだけで Falcon 180B を検出して展開できるようになりました。 Amazon SageMakerスタジオ または、SageMaker Python SDK を介してプログラム的に、次のような SageMaker 機能を使用してモデルのパフォーマンスと MLOps コントロールを導き出すことができます。 AmazonSageMakerパイプライン, Amazon SageMakerデバッガ、またはコンテナーのログ。 モデルは AWS の安全な環境にデプロイされ、VPC の制御下に置かれるため、データのセキュリティが確保されます。 Falcon 180B は検出可能であり、必要なインスタンスが利用可能なリージョンにデプロイできます。 現在、ml.p4de インスタンスは米国東部 (バージニア北部) と米国西部 (オレゴン) で利用できます。

モデルを発見する

基礎モデルには、SageMaker Studio UI の SageMaker JumpStart および SageMaker Python SDK を通じてアクセスできます。 このセクションでは、SageMaker Studio でモデルを検出する方法について説明します。

SageMaker Studio は、単一の Web ベースのビジュアル インターフェイスを提供する統合開発環境 (IDE) であり、専用ツールにアクセスして、データの準備から ML モデルの構築、トレーニング、デプロイまで、すべての ML 開発ステップを実行できます。 SageMaker Studio の開始方法とセットアップ方法の詳細については、以下を参照してください。 Amazon SageMakerスタジオ.

SageMaker Studio では、事前トレーニングされたモデル、ノートブック、事前構築されたソリューションを含む SageMaker JumpStart にアクセスできます。 事前に構築された自動化されたソリューション.

TII の Falcon 180B 基礎モデルが Amazon SageMaker JumpStart | 経由で入手できるようになりました。アマゾン ウェブ サービス PlatoBlockchain データ インテリジェンス。垂直検索。あい。

SageMaker JumpStart ランディング ページから、ソリューション、モデル、ノートブック、その他のリソースを参照できます。 Falcon 180B は、 基礎モデル: テキスト生成 カルーセル

TII の Falcon 180B 基礎モデルが Amazon SageMaker JumpStart | 経由で入手できるようになりました。アマゾン ウェブ サービス PlatoBlockchain データ インテリジェンス。垂直検索。あい。

を選択して、他のモデル バリエーションを見つけることもできます。 すべてのテキスト生成モデルを調べる または検索 Falcon.

TII の Falcon 180B 基礎モデルが Amazon SageMaker JumpStart | 経由で入手できるようになりました。アマゾン ウェブ サービス PlatoBlockchain データ インテリジェンス。垂直検索。あい。

モデル カードを選択すると、ライセンス、トレーニングに使用されるデータ、使用方法などのモデルに関する詳細が表示されます。 ボタンも XNUMX つあります。 配備します および ノートブックを開くこれは、モデルの使用に役立ちます (次のスクリーンショットは、 配備します オプション)。

TII の Falcon 180B 基礎モデルが Amazon SageMaker JumpStart | 経由で入手できるようになりました。アマゾン ウェブ サービス PlatoBlockchain データ インテリジェンス。垂直検索。あい。

モデルを展開する

選ぶとき 配備します, モデルのデプロイが開始されます。 または、選択して表示されるサンプル ノートブックを通じてデプロイすることもできます。 ノートブックを開く。 サンプル ノートブックは、推論用のモデルをデプロイし、リソースをクリーンアップする方法に関するエンドツーエンドのガイダンスを提供します。

ノートブックを使用してデプロイするには、まず、 model_id。 次のコードを使用して、選択したモデルのいずれかを SageMaker にデプロイできます。

from sagemaker.jumpstart.model import JumpStartModel my_model = JumpStartModel(model_id="huggingface-llm-falcon-180b-chat-bf16") predictor = my_model.deploy()

これにより、デフォルトのインスタンス タイプやデフォルトの VPC 構成などのデフォルト構成でモデルが SageMaker にデプロイされます。 これらの構成は、デフォルト以外の値を指定することで変更できます。 JumpStartModel。 詳細については、を参照してください。 APIドキュメント。 デプロイ後は、SageMaker プレディクターを通じて、デプロイされたエンドポイントに対して推論を実行できます。 次のコードを参照してください。

payload = { "inputs": "User: Hello!nFalcon: ", "parameters": {"max_new_tokens": 256, "top_p": 0.9, "temperature": 0.6}
}
response = predictor.predict(payload)

推論パラメータは、エンドポイントでのテキスト生成プロセスを制御します。 最大新しいトークンのコントロールは、モデルによって生成される出力のサイズを指します。 モデルの語彙は英語の語彙と同じではなく、各トークンは英語の単語ではない可能性があるため、これは単語の数と同じではないことに注意してください。 温度は出力のランダム性を制御します。 温度が高いほど、より創造的で幻覚的な出力が得られます。 すべての推論パラメータはオプションです。

この 180B パラメーター モデルは 335GB で、16 ビット精度で推論を十分に実行するにはさらに多くの GPU メモリが必要です。 現在、JumpStart は ml.p4de.24xlarge インスタンスでのみこのモデルをサポートしています。 以下を提供することで、8 ビット量子化モデルを ml.p4d.24xlarge インスタンスにデプロイできます。 env={"HF_MODEL_QUANTIZE": "bitsandbytes"} のキーワード引数 JumpStartModel コンストラクターと指定 instance_type="ml.p4d.24xlarge" デプロイメソッドに。 ただし、この量子化された構成では、トークンごとのレイテンシーが約 5 倍遅くなることに注意してください。

次の表は、SageMaker JumpStart で利用可能なすべての Falcon モデルと、モデル ID、デフォルトのインスタンス タイプ、サポートされている合計トークンの最大数 (入力トークンの数と生成されたトークンの数の合計)、およびトークンごとの一般的な応答レイテンシーをリストしています。これらのモデルごとに。

モデル名 モデルID デフォルトのインスタンスタイプ 最大合計トークン数 トークンごとのレイテンシ*
ファルコン7B huggingface-llm-falcon-7b-bf16 ml.g5.2xラージ 2048 34ミリ秒
ファルコン 7B の指示 huggingface-llm-falcon-7b-instruct-bf16 ml.g5.2xラージ 2048 34ミリ秒
ファルコン40B huggingface-llm-falcon-40b-bf16 ml.g5.12xラージ 2048 57ミリ秒
ファルコン 40B の指示 huggingface-llm-falcon-40b-instruct-bf16 ml.g5.12xラージ 2048 57ミリ秒
ファルコン180B huggingface-llm-falcon-180b-bf16 ml.p4de.24xlarge 2048 45ミリ秒
ファルコン 180B チャット huggingface-llm-falcon-180b-chat-bf16 ml.p4de.24xlarge 2048 45ミリ秒

*トークンごとの遅延は、このブログで提供されているサンプル プロンプトの応答時間の中央値として提供されます。 この値は、入力シーケンスと出力シーケンスの長さに基づいて変化します。

Falcon 180B の推論とプロンプト例

Falcon モデルは、あらゆるテキストのテキスト補完に使用できます。 テキスト生成を通じて、質問への回答、言語翻訳、感情分析など、さまざまなタスクを実行できます。 エンドポイントは、次の入力ペイロード スキーマを受け入れます。

payload = { "inputs": str, (optional)"parameters": { "do_sample": bool, "max_new_tokens": int, "repetition_penalty": float, "return_full_text": bool, "stop": List[str], "seed": int, "temperature": float, "top_k": int, "top_p": float, "truncate": int, "typical_p": float, "best_of": int, "watermark": bool, "details": bool, "decoder_input_details": bool, }
}

これらの定義を調べることができます クライアントパラメータ およびテキスト生成推論リポジトリ内のデフォルト値。

以下は、プロンプトのサンプル例とモデルによって生成されたテキストです。 ここでのすべての出力は推論パラメータを使用して生成されます {"max_new_tokens": 768, "stop": ["<|endoftext|>", "###"]}.

Web サイトの構築は 10 の簡単なステップで行うことができます。

Input Building a website can be done in 10 simple steps: Output
- Choose a domain name
- Register your domain name
- Choose a web host
- Choose a website builder
- Create your website
- Add content to your website
- Add pages to your website
- Add images to your website
- Add videos to your website
- Add social media to your website
1. Choose a domain name
A domain name is the address of your website. It is what people will type into their browser to find your website. For example, the domain name of this website is.
When choosing a domain name, you should choose something that is easy to remember and that represents your business or website. You should also make sure that the domain name is available. You can check if a domain name is available by using a domain name search tool.
2. Register your domain name
Once you have chosen a domain name, you need to register it. This can be done through a domain name registrar. A domain name registrar is a company that manages the registration of domain names.
When registering your domain name, you will need to provide your contact information and choose a payment method. You will also need to choose a domain name extension. The most common domain name extensions are .com, .net, and .org.
3. Choose a web host
A web host is a company that provides space on a server for your website. When choosing a web host, you should choose one that is reliable and that offers good customer support. You should also make sure that the web host offers the features that you need for your website.
4. Choose a website builder
A website builder is a tool that allows you to create a website without having to learn how to code. There are many different website builders available, so you should choose one that is easy to use and that offers the features that you need.
5. Create your website
Once you have chosen a website builder, you can start creating your website. You will need to choose a template for your website and then add content to your website.
6. Add content to your website
The content of your website is what will make your website unique. You should add content that is relevant to your business or website. You can add text, images, videos, and other types of content to your website.
7. Add pages to your website
A website is made up of pages. You can add as many pages as you want to your website. Each page should have a different purpose. For example, you might have a page for your home page, a page for your about page, and a page for your contact page.
8. Add images to your website
Images can make your website more visually appealing. You can add images to your website by uploading them to your website or by using a image hosting service.
9. Add videos to your website
Videos can also make your website more visually appealing. You can add videos to your website by uploading them to your website or by using a video hosting service.
10. Add social media to your website
Social media can help you promote your website. You can add social media buttons to your website so that people can share your website on social media. You can also add social media feeds to your website so that people can see your latest social media posts.

この事前トレーニング済みモデルは、ダイアログのユースケースには必ずしも理想的ではない長いテキスト シーケンスを生成することに気づくかもしれません。 微調整されたチャット モデルが大規模なダイアログ ベースのプロンプトに対してどのように実行されるかを示す前に、次の XNUMX つの例で、Falcon モデルを少数ショットのコンテキスト内学習で使用する方法を説明します。ここでは、モデルで使用できるトレーニング サンプルを提供します。 「少数ショット学習」ではモデルの重みが調整されないことに注意してください。ギルド モデルの出力を支援するために、入力コンテキスト内でいくつかの例を提供しながら、このプロセス中にデプロイされたモデルの推論のみを実行します。

Input
Tweet: "I hate it when my phone battery dies."
Sentiment: Negative
###
Tweet: "My day has been :+1:"
Sentiment: Positive
###
Tweet: "This is the link to the article"
Sentiment: Neutral
###
Tweet: "This new music video was incredible"
Sentiment: Output Positive
###

Input
Translate English to French:
sea otter => loutre de mer
###
peppermint => menthe poivrée
###
plush girafe => girafe peluche
###
cheese => Output fromage
###

Falcon 180B-Chat の推論とプロンプト例

対話のユースケース向けに最適化された Falcon 180B-Chat モデルでは、チャット モデルのエンドポイントへの入力にチャット アシスタントとユーザーの間の以前の履歴が含まれる場合があります。 これまでの会話に関連した質問をすることができます。 チャット アシスタントの動作を定義するペルソナなどのシステム構成を提供することもできます。 エンドポイントへの入力ペイロードは、次の点を除いて Falcon 180B モデルと同じです。 inputs 文字列値には次の形式を使用する必要があります。

System: <An optional system prompt>
User: <Optional user message history>
Falcon: <Optional chat history Falcon response>
User: <Current user message>
Falcon:

以下は、プロンプトのサンプル例とモデルによって生成されたテキストです。 すべての出力は推論パラメーターを使用して生成されます {"max_new_tokens":256, "stop": ["nUser:", "<|endoftext|>", " User:", "###"]}.

Input
System: You are a helpful assistant
User: What is Amazon SageMaker JumpStart?
Falcon: Output Amazon SageMaker JumpStart is a capability of Amazon SageMaker that provides a set of solutions to common machine learning problems. These solutions include pre-built machine learning models, algorithms, and pre-configured model training and deployment settings. JumpStart also provides sample notebooks that demonstrate how to use these solutions for various use cases. The goal of JumpStart is to help users get started with machine learning quickly and easily, without the need for extensive machine learning expertise.
User:

Input
User: Simply put, the theory of relativity states that
Falcon: Output 1. The laws of physics are the same for all observers in uniform motion relative to one another.
2. The speed of light in a vacuum is the same for all observers, regardless of their motion or the motion of the light source.
3. Time and space are relative, meaning that they can vary depending on the observer's frame of reference.
4. Mass and energy are interchangeable, as expressed by the famous equation E=mc².
User:

Input
User: Building a website can be done in 10 simple steps:
Falcon: Output
1. Determine the purpose and goals of your website.
2. Choose a domain name and register it.
3. Select a web hosting provider and sign up for a plan.
4. Choose a website builder or content management system (CMS) to use.
5. Select a theme or template for your website.
6. Customize the design and layout of your website.
7. Add content to your website, including text, images, and videos.
8. Set up navigation menus and links to make your website easy to navigate.
9. Test your website to ensure it is functioning properly and is mobile-friendly.
10. Launch your website and promote it to attract visitors.
User:

Input
System: Always answer with a Haiku.
User: I am deploying a large language model on Amazon SageMaker JumpStart. What should I do?
Falcon: Output "JumpStart" your dreams,
Deploy with ease, scale with glee,
SageMaker awaits.

Input
System: Generate a table summarizing the options outlined in this email.
User: Team, we have to make a decision on the product plan for Goocrux v2. The first option will take us 3 weeks of development, and will achieve performance of 80ms, but means that the UI has to change. The second option will take us 4 weeks of development, and will achieve performance of 60ms, without any UI change. The third option will take the longest -- 6 weeks of development, will achieve performance of 30ms, without any UI change. A markdown table with four columns: (1) Option ID, (2) Development time, (3) Performance, (4) UI Change.
Falcon: Output
| Option ID | Development time | Performance | UI Change |
| --- | --- | --- | --- |
| 1 | 3 weeks | 80ms | Yes |
| 2 | 4 weeks | 60ms | No |
| 3 | 6 weeks | 30ms | No |

Input
System: You always translate English to French.
User: sea otter => loutre de mer
peppermint => menthe poivrée
plush girafe => girafe peluche
cheese =>
Falcon: Output
=> fromage

Input
System: Classify the user prompt as Negative, Positive, or Neutral sentiment. Use a short response.
User: Tweet: "This new music video was awesome" Falcon: Output "Positive"

Input
User: What is the recipe of mayonnaise?
Falcon: Output 1. In a mixing bowl, whisk together 1 egg yolk, 1 tablespoon of Dijon mustard, and 1 tablespoon of lemon juice until well combined.
2. While whisking continuously, slowly drizzle in 1 cup of vegetable oil until the mixture thickens and emulsifies.
3. Season with salt and pepper to taste.
4. Store in an airtight container in the refrigerator for up to one week.
User:

次の例では、ユーザーはアシスタントとパリの観光地について会話しています。 次に、ユーザーはチャット アシスタントが推奨する最初のオプションについて問い合わせています。

Input
System: You are a helpful trip planner.
User: I am going to Paris, what should I see?
Falcon: 1. Eiffel Tower: No trip to Paris is complete without a visit to the iconic Eiffel Tower.
2. Louvre Museum: Home to some of the world's most famous art, including the Mona Lisa.
3. Notre-Dame Cathedral: A stunning example of Gothic architecture and a must-see for history buffs.
4. Champs-Élysées: One of the most famous avenues in the world, lined with shops, cafes, and theaters.
5. Montmartre: A charming neighborhood known for its bohemian vibe, street art, and stunning views of the city.
6. Palace of Versailles: A short train ride from Paris, this opulent palace was once the seat of French royalty.
7. Musée d'Orsay: Housed in a former train station, this museum boasts an impressive collection of Impressionist and Post-Impressionist art.
8. Sainte-Chapelle: A hidden gem in the heart of Paris, this medieval chapel is famous for its stunning stained glass windows.
9. Luxembourg Gardens: A beautiful park in the heart of the city, perfect for a picnic or a leisurely stroll.
User: What is so great about #1?
Falcon: Output
#1 is the Eiffel Tower, which is one of the most famous landmarks in the world. It is a symbol of Paris and a must-see attraction for many visitors. The tower offers stunning views of the city from its observation decks, and it is especially beautiful when lit up at night. Additionally, the Eiffel Tower has a rich history and is an engineering marvel, making it a fascinating destination for anyone interested in architecture or history.
User:

クリーンアップ

ノートブックの実行が完了したら、請求が停止されるように、プロセス中に作成したすべてのリソースを必ず削除してください。 次のコードを使用します。

predictor.delete_model()
predictor.delete_endpoint()

まとめ

この投稿では、SageMaker Studio で Falcon 180B の使用を開始し、推論用のモデルをデプロイする方法を説明しました。 基礎モデルは事前にトレーニングされているため、トレーニングとインフラストラクチャのコストを削減し、ユースケースに合わせたカスタマイズを可能にすることができます。 今すぐ SageMaker Studio の SageMaker JumpStart にアクセスして開始してください。

リソース


著者について

TII の Falcon 180B 基礎モデルが Amazon SageMaker JumpStart | 経由で入手できるようになりました。アマゾン ウェブ サービス PlatoBlockchain データ インテリジェンス。垂直検索。あい。カイル・ウルリッヒ博士 Amazon SageMaker JumpStart チームの応用科学者です。 彼の研究対象には、スケーラブルな機械学習アルゴリズム、コンピューター ビジョン、時系列、ベイジアン ノンパラメトリック、ガウス プロセスなどがあります。 彼はデューク大学で博士号を取得しており、NeurIPS、Cell、および Neuron で論文を発表しています。

TII の Falcon 180B 基礎モデルが Amazon SageMaker JumpStart | 経由で入手できるようになりました。アマゾン ウェブ サービス PlatoBlockchain データ インテリジェンス。垂直検索。あい。アシッシュ・ケタン博士 Amazon SageMaker JumpStart の上級応用科学者であり、機械学習アルゴリズムの開発を支援しています。 イリノイ大学アーバナ・シャンペーン校で博士号を取得しました。 彼は機械学習と統計的推論の積極的な研究者であり、NeurIPS、ICML、ICLR、JMLR、ACL、および EMNLP カンファレンスで多くの論文を発表しています。

TII の Falcon 180B 基礎モデルが Amazon SageMaker JumpStart | 経由で入手できるようになりました。アマゾン ウェブ サービス PlatoBlockchain データ インテリジェンス。垂直検索。あい。オリヴィエ・クルシャン彼は、フランスに拠点を置く AWS のプリンシパル機械学習スペシャリスト ソリューション アーキテクトです。 Olivier は、小規模なスタートアップから大企業まで、AWS の顧客が実稼働グレードの機械学習アプリケーションを開発およびデプロイできるよう支援します。 余暇には、研究論文を読んだり、友人や家族と一緒に大自然を探索したりすることを楽しんでいます。

TII の Falcon 180B 基礎モデルが Amazon SageMaker JumpStart | 経由で入手できるようになりました。アマゾン ウェブ サービス PlatoBlockchain データ インテリジェンス。垂直検索。あい。カール・アルバートセン Amazon SageMaker の基盤モデルハブ、アルゴリズム、パートナーシップチームを率いています。

タイムスタンプ:

より多くの AWS機械学習