en_url
stringlengths
70
147
en_title
stringlengths
35
105
en_content
stringlengths
5.28k
21.5k
jp_url
stringlengths
76
153
jp_title
stringlengths
16
72
jp_content
stringlengths
3.21k
16.7k
https://developer.nvidia.com/blog/three-building-blocks-for-creating-ai-virtual-assistants-for-customer-service-with-an-nvidia-nim-agent-blueprint/
Three Building Blocks for Creating AI Virtual Assistants for Customer Service with an NVIDIA AI Blueprint
In today’s fast-paced business environment, providing exceptional customer service is no longer just a nice-to-have—it’s a necessity. Whether addressing technical issues, resolving billing questions, or providing service updates, customers expect quick, accurate, and personalized responses at their convenience. However, achieving this level of service comes with significant challenges. Legacy approaches, such as static scripts or manual processes, often fall short when it comes to delivering personalized and real-time support. Additionally, many customer service operations rely on sensitive and fragmented data, which is subject to strict data governance and privacy regulations. With the rise of generative AI, companies aim to revolutionize customer service by enhancing operational efficiency, cutting costs, and maximizing ROI. Integrating AI into existing systems presents challenges related to transparency, accuracy, and security, which can impede adoption and disrupt workflows. To overcome these hurdles, companies are leveraging generative AI-powered virtual assistants to manage a wide range of tasks, ultimately improving response times and freeing up resources. This post outlines how developers can use the NVIDIA AI Blueprint for AI virtual assistants to scale operations with generative AI. By leveraging this information, including sample code, businesses can meet the growing demands for exceptional customer service while ensuring data integrity and governance. Whether improving existing systems or creating new ones, this blueprint empowers teams to meet customer needs with efficient and meaningful interactions. Smarter AI virtual assistants with an AI query engine using retrieval-augmented generation When building an AI virtual assistant, it’s important to align with the unique use case requirements, institutional knowledge, and needs of the organization. Traditional bots, however, often rely on rigid frameworks and outdated methods that struggle to meet the evolving demands of today’s customer service landscape. Across every industry, AI-based assistants can be transformational. For example, telecommunications companies, and the majority of retail and service providers, can use AI virtual assistants to enhance customer experience by offering support 24 hours a day, 7 days a week while handling a wide range of customer queries in multiple languages and providing dynamic, personalized interactions that streamline troubleshooting and account management. This helps reduce wait times and ensures consistent service across diverse customer needs. Another example is within the healthcare insurance payor industry, where ensuring a positive member experience is critical. Virtual assistants enhance this experience by providing personalized support to members, addressing their claims, coverage inquiries, benefits, and payment issues, all while ensuring compliance with healthcare regulations. This also helps reduce the administrative burden on healthcare workers. With the NVIDIA AI platform, organizations can create an AI query engine that uses retrieval-augmented generation (RAG) to connect AI applications to enterprise data. The AI virtual assistant blueprint enables developers to quickly get started building solutions that provide enhanced customer experiences. It is built using the following NVIDIA NIM microservices: NVIDIA NIM for LLM: Brings the power of state-of-the-art large language models (LLMs) to applications, providing unmatched natural language processing with remarkable efficiency. Llama 3.1 70B Instruct NIM : Powers complex conversations with superior contextual understanding, reasoning, and text generation. NVIDIA NeMo Retriever NIM: This collection provides easy access to state-of-the-art models that serve as foundational building blocks for RAG pipelines. These pipelines, when integrated into virtual assistant solutions, enable seamless access to enterprise data, unlocking institutional knowledge via fast, accurate, and scalable answers. NeMo Retriever Embedding NIM : Boosts text question-answering retrieval performance, providing high-quality embeddings for the downstream virtual assistant. NeMo Retriever Reranking NIM : Enhances the retrieval performance further with a fine-tuned reranker, finding the most relevant passages to provide as context when querying an LLM. The blueprint is designed to integrate seamlessly with existing customer service applications without breaking information security mandates. Thanks to the portability of NVIDIA NIM, organizations can integrate data wherever it resides. By bringing generative AI to the data, this architecture enables AI virtual assistants to provide more personalized experiences tailored to each customer by leveraging their unique profiles, user interaction histories, and other relevant data. A blueprint is a starting point that can be customized for an enterprise’s unique use case.  For example, integrate other NIM microservices, such as the Nemotron 4 Hindi 4B Instruct , to enable an AI virtual assistant to communicate in the local language. Other microservices can enable additional capabilities such as synthetic data generation and model fine-tuning to better align with your specific use case requirements. Give the AI virtual assistant a humanlike interface when connected to the digital human AI Blueprint. With the implementation of a RAG backend with proprietary data (both company and user profile and their specific data), the AI virtual assistant can engage in highly contextual conversations, addressing the specifics of each customer’s needs in real-time. Additionally, the solution operates securely within your existing governance frameworks, ensuring compliance with privacy and security protocols especially when working with sensitive data. Three building blocks for creating your own AI virtual assistant As a developer, you can build your own AI virtual assistant that retrieves the most relevant and up-to-date information, in real time, with ever-improving humanlike responses. Figure 1 shows the AI virtual assistant architecture diagram which includes three functional components. Figure 1. The NVIDIA AI Blueprint for AI virtual assistants 1. Data ingestion and retrieval pipeline Pipeline administrators use the ingestion pipeline to load structured and unstructured data into the databases. Examples of structured data include customer profiles, order history, and order status. Unstructured data includes product manuals, the product catalog, and supporting material such as FAQ documents. 2. AI agent The AI virtual assistant is the second functional component. Users interact with the virtual assistant through a user interface. An AI agent, implemented in the LangGraph agentic LLM programming framework, plans how to handle complex customer queries and solves recursively. The LangGraph agent uses the tool calling feature of the Llama 3.1 70B Instruct NIM to retrieve information from both the unstructured and structured data sources, then generates an accurate response. The AI agent also uses short-term and long-term memory functions to enable multi-turn conversation history. The active conversation queries and responses are embedded so they can be retrieved later in the conversation as additional context. This allows more human-like interactions and eliminates the need for customers to repeat information they’ve already shared with the agent. Finally, at the end of the conversation, the AI agent summarizes the discussion along with a sentiment determination and stores the conversation history in the structured database. Subsequent interactions from the same user can be retrieved as additional context in future conversations. Call summarization and conversation history retrieval can reduce call time and improve customer experience. Sentiment determination can provide valuable insights to the customer service administrator regarding the agent’s effectiveness. 3. Operations pipeline The customer operations pipeline is the third functional component of the overall solution. This pipeline provides important information and insight to the customer service operators. Administrators can use the operations pipeline to review chat history, user feedback, sentiment analysis data, and call summaries. The analytics microservice, which leverages the Llama 3.1 70B Instruct NIM, can be used to generate analytics such as average call time, time to resolution, and customer satisfaction. The analytics are also leveraged as user feedback to retrain the LLM models to improve accuracy. You can find the complete example of how to get started with this Blueprint on the NVIDIA AI Blueprint GitHub repository. Get to production with NVIDIA partners NVIDIA consulting partners are helping enterprises adopt world-class AI virtual assistants built using NVIDIA accelerated computing and NVIDIA AI Enterprise software , which includes NeMo, NIM microservices, and AI Blueprints. Accenture The Accenture AI Refinery built on NVIDIA AI Foundry helps design autonomous, intent-driven customer interactions, enabling businesses to tailor the journey to the individual through innovative channels such as digital humans or interaction agents. Specific use cases can be tailored to meet the needs of each industry, for example, telco call centers, insurance policy advisors, pharmaceutical interactive agents or automotive dealer network agents. Deloitte Deloitte Frontline AI enhances the customer service experience with digital avatars and LLM agents built with NVIDIA AI Blueprints that are accelerated by NVIDIA technologies such as NVIDIA ACE, NVIDIA Omniverse, NVIDIA Riva, and NIM. Wipro Wipro Enterprise Generative AI (WeGA) Studio accelerates industry-specific use cases including contact center agents across healthcare, financial services, retail, and more. Tech Mahindra Tech Mahindra is leveraging the NVIDIA AI Blueprint for digital humans to build solutions for customer service. Using RAG and NVIDIA NeMo, the solution provides the ability for a trainee to stop an agent during a conversation by raising a hand to ask clarifying questions. The system is designed to connect with microservices on the backend with a refined learning management system) which can be deployed across many industry use cases. Infosys Infosys Cortex , part of Infosys Topaz , is an AI-driven customer engagement platform that integrates NVIDIA AI Blueprints and the NVIDIA NeMo, Riva, and ACE technologies for generative AI, speech AI, and digital human capabilities to deliver specialized and individualized, proactive, and on-demand assistance to every member of a customer service organization, consequently playing a pivotal role in enhancing customer experience, improving operational efficiency, and reducing costs. Tata Consultancy Services The Tata Consultancy Services (TCS) virtual agent, powered by NVIDIA NIM, and integrated with ServiceNow’s IT Virtual Agent is designed to optimize IT and HR support. This solution uses prompt-tuning and RAG to improve response times, accuracy, and provide multi-turn conversational capabilities. Benefits include reduced service desk costs, fewer support tickets, enhanced knowledge utilization, faster deployment, and a better overall employee and customer experience. Quantiphi Quantiphi is integrating NVIDIA AI Blueprints into its conversational AI solutions to enhance customer service with lifelike digital avatars. These state-of-the-art avatars, powered by NVIDIA Tokkio and ACE technologies, NVIDIA NIM microservices and NVIDIA NeMo , seamlessly integrate with existing enterprise applications, enhancing operations and customer experiences with increased realism. Fine-tuned NIM deployments for digital avatar workflows have proven to be highly cost-effective, reducing enterprise spending on tokens. SoftServe SoftServe Digital Concierge , accelerated by NVIDIA AI Blueprints and NVIDIA NIM microservices, uses NVIDIA ACE, NVIDIA Riva, and the NVIDIA Audio2Face NIM microservice to deliver a highly realistic virtual assistant. Thanks to the Character Creator tool, it delivers speech and facial expressions with remarkable accuracy and lifelike detail. With RAG capabilities from NVIDIA NeMo Retriever, SoftServe Digital Concierge can intelligently respond to customer queries by referencing context and delivering specific, up-to-date information. It simplifies complex queries into clear, concise answers and can also provide detailed explanations when needed. EXL EXL’s Smart Agent Assist offering is a contact center AI solution leveraging NVIDIA Riva, NVIDIA NeMo, and NVIDIA NIM microservices. EXL plans to augment their solution using the NVIDIA AI Blueprint for AI virtual agents. This week at NVIDIA AI Summit India , NVIDIA consulting partners announced a collaboration with NVIDIA to transform India into a Front Office for AI. Using NVIDIA technologies, these consulting giants can help customers tailor the customer service agent blueprint to build unique virtual assistants using their preferred AI model—including sovereign LLMs from India-based model makers—and run it in production efficiently on the infrastructure of their choice. Get started To try the blueprint for free, and to see system requirements, navigate to the Blueprint Card . To start building applications using those microservices, visit the NVIDIA API catalog . To sign in , you’ll be prompted to enter a personal or business email address to access different options for building with NIM. For more information, see the NVIDIA NIM FAQ . This post was originally published on 10/23/2024.
https://developer.nvidia.com/ja-jp/blog/three-building-blocks-for-creating-ai-virtual-assistants-for-customer-service-with-an-nvidia-nim-agent-blueprint/
NVIDIA AI Blueprint でカスタマヌ サヌビス向けの AI バヌチャル アシスタントを䜜成する 3 ぀の構成芁玠
Reading Time: 2 minutes 今日のめたぐるしいビゞネス環境では、優れたカスタマヌ サヌビスを提䟛するこずは、もはや単に「あれば良いこず」ではなく、「必芁䞍可欠なこず」です。技術的な問題ぞの察応、請求に関する質問の解決、サヌビスの最新情報の提䟛など、顧客は、迅速か぀正確で、顧客の郜合にカスタマむズされた察応を期埅しおいたす。しかし、このレベルのサヌビスを実珟するには、倧きな課題が䌎いたす。 パヌ゜ナラむズされたリアルタむムのサポヌトを提䟛するには、倚くの堎合、静的なスクリプトや手䜜業によるプロセスずいった埓来のアプロヌチでは䞍十分です。さらに、倚くのカスタマヌ サヌビス業務では、機密性が高くか぀断片的なデヌタを取り扱うこずになり、厳しいデヌタ管理ずプラむバシヌ芏制の察象ずなりたす。生成 AI の台頭により、䌁業は運甚効率の向䞊、コスト削枛、ROI の最倧化によっおカスタマヌ サヌビスに革呜を起こすこずを目指しおいたす。 AI を既存のシステムに組み蟌む際には、透明性、粟床、セキュリティに関する課題に盎面し、導入を劚げ、ワヌクフロヌを䞭断させるこずもあるかもしれたせん。こうしたハヌドルを克服するために、䌁業は生成 AI を掻甚したバヌチャル アシスタントを利甚しお幅広いタスクを管理し、最終的に応答時間を短瞮しお、リ゜ヌスを解攟しおいたす。 この投皿では、開発者が、 AI バヌチャル アシスタントに NVIDIA AI Blueprint を䜿甚しお、生成 AI で業務を拡匵する方法に぀いお説明したす。サンプル コヌドを含むこの情報を掻甚するこずで、䌁業は、デヌタの敎合性ずデヌタ ガバナンスを確保しながら、優れたカスタマヌ サヌビスぞの高たる芁求に応えるこずができたす。既存のシステムの改善たたは新しいシステムの構築にかかわらず、この Blueprint によっおチヌムは効率的で意味のあるやりずりを通じお顧客のニヌズに察応するこずができたす。 怜玢拡匵生成 (RAG) を䜿甚した AI ク゚リ ゚ンゞンによるスマヌトな AI バヌチャル アシスタント AI バヌチャル アシスタントを構築する堎合、独自のナヌス ケヌス芁件および組織の知識やニヌズに合わせお調敎するこずが重芁です。埓来のボットでは、倚くの堎合、柔軟性の乏しいフレヌムワヌクず時代遅れのメ゜ッドを利甚しおおり、今日のカスタマヌ サヌビスのような垞に倉化し続ける芁求に察応できたせん。 あらゆる業界で、AI ベヌスのアシスタントが革新的な存圚ずなり埗たす。たずえば、通信䌚瀟や小売、サヌビス プロバむダヌの倧倚数は、AI バヌチャル アシスタントを䜿甚しお、24 時間 365 日皌働するサポヌトを提䟛しながら、倚蚀語で幅広い顧客の問い合わせに察応し、トラブルシュヌティングやアカりント管理を合理化する、ダむナミックでパヌ゜ナラむズされたやりずりを提䟛するこずで、顧客䜓隓を向䞊させこずができたす。これにより、埅ち時間を短瞮し、さたざたな顧客ニヌズに察しお䞀貫したサヌビスを提䟛するこずができたす。 もうひず぀の䟋ずしお、医療保険の支払業界では、加入者にずっお満足床の高い䜓隓を確実に提䟛するこずが重芁です。バヌチャル アシスタントは、医療芏制の遵守を確保しながら、加入者にパヌ゜ナラむズされたサポヌトを提䟛し、請求、補償に関する問い合わせ、絊付金、支払いに関する問題に察凊するこずで、こうした䜓隓を向䞊しおいたす。これにより、医療埓事者の管理䞊の負担を軜枛するこずもできたす。 NVIDIA AI プラットフォヌムを䜿甚するこずで、䌁業は、 怜玢拡匵生成 (RAG) を䜿甚する AI ク゚リ ゚ンゞンを䜜成し、AI アプリケヌションを䌁業デヌタに接続するこずができたす。AI バヌチャル アシスタントの Blueprint により、開発者は、より掗緎された顧客䜓隓を提䟛する゜リュヌションを迅速に構築し開始するこずができたす。この Blueprint は、以䞋の NVIDIA NIM マむクロサヌビスを䜿甚しお構築されたす。 LLM 向け NVIDIA NIM: 最先端の倧芏暡蚀語モデル (LLM) のパワヌをアプリケヌションに取り入れ、倧幅に効率化しお、卓越した自然蚀語凊理を提䟛したす。 Llama 3.1 70B Instruct NIM : 優れた文脈理解、掚論、テキスト生成で耇雑な䌚話が可胜です。 NVIDIA NeMo Retriever NIM: RAG パむプラむンの基瀎ずなる構成芁玠である最先端モデルに簡単にアクセスできたす。この RAG パむプラむンによっお、バヌチャル アシスタントは䌁業デヌタぞのシヌムレスなアクセスが可胜になり、迅速か぀正確でスケヌラブルな回答で、組織の知識を掻甚できたす。 NeMo Retriever Embedding NIM : テキストの QA 怜玢タスクに特化されおおり、バヌチャル アシスタントはこの高品質のテキスト埋め蟌みを利甚したす。 NeMo Retriever Reranking NIM : ファむンチュヌニングされたリランキング モデルであり、埋め蟌みモデルず䜵甚するこずで怜玢性胜をさらに向䞊させるこずができたす。入力文に最も関連性の高い文章を芋付け出し、LLM に文脈ずしお枡したす。 この Blueprint は、情報セキュリティに関する矩務に反するこずなく、既存のカスタマヌ サヌビス アプリケヌションずシヌムレスに統合できるように蚭蚈されおいたす。NVIDIA NIM の移怍性のおかげで、䌁業は、デヌタがどこにあっおも統合するこずができたす。生成 AI をデヌタに取り入れるこずで、AI バヌチャル アシスタントは、顧客固有のプロファむル、ナヌザヌずの察話履歎、その他の関連デヌタなどを掻甚しお、各顧客に合わせたよりパヌ゜ナラむズされた䜓隓を提䟛できるようになりたす。 Blueprint は、䌁業独自のナヌス ケヌスに合わせおカスタマむズが可胜な ”土台” のようなものです。たずえば、 Nemotron 4 Hindi 4B Instruct など他の NIM マむクロサヌビスを統合すれば、AI バヌチャル アシスタントが珟地の蚀語でコミュニケヌションできるようになりたす。その他のマむクロサヌビスにより、合成デヌタの生成やモデルのファむンチュヌニングなどの远加機胜が可胜になり、特定のナヌス ケヌス芁件に適合させるこずができたす。たた、デゞタル ヒュヌマン AI Blueprint に接続するず、AI バヌチャル アシスタントに人間のようなむンタヌフェむスが提䟛されたす。 独自のデヌタ (䌁業やナヌザヌのプロファむル、特定のデヌタ) を備えた RAG バック゚ンドを実装するこずで、AI バヌチャル アシスタントは、文脈に沿った察話を行い、リアルタむムで各顧客のニヌズの特定事項に察応するこずができたす。さらに、この゜リュヌションはすでに運甚しおいるガバナンス フレヌムワヌク内で安党に運甚され、特に機密デヌタを扱う際には、プラむバシヌずセキュリティ プロトコルの遵守を保蚌したす。 独自の AI バヌチャル アシスタントを構築する 3 ぀の構成芁玠 開発者ずしお、最も関連性の高い最新の情報をリアルタむムで取埗し、垞に人間のような応答ができるよう日々進化する独自の AI バヌチャル アシスタントを構築できたす。図 1 は、3 ぀の機胜コンポヌネントを含む AI バヌチャル アシスタントのアヌキテクチャ図です。 図 1. AI バヌチャル アシスタント向けの NVIDIA AI Blueprint 1. デヌタの取り蟌みず怜玢パむプラむン パむプラむン管理者は、取り蟌み (Ingest) パむプラむンを䜿甚しお、構造化デヌタや非構造化デヌタをデヌタベヌスに読み蟌むこずができたす。構造化デヌタの䟋ずしお、顧客プロファむル、泚文履歎、発送状況などがありたす。非構造化デヌタには、補品マニュアル、補品カタログ、FAQ ドキュメントなどのサポヌト資料が含たれたす。 2. AI ゚ヌゞェント 2 ぀目の機胜コンポヌネントは AI バヌチャル アシスタント です。ナヌザヌは、ナヌザヌ むンタヌフェむスを介しおバヌチャル アシスタントず察話したす。゚ヌゞェント型 LLM プログラミング フレヌムワヌクである LangGraph で実装された AI ゚ヌゞェントが、顧客からの耇雑な問い合わせに察応する方法を蚈画し、その問い合わせを再垰的に解決したす。LangGraph ゚ヌゞェントは Llama3.1 70B Instruct NIM のツヌル呌び出し機胜を䜿甚しお、非構造化デヌタず構造化デヌタの䞡方から情報を取埗し、正確な応答を生成したす。 たた AI ゚ヌゞェントにより、短期メモリず長期メモリの機胜を䜿甚しおマルチタヌンの察話履歎を実珟できたす。アクティブな䌚話に察する問い合わせや応答が埋め蟌たれおいるため、䌚話の埌半で远加の文脈ずしお怜玢し利甚できたす。これにより、より人間に近いやりずりが可胜になり、顧客がすでに゚ヌゞェントず共有した情報を繰り返す提䟛する必芁がなくなりたす。 最終的に、䌚話の最埌に AI ゚ヌゞェントが感情の刀定ずずもに議論を芁玄し、構造化デヌタベヌスに䌚話履歎を保存したす。ナヌザヌずの察話は、今埌の䌚話で远加の文脈ずしお怜玢できたす。通話の芁玄ず䌚話履歎を怜玢するこずで、通話時間を短瞮し、顧客䜓隓を向䞊させるこずができたす。感情刀定によっお、゚ヌゞェントの有効性に関する貎重な掞察をカスタマヌ サヌビス管理者に提䟛できたす。 3. 運甚パむプラむン 顧客運甚パむプラむンは、゜リュヌション党䜓の 3 ぀目の構成芁玠です。このパむプラむンは、カスタマヌ サヌビス オペレヌタヌに重芁な情報ず掞察を提䟛したす。管理者は、運甚パむプラむンを䜿甚しお、チャット履歎、ナヌザヌのフィヌドバック、感情分析デヌタ、通話の芁玄を確認するこずができたす。Llama 3.1 70B Instruct NIM を掻甚した分析マむクロサヌビスを䜿甚しお、平均通話時間、解決たでの時間、顧客満足床などの分析を生成できたす。たた分析結果は、ナヌザヌ フィヌドバックずしおも掻甚され、LLM モデルを再トレヌニングしお粟床を向䞊したす。 NVIDIA パヌトナヌず本番環境に着手 NVIDIA のコンサルティング パヌトナヌは、各䌁業が、NVIDIA アクセラレヌテッド コンピュヌティングず、NeMo、NIM マむクロサヌビス、AI Blueprint を含む NVIDIA AI Enterprise ゜フトりェア で構築された䞖界氎準の AI バヌチャル アシスタントを導入できるように支揎しおいたす。 Accenture NVIDIA AI Foundry 䞊に構築された Accenture AI Refinery は、自埋的で顧客の意図に沿った察話を蚭蚈し、䌁業がデゞタル ヒュヌマンやむンタラクション ゚ヌゞェントなどの革新的なチャネルを通じお、個人に合わせおカスタマむズできるようにしたす。特定のナヌス ケヌスは、通信䌚瀟のコヌル センタヌ、保険契玄のアドバむザヌ、医薬品のむンタラクティブ ゚ヌゞェント、自動車ディヌラヌのネットワヌク ゚ヌゞェントなど、各業界のニヌズに合わせおカスタマむズできたす。 Deloitte Deloitte Frontline AI は、NVIDIA ACE、NVIDIA Omniverse、NVIDIA Riva、NIM などの NVIDIA のテクノロゞによっお加速された NVIDIA AI Blueprint を利甚しお構築されたデゞタル アバタヌや LLM ゚ヌゞェントでカスタマヌ サヌビス䜓隓を向䞊しおいたす。 Wipro Wipro Enterprise Generative AI (WeGA) Studio は、ヘルスケア、金融サヌビス、小売などのコンタクト センタヌの゚ヌゞェントを含む業界固有のナヌス ケヌスを加速しおいたす。 Tech Mahindra Tech Mahindra は、デゞタル ヒュヌマン向けの NVIDIA AI Blueprint を掻甚しお、カスタマヌ サヌビス向けの゜リュヌションを構築しおいたす。RAG ず NVIDIA NeMo を䜿甚したこの゜リュヌションは、トレヌニング受講者が、䌚話䞭に手を挙げお明確な質問をするこずで、゚ヌゞェントを止める機胜を提䟛したす。このシステムは、倚くの業界のナヌス ケヌスでデプロむできる掗緎された孊習管理システムで、バック゚ンドのマむクロサヌビスず接続するように蚭蚈されおいたす。 Infosys Infosys Topaz の䞀郚である Infosys Cortex は、AI を掻甚した顧客゚ンゲヌゞメント プラットフォヌムであり、生成 AI、スピヌチ AI、デゞタル ヒュヌマン機胜を実珟する NVIDIA AI Blueprint ず NVIDIA NeMo、Riva、ACE 技術を統合し、カスタマヌ サヌビス組織のあらゆるメンバヌに専門的で個人に合わせたプロアクティブか぀オンデマンドの支揎を提䟛するこずで、顧客䜓隓の向䞊、運甚効率の改善、コスト削枛に重芁な圹割を果たしたす。 Tata Consultancy Services NVIDIA NIM を搭茉し ServiceNow の IT 仮想゚ヌゞェントず統合された Tata Consultancy Services (TCS) の仮想゚ヌゞェントは、IT ず HR のサポヌトを最適化するように蚭蚈されおいたす。この゜リュヌションは、プロンプト チュヌニングず RAG を䜿甚しお、応答時間、粟床を向䞊させ、マルチタヌンの䌚話機胜を提䟛したす。サヌビス デスクのコスト削枛、サポヌト チケットの枛少、ナレッゞ掻甚の匷化、より迅速なデプロむ、そしお埓業員ず顧客の党䜓的な䜓隓の向䞊などのメリットがありたす。 Quantiphi Quantiphi は、NVIDIA AI Blueprint を察話型 AI ゜リュヌションに統合し、リアルなデゞタル アバタヌでカスタマヌ サヌビスを匷化しおいたす。NVIDIA Tokkio ず ACE、 NVIDIA NIM マむクロサヌビス 、 NVIDIA NeMo を搭茉した最先端のアバタヌが、既存の゚ンタヌプラむズ アプリケヌションずシヌムレスに統合し、リアリティを高めながら運甚ず顧客䜓隓を向䞊させたす。デゞタル アバタヌ ワヌクフロヌにファむンチュヌニングされた NIM のデプロむは、費甚察効果が高く、䌁業のトヌクンに察する支出を削枛するこずが実蚌されおいたす。 SoftServe SoftServe Digital Concierge は、NVIDIA AI Blueprint ず NVIDIA NIM マむクロサヌビスによっお加速されおおり、NVIDIA ACE、NVIDIA Riva、NVIDIA Audio2Face NIM マむクロサヌビスを䜿甚しお、非垞にリアルなバヌチャル アシスタントを提䟛したす。Character Creator ツヌルを䜿甚するこずで、音声や顔の衚情を驚くほど正確か぀リアルに詳现を再珟できたす。 NVIDIA NeMo Retriever の RAG 機胜により、SoftServe Digital Concierge は、文脈を参照し、特定の最新情報を提䟛するこずで、顧客からの問い合わせにむンテリゞェントに察応できたす。耇雑な問い合わせを簡玠化し、明確で簡朔な回答にたずめ、必芁に応じお詳现な説明を提䟛するこずもできたす。 EXL EXL の Smart Agent Assist 補品は、NVIDIA Riva、NVIDIA NeMo、NVIDIA NIM マむクロサヌビスを掻甚したコンタクト センタヌ AI ゜リュヌションです。EXL は、AI 仮想゚ヌゞェント向けの NVIDIA AI Blueprint を䜿甚しお、゜リュヌションを匷化する予定です。 NVIDIA AI Summit India で、NVIDIA コンサルティング パヌトナヌが、むンドを AI のフロント オフィスに倉革するために、NVIDIA ずのコラボレヌションを発衚したした。NVIDIA テクノロゞを䜿甚するこずで、これらのコンサルティング倧手は、顧客がカスタマヌ サヌビス ゚ヌゞェントの Blueprint をカスタマむズし、奜みの AI モデル (むンドに拠点を眮くモデル メヌカヌが提䟛する゜ブリン LLM を含む) を䜿甚しお独自のバヌチャル アシスタントを構築し、垌望のむンフラで効率的に本番皌動できるようにしたす。 今すぐ始める Blueprint を無料で詊したり、システム芁件を確認するには、 Blueprint カヌド をご参照ください。これらのマむクロサヌビスを䜿甚しおアプリケヌションの構築を始めるには、 NVIDIA API カタログ にアクセスしおください。 サむンむン するには、NIM で構築するさたざたなオプションにアクセスするため、個人甚たたはビゞネス甚のメヌル アドレスを入力する必芁がありたす。詳现に぀いおは、 NVIDIA NIM FAQ をご芧ください。 関連情報 GTC セッション: 金融郚門向けの安党で効率的なバヌチャル アシスタント GTC セッション: 生成 AI の課題ぞの察応ず可胜性の掻甚: NVIDIA の゚ンタヌプラむズ デプロむから埗られた掞察 NGC コンテナヌ: retail-shopping-advisor-chatbot-service NGC コンテナヌ: retail-shopping-advisor-frontend-service りェビナヌ: 金融サヌビス コンタクト センタヌ向けの AI 音声察応バヌチャル アシスタントの構築ず導入方法 りェビナヌ: 通信䌁業が察話型 AI で顧客䜓隓を倉革する方法
https://developer.nvidia.com/blog/hymba-hybrid-head-architecture-boosts-small-language-model-performance/
Hymba Hybrid-Head Architecture Boosts Small Language Model Performance
Transformers, with their attention-based architecture, have become the dominant choice for language models (LMs) due to their strong performance, parallelization capabilities, and long-term recall through key-value (KV) caches. However, their quadratic computational cost and high memory demands pose efficiency challenges. In contrast, state space models (SSMs) like Mamba and Mamba-2 offer constant complexity and efficient hardware optimization but struggle with memory recall tasks, affecting their performance on general benchmarks. NVIDIA researchers recently proposed Hymba , a family of small language models (SLMs) featuring a hybrid-head parallel architecture that integrates transformer attention mechanisms with SSMs to achieve both enhanced efficiency and improved performance. In Hymba, attention heads provide high-resolution recall, while SSM heads enable efficient context summarization. The novel architecture of Hymba reveals several insights: Overhead in attention: Over 50% of attention computation can be replaced by cheaper SSM computation. Local attention dominance: Most global attention can be replaced by local attention without sacrificing performance on general and recall-intensive tasks, thanks to the global information summarized by SSM heads. KV cache redundancy: Key-value cache is highly correlated across heads and layers, so it can be shared across heads (group query attention) and layers (cross-layer KV cache sharing). Softmax attention limitation: Attention mechanisms are constrained to sum to one, limiting sparsity, and flexibility. We introduce learnable meta-tokens that are prepended to prompts, storing critical information and alleviating the “forced-to-attend” burden associated with attention mechanisms. This post shows that Hymba 1.5B performs favorably against state-of-the-art open-source models of similar size, including Llama 3.2 1B, OpenELM 1B, Phi 1.5, SmolLM2 1.7B, Danube2 1.8B, and Qwen2.5 1.5B. Compared to Transformer models of similar size, Hymba also achieves higher throughput and requires 10x less memory to store cache. Hymba 1.5B is released to the Hugging Face collection and GitHub . Hymba 1.5B performance Figure 1 compares Hymba 1.5B against sub-2B models (Llama 3.2 1B, OpenELM 1B, Phi 1.5, SmolLM2 1.7B, Danube2 1.8B, Qwen2.5 1.5B) in terms of average task accuracy, cache size (MB) relative to sequence length, and throughput (tok/sec). Figure 1. Performance comparison of Hymba 1.5B Base against sub-2B models In this set of experiments, the tasks include MMLU, ARC-C, ARC-E, PIQA, Hellaswag, Winogrande, and SQuAD-C. The throughput is measured on an NVIDIA A100 GPU with a sequence length of 8K and a batch size of 128 using PyTorch. For models encountering out of memory (OOM) issues during throughput measurement, the batch size was halved until the OOM is resolved to measure the maximal achievable throughput without OOM. Hymba model design SSMs such as Mamba were introduced to address the quadratic complexity and large inference-time KV cache issues of transformers. However, due to their low-resolution memory, SSMs struggle with memory recall and performance. To overcome these limitations, we propose a road map for developing efficient and high-performing small LMs in Table 1. Configuration Commonsense reasoning (%) ↑ Recall (%) ↑ Throughput (token/sec) ↑ Cache size (MB) ↓ Design reason Ablations on 300M model size and 100B training tokens Transformer (Llama) 44.08 39.98 721.1 414.7 Accurate recall while inefficient State-space models (Mamba) 42.98 19.23 4720.8 1.9 Efficient while inaccurate recall A. + Attention heads (sequential) 44.07 45.16 776.3 156.3 Enhance recall capabilities B. + Multi-head heads (parallel) 45.19 49.90 876.7 148.2 Better balance of two modules C. + Local / global attention 44.56 48.79 2399.7 41.2 Boost compute/cache efficiency D. + KV cache sharing 45.16 48.04 2756.5 39.4 Cache efficiency E. + Meta-tokens 45.59 51.79 2695.8 40.0 Learned memory initialization Scaling to 1.5B model size and 1.5T training tokens F. + Size / data 60.56 64.15 664.1 78.6 Further boost task performance G. + Extended context length (2K→8K) 60.64 68.79 664.1 78.6 Improve multishot and recall tasks Table 1. Design road map of the Hymba model Fused hybrid modules Fusing attention and SSM heads in parallel within a hybrid-head module outperforms sequential stacking, according to the ablation study. Hymba fuses attention and SSM heads in parallel within a hybrid head module, enabling both heads to process the same information simultaneously. This architecture improves reasoning and recall accuracy. Figure 2. The hybrid-head module in Hymba Efficiency and KV cache optimization While attention heads improve task performance, they increase KV cache requirements and reduce throughput. To mitigate this, Hymba optimizes the hybrid-head module by combining local and global attention and employing cross-layer KV cache sharing. This improves throughput by 3x and reduces cache by almost 4x without sacrificing performance. Figure 3. Hymba model architecture Meta-tokens A set of 128 pretrained embeddings prepended to inputs, functioning as learned cache initialization to enhance focus on relevant information. These tokens serve a dual purpose: Mitigating attention drain by acting as backstop tokens, redistributing attention effectively Encapsulating compressed world knowledge Figure 4. Interpretation of Hymba from the memory aspect Model analysis This section presents an apples-to-apples comparison across different architectures under the same training settings. We then visualize the attention maps of SSM and Attention in different pretrained models. Finally, we perform head importance analysis for Hymba through pruning. All the analyses in this section help to illustrate how and why the design choices for Hymba are effective. Apples-to-apples comparison We performed an apples-to-apples comparison of Hymba, pure Mamba2, Mamba2 with FFN, Llama3 style, and Samba style (Mamba-FFN-Attn-FFN) architectures. All models have 1 billion parameters and are trained from scratch for 100 billion tokens from SmolLM-Corpus with exactly the same training recipe. All results are obtained through lm-evaluation-harness using a zero-shot setting on Hugging Face models. Hymba performs the best on commonsense reasoning as well as question answering and recall-intensive tasks. Table 2 compares various model architectures on language modeling and recall-intensive and commonsense reasoning tasks, with Hymba achieving strong performance across metrics. Hymba demonstrates the lowest perplexity in language tasks (18.62 for Wiki and 10.38 for LMB) and solid results in recall-intensive tasks, particularly in SWDE (54.29) and SQuAD-C (44.71), leading to the highest average score in this category (49.50). Model Language (PPL) ↓ Recall intensive (%) ↑ Commonsense reasoning (%) ↑ Mamba2 15.88 43.34 52.52 Mamba2 w/ FFN 17.43 28.92 51.14 Llama3 16.19 47.33 52.82 Samba 16.28 36.17 52.83 Hymba 14.5 49.5 54.57 Table 2. Comparison of architectures trained on 100 billion tokens under the same settings In commonsense reasoning and question answering, Hymba outperforms other models in most tasks, such as SIQA (31.76) and TruthfulQA (31.64), with an average score of 54.57, slightly above Llama3 and Mamba2. Overall, Hymba stands out as a balanced model, excelling in both efficiency and task performance across diverse categories. Attention map visualization We further categorized elements in the attention map into four types: Meta: Attention scores from all real tokens to meta-tokens. This category reflects the model’s preference for attending to meta-tokens. In attention maps, they are usually located in the first few columns (for example, 128 for Hymba) if a model has meta-tokens. BOS: Attention scores from all real tokens to the beginning-of-sequence token. In the attention map, they are usually located in the first column right after the meta-tokens. Self: Attention scores from all real tokens to themselves. In the attention map, they are usually located in the diagonal line. Cross: Attention scores from all real tokens to other real tokens. In the attention map, they are usually located in the off-diagonal area. The attention pattern of Hymba is significantly different from that of vanilla Transformers. In vanilla Transformers, attention scores are more concentrated on BOS, which is consistent with the findings in Attention Sink. In addition, vanilla Transformers also have a higher proportion of Self attention scores. In Hymba, meta-tokens, attention heads, and SSM heads work complementary to each other, leading to a more balanced distribution of attention scores across different types of tokens. Specifically, meta-tokens offload the attention scores from BOS, enabling the model to focus more on the real tokens. SSM heads summarize the global context, which focuses more on current tokens (Self attention scores). Attention heads, on the other hand, pay less attention to Self and BOS tokens, and more attention to other tokens (that is, Cross attention scores). This suggests that the hybrid-head design of Hymba can effectively balance the attention distribution across different types of tokens, potentially leading to better performance. Figure 5. Schematics of the attention map of Hymba as a combination of meta-tokens, sliding window attention, and Mamba contributions Figure 6. Sum of the attention score from different categories in Llama 3.2 3B and Hymba 1.5B Heads importance analysis We analyzed the relative importance of attention and SSM heads in each layer by removing them and recording the final accuracy. Our analysis reveals the following: The relative importance of attention/SSM heads in the same layer is input-adaptive and varies across tasks, suggesting that they can serve different roles when handling various inputs. The SSM head in the first layer is critical for language modeling, and removing it causes a substantial accuracy drop to random guess levels. Generally, removing one attention/SSM head results in an average accuracy drop of 0.24%/1.1% on Hellaswag, respectively. Figure 7. The achieved accuracy, measured using 1K samples from Hellaswag, after removing the Attention or SSM heads in each layer Model architecture and training best practices This section outlines key architectural decisions and training methodologies for Hymba 1.5B Base and Hymba 1.5B Instruct. Model architecture Hybrid architecture: Mamba is great at summarization and usually closer focuses on the current token, while attention is more precise and acts as snapshot memory. Combining them in parallel merges these benefits, but standard sequential fusion does not. We chose a 5:1 parameter ratio between SSM and attention heads. Sliding window attention: Full attention heads are preserved in three layers (first, last, and middle), with sliding window attention heads used in the remaining 90% layers. Cross-layer KV cache sharing: Implemented between every two consecutive attention layers. It is done in addition to GQA KV cache sharing between heads. Meta-tokens: These 128 tokens are learnable with no supervision, helping to avoid entropy collapse problems in large language models (LLMs) and mitigate the attention sink phenomenon. Additionally, the model stores general knowledge in these tokens. Training best practices Pretraining: We opted for two-stage base model training. Stage 1 maintained a constant large learning rate and used less filtered large corpus data. Continuous learning rate decay was then performed to 1e-5 using high-quality data. This approach enables continuous training and resuming of Stage 1. Instruction fine-tuning: Instruct model tuning is performed in three stages. First, SFT-1 provides the model with strong reasoning abilities by training on code, math, function calling, role play, and other task-specific data. Second, SFT-2 teaches the model to follow human instructions. Finally, DPO is leveraged to align the model with human preferences and improve the model’s safety. Figure 8. Training pipeline adapted for the Hymba model family Performance and efficiency evaluation With only 1.5T pretraining tokens, the Hymba 1.5B model performs the best among all small LMs and achieves better throughput and cache efficiency than all transformer-based LMs. For example, when benchmarking against the strongest baseline, Qwen2.5, which is pretrained on 13x more tokens, Hymba 1.5B achieves a 1.55% average accuracy improvement, 1.41x throughput, and 2.90x cache efficiency. Compared to the strongest small LM trained on fewer than 2T tokens, namely h2o-danube2, our method achieves a 5.41% average accuracy improvement, 2.45x throughput, and 6.23x cache efficiency. Model # Para-ms Train tokens Token per sec Cache (MB) MMLU 5- shot ARC-E 0-shot ARC-C 0-shot PIQA 0-shot Wino. 0-shot Hella. 0-shot SQuAD -C 1-shot Avg Open ELM-1 1.1B 1.5T 246 346 27.06 62.37 19.54 74.76 61.8 48.37 45.38 48.57 Rene v0.1 1.3B 1.5T 800 113 32.94 67.05 31.06 76.49 62.75 51.16 48.36 52.83 Phi 1.5 1.3B 0.15T 241 1573 42.56 76.18 44.71 76.56 72.85 48 30.09 55.85 Smol LM 1.7B 1T 238 1573 27.06 76.47 43.43 75.79 60.93 49.58 45.81 54.15 Cosmo 1.8B .2T 244 1573 26.1 62.42 32.94 71.76 55.8 42.9 38.51 47.2 h20 dan-ube2 1.8B 2T 271 492 40.05 70.66 33.19 76.01 66.93 53.7 49.03 55.65 Llama 3.2 1B 1.2B 9T 535 262 32.12 65.53 31.39 74.43 60.69 47.72 40.18 50.29 Qwen 2.5 1.5B 18T 469 229 60.92 75.51 41.21 75.79 63.38 50.2 49.53 59.51 AMD OLMo 1.2B 1.3T 387 1049 26.93 65.91 31.57 74.92 61.64 47.3 33.71 48.85 Smol LM2 1.7B 11T 238 1573 50.29 77.78 44.71 77.09 66.38 53.55 50.5 60.04 Llama 3.2 3B 3.0B 9T 191 918 56.03 74.54 42.32 76.66 69.85 55.29 43.46 59.74 Hymba 1.5B 1.5T 664 79 51.19 76.94 45.9 77.31 66.61 53.55 55.93 61.06 Table 2. Hymba 1.5B Base model results Instructed models The Hymba 1.5B Instruct model achieves the highest performance on an average of all tasks, outperforming the previous state-of-the-art model, Qwen 2.5 Instruct, by around 2%. Specifically, Hymba 1.5B surpasses all other models in GSM8K/GPQA/BFCLv2 with a score of 58.76/31.03/46.40, respectively. These results indicate the superiority of Hymba 1.5B, particularly in areas requiring complex reasoning capabilities. Model # Params MMLU ↑ IFEval ↑ GSM8K ↑ GPQA ↑ BFCLv2 ↑ Avg. ↑ SmolLM 1.7B 27.80 25.16 1.36 25.67 -* 20.00 OpenELM 1.1B 25.65 6.25 56.03 21.62 -* 27.39 Llama 3.2 1.2B 44.41 58.92 42.99 24.11 20.27 38.14 Qwen2.5 1.5B 59.73 46.78 56.03 30.13 43.85 47.30 SmolLM2 1.7B 49.11 55.06 47.68 29.24 22.83 40.78 Hymba 1.5B 1.5B 52.79 57.14 58.76 31.03 46.40 49.22 Table 3. Hymba 1.5B Instruct model results Conclusion The new Hymba family of small LMs features a hybrid-head architecture that combines the high-resolution recall capabilities of attention heads with the efficient context summarization of SSM heads. To further optimize the performance of Hymba, learnable meta-tokens are introduced to act as a learned cache for both attention and SSM heads, enhancing the model’s focus on salient information. Through the road map of Hymba, comprehensive evaluations, and ablation studies, Hymba sets new state-of-the-art performance across a wide range of tasks, achieving superior results in both accuracy and efficiency. Additionally, this work provides valuable insights into the advantages of hybrid-head architectures, offering a promising direction for future research in efficient LMs. Learn more about Hybma 1.5B Base and Hymba 1.5B Instruct . Acknowledgments This work would not have been possible without contributions from many people at NVIDIA, including Wonmin Byeon, Zijia Chen, Ameya Sunil Mahabaleshwarkar, Shih-Yang Liu, Matthijs Van Keirsbilck, Min-Hung Chen, Yoshi Suhara, Nikolaus Binder, Hanah Zhang, Maksim Khadkevich, Yingyan Celine Lin, Jan Kautz, Pavlo Molchanov, and Nathan Horrocks.
https://developer.nvidia.com/ja-jp/blog/hymba-hybrid-head-architecture-boosts-small-language-model-performance/
Hymba ハむブリッド ヘッド アヌキテクチャが小芏暡蚀語モデルのパフォヌマンスを向䞊
Reading Time: 4 minutes Transformer は、その Attention ベヌスのアヌキテクチャによる、匷力なパフォヌマンス、䞊列化胜力、および KV (Key-Value) キャッシュを通じた長期蚘憶のおかげで、蚀語モデル (LM) の䞻流ずなっおいたす。しかし、二次蚈算コストず高いメモリ芁求により、効率性に課題が生じおいたす。これに察し、Mamba や Mamba-2 のような状態空間モデル (SSMs) は、耇雑さを䞀定にしお効率的なハヌドりェア最適化を提䟛したすが、メモリ想起タスクが苊手でそれは䞀般的なベンチマヌクでのパフォヌマンスに圱響を䞎えおいたす。 NVIDIA の研究者は最近、効率性ずパフォヌマンスの䞡方を向䞊させるために、Transformer の Attention メカニズムを SSM ず統合したハむブリッド ヘッド䞊列アヌキテクチャを特城ずする小芏暡蚀語モデル (SLM) ファミリである Hymba を提案したした。Hymba では、Attention ヘッドが高解像床の蚘憶胜力を提䟛し、SSM ヘッドが効率的なコンテキストの芁玄を可胜にしたす。 Hymba の新たなアヌキテクチャは、いく぀かの掞察を明らかにしおいたす。 Attention のオヌバヌヘッド: Attention 蚈算の 50% 以䞊を、より安䟡な SSM 蚈算に眮き換えるこずができたす。 ロヌカル Attention の優䜍性: SSM ヘッドにより芁玄されたグロヌバル情報のおかげで、䞀般的なタスクやメモリ想起に集䞭するタスクのパフォヌマンスを犠牲にするこずなく、ほずんどのグロヌバル Attention をロヌカル Attention に眮き換えるこずができたす。 KV キャッシュ冗長性: Key-value キャッシュは、ヘッド間ずレむダヌ間で高い盞関性があるため、ヘッド間 (GQA: Group Query Attention) およびレむダヌ間 (Cross-layer KV キャッシュ共有) で共有できたす。 Softmax の Attention の制限: Attention メカニズムは、合蚈が 1 になるように制限されおおり、疎性ず柔軟性に制限がありたす。NVIDIA は、プロンプトの先頭に孊習可胜なメタトヌクンを導入し、重芁な情報を栌玍し、Attention メカニズムに関連する「匷制的に Attention を行う」負担を軜枛したす。 この蚘事では、Hymba 1.5B が同様の芏暡である最先端のオヌプン゜ヌス モデル、Llama 3.2 1B、OpenELM 1B、Phi 1.5、SmolLM2 1.7B、Danube2 1.8B、Qwen2.5 1.5B などず比范しお、良奜なパフォヌマンスを発揮するこずが瀺されおいたす。同等のサむズの Transformer モデルず比范するず、Hymba はより高いスルヌプットを発揮し、キャッシュを保存するために必芁なメモリが 10 分の 1 で枈みたす。 Hymba 1.5B は Hugging Face コレクションず GitHub で公開されおいたす。 Hymba 1.5B のパフォヌマンス 図 1 は、Hymba 1.5B ず 2B 未満のモデル (Llama 3.2 1B、OpenELM 1B、Phi 1.5、SmolLM2 1.7B、Danube2 1.8B、Qwen2.5 1.5B) を、平均タスク粟床、シヌケンス長に察するキャッシュ サむズ (MB)、スルヌプット (tok/sec) で比范したものです。 図 1. Hymba 1.5B Base ず 2B 未満のモデルのパフォヌマンス比范 この䞀連の実隓には、MMLU、ARC-C、ARC-E、PIQA、Hellaswag、Winogrande、SQuAD-C などのタスクが含たれおいたす。スルヌプットは、シヌケンス長 8K、バッチ サむズ 128 で PyTorch を䜿甚しお NVIDIA A100 GPU で枬定したす。スルヌプット枬定䞭にメモリ䞍足 (OOM: Out of Memory) 問題が発生したモデルでは、OOM が解決されるたでバッチ サむズを半分にしお、OOM なしで達成可胜な最倧スルヌプットを枬定したした。 Hymba モデルのデザむン Mamba のような SSM は、Transformer の二次的な耇雑性ず掚論時の KV キャッシュが倧きい問題に察凊するために導入されたした。しかし、メモリ解像床が䜎いために、SSM は蚘憶想起ずパフォヌマンスの点で苊戊しおいたす。これらの制限を克服するために、衚 1 で効率的で高性胜な小芏暡蚀語モデルを開発するためのロヌドマップを提案したす。 構成 垞識掚論 (%) ↑ リコヌル (%) ↑ スルヌプット (token/sec) ↑ キャッシュ サむズ (MB) ↓ 蚭蚈理由 300M モデル サむズず 100B トレヌニング トヌクンのアブレヌション Transformer (Llama) 44.08 39.98 721.1 414.7 非効率的ながら正確な蚘憶 状態空間モデル (Mamba) 42.98 19.23 4720.8 1.9 効率的だが䞍正確な蚘憶 A. + Attention ヘッド (連続) 44.07 45.16 776.3 156.3 蚘憶胜力を匷化 B. + 耇数ヘッド (䞊列) 45.19 49.90 876.7 148.2 2 ぀のモゞュヌルのバランスの改善 C. + ロヌカル / グロヌバル Attention 44.56 48.79 2399.7 41.2 挔算 / キャッシュの効率を向䞊 D. + KV キャッシュ共有 45.16 48.04 2756.5 39.4 キャッシュ効率化 E. + メタトヌクン 45.59 51.79 2695.8 40.0 孊習した蚘憶の初期化 1.5B モデル サむズず 1.5T トレヌニング トヌクンぞのスケヌリング F. + サむズ / デヌタ 60.56 64.15 664.1 78.6 タスク パフォヌマンスのさらなる向䞊 G. + コンテキスト長の拡匵 (2K→8K) 60.64 68.79 664.1 78.6 マルチショットずリコヌル タスクの改善 è¡š 1. Hymba モデルのデザむン ロヌドマップ 融合型ハむブリッド モゞュヌル アブレヌション研究によるず、ハむブリッド ヘッド モゞュヌル内で Attention ず SSM ヘッドを䞊列にしお融合するほうが、シヌケンシャルにスタッキングするより優れおいるこずが分かっおいたす。Hymba は、ハむブリッド ヘッド モゞュヌル内で Attention ず SSM ヘッドを䞊列に融合させ、䞡ヘッドが同時に同じ情報を凊理できるようにしたす。このアヌキテクチャは、掚論ず蚘憶の正確さを高めたす。 図 2. Hymba のハむブリッド ヘッド モゞュヌル 効率性ず KV キャッシュの最適化 Attention ヘッドはタスクのパフォヌマンスを向䞊させたすが、KV キャッシュの芁求を増倧させ、スルヌプットを䜎䞋させたす。これを緩和するために、Hymba はロヌカルおよびグロヌバルの Attention を組み合わせ、 Cross-layer KV キャッシュ共有を採甚するこずで、ハむブリッド ヘッド モゞュヌルを最適化したす。これにより、パフォヌマンスを犠牲にするこずなくスルヌプットが 3 倍向䞊し、キャッシュがほが 4 分の 1 に削枛されたす。 図 3. Hymba モデルのアヌキテクチャ メタトヌクン 入力の先頭に眮かれる 128 の事前孊習枈みの埋め蟌みのセットであり、孊習枈みキャッシュの初期化ずしお機胜し、関連情報ぞの泚意を匷化したす。このようなトヌクンには 2 ぀の目的がありたす。 バックストップ トヌクンずしお機胜し、Attention を効果的に再分配するこずで Attention の流出を軜枛する 圧瞮された䞖界知識をカプセル化する 図 4. メモリの偎面から芋た Hymba の解釈 モデル解析 このセクションでは、同䞀のトレヌニング蚭定における異なるアヌキテクチャを比范する方法を玹介したす。それから、SSM ず Attention の Attention マップを異なる孊習枈みモデルで可芖化し、最埌に、剪定 (pruning) を通じお Hymba のヘッド重芁床分析を行いたす。このセクションのすべおの分析は、Hymba のデザむンにおける遞択の仕組みず、それが効果的な理由を説明するのに圹立ちたす。 同䞀条件での比范 Hymba、玔粋な Mamba2、Mamba2 ず FFN、Llama3 スタむル、Samba スタむル (Mamba-FFN-Attn-FFN) のアヌキテクチャを同䞀条件で比范したした。すべおのモデルが 10 億のパラメヌタヌで、たったく同じトレヌニング レシピで SmolLM-Corpus から 1,000 億トヌクンをれロから孊習しおいたす。すべおの結果は、Hugging Face モデルでれロショット蚭定を䜿甚しお lm-evaluation-harness を通じお取埗されおいたす。Hymba は、垞識掚論だけでなく、質問応答タスクや蚘憶想起タスクでも最高のパフォヌマンスを発揮したす。 è¡š 2 は、蚀語モデリングタスクず蚘憶想起タスクおよび垞識掚論タスクに関するさたざたなモデル アヌキテクチャを比范しおおり、Hymba はすべおの評䟡基準で卓越したパフォヌマンスを達成しおいたす。Hymba は、蚀語モデリングタスクで最も䜎い Perplexity を瀺し (Wiki で 18.62、LMB で 10.38)、特に SWDE (54.29) ず SQuAD-C (44.71) の蚘憶想起タスクにおいお堅実な結果を瀺し、このカテゎリで最高の平均スコア (49.50) を達成したした。 モデル 蚀語モデリング (PPL) ↓ 蚘憶想起型 (%) ↑ 垞識掚論 (%) ↑ Mamba2 15.88 43.34 52.52 Mamba2 ず FFN 17.43 28.92 51.14 Llama3 16.19 47.33 52.82 Samba 16.28 36.17 52.83 Hymba 14.5 49.5 54.57 è¡š 2. 同じ蚭定で 1,000 億トヌクンで孊習されたアヌキテクチャの比范 垞識掚論ず質問応答においお、Hymba は平均スコア 54.57 で、 SIQA (31.76) や TruthfulQA (31.64) などのほずんどのタスクで、Llama3 や Mamba2 をやや䞊回っおいたす。党䜓的に、Hymba はバランスの取れたモデルずしお際立っおおり、倚様なカテゎリで効率性ずタスク パフォヌマンスの䞡方で優れおいたす。 Attention マップの可芖化 さらに、Attention マップの芁玠を 4 ぀のタむプに分類したした。 Meta: すべおの実トヌクンからメタトヌクンぞの Attention スコア。このカテゎリは、モデルがメタトヌクンに Attention を向ける傟向を反映するものです。Attention マップでは、通垞、モデルにメタトヌクンがある堎合、最初の数列 (䟋えば Hymba の堎合は 128) に䜍眮しおいたす。 BOS: すべおの実トヌクンからセンテンスの開始トヌクンたでの Attention スコア。Attention マップでは、通垞、メタトヌクンの盎埌の最初の列に䜍眮したす。 Self: すべおの実トヌクンからそれ自身ぞの Attention スコア。Attention マップでは、通垞、察角線䞊に䜍眮しおいたす。 Cross: すべおの実トヌクンから他の実トヌクンぞの Attention スコア。Attention マップでは、通垞、察角線倖の領域に䜍眮しおいたす。 Hymba の Attention パタヌンは、vanilla (加工されおいない) Transformer のそれずは倧きく異なりたす。vanilla Transformer の Attention スコアは BOS に集䞭しおおり、Attention Sink の結果ず䞀臎しおいたす。さらに、vanilla Transformer は、Self-Attention スコアの比率も高くなっおいたす。Hymba では、メタトヌクン、Attention ヘッド、SSM ヘッドが互いに補完し合うように機胜し、異なるタむプのトヌクン間で、よりバランスの取れた Attention スコアの分垃を実珟しおいたす。 具䜓的には、メタトヌクンが BOS からの Attention スコアをオフロヌドするこずで、モデルがより実際のトヌクンに集䞭できるようになりたす。SSM ヘッドはグロヌバルなコンテキストを芁玄し、珟圚のトヌクン (Self-Attention スコア) により重点を眮きたす。䞀方、Attention ヘッドは、Self ず BOS トヌクンに察する泚意が䜎く、他のトヌクン (すなわち、Cross Attention スコア) ぞの泚意が高くなりたす。これは、Hymba のハむブリッド ヘッド デザむンが、異なるタむプのトヌクン間の Attention 分垃のバランスを効果的に取るこずができ、パフォヌマンスの向䞊に぀ながる可胜性があるこずを瀺唆しおいたす。 図 5. メタトヌクン、Sliding Window Attention、Mamba 貢献の組み合わせによる Hymba の Attention マップの抂略図 図 6. Llama 3.2 3B ず Hymba 1.5B の異なるカテゎリからの Attention スコアの合蚈 ヘッド重芁床分析 各レむダヌのAttention ず SSM ヘッドの盞察的な重芁性を分析するために、それぞれを削陀しお最終的な粟床を蚘録したした。分析の結果、以䞋のこずが明らかになりたした。 同じレむダヌの  Attention / SSM ヘッドの盞察的な重芁性は入力適応であり、タスクによっお異なりたす。これは、さたざたな入力の凊理においお、異なる圹割を果たす可胜性があるこずを瀺唆しおいたす。 最初のレむダヌの SSM ヘッドは蚀語モデリングタスクに䞍可欠で、これを削陀するず、ランダム掚枬レベルにたで倧幅に粟床が䜎䞋したす。 䞀般的に、Attention / SSM ヘッドを 1 ぀削陀するず、Hellaswag ではそれぞれ平均 0.24%/1.1% 粟床が䜎䞋したす。 図 7. Hellaswag の 1K サンプルを䜿甚しお枬定した、各レむダヌの Attention たたは SSM ヘッドを削陀した埌の達成粟床 モデル アヌキテクチャず孊習のベスト プラクティス このセクションでは、Hymba 1.5B Base ず Hymba 1.5B Instruct の䞻芁アヌキテクチャ䞊の決定事項ず孊習方法の抂芁に぀いお説明したす。 モデル アヌキテクチャ ハむブリッド アヌキテクチャ: Mamba は芁玄に優れ、通垞は珟圚のトヌクンにより重点を眮きたす。Attention はより正確でスナップショット メモリずしお機胜したす。暙準的なシヌケンシャル融合ではなく、䞊列に組み合わせるこずで利点を統合するこずができたす。SSM ず Attention ヘッド間のパラメヌタヌ比は 5:1 を遞択したした。 Sliding Window Attention: 完党な Attention ヘッドは 3 ぀のレむダヌ (最初、最埌、䞭間) に維持され、残りの 90% のレむダヌで Sliding Window Attention ヘッドが䜿甚されたす。 Cross-layer KV キャッシュ共有: 連続する 2 ぀の Attention レむダヌ間に実装されたす。これは、ヘッド間の GQA KV キャッシュ共有に加えお行われたす。 メタトヌクン: これらの 128 トヌクンは教垫なし孊習が可胜であり、倧芏暡蚀語モデル (LLM) における゚ントロピヌ厩壊の問題を回避し、Attention Sink 珟象を緩和するのに圹立ちたす。さらに、モデルはこれらのトヌクンに䞀般的な知識を栌玍したす。 孊習のベスト プラクティス 事前孊習: 2 段階のベヌスモデル孊習を遞択したした。ステヌゞ 1 では、䞀定の高い孊習率を維持し、フィルタリングされおいない倧芏暡なコヌパス デヌタの䜿甚したした。続いお、高品質のデヌタを甚いお 1e-5 たで継続的に孊習率を枛衰させたした。このアプロヌチにより、ステヌゞ 1 の継続的な孊習ず再開が可胜になりたす。 指瀺ファむンチュヌニング: 指瀺モデルの調敎は 3 ぀の段階で行われたす。たず、SFT-1 は、コヌド、数孊、関数呌び出し、ロヌル プレむ、その他のタスク固有のデヌタで孊習を実斜し、匷力な掚論胜力をモデルに付䞎したす。次に、SFT-2 はモデルに人間の指瀺に埓うこずを教えたす。最埌に、DPO を掻甚しお、モデルを人間の奜みに合わせ、モデルの安党性を高めたす。 図 8. Hymba モデル ファミリに適応した孊習パむプラむン パフォヌマンスず効率性の評䟡 1.5T の事前孊習トヌクンだけで、Hymba 1.5B モデルはすべおの小芏暡蚀語モデルの䞭で最高の性胜を発揮し、Transformer ベヌスの LM よりも優れたスルヌプットずキャッシュ効率を実珟したす。 䟋えば、13 倍以䞊のトヌクン数で事前孊習された最も匷力なベヌスラむンである Qwen2.5 に察しおベンチマヌクした堎合、Hymba 1.5B は平均粟床が 1.55%、スルヌプットが 1.41 倍、キャッシュ効率が 2.90 倍に向䞊したす。2T 未満のトヌクンで孊習された最も匷力な小芏暡蚀語モデル、すなわち h2o-danube2 ず比范するず、この方法は平均粟床が 5.41%、スルヌプットが 2.45 倍、キャッシュ効率が 6.23 倍に向䞊しおいたす。 モデル パラメヌタヌ数 孊習トヌクン トヌクン (1 秒あたり) キャッシュ (MB) MMLU 5- shot ARC-E 0-shot ARC-C 0-shot PIQA 0-shot Wino. 0-shot Hella. 0-shot SQuAD -C 1-shot 平均 OpenELM-1 1.1B 1.5T 246 346 27.06 62.37 19.54 74.76 61.8 48.37 45.38 48.57 Renev0.1 1.3B 1.5T 800 113 32.94 67.05 31.06 76.49 62.75 51.16 48.36 52.83 Phi1.5 1.3B 0.15T 241 1573 42.56 76.18 44.71 76.56 72.85 48 30.09 55.85 SmolLM 1.7B 1T 238 1573 27.06 76.47 43.43 75.79 60.93 49.58 45.81 54.15 Cosmo 1.8B .2T 244 1573 26.1 62.42 32.94 71.76 55.8 42.9 38.51 47.2 h20dan-ube2 1.8B 2T 271 492 40.05 70.66 33.19 76.01 66.93 53.7 49.03 55.65 Llama 3.2 1B 1.2B 9T 535 262 32.12 65.53 31.39 74.43 60.69 47.72 40.18 50.29 Qwen2.5 1.5B 18T 469 229 60.92 75.51 41.21 75.79 63.38 50.2 49.53 59.51 AMDOLMo 1.2B 1.3T 387 1049 26.93 65.91 31.57 74.92 61.64 47.3 33.71 48.85 SmolLM2 1.7B 11T 238 1573 50.29 77.78 44.71 77.09 66.38 53.55 50.5 60.04 Llama3.2 3B 3.0B 9T 191 918 56.03 74.54 42.32 76.66 69.85 55.29 43.46 59.74 Hymba 1.5B 1.5T 664 79 51.19 76.94 45.9 77.31 66.61 53.55 55.93 61.06 è¡š 2. Hymba 1.5B ベヌス モデルの結果 指瀺モデル Hymba 1.5B Instruct モデルは、党タスク平均で最高のパフォヌマンスを達成し、盎近の最高性胜モデルである Qwen 2.5 Instruct を玄 2% 䞊回りたした。特に、Hymba 1.5B は GSM8K/GPQA/BFCLv2 で、それぞれ 58.76/31.03/46.40 のスコアで他のすべおのモデルを䞊回っおいたす。これらの結果は、特に耇雑な掚論胜力を必芁ずする分野においお、Hymba 1.5B の優䜍性を瀺しおいたす。 モデル パラメヌタヌ数 MMLU ↑ IFEval ↑ GSM8K ↑ GPQA ↑ BFCLv2 ↑ 平均↑ SmolLM 1.7B 27.80 25.16 1.36 25.67 -* 20.00 OpenELM 1.1B 25.65 6.25 56.03 21.62 -* 27.39 Llama 3.2 1.2B 44.41 58.92 42.99 24.11 20.27 38.14 Qwen2.5 1.5B 59.73 46.78 56.03 30.13 43.85 47.30 SmolLM2 1.7B 49.11 55.06 47.68 29.24 22.83 40.78 Hymba 1.5B 1.5B 52.79 57.14 58.76 31.03 46.40 49.22 è¡š 3. Hymba 1.5B Instruct モデルの結果 たずめ 新しい Hymba ファミリの小芏暡蚀語モデルは、ハむブリッド ヘッド アヌキテクチャを採甚し、Attention ヘッドの高解像な蚘憶胜力ず SSM ヘッドの効率的なコンテキストの芁玄を組み合わせおいたす。Hymba のパフォヌマンスをさらに最適化するために、孊習可胜なメタトヌクンが導入され、Attention ヘッドず SSM ヘッドの䞡方で孊習枈みキャッシュずしお機胜し、顕著な情報に泚目するモデルの粟床を匷化したした。Hymba のロヌドマップ、包括的な評䟡、アブレヌション研究を通じお、Hymba は幅広いタスクにわたっお新たな最先端のパフォヌマンスを確立し、正確さず効率性の䞡面で優れた結果を達成したした。さらに、この研究は、ハむブリッド ヘッド アヌキテクチャの利点に関する貎重な掞察をもたらし、効率的な蚀語モデルの今埌の研究に有望な方向性を瀺しおいたす。 Hybma 1.5B Base ず Hymba 1.5B Instruct の詳现はこちらをご芧ください。 謝蟞 この成果は、Wonmin Byeon、Zijia Chen、Ameya Sunil Mahabaleshwarkar、Shih-Yang Liu、Matthijs Van Keirsbilck、Min-Hung Chen、Yoshi Suhara、Nikolaus Binder、Hanah Zhang、Maksim Khadkevich、Yingyan Celine Lin、Jan Kautz、Pavlo Molchanov、Nathan Horrocks など、NVIDIA の倚くのメンバヌの貢献なくしおは実珟したせんでした。 関連情報 GTC セッション: Optimizing Large Language Models: An Experimental Approach to Pruning and Fine-Tuning LLama2 7B (倧芏暡蚀語モデルの最適化: LLama2 7B の剪定ずファむンチュヌニングの実隓的アプロヌチ) GTC セッション: Accelerating End-to-End Large Language Models System using a Unified Inference Architecture and FP8 (統䞀掚論アヌキテクチャず FP8 を甚いた゚ンドツヌ゚ンドの倧芏暡蚀語モデル システムの高速化) NGC コンテナヌ: Llama-3.1-Nemotron-70B-Ins truct NGC コンテナヌ: Llama-3-Swallow-70B-Instruct-v0.1 SDK: NeMo Megatron
https://developer.nvidia.com/blog/deploying-fine-tuned-ai-models-with-nvidia-nim/
Deploying Fine-Tuned AI Models with NVIDIA NIM
For organizations adapting AI foundation models with domain-specific data, the ability to rapidly create and deploy fine-tuned models is key to efficiently delivering value with enterprise generative AI applications. NVIDIA NIM offers prebuilt, performance-optimized inference microservices for the latest AI foundation models, including seamless deployment of models customized using parameter-efficient fine-tuning (PEFT). In some cases, it’s ideal to use methods like continual pretraining, DPO, supervised fine-tuning (SFT), or model merging, where the underlying model weights are adjusted directly in the training or customization process, unlike PEFT with low-rank adaptation (LoRA). In these cases, inference software configuration for the model must be updated for optimal performance given the new weights. Rather than burden you with this often lengthy process, NIM can automatically build a TensorRT-LLM inference engine performance optimized for the adjusted model and GPUs in your local environment, and then load it for running inference as part of a single-step model deployment process. In this post, we explore how to rapidly deploy NIM microservices for models that have been customized through SFT by using locally built, performance-optimized TensorRT-LLM inference engines. We include all the necessary commands as well as some helpful options, so you can try it out on your own today. Prerequisites To run this tutorial, you need an NVIDIA-accelerated compute environment with access to 80 GB of GPU memory and which has git-lfs installed. Before you can pull and deploy a NIM microservice in an NVIDIA-accelerated compute environment, you also need an NGC API key. Navigate to the Meta Llama 3 8B Instruct model listing in the NVIDIA API Catalog. Choose Login at the top right and follow the instructions. When you’re logged in, choose Build with this NIM on the model page . Choose Self-Hosted API and follow either option to access NIM microservices access: NVIDIA Developer Program membership with free access to NIM for research, development, and testing only. The 90-day NVIDIA AI Enterprise license, which includes access to NVIDIA Enterprise Support. After you provide the necessary details for your selected access method, copy your NGC API key and be ready to move forward with NIM. For more information, see Launch NVIDIA NIM for LLMs . Getting started with NIM microservices Provide your NGC CLI API key as an environment variable in your compute environment: export NGC_API_KEY=<<YOUR API KEY HERE>> You also must point to, create, and modify permissions for a directory to be used as a cache during the optimization process: export NIM_CACHE_PATH=/tmp/nim/.cache mkdir -p $NIM_CACHE_PATH chmod -R 777 $NIM_CACHE_PATH To demonstrate locally built, optimized TensorRT-LLM inference engines for deploying fine-tuned models with NIM, you need a model that has undergone customization through SFT. For this tutorial, use the NVIDIA OpenMath2-Llama3.1-8B model, which is a customization of Meta’s Llama-3.1-8B using the OpenMathInstruct-2 dataset. The base model must be available as a downloadable NIM for LLMs. For more information about downloadable NIM microservices, see the NIM Type: Run Anywhere filter in the NVIDIA API Catalog. All you need is the weights to this model, which can be obtained in several ways. For this post, clone the model repository using the following commands: git lfs install git clone https://huggingface.co/nvidia/OpenMath2-Llama3.1-8B export MODEL_WEIGHT_PARENT_DIRECTORY=$PWD Now that you have the model weights collected, move on to the next step: firing up the microservice. Selecting from available performance profiles Based on your selected model and hardware configuration, the most applicable inference performance profile available is automatically selected. There are two available performance profiles for local inference engine generation: Latency: Focused on delivering a NIM microservice that is optimized for latency. Throughput: Focused on delivering a NIM microservice that is optimized for batched throughput. For more information about supported features, including available precision, see the Support Matrix topic in the NVIDIA NIM documentation. Example using an SFT model Create a locally built TensorRT-LLM inference engine for OpenMath2-Llama3.1-8B by running the following commands: docker run -it --rm --gpus all \ --user $(id -u):$(id -g)\ --network=host \ --shm-size=32GB \ -e NGC_API_KEY \ -e NIM_FT_MODEL=/opt/weights/hf/OpenMath2-Llama3.1-8B \ -e NIM_SERVED_MODEL_NAME=OpenMath2-Llama3.1-8B \ -v $NIM_CACHE_PATH:/opt/nim/.cache \ -v $MODEL_WEIGHT_PARENT_DIRECTORY:/opt/weights/hf \ nvcr.io/nim/meta/llama-3.1-8b-instruct:1.3.0 The command is nearly identical to the typical command you’d use to deploy a NIM microservice. In this case, you’ve added the extra NIM_FT_MODEL parameter, which points to the OpenMath2-Llama3.1-8B model. With that, NIM builds an optimized inference engine locally. To perform inference using this new NIM microservice, run the following Python code example: from openai import OpenAI client = OpenAI( base_url = "http://localhost:8000/v1", api_key = "none" ) completion = client.chat.completions.create( model="OpenMath2-Llama3.1-8B", messages=[{"role":"user","content":"What is your name?"}], temperature=0.2, top_p=0.7, max_tokens=100, stream=True ) for chunk in completion: if chunk.choices[0].delta.content is not None: print(chunk.choices[0].delta.content, end="") Video 1. How to Deploy Fine-Tuned AI Models Building an optimized TensorRT-LLM engine with a custom performance profile On supported GPUs , you can use a similar command to spin up your NIM microservice. Follow the Model Profile instructions to launch your microservice and determine which profiles are accessible for it. export IMG_NAME="nvcr.io/nim/meta/llama-3.1-8b-instruct:1.3.0" docker run --rm --gpus=all -e NGC_API_KEY=$NGC_API_KEY $IMG_NAME list-model-profiles Assuming you’re in an environment with two (or more) H100 GPUs, you should see the following profiles available: tensorrt_llm-h100-bf16-tp2–pp1-throughput tensorrt_llm-h100-bf16-tp2-pp1-latency Re-run the command and provide an additional environment variable to specify the desired profile: docker run --rm --gpus=all \ -e NGC_API_KEY \ -e NIM_FT_MODEL=/opt/weights/hf/OpenMath2-Llama3.1-8B \ -e NIM_SERVED_MODEL_NAME=OpenMath2-Llama3.1-8B \ -e NIM_MODEL_PROFILE=tensorrt_llm-h100-bf16-tp2-pp1-latency \ -v $NIM_CACHE_PATH:/opt/nim/.cache \ -v $MODEL_WEIGHT_PARENT_DIRECTORY:/opt/weights/hf \ $IMG_NAME Now that you’ve relaunched your NIM microservice with the desired profile, use Python to interact with the model: from openai import OpenAI client = OpenAI( base_url = "http://localhost:8000/v1", api_key = "none" ) completion = client.chat.completions.create( model="llama-3.1-8b-instruct", messages=[{"role":"user","content":"What is your name?"}], temperature=0.2, top_p=0.7, max_tokens=100, stream=True ) for chunk in completion: if chunk.choices[0].delta.content is not None: print(chunk.choices[0].delta.content, end="") Conclusion Whether you’re using PEFT or SFT methods for model customization, NIM accelerates customized model deployment for high-performance inferencing in a few simple steps. With optimized TensorRT-LLM inference engines built automatically in your local environment, NIM is unlocking new possibilities for rapidly deploying accelerated AI inferencing anywhere. Learn more and get started today by visiting the NVIDIA API catalog and checking out the documentation . To engage with NVIDIA and the NIM microservices community, see the NVIDIA NIM developer forum .
https://developer.nvidia.com/ja-jp/blog/deploying-fine-tuned-ai-models-with-nvidia-nim/
NVIDIA NIM でファむンチュヌニングされた AI モデルのデプロむ
Reading Time: 2 minutes ドメむン固有のデヌタで AI 基盀モデルを適応させおいる䌁業にずっお、ファむンチュヌニングされたモデルを迅速に䜜成し、デプロむする胜力は、䌁業の生成 AI アプリケヌションで効率的に䟡倀を提䟛するための鍵ずなりたす。 NVIDIA NIM は、Parapeter-efficient Fine-tuning (PEFT) を甚いおカスタマむズしたモデルの シヌムレスなデプロむ など、最新の AI 基盀モデル向けにビルドされたパフォヌマンスを最適化した掚論マむクロサヌビスを提䟛したす。 堎合によっおは、Low-rank Adaptation (LoRA) を䜿甚した PEFT ずは異なり、継続事前孊習、DPO、教垫ありファむンチュヌニング (SFT: Supervised Fine-tuning)、モデル マヌゞなどの手法を利甚し、基瀎ずなるモデルの重みをトレヌニングやカスタマむズの過皋で盎接調敎するのが理想的です。このような堎合、新しい重みを考慮した最適なパフォヌマンスを実珟するには、モデルの掚論゜フトりェア構成を曎新する必芁がありたす。 この長時間を芁するプロセスに負担を割くのではなく、NIM は、調敎されたモデルず GPU に合わせお最適化した TensorRT-LLM 掚論゚ンゞンをロヌカル環境でビルドし、ロヌドし、それを単䞀ステップのモデル デプロむ プロセスの䞀環ずしお掚論を実行できたす。 この投皿では、パフォヌマンスを最適化した TensorRT-LLM 掚論゚ンゞンをロヌカルでビルドしお、SFT でカスタマむズされたモデルに察する NIM マむクロサヌビスを迅速にデプロむする方法を説明したす。必芁なコマンドず䟿利なオプションもご玹介したすので、是非今すぐお詊しください。 前提条件 このチュヌトリアルを実行するには、80 GB の GPU メモリを持぀ NVIDIA アクセラレヌテッド コンピュヌティング環境ず git-lfs のむンストヌルが必芁です。 NVIDIA アクセラレヌテッド コンピュヌティング環境で、NIM マむクロサヌビスを pull しおデプロむするには、NGC API キヌも必芁です。 NVIDIA API カタログのモデル䞀芧から Meta Llama 3 8B Instruct に移動したす。 右䞊の [Login] を遞択し、指瀺に埓っおください。 ログむンしたら、 モデル ペヌゞ で [Build with this NIM] を遞択したす。 [Self-Hosted API] を遞択し、いずれかのオプションに埓っお、NIM マむクロサヌビスぞアクセスしたす。 NVIDIA 開発者プログラムのメンバヌであれば、研究、開発、テストに限り NIM に無料でアクセスするこずができたす。 90 日間の NVIDIA AI Enterprise ラむセンスには、NVIDIA Enterprise サポヌトぞのアクセスが含たれおいたす。 遞択したアクセス方法に必芁な詳现情報を提䟛したら、NGC API キヌをコピヌしお、NIM を進める準備をしたす。詳现に぀いおは、 Launch NVIDIA NIM for LLMs を参照しおください。 NIM マむクロサヌビスをはじめる 利甚䞭のコンピュヌティング環境の環境倉数ずしお、NGC API キヌを提䟛したす。 export NGC_API_KEY=<<YOUR API KEY HERE>> たた、最適化凊理䞭にキャッシュずしお䜿甚するディレクトリを䜜成しお、パヌミッションを倉曎しお、指定する必芁がありたす。 export NIM_CACHE_PATH=/tmp/nim/.cache mkdir -p $NIM_CACHE_PATH chmod -R 777 $NIM_CACHE_PATH NIM でファむンチュヌニングされたモデルをデプロむするために、最適な TensorRT-LLM 掚論゚ンゞンをロヌカルでビルドする実蚌には、SFT によっおカスタマむズしたモデルが必芁です。このチュヌトリアルでは、 OpenMathInstruct-2 デヌタセットを䜿甚しお、 Meta の Llama-3.1-8B をカスタマむズした NVIDIA OpenMath2-Llama3.1-8B モデルを䜿甚したす。 ベヌス モデルは、ダりンロヌド可胜な NIM for LLMs ずしお利甚可胜でなければなりたせん。ダりンロヌド可胜な NIM マむクロサヌビスの詳现に぀いおは、NVIDIA API カタログの「 NIM Type: Run Anywhere filter 」を参照しおください。 必芁なのはこのモデルの重みだけで、これはさたざたな方法がありたす。この投皿では、以䞋のコマンドを䜿甚しおモデル リポゞトリをクロヌンしたす。 git lfs install git clone https://huggingface.co/nvidia/OpenMath2-Llama3.1-8B export MODEL_WEIGHT_PARENT_DIRECTORY=$PWD これでモデルの重みが収集できたので、次のステップのマむクロサヌビスの起動に進みたす。 利甚可胜なパフォヌマンス プロファむルから遞択する 遞択したモデルずハヌドりェアの構成に基づいお、利甚可胜なものの䞭から最も適切な掚論パフォヌマンス プロファむルが自動的に遞択されたす。ロヌカル掚論゚ンゞンの生成には、以䞋の 2 ぀のパフォヌマンス プロファむルが利甚できたす。 レむテンシ: レむテンシに最適化された NIM マむクロサヌビスの提䟛に重点を眮きたす。 スルヌプット: バッチ スルヌプットに最適化された NIM マむクロサヌビスの提䟛に重点を眮きたす。 利甚可胜な粟床など、サポヌト機胜の詳现に぀いおは、NVIDIA NIM ドキュメントの サポヌト情報 のトピックを参照しおください。 SFT モデルを䜿甚した䟋 以䞋のコマンドを実行しお、ロヌカル環境でビルドした OpenMath2-Llama3.1-8B 甚の TensorRT-LLM 掚論゚ンゞンを䜜成したす。 docker run -it --rm --gpus all \ --user $(id -u):$(id -g)\ --network=host \ --shm-size=32GB \ -e NGC_API_KEY \ -e NIM_FT_MODEL=/opt/weights/hf/OpenMath2-Llama3.1-8B \ -e NIM_SERVED_MODEL_NAME=OpenMath2-Llama3.1-8B \ -v $NIM_CACHE_PATH:/opt/nim/.cache \ -v $MODEL_WEIGHT_PARENT_DIRECTORY:/opt/weights/hf \ nvcr.io/nim/meta/llama-3.1-8b-instruct:1.3.0 このコマンドは、NIM マむクロサヌビスをデプロむするために䜿甚する兞型的なコマンドずほが同じです。この堎合、远加の NIM_FT_MODEL パラメヌタヌを远加し、OpenMath2-Llama3.1-8B モデルを指しおいたす。 これにより、NIM は最適化された掚論゚ンゞンをロヌカル環境でビルドしたす。この新しい NIM マむクロサヌビスを䜿甚しお掚論を行うには、以䞋の Python コヌド サンプルを実行したす。 from openai import OpenAI client = OpenAI( base_url = "http://localhost:8000/v1", api_key = "none" ) completion = client.chat.completions.create( model="OpenMath2-Llama3.1-8B", messages=[{"role":"user","content":"What is your name?"}], temperature=0.2, top_p=0.7, max_tokens=100, stream=True ) for chunk in completion: if chunk.choices[0].delta.content is not None: print(chunk.choices[0].delta.content, end="") 動画 1. ファむンチュヌニングされた AI モデルをデプロむする方法 カスタム パフォヌマンス プロファむルで最適化された TensorRT-LLM ゚ンゞンのビルド サポヌトされおいる GPU なら、同様のコマンドを䜿甚しお、NIM マむクロサヌビスを起動できたす。 モデル プロファむル の手順に埓っおマむクロサヌビスを起動し、どのプロファむルにアクセスできるかを確認したす。 export IMG_NAME="nvcr.io/nim/meta/llama-3.1-8b-instruct:1.3.0" docker run --rm --gpus=all -e NGC_API_KEY=$NGC_API_KEY $IMG_NAME list-model-profiles H100 GPU を䜿甚しおいるず仮定するず、以䞋のプロファむルが利甚可胜であるこずがわかりたす。 tensorrt_llm-h100-bf16-tp2-pp1-latency tensorrt_llm-h100-bf16-tp1-pp1-throughput コマンドを再実行し、目的のプロファむルを指定する環境倉数を远加したす。 docker run --rm --gpus=all \ --user $(id -u):$(id -g)\ --network=host \ --shm-size=32GB \ -e NGC_API_KEY \ -e NIM_FT_MODEL=/opt/weights/hf/OpenMath2-Llama3.1-8B \ -e NIM_SERVED_MODEL_NAME=OpenMath2-Llama3.1-8B \ -e NIM_MODEL_PROFILE=tensorrt_llm-h100-bf16-tp2-pp1-latency \ -v $NIM_CACHE_PATH:/opt/nim/.cache \ -v $MODEL_WEIGHT_PARENT_DIRECTORY:/opt/weights/hf \ $IMG_NAME 目的のプロファむルで NIM マむクロサヌビスを再起動したので、Python を䜿甚しおモデルずやり取りしたす。 from openai import OpenAI client = OpenAI( base_url = "http://localhost:8000/v1", api_key = "none" ) completion = client.chat.completions.create( model="llama-3.1-8b-instruct", messages=[{"role":"user","content":"What is your name?"}], temperature=0.2, top_p=0.7, max_tokens=100, stream=True ) for chunk in completion: if chunk.choices[0].delta.content is not None: print(chunk.choices[0].delta.content, end="") たずめ モデルのカスタマむズに PEFT たたは SFT を䜿甚しおいる堎合でも、NIM は、高性胜な掚論のためにカスタマむズされたモデルのデプロむをわずかなステップで簡単に高速化したす。最適化された TensorRT-LLM 掚論゚ンゞンをロヌカル環境で自動的にビルドするこずで、NIM は、高速化された AI 掚論をどこにでも迅速にデプロむできるよう新たな可胜性を匕き出しおいたす。詳现に぀いおは、 NVIDIA API カタログ にアクセスし、NVIDIA NIM ドキュメントの ファむンチュヌニングされたモデルのサポヌト をご芧ください。 NVIDIA NIM 開発者フォヌラム では、NVIDIA および NIM マむクロサヌビス コミュニティずの亀流するこずもできたす。 関連情報 GTC セッション: Kubernetes 甹 Oracle コンテナヌ ゚ンゞンを䜿甚した OCI の NVIDIA Nemotron LLM のファむンチュヌニングずデプロむ (Oracle 提䟛) GTC セッション: 䌁業を加速: 次䞖代 AI デプロむを実珟するツヌルずテクニック GTC セッション: NVIDIA NeMo による倚様な蚀語での基盀ずなる倧芏暡蚀語モデルのカスタマむズ NGC コンテナヌ: Phind-CodeLlama-34B-v2-Instruct NGC コンテナヌ: Phi-3-Mini-4K-Instruct NGC コンテナヌ: Mistral-NeMo-Minitron-8B-Instruct
https://developer.nvidia.com/blog/mastering-llm-techniques-data-preprocessing/
Mastering LLM Techniques: Data Preprocessing
The advent of large language models (LLMs) marks a significant shift in how industries leverage AI to enhance operations and services. By automating routine tasks and streamlining processes, LLMs free up human resources for more strategic endeavors, thus improving overall efficiency and productivity. Training and customizing LLMs for high accuracy is fraught with challenges, primarily due to their dependency on high-quality data. Poor data quality and inadequate volume can significantly reduce model accuracy, making dataset preparation a critical task for AI developers. Datasets frequently contain duplicate documents, personally identifiable information (PII), and formatting issues. Some datasets even house toxic or harmful information that poses risks to users. Training models on these datasets without proper processing can result in higher training time and lower model quality. Another significant challenge is the scarcity of data. Model builders are running out of publicly available data to train on, prompting many to turn to third-party vendors or generate synthetic data using advanced LLMs. In this post, we will describe data processing techniques and best practices for optimizing LLM performance by improving data quality for training. We will introduce NVIDIA NeMo Curator and how it addresses these challenges, demonstrating real-world data processing use cases for LLMs. Text processing pipelines and best practices Dealing with the preprocessing of large data is nontrivial, especially when the dataset consists of mainly web-scraped data which is likely to contain large amounts of ill-formatted, low-quality data. Figure 1. Text processing pipelines that can be built using NeMo Curator Figure 1 shows a comprehensive text processing pipeline, including the following steps at a high-level: Download the dataset from the source and extract to a desirable format such as JSONL. Apply preliminary text cleaning, such as Unicode fixing and language separation. Apply both standard and custom-defined filters to the dataset based on specific quality criteria. Perform various levels of deduplication (exact, fuzzy, and semantic). Selectively apply advanced quality filtering, including model-based quality filtering, PII redaction, distributed data classification, and task decontamination. Blend curated datasets from multiple sources to form a unified dataset. The sections below dive deeper into each of these stages. Download and extract text The initial step in data curation involves downloading and preparing datasets from various common sources such as Common Crawl, specialized collections such as arXiv and PubMed, or private on-prime datasets, each potentially containing terabytes of data. This crucial phase requires careful consideration of storage formats and extraction methods, as publicly hosted datasets often come in compressed formats (for example, .warc.gz, tar.gz, or zip files) that need to be converted to more manageable formats (such as .jsonl or .parquet) for further processing. Preliminary text cleaning Unicode fixing and language identification represent crucial early steps in the data curation pipeline, particularly when dealing with large-scale web-scraped text corpora. This phase addresses two fundamental challenges: improperly decoded Unicode characters, and the presence of multiple languages within the dataset. Unicode formatting issues often arise from incorrect character encoding or multiple encoding/decoding cycles. Common problems include special characters appearing as garbled sequences (for example, “café” showing as “café”). Language identification and separation are equally important, especially for curators who are interested in curating monolingual datasets. Moreover, some of the data curation steps such as heuristic filtering, and model-based quality classifiers are language-specific. This preliminary preprocessing step ensures clean, properly encoded text in identified languages, forming the foundation for all subsequent curation steps. Heuristic filtering Heuristic filtering employs rule-based metrics and statistical measures to identify and remove low-quality content. The process typically evaluates multiple quality dimensions, such as document length, repetition patterns, punctuation distribution, and structural integrity of the text. Common heuristic filters include: Word count filter: Filters out snippets that are too brief to be meaningful or suspiciously long. Boilerplate string filter: Identifies and removes text containing excessive boilerplate content. N-gram repetition filter: Identifies repeated phrases at different lengths and removes documents with excessive repetition that might indicate low-quality or artificially generated content. For heuristic filtering, the best practice is to implement a cascading approach. This enables more nuanced quality control while maintaining transparency in the filtering process.  For improved performance, batch filtering can be implemented to process multiple documents simultaneously, significantly reducing computation time when dealing with large-scale datasets. Deduplication Deduplication is essential for improving model training efficiency, reducing computational costs, and ensuring data diversity. It helps prevent models from overfitting to repeated content and improves generalization. The process can be implemented through three main approaches: exact, fuzzy, and semantic deduplication. These form a comprehensive strategy for handling different types of duplicates in large-scale datasets, from identical copies to conceptually similar content. Exact deduplication Exact deduplication focuses on identifying and removing completely identical documents. This method generates hash signatures for each document and groups documents by their hashes into buckets, keeping only one document per bucket. While this method is computationally efficient, fast and reliable, it’s limited to detecting perfectly matching content and may miss semantically equivalent documents with minor variations. Fuzzy deduplication Fuzzy deduplication addresses near-duplicate content using MinHash signatures and Locality-Sensitive Hashing (LSH) to identify similar documents. The process involves the following steps: Compute MinHash signatures for documents. Use LSH to group similar documents into buckets. One document might belong to one or more buckets. Compute Jaccard similarity between documents within the same buckets. Based on the Jaccard similarity, transform the similarity matrix to a graph and identify connected components in the graph. Documents within a connected component are considered fuzzy duplicates. Remove identified duplicates from the dataset. This method is particularly valuable for identifying content with minor modifications, detecting partial document overlaps, and finding documents with different formatting but similar content.  It strikes a balance between computational efficiency and duplicate detection capability. Semantic deduplication Semantic deduplication represents the most sophisticated approach, employing advanced embedding models to capture semantic meaning combined with clustering techniques to group semantically similar content. Research has shown that semantic deduplication can effectively reduce dataset size while maintaining or improving model performance. It’s especially valuable for identifying paraphrased content, translated versions of the same material, and conceptually identical information. Semantic deduplication consists of the following steps: Each data point is embedded using a pretrained model. The embeddings are clustered into k clusters using k-means clustering. Within each cluster, pairwise cosine similarities are computed. Data pairs with cosine similarity above a threshold are considered semantic duplicates. From each group of semantic duplicates within a cluster, one representative datapoint is kept and the rest are removed. Model-based quality filtering Model-based quality filtering employs various types of models to evaluate and filter content based on quality metrics. The choice of model type significantly impacts both the effectiveness of filtering and the computational resources required, making it crucial to select the appropriate model for specific use cases. Different types of models that can be used for quality filtering include: N-gram based classifiers: The simplest approach uses n-gram based bag-of-words classifiers like fastText, which excel in efficiency and practicality, as they require minimal training data (100,000 to 1,000,000 samples). BERT-style classifiers: BERT-style classifiers represent a middle-ground approach, offering better quality assessment through Transformer-based architectures. They can capture more complex linguistic patterns and contextual relationships, making them effective for quality assessment. LLMs: LLMs provide the most sophisticated quality assessment capabilities, leveraging their extensive knowledge to evaluate text quality. While they offer superior understanding of content quality, they have significant computational requirements thus they are best suited for smaller-scale applications, such as fine-tuning datasets. Reward models: Reward models represent a specialized category designed specifically for evaluating conversational data quality. These models can assess multiple quality dimensions simultaneously but similar to LLMs, they have significant computational requirements. The optimal selection of quality filtering models should consider both the dataset scale and available computational resources. For large-scale pretraining datasets, combining lightweight models for initial filtering with advanced models for final quality assessment often provides the best balance of efficiency and effectiveness. For smaller, specialized datasets where quality is crucial, using models like LLMs or reward models becomes more feasible and beneficial. PII redaction Personally Identifiable Information (PII) redaction involves identifying and removing sensitive information from datasets to protect individual privacy and ensure compliance with data protection regulations. This process is particularly important when dealing with datasets that contain personal information, from direct identifiers like names and social security numbers to indirect identifiers that could be used to identify individuals when combined with other data. Modern PII redaction employs various techniques to protect sensitive information, including: Replacing sensitive information with symbols (for example, XXX-XX-1234 for U.S. Social Security Numbers) while maintaining data format and structure. Substituting sensitive data with non-sensitive equivalents that maintain referential integrity for analysis purposes. Eliminating sensitive information when its presence is not necessary for downstream tasks. Overall, PII redaction helps maintain data privacy, comply with regulations, and build trust with users while preserving the utility of their datasets for training and analysis purposes. Distributed data classification Data classification plays a vital role in data curation. This process helps organize and categorize data based on various attributes such as domain and quality, ensuring data is well-balanced and representative of different knowledge domains. Domain classification helps LLMs understand the context and specific domain of input text by identifying and categorizing content based on subject matter. The domain information serves as valuable auxiliary data, enabling developers to build more diverse training datasets while identifying and filtering out potentially harmful or unwanted content. For example, using the AEGIS Safety Model, which classifies content into 13 critical risk categories, developers can effectively identify and filter harmful content from training data. When dealing with pretraining corpora that often contain billions of documents, running inference for classification becomes computationally intensive and time-consuming. Therefore, distributed data classification is necessary to overcome these challenges. This is achieved by chunking the datasets across multiple GPU nodes to accelerate the classification task in a distributed manner. Task decontamination After training, LLMs are usually evaluated by their performance on downstream tasks consisting of unseen test data. Downstream task decontamination is a step that addresses the potential leakage of test data into training datasets, which can provide misleading evaluation results. The decontamination process typically involves several key steps: Identifying potential downstream tasks and their test sets. Converting test data into n-gram representations. Searching for matching n-grams in the training corpus. Removing or modifying contaminated sections while preserving document coherence. This systematic approach helps ensure the effectiveness of decontamination while minimizing unintended impacts on data quality, ultimately contributing to more reliable model evaluation and development. Blending and shuffling Data blending and shuffling represent the final steps in the data curation pipeline, combining multiple curated datasets while ensuring proper randomization for optimal model training. This process is essential for creating diverse, well-balanced training datasets that enable better model generalization and performance. Data blending involves merging data from multiple sources into a unified dataset, creating more comprehensive and diverse training data. The blending process is implemented using two approaches: Online: Data combination occurs during training Offline: Datasets are combined before training Each approach offers distinct advantages depending on the specific requirements of the training process and the intended use of the final dataset. Synthetic data generation Having navigated the intricacies of the preprocessing stage, we now confront a formidable challenge in the realm of LLM development: the scarcity of data. The insatiable appetite of LLMs for vast training datasets, even for fine-tuning purposes, frequently outstrips the availability of domain-specific or language-particular data. To this end, synthetic data generation (SDG) is a powerful approach that leverages LLMs to create artificial datasets that mimic real-world data characteristics while maintaining privacy and ensuring data utility. This process uses external LLM services to generate high-quality, diverse, and contextually relevant data that can be used for pretraining, fine-tuning, or evaluating other models. SDG empowers LLMs by enabling adaptation to low-resource languages, supporting domain specialization, and facilitating knowledge distillation across models, making it a versatile tool for expanding model capabilities. SDG has become particularly valuable in scenarios where real data is scarce, sensitive, or difficult to obtain. Figure 2. General synthetic data generation architecture with NeMo Curator The synthetic data pipeline encompasses three key stages: Generate, Critique, and Filter. Generate: Use prompt engineering to generate synthetic data for various tasks. Taking Nemotron-4 as an example, SDG is applied to generate training data for five different types of tasks: open-ended QA, closed-ended QA, writing assignments, coding, and math problems. Critique: Use methods like LLM reflection, LLM-as-judge, reward model inference, and other agents to evaluate the quality of synthetic data. The evaluation results can be used as feedback to SDG LLM to generate better results or filter out low quality data. A prime example is the Nemotron-4-340B reward NIM , which assesses data quality through five key attributes: Helpfulness, Correctness, Coherence, Complexity, and Verbosity. By setting appropriate thresholds for these attribute scores, the filtering process ensures that only high-quality synthetic data is retained, while filtering out low-quality or inappropriate content. Filter: Steps like deduplication and PII redaction to further improve SDG data quality. Note, however, SDG is not suitable in all cases. Hallucinations from external LLMs can introduce unreliable information, compromising data integrity. Additionally, the generated data’s distribution may not align with the target distribution, potentially leading to poor real-world performance. In such cases, using SDG could actually harm the system’s effectiveness rather than improve it. Data processing for building sovereign LLMs As noted previously, open-source LLMs excel in English but struggle with other languages, especially those of Southeast Asia. This is primarily due to a lack of training data in these languages, limited understanding of local cultures, and insufficient tokens to capture unique linguistic structures and expressions. To fully meet customer needs, enterprises in non-English-speaking countries must go beyond generic models and customize them to capture the nuances of their local languages, ensuring a seamless and impactful customer experience. For example, using NeMo Curator, Viettel Solutions processed high-quality Vietnamese data to increase accuracy by 10%, reduce the dataset size by 60% and accelerate training time by 3x. The main steps for this use case are: Download several Vietnamese and multilingual datasets (Wikipedia, Vietnamese news corpus, OSCAR , and C4) and convert to Parquet for efficient handling and processing of large datasets. Combine, standardize, and shard into a single dataset Apply unicode reformatting, exact deduplication, quality filtering (heuristic and classifier-based). You can follow along with the full tutorial . Improve data quality with NVIDIA NeMo Curator So far, we have discussed the importance of data quality in improving the accuracy of LLMs and explored various data processing techniques. Developers can now try these techniques directly through NeMo Curator . It provides a customizable and modular interface that enables developers to build on top of it easily. NeMo Curator uses NVIDIA RAPIDS GPU-accelerated libraries like cuDF, cuML, and cuGraph, and Dask to speed up workloads on multinode multi-GPUs, reducing processing time and scale as needed. For example, by using GPUs to accelerate the data processing pipelines, Zyphra reduced the total cost of ownership (TCO) by 50% and processed the data 10x faster (from 3 weeks to 2 days). To get started, check out the NVIDIA/NeMo-Curator GitHub repository and available tutorials that cover various data curation workflows, such as: Data processing for pretraining Data processing for customization SDG pipelines You can also gain access through a NeMo framework container and request enterprise support with an NVIDIA AI Enterprise license.
https://developer.nvidia.com/ja-jp/blog/mastering-llm-techniques-data-preprocessing/
LLM テクニックの習埗: デヌタの前凊理
Reading Time: 2 minutes 倧芏暡蚀語モデル (LLM) の出珟は、䌁業が AI を掻甚しお業務ずサヌビスを匷化する方法に倧きな倉化をもたらしたした。LLM は日垞的な䜜業を自動化し、プロセスを合理化するこずで、人的リ゜ヌスをより戊略的な取り組みに割り圓おるこずで、党䜓的な効率性ず生産性を向䞊させたす。 LLM を高粟床にトレヌニングおよび カスタマむズ するには、高品質なデヌタが必芁ずなるため、倚くの課題を䌎いたす。デヌタの質が䜎く、量が十分でないず、モデルの粟床が倧幅に䜎䞋する可胜性があるため、AI 開発者にずっおデヌタセットの準備は重芁な䜜業の 1 ぀ずなっおいたす。 デヌタセットには埀々にしお重耇したドキュメント、個人を特定できる情報 (PII)、フォヌマットに関する問題が存圚したす。デヌタセットの䞭には、ナヌザヌにリスクをもたらす有害な情報や䞍適切な情報が含たれおいるものさえありたす。適切な凊理を行わずにこういったデヌタセットでモデルをトレヌニングするず、トレヌニング時間が長匕いたり、モデルの品質が䜎䞋する堎合がありたす。もう 1 ぀の倧きな課題はデヌタの䞍足です。モデル開発者はトレヌニング甚の公開デヌタを䜿い果たし぀぀あり、倚くの人々がサヌドパヌティのベンダヌに䟝頌したり、高床な LLM を䜿甚しお合成デヌタを生成したりするようになっおいたす。 この蚘事では、トレヌニング甚のデヌタの品質を向䞊するこずで LLM のパフォヌマンスを最適化するためのデヌタ凊理テクニックずベスト プラクティスに぀いお説明したす。たた、 NVIDIA NeMo Curator の抂芁および前述した課題ぞの察凊方法を説明し、LLM の実際のデヌタ凊理のナヌス ケヌスもご玹介したす。 テキスト凊理パむプラむンずベスト プラクティス 倧芏暡デヌタの前凊理は容易ではありたせん。特に、デヌタセットが䞻にWeb スクレむピングされたデヌタで構成されおおり、倧量の䞍適切なフォヌマットの䜎品質デヌタが含たれおいる可胜性が高い堎合はなおさらです。 図 1. NeMo Curator を䜿甚しお構築できるテキスト凊理パむプラむン 図 1 は、以䞋の手順を含む包括的なテキスト凊理パむプラむンの抂芁を瀺しおいたす。 ゜ヌスからデヌタセットをダりンロヌドし、JSONL などの望たしいフォヌマットで抜出したす。 Unicode の修正や蚀語による分類など、予備的なテキスト クリヌニングを適甚したす。 特定の品質基準に基づいお、暙準的なフィルタヌずカスタム定矩のフィルタヌの䞡方をデヌタセットに適甚したす。 さたざたなレベルの重耇排陀 (厳密、曖昧、意味的) を実行したす。 モデルベヌスの品質フィルタリング、個人情報 (PII) の削陀、(分散凊理による) デヌタ分類、䞋流タスクの汚染陀去などの高床な品質フィルタリングを必芁に応じお遞択的に適甚したす。 耇数の゜ヌスから収集され、粟遞されたデヌタセットを䞀䜓化し、統合したデヌタセットを䜜成したす。 以䞋のセクションでは、これらの各段階に぀いお詳しく説明したす。 テキストをダりンロヌドしお抜出 デヌタ キュレヌションの最初のステップでは、 Common Crawl のような、さたざたな䞀般的な゜ヌス、arXiv や PubMed などの専門的なコレクション、自瀟保有のプラむベヌト デヌタなどからデヌタセットをダりンロヌドしお準備したす。これらのデヌタセットには、それぞれテラバむト単䜍のデヌタが含たれおいる可胜性がありたす。 この重芁なフェヌズでは、保存圢匏ず抜出方法を慎重に怜蚎する必芁がありたす。䞀般に公開されホストされおいるデヌタセットは圧瞮圢匏 (䟋: .warc.gz、tar.gz、zip ファむル) で提䟛されるこずが倚いため、埌続の凊理のためにより扱いやすい圢匏 (.jsonl や .parquet など) に倉換する必芁がありたす。 予備的なテキスト クリヌニング Unicode の修正ず蚀語による分類は、特に倧芏暡な Web スクレむピングによるテキスト コヌパスを扱う堎合、デヌタ キュレヌション パむプラむンの重芁な初期ステップです。このフェヌズでは、䞍適切にデコヌドされた Unicode 文字ず、デヌタセット内に耇数の蚀語が存圚するずいう 2 ぀の基本的な課題に察凊したす。 Unicode 圢匏に関する問題は、倚くの堎合、文字゚ンコヌドの誀りや、゚ンコヌド/デコヌド サむクルが耇数回実行されるこずによっお発生したす。よくある問題ずしおは、特殊文字が文字化けした文字列 (䟋:「café」が「café」ず衚瀺される) ずしお衚瀺されるこずが挙げられたす。蚀語の識別ず分類は、特に単䞀蚀語のデヌタセットのキュレヌションに関心のある開発者にずっおは同様に重芁です。さらに、ヒュヌリスティック フィルタリング、モデルベヌスの品質分類噚などのデヌタ キュレヌションのステップの䞀郚は蚀語に䟝存しおいたす。 この予備的な前凊理ステップでは、識別された蚀語で適切に゚ンコヌドされたクリヌンなテキストが確保され、その埌のキュレヌションステップの基盀ずなりたす。 ヒュヌリスティック フィルタリング ヒュヌリスティック フィルタリングでは、ルヌルベヌスの評䟡指暙ず統蚈的尺床を䜿甚しお、䜎品質なコンテンツを特定し、削陀したす。 このプロセスは通垞、ドキュメントの長さ、繰り返しパタヌン、句読点の分垃、テキストの構造的敎合性など、耇数の品質基準で評䟡されたす。䞀般的なヒュヌリスティック フィルタヌには以䞋のようなものがありたす。 単語数フィルタヌ: 意味をなさないほど短すぎる、たたは疑わしいほどに長すぎるテキストをフィルタリングしたす。 定型文フィルタヌ: 過剰な定型文を含むテキストを特定し、削陀したす。 N-gram 反埩フィルタヌ: 異なる長さで繰り返されるフレヌズを特定し、䜎品質たたは人工的に生成されたコンテンツである可胜性がある過剰な反埩を含む文曞を削陀したす。 ヒュヌリスティック フィルタリングの堎合は、カスケヌド アプロヌチを採るのが最善の方法です。これにより、フィルタリング プロセスの透明性を維持しながら、より繊现な品質管理が可胜になりたす。凊理パフォヌマンスを向䞊させるために、バッチ フィルタリングを採甚しお耇数のドキュメントを同時に凊理するず倧芏暡なデヌタセットを扱う際の蚈算時間を倧幅に短瞮するこずができたす。 重耇排陀 重耇排陀は、モデルのトレヌニング効率の向䞊、蚈算コストの削枛、デヌタの倚様性の確保に䞍可欠です。繰り返し出珟するコンテンツにモデルが過剰適合するのを防ぎ、汎甚性を高めたす。このプロセスは、厳密、曖昧、意味ずいう 3 ぀の䞻な重耇排陀アプロヌチを通じお実装できたす。これらは、同䞀のコピヌから抂念的に類䌌したコンテンツたで、倧芏暡デヌタセット内の異なるタむプの重耇を凊理する包括的な戊略を圢成したす。 厳密な重耇排陀 厳密な重耇排陀は、完党に同䞀のドキュメントを識別し、削陀するこずに重点を眮いおいたす。この方法では、ドキュメントごずにハッシュ眲名を生成し、ハッシュごずにドキュメントをグルヌプ化しおバケットに栌玍し、バケットごずに 1 ぀のドキュメントのみを残したす。この方法は蚈算効率が高く、高速か぀信頌性が高いのですが、完党に䞀臎するコンテンツの怜出に限定されるため、意味的には同等なのにわずかに異なる文曞を芋逃す可胜性がありたす。 曖昧な重耇排陀 曖昧な重耇排陀は、MinHash 眲名ず局所性鋭敏型ハッシュ化 (LSH: Locality-Sensitive Hashing) を䜿甚しお、類䌌したドキュメントを識別し、ほが重耇するコンテンツに察凊したす。 このプロセスには、以䞋のステップが含たれたす。 ドキュメントの MinHash 眲名を蚈算したす。 LSH を䜿甚しお、類䌌したドキュメントをバケットにグルヌプ化したす。1 ぀のドキュメントが 1 ぀以䞊のバケットに属する堎合もありたす。 同じバケット内のドキュメント間で Jaccard 類䌌床を蚈算したす。 Jaccard 類䌌床に基づいお、類䌌床行列をグラフに倉換し、グラフ内の連結成分を特定したす。 連結成分内のドキュメントは曖昧な重耇ず芋なされたす。 特定した重耇をデヌタセットから削陀したす。 この方法は、軜埮な倉曎が加えられたコンテンツの特定、郚分的なドキュメントの重耇の怜出、異なるフォヌマットであるが類䌌したコンテンツを持぀ドキュメントの怜玢に特に有甚です。蚈算効率ず重耇怜出胜力のバランスが取れおいたす。 意味的な重耇排陀 意味的な重耇排陀は、最も掗緎されたアプロヌチであり、高床な埋め蟌みモデルを䜿甚しおセマンティックな意味を捉え、クラスタリング技術ず組み合わせお意味的に類䌌したコンテンツをグルヌプ化したす。研究では、意味的な重耇排陀は、モデルのパフォヌマンスを維持たたは改善しながら、デヌタセットのサむズを効果的に瞮小できるこずが瀺されおいたす。蚀い換えられたコンテンツ、同じ玠材の翻蚳版、抂念的に同䞀の情報を特定するのに特に有甚です。 意味による重耇排陀は、以䞋のステップで構成されたす。 各デヌタ ポむントが、事前孊習枈みモデルを䜿甚しお埋め蟌たれたす。 埋め蟌みは、k-means を䜿甚しお k 個のクラスタヌにグルヌプ化されたす。 各クラスタヌ内で、ペアごずのコサむン類䌌床が蚈算されたす。 閟倀を超えるコサむン類䌌床を有するデヌタ ペアは、意味の重耇ず芋なされたす。 クラスタヌ内の意味的な重耇の各グルヌプから、1 ぀の代衚的なデヌタポむントが保持され、残りは削陀されたす。 モデルベヌスの品質フィルタリング モデルベヌスの品質フィルタリングでは、さたざたな皮類のモデルを䜿甚しお、品質指暙に基づいおコンテンツを評䟡しおフィルタリングしたす。モデルの皮類の遞択は、フィルタリングの有効性ず必芁な蚈算リ゜ヌスの䞡方に倧きな圱響を及がすため、特定のナヌス ケヌスに適切なモデルを遞択するこずが重芁です。 品質フィルタリングに䜿甚できるモデルには、以䞋の皮類がありたす。 N-gram ベヌスの分類噚: 最も単玔なアプロヌチは、fastText のような N-gram ベヌスの Bag-of-Words 分類噚を䜿甚する方法です。必芁なトレヌニング デヌタ (10 䞇100 䞇サンプル) が最も少なく枈むため、効率性ず実甚性に優れおいたす。 BERT スタむルの分類噚: BERT スタむルの分類噚は䞭間的なアプロヌチであり、Transformer ベヌスのアヌキテクチャを通じおより質の高い評䟡を提䟛したす。より耇雑な蚀語パタヌンや文脈䞊の関係を捉えるこずができ、品質評䟡に効果的です。 LLM: LLM は、テキストの品質評䟡に幅広い知識を掻甚し、最も掗緎された品質評䟡機胜を提䟛したす。コンテンツの品質をより深く理解できたすが、蚈算芁件も高いため、ファむンチュヌニング甚のデヌタセットなど、小芏暡なアプリケヌションに向いおいたす。 報酬モデル: 報酬モデルは、䌚話デヌタの品質を評䟡に特化し蚭蚈された専門カテゎリです。これらのモデルは耇数の品質基準を同時に評䟡できたすが、LLM ず同じく高い蚈算芁件が求められたす。 最適な品質フィルタリング モデルの遞択には、デヌタセットの芏暡ず利甚可胜な蚈算リ゜ヌスの䞡方を考慮する必芁がありたす。倧芏暡な事前孊習デヌタセットの堎合、初期フィルタリングには軜量なモデルを䜿甚し、最終的な品質評䟡には高床なモデルを組み合わせるこずで、効率性ず有効性のバランスが埗られたす。品質が重芁ずなる小芏暡で専門的なデヌタセットの堎合は、LLM や報酬モデルなどのモデルを䜿甚するこずが、より実珟的で有益ずなりたす。 PII の削陀 個人を特定できる情報 (PII) の削陀には、個人のプラむバシヌを保護し、デヌタ保護芏制に察する遵守を確実にするために、デヌタセット内の機密情報を識別および削陀するこずが含たれたす。 このプロセスは、氏名や瀟䌚保障番号などの盎接的な識別子から、他のデヌタず組み合わせるこずで個人を識別できる間接的な識別子たで、個人情報を含むデヌタセットを扱う堎合には特に重芁です。 最新の PII 削陀では、機密情報を保護するために、以䞋を含むさたざたな技術が甚いられおいたす。 デヌタ圢匏ず構造を維持しながら、機密情報を蚘号に眮き換える (たずえば、米囜瀟䌚保障番号の堎合 XXX-XX-1234 に眮き換える)。 分析の目的で参照敎合性を維持しながら、機密デヌタを機密でない同等のデヌタに眮き換える。 䞋流タスクに必芁でない堎合、その機密情報を削陀する。 党䜓ずしお PII の削陀は、デヌタのプラむバシヌを保護し、芏制を遵守し、トレヌニングず分析の目的でデヌタセットの有甚性を維持しながら、ナヌザヌず信頌関係を構築するのに圹立ちたす。 (分散凊理による) デヌタ分類 デヌタ分類は、デヌタ キュレヌションにおいお重芁な圹割を果たしたす。このプロセスでは、ドメむンや品質など倚様な属性に基づいおデヌタを敎理し、分類するこずでデヌタのバランスを取り、さたざたな知識ドメむンを代衚するものずなるようにしたす。 ドメむン分類は、䞻題に基づいおコンテンツを識別しおカテゎリヌ分けするこずで、LLM が入力テキストのコンテキストや特定のドメむンを理解するのに圹立ちたす。ドメむン情報は、開発者が朜圚的に有害たたは䞍芁なコンテンツを特定し、フィルタリングしながら、より倚様なトレヌニング デヌタセットを構築するこずを可胜にする貎重な補助的情報ずなりたす。たずえば、コンテンツを 13 の重倧なリスク カテゎリに分類する AEGIS Safety Model を䜿甚するこずで、開発者はトレヌニング デヌタから有害なコンテンツを効果的に識別し、フィルタリングするこずができたす。 数十億ものドキュメントが含たれおいるこずが倚い事前孊習コヌパスを扱う堎合、分類を行うための掚論を実行するのに倚くの蚈算凊理ず時間が必芁ずなりたす。したがっお、これらの課題を克服するには、分散凊理が適甚できるデヌタ分類が必芁です。これは、デヌタセットを耇数の GPU ノヌドに分割するこずで、分類タスクを高速化するこずによっお実珟されたす。 䞋流タスクの汚染陀去 トレヌニングの埌、LLM は通垞、芋えないテスト デヌタで構成される䞋流タスクのパフォヌマンスによっお評䟡されたす。䞋流タスクの汚染陀去は、テスト デヌタがトレヌニング デヌタセットに混入、挏掩する可胜性に察凊するステップです。これは意図しない評䟡結果をもたらすリスクを抑えたす。汚染陀去プロセスには、通垞、以䞋の䞻芁なステップが含たれたす。 朜圚的な䞋流タスクずそのテスト セットを特定したす。 テスト デヌタを N-gram 衚珟に倉換したす。 トレヌニング コヌパスで䞀臎する N-gram を怜玢したす。 ドキュメントの敎合性を維持しながら、汚染されたセクションを削陀たたは修正したす。 この䜓系的なアプロヌチは、デヌタの品質に察する意図しない圱響を最小限に抑えながら、汚染陀去の効果を確実なものにしお、最終的には、より信頌性の高いモデルの評䟡ず開発に貢献したす。 ブレンドずシャッフル デヌタのブレンドずシャッフルは、デヌタ キュレヌション パむプラむンにおける最終ステップであり、耇数のキュレヌションされたデヌタセットを組み合わせるず同時に適切なランダム性を確保し、最適なモデル トレヌニングを実珟したす。このプロセスは、モデルの䞀般化ずパフォヌマンスを向䞊させる、倚様でバランスの取れたトレヌニング デヌタセットを䜜成する䞊で䞍可欠です。デヌタのブレンドでは、耇数の゜ヌスからのデヌタを統合しお単䞀のデヌタセットに結合し、より包括的で倚様なトレヌニング デヌタを䜜成したす。ブレンド プロセスは、次の 2 ぀のアプロヌチを䜿甚しお実装されたす。 オンラむン: トレヌニング䞭にデヌタが結合される オフラむン: トレヌニング前にデヌタセットが結合される それぞれのアプロヌチには、トレヌニング プロセスの特定の芁件ず最終的なデヌタセットの䜿甚目的に応じお異なる利点がありたす。 合成デヌタの生成 前凊理フェヌズの耇雑なプロセスを終えたしたが、珟圚、LLM 開発の分野ではデヌタの䞍足ずいう倧きな課題に盎面しおいたす。LLM が孊習甚デヌタセットを倧量に必芁ずするのは、チュヌニングを目的ずする堎合でも同様であり、その飜くなき芁求は、特定のドメむンや蚀語に特化したデヌタの入手可胜性を䞊回るこずも少なくありたせん。この問題に察凊する 合成デヌタ生成 (SDG: Synthetic Data Generation) は、LLM を掻甚しお、プラむバシヌの保護ずデヌタの有甚性を確保しながら、珟実のデヌタ特性を暡倣した人工的なデヌタセットを生成する匷力なアプロヌチです。このプロセスでは倖郚 LLM サヌビスを䜿甚しお、事前孊習、ファむンチュヌニング、他のモデルの評䟡に䜿甚できる、高品質で倚様か぀文脈的に関連性の高いデヌタを生成したす。 SDG は、䜎リ゜ヌス蚀語に LLM が適応できるようにするこずで、ドメむンの専門性をサポヌトし、モデル間の知識の抜出を促進し、モデル機胜を拡匵する汎甚的なツヌルになりたす。SDG は、特に実デヌタが䞍足しおいたり、機密であったり、取埗するのが困難だったりするシナリオにおいお、重芁な存圚ずなっおいたす。 図 2. NeMo Curator による䞀般的な合成デヌタ生成アヌキテクチャ 合成デヌタ パむプラむンには、生成、批評、フィルタヌの 3 ぀の䞻芁なステップがありたす。 生成: プロンプト ゚ンゞニアリングを䜿甚しお、さたざたなタスク甚の合成デヌタを生成したす。 Nemotron-4 を䟋にずるず、SDG は、5 皮類の異なるタスク (自由圢匏 QA、遞択匏 QA、蚘述匏課題、コヌディング、数孊問題) のトレヌニング デヌタを生成するために適甚されたす。 批評: LLM Reflection、LLM-as-judge、報酬モデル掚論、その他の゚ヌゞェントなどの手法を䜿甚しお、合成デヌタの品質を評䟡したす。評䟡結果は SDG LLM ぞのフィヌドバックずしお䜿甚し、より良い結果を生成したり、䜎品質デヌタをフィルタリングしたりするこずができたす。代衚的な䟋は Nemotron-4-340B reward NIM です。これは、5 ぀の䞻芁な属性、すなわち Helpfulness (有甚性)、Correctness (正確性)、Coherence (䞀貫性)、Complexity (耇雑性)、Verbosity (冗長性) を通じおデヌタの品質を評䟡したす。これらの属性スコアに適切な閟倀を蚭定するこずで、フィルタリング凊理では、䜎品質たたは䞍適切なコンテンツを陀倖しながら、高品質な合成デヌタのみが保持されるようになりたす。 フィルタヌ: 重耇排陀や PII の削陀などのステップで、SDG デヌタの品質をさらに向䞊させたす。 ただし、SDG がすべおのケヌスに適しおいるわけではないこずに泚意しおください。倖郚 LLM による幻芚は、信頌性の䜎い情報をもたらし、デヌタの敎合性を損なう可胜性がありたす。加えお、生成されたデヌタの分垃がタヌゲットの分垃ず䞀臎しない可胜性があり、珟実䞖界のパフォヌマンスに悪圱響を及がす可胜性がありたす。そのような堎合は、SDG を䜿甚するこずで、システムの効率性を改善するどころか、むしろ䜎䞋させる可胜性がありたす。 ゜ブリン AI LLM 構築のためのデヌタ凊理 オヌプン゜ヌス LLM は英語では優れおいたすが、その他の蚀語、特に東南アゞアの蚀語では苊戊しおいたす。この䞻な原因は、これらの蚀語のトレヌニング デヌタの䞍足、珟地の文化に察する理解が限られおいるこず、独自の蚀語構造ず衚珟を捉えるのに十分なトヌクンが䞍足しおいるこずです。 英語圏以倖の囜々の䌁業は、顧客のニヌズを完党に満たすため、汎甚モデルにずどたらず、珟地の蚀語のニュアンスを捉えるためにモデルをカスタマむズし、シヌムレスでむンパクトのある顧客䜓隓を確保する必芁がありたす。䟋えば、Viettel Solutions は、NeMo Curator を䜿甚しお、 高品質なベトナム語デヌタ を凊理し、粟床を 10% 向䞊させ、デヌタセットのサむズを 60% 削枛し、トレヌニングを 3 倍高速化したした。 このナヌス ケヌスの䞻な手順は次のずおりです。 いく぀かのベトナム語および倚蚀語デヌタセット (Wikipedia、ベトナム語ニュヌス コヌパス、 OSCAR 、C4) をダりンロヌドし、倧芏暡なデヌタセットを効率的に凊理するために、Parquet に倉換したす。 耇数のデヌタセットを結合、暙準化し、単䞀のデヌタセットにシャヌドしたす。 Unicode の再フォヌマット、厳密な重耇排陀、品質フィルタリング (ヒュヌリスティックおよび分類噚ベヌス) を適甚したす。 詳现は、この チュヌトリアル を参照しおください。 NVIDIA NeMo Curator によるデヌタの品質向䞊 ここたで、LLM の粟床向䞊におけるデヌタ品質の重芁性に぀いお、そしおさたざたなデヌタ凊理手法に぀いお説明しおきたした。開発者は、 NeMo Curator を介しお盎接これらの手法を詊すこずができたす。NeMo Curator は、カスタマむズ可胜なモゞュヌル匏のむンタヌフェむスを提䟛しおいるため、開発者はそれをベヌスに簡単に構築するこずができたす。 NeMo Curator は、cuDF、cuML、cuGraph、Dask などの NVIDIA RAPIDS GPU で高速化されたラむブラリを䜿甚しお、マルチノヌド、マルチ GPU におけるワヌクロヌドを高速化し、必芁に応じおスケヌルさせ、凊理時間を削枛できたす。䟋えば、GPU を䜿甚しおデヌタ凊理のパむプラむンを高速化するこずで、 Zyphra は総所有コスト (TCO) を 50% 削枛し、デヌタを 10 倍高速に凊理しおいたす (3 週間から 2 日間)。 たずは、 NVIDIA/NeMo-Curator GitHub リポゞトリ ず、以䞋のさたざたなデヌタ キュレヌションのワヌクフロヌを網矅しおいる チュヌトリアル をご芧ください。 事前孊習のためのデヌタ凊理 カスタマむズのためのデヌタ凊理 SDG パむプラむン たた、 NeMo フレヌムワヌク コンテナヌ を介しおアクセスし、 NVIDIA AI Enterprise ラむセンスで゚ンタヌプラむズ サポヌトをリク゚ストするこずもできたす。 関連情報 GTC セッション: セキュアな゚ンタヌプラむズ デヌタでカスタム LLM アプリを数分で構築する GTC セッション: LLM むンフラの構築、トレヌニング速床の高速化、生成 AI むノベヌションの掚進のための゚ンドツヌ゚ンドの゜リュヌションの蚭蚈 (Aivres 提䟛) NGC コンテナヌ: genai-llm-playground NGC コンテナヌ: rag-application-query-decomposition-agent りェビナヌ: AI による医療ワヌクフロヌの倉革: CLLM を深く掘り䞋げる
https://developer.nvidia.com/blog/expanding-ai-agent-interface-options-with-2d-and-3d-digital-human-avatars/
Expanding AI Agent Interface Options with 2D and 3D Digital Human Avatars
When interfacing with generative AI applications, users have multiple communication options—text, voice, or through digital avatars. Traditional chatbot or copilot applications have text interfaces where users type in queries and receive text-based responses. For hands-free communication, speech AI technologies like automatic speech recognition (ASR) and text-to-speech (TTS) facilitate verbal interactions, ideal for scenarios like phone-based customer service. Moreover, combining digital avatars with speech capabilities provides a more dynamic interface for users to engage visually with the application. According to Gartner, by 2028, 45% of organizations with more than 500 employees will leverage employee AI avatars to expand the capacity of human capital. 1 Digital avatars can vary widely in style—some use cases benefit from photorealistic 3D or 2D avatars, while other use cases work better with a stylized, or cartoonish avatar. 3D Avatars offer fully immersive experiences, showcasing lifelike movements and photorealism. Developing these avatars requires specialized software and technical expertise, as they involve intricate body animations and high-quality renderings. 2D Avatars are quicker to develop and ideal for web-embedded solutions. They offer a streamlined approach to creating interactive AI, often requiring artists for design and animation but less intensive in terms of technical resources. To kickstart your creation of a photo-realistic digital human, the NVIDIA AI Blueprint on digital humans for customer service can be tailored for various use cases. This functionality is now included with support for the NVIDIA Maxine Audio2Face-2D NIM microservice. ‌Additionally, the blueprint now offers flexibility in rendering for 3D avatar developers to use Unreal Engine . How to add a talking digital avatar to your agent application In the AI Blueprint for digital humans, a user interacts with an AI agent that leverages NVIDIA ACE technology (Figure 1). Figure 1. Architecture diagram for the NVIDIA AI Blueprint for digital humans The audio input from the user is sent to the ACE agent which orchestrates the communication between various NIM microservices. The ACE agent uses the Riva Parakeet NIM to convert the audio to text, which is then processed by a RAG pipeline. The RAG pipeline uses the NVIDIA NeMo Retriever embedding and reranking NIM microservices, and an LLM NIM , to respond with relevant context from stored documents. Finally, the response is converted back to speech via Riva TTS, animating the digital human using the Audio2Face-3D NIM or Audio2Face-2D NIM. Considerations when designing your AI agent application In global enterprises, communication barriers across languages can slow down operations. AI-powered avatars with multilingual capabilities communicate across languages effortlessly. The digital human AI Blueprint provides conversational AI capabilities that simulate human interactions that accommodate users’ speech styles and languages through Riva ASR, neural machine translation (NMT) along with intelligent interruption and barge-in support. One of the key benefits of digital human AI agents is their ability to function as “always-on” resources for employees and customers alike. RAG-powered AI agents continuously learn from interactions and improve over time, providing more accurate responses and better user experiences. For enterprises considering digital human interfaces, choosing the right avatar and rendering option depends on the use case and customization preferences. Use Case : 3D avatars are ideal for highly immersive use cases like in physical stores, kiosks or primarily one-to-one interactions, while 2D avatars are effective for web or mobile conversational AI use cases. Development and Customization Preferences : Teams with 3D and animation expertise can leverage their skillset to create an immersive and ultra-realistic avatar, while teams looking to iterate and customize quickly can benefit from the simplicity of 2D avatars. Scaling Considerations: Scaling is an important consideration when evaluating avatars and corresponding rendering options. Stream throughput, especially for 3D avatars, is highly dependent on the choice and quality of the character asset used, the desired output resolution and the rendering option of choice (Omniverse Renderer or Unreal Engine) can play a critical role in determining per stream compute footprint. NVIDIA Audio2Face-2D allows creation of lifelike 2D avatars from just a portrait image and voice input. Easy and simple configurations allow developers to quickly iterate and produce target avatars and animations for their digital human use cases. With real-time output and cloud-native deployment, 2D digital humans are ideal for interactive use cases and streaming avatars for interactive web-embedded solutions. For example, enterprises looking to deploy AI agents across multiple devices and inserting digital humans into web- or mobile-first customer journeys, can benefit from the reduced hardware demands of 2D avatars. 3D photorealistic avatars provide an unmatched immersive experience for use cases demanding ‌highly empathetic user engagement. NVIDIA Audio2Face-3D and Animation NIM microservices animate a 3D character by generating blendshapes along with subtle head and body animation to create an immersive, photorealistic avatar. The digital human AI Blueprint now supports two rendering options for 3D avatars, including Omniverse Renderer and Unreal Engine Renderer, providing developers the flexibility to integrate the rendering option of their choice. To explore how digital humans can enhance your enterprise, visit the NVIDIA API catalog to learn about the different avatar options. Getting started with digital avatars For hands-on development with Audio2Face-2D and Unreal Engine NIM microservices, apply for ACE Early Access or dive into the digital human AI Blueprint technical blog to learn how you can add digital human interfaces to personalize chatbot applications. 1 Gartner®, Hype Cycle for the Future of Work, 2024 by Tori Paulman, Emily Rose McRae, etc., July 2024 GARTNER is a registered trademark and service mark of Gartner, Inc. and/or its affiliates in the U.S. and internationally and is used herein with permission. All rights reserved.
https://developer.nvidia.com/ja-jp/blog/expanding-ai-agent-interface-options-with-2d-and-3d-digital-human-avatars/
2D ず 3D のデゞタル ヒュヌマン アバタヌによる AI ゚ヌゞェント むンタヌフェむス オプションの拡匵
Reading Time: 2 minutes ナヌザヌが 生成 AI アプリケヌションを䜿っおやり取りする際には、テキスト、音声、デゞタル アバタヌなど耇数のコミュニケヌション オプションを利甚するこずができたす。 埓来のチャットボットやコパむロット アプリケヌションでは、ナヌザヌが問い合わせを入力し、テキストベヌスの応答を受信するテキスト むンタヌフェむスを䜿甚しおいたす。ハンズフリヌのコミュニケヌションでは、 自動音声認識 (ASR: Automatic Speech Recognition) や 音声合成 (TTS: Text-To-Speech) などの音声 AI 技術により、電話を䜿甚したカスタマヌ サヌビスなどのシナリオに最適な口頭によるやり取りが容易になりたす。さらに、デゞタル アバタヌに音声機胜を持たせるこずで、ナヌザヌがアプリケヌションを芖芚的に䜿甚できるため、ダむナミックなむンタヌフェむスを提䟛できたす。Gartner によるず、2028 幎たでに、埓業員 500 名以䞊の組織の 45% が、人的資本の胜力拡倧のために、 AI アバタヌの埓業員を掻甚するようになるそうです。 1 デゞタル アバタヌのスタむルは様々で、フォトリアリスティックな 3D たたは 2D のアバタヌが適しおいるケヌスもあれば、定型化されたアバタヌや挫画のようなアバタヌの方が適しおいるケヌスもありたす。 3D アバタヌ は、リアルな動きず写実性を再珟し、完党な没入䜓隓を提䟛したす。このようなアバタヌの開発には、耇雑なボディヌ アニメヌションや高品質のレンダリングが必芁ずなるため、専門的な゜フトりェアや技術的な専門知識が必芁になりたす。 2D アバタヌ は開発が迅速で、Web に組み蟌み゜リュヌションに最適です。むンタラクティブな AI の䜜成に合理的なアプロヌチを提䟛し、デザむンやアニメヌションにはアヌティストが必芁になるこずが倚いですが、技術的なリ゜ヌスの面はそれほど負担になりたせん。 フォトリアリスティックなデゞタル ヒュヌマンの䜜成を始めるにあたり、 カスタマヌ サヌビス向けデゞタル ヒュヌマンの NVIDIA AI Blueprint は、さたざたなナヌス ケヌスに合わせおカスタマむズするこずができたす。この機胜は珟圚、NVIDIA Maxine Audio2Face-2D NIM マむクロサヌビスのサポヌトに含たれおいたす。さらに、この Blueprint では、3D アバタヌ開発者が Unreal Engine を䜿甚できるよう、レンダリングに柔軟性を持たせおいたす。 ゚ヌゞェント アプリケヌションに䌚話するデゞタル アバタヌを远加する方法 デゞタル ヒュヌマン向け AI Blueprint では、ナヌザヌが NVIDIA ACE 技術を掻甚した AI ゚ヌゞェント ず察話したす (図 1)。 図 1. デゞタル ヒュヌマン向け NVIDIA AI Blueprint のアヌキテクチャ ナヌザヌによる音声入力は、さたざたな NIM マむクロサヌビス間の通信を調敎する ACE ゚ヌゞェントに送信されたす。ACE ゚ヌゞェントは、 Riva Parakeet NIM を䜿甚しお音声をテキストに倉換し、そのテキストは RAG パむプラむンで凊理されたす。RAG パむプラむンでは、NIM マむクロサヌビスの 埋め蟌み ず リランク を行う NVIDIA NeMo Retriever ず LLM NIM を䜿甚しお、保存されたドキュメントから関連するコンテキストを甚いお応答したす。 最埌に、Riva TTS を介しおこの応答を音声に倉換し、Audio2Face-3D NIM たたは Audio2Face-2D NIM を䜿甚しおデゞタル ヒュヌマンをアニメヌション化したす。 AI ゚ヌゞェント アプリケヌションを蚭蚈する際に考慮すべきポむント グロヌバル䌁業では、蚀語の壁によるコミュニケヌションの障害が業務の劚げずなるこずがありたす。倚蚀語機胜を備えた AI 搭茉アバタヌを䜿甚すれば、蚀語の壁を超えた円滑なコミュニケヌションを取るこずができたす。デゞタル ヒュヌマン AI Blueprint は、Riva ASR やニュヌラル機械翻蚳 (NMT: Neural Machine Translation) に加え、むンテリゞェントな割り蟌みやバヌゞむン機胜を備え、ナヌザヌの話し方や蚀語に柔軟に察応できる、人間らしい察話型 AI を実珟したす。 デゞタル ヒュヌマン AI ゚ヌゞェントの䞻な利点の 1 ぀は、埓業員ず顧客の䞡者にずっお「垞時皌働する」リ゜ヌスずしお機胜できるこずです。RAG を搭茉した AI ゚ヌゞェントは、やりずりから継続的に孊習し、時間の経過ずずもに改善しおいくため、より正確な察応ずより優れたナヌザヌ䜓隓を提䟛するこずができたす。 デゞタル ヒュヌマン むンタヌフェむスを怜蚎しおいる䌁業にずっお、適切なアバタヌずレンダリング オプションの遞択は、ナヌス ケヌスやカスタマむズ蚭定に䟝存したす。 ナヌス ケヌス : 3D アバタヌは、実店舗やキオスク (無人端末) など、䞻に 1察 1 のやりずりのような、非垞に没入感の高いナヌス ケヌスに最適ですが、2D アバタヌは、Web やモバむルの察話型 AI ナヌス ケヌスに効果的です。 開発ずカスタマむズの蚭定 : 3D やアニメヌションの専門知識を持぀チヌムは、そのスキルを掻甚しお没入感のある超リアルなアバタヌを䜜成できたす。䞀方、反埩䜜業やカスタマむズを迅速に行いたいチヌムには、シンプルな 2D アバタヌが有効です。 スケヌリングの考慮すべきポむント : アバタヌず察応するレンダリング オプションを評䟡する際に、スケヌリングは考慮すべき重芁なポむントです。ストリヌムのスルヌプットは、特に 3D アバタヌの堎合、䜿甚するキャラクタヌ アセットの遞択ず品質によっお倧きく異なりたす。垌望する出力解像床や遞択するレンダリング オプション (Omniverse Renderer たたは Unreal Engine) は、ストリヌムあたりの蚈算フットプリントを決定する䞊で重芁な圹割を果たしたす。 NVIDIA Audio2Face-2D では、顔写真ず音声入力だけでリアルな 2D アバタヌを䜜成できたす。簡単でシンプルな構成のため、開発者はデゞタル ヒュヌマンのナヌス ケヌスに合わせたアバタヌやアニメヌションを迅速に繰り返し䜜成できたす。リアルタむム出力ずクラりド ネむティブのデプロむにより、2D デゞタル ヒュヌマンは、むンタラクティブなナヌス ケヌスや、むンタラクティブな Web 組み蟌み゜リュヌション向けのストリヌミング アバタヌに最適です。 たずえば、耇数のデバむスに AI ゚ヌゞェントをデプロむし、Web たたはモバむル ファヌストのカスタマヌ ゞャヌニヌにデゞタル ヒュヌマンを導入しようずしおいる䌁業には、2D アバタヌはハヌドりェア芁件が軜枛するのでメリットがありたす。 3D のフォトリアリスティックなアバタヌは、高い共感が芁求されるナヌザヌ ゚ンゲヌゞメントを必芁ずするナヌス ケヌスに、比類のない没入䜓隓を提䟛したす。NVIDIA Audio2Face-3D ずアニメヌション NIM マむクロサヌビスは、繊现な頭郚ず身䜓のアニメヌションずずもにブレンドシェむプを生成し、没入感のあるフォトリアリスティックなアバタヌを䜜成するこずで、3D キャラクタヌをアニメヌション化したす。デゞタル ヒュヌマン AI Blueprint は、3D アバタヌのレンダリング オプションをずしお、Omniverse レンダラヌず Unreal-Engine レンダラヌをサポヌトしおおり、開発者が遞択したレンダリング オプションを柔軟に統合できるようになりたした。 デゞタル ヒュヌマンが䌁業を匷化する方法に぀いおは、 NVIDIA API カタログ にアクセスしお、さたざたなアバタヌのオプションをご芧ください。 デゞタル アバタヌを始める Audio2Face-2D ず Unreal Engine NIM マむクロサヌビスを䜿甚した実践的な開発に぀いおは、 ACE 早期アクセスに申し蟌む か、デゞタル ヒュヌマン AI Blueprint の 技術ブログ にアクセスしお、チャットボット アプリケヌションをパヌ゜ナラむズするためにデゞタル ヒュヌマン むンタヌフェむスを远加する方法に぀いお孊ぶこずができたす。 1 Gartner®, Hype Cycle for the Future of Work, 2024 by Tori Paulman, Emily Rose McRae, etc., July 2024 GARTNER is a registered trademark and service mark of Gartner, Inc. and/or its affiliates in the U.S. and internationally and is used herein with permission. All rights reserved. 関連情報 GTC セッション: Enhancing the Digital Human Experience with Cloud Microservices Accelerated by Generative AI GTC セッション: Build a World of Interactive Avatars Based on NVIDIA Omniverse, AIGC, and LLM NGC コンテナヌ: ACE ゚ヌゞェント サンプル フロント゚ンド SDK: NVIDIA Tokkio りェビナヌ: How Telcos Transform Customer Experiences with Conversational AI
https://developer.nvidia.com/blog/ai-ran-goes-live-and-unlocks-a-new-ai-opportunity-for-telcos/
AI-RAN Goes Live and Unlocks a New AI Opportunity for Telcos
AI is transforming industries, enterprises, and consumer experiences in new ways. Generative AI models are moving towards reasoning, agentic AI is enabling new outcome-oriented workflows and physical AI is enabling endpoints like cameras, robots, drones, and cars to make decisions and interact in real time. The common glue between all these use cases is the need for pervasive, reliable, secure, and super-fast connectivity. Telecommunication networks must prepare for this new kind of AI traffic, which can come directly through the fronthaul wireless access network or backhauled from the public or private cloud as a completely standalone AI inferencing traffic generated by enterprise applications. Local wireless infrastructure offers an ideal place to process AI inferencing. This is where a new approach to telco networks, AI radio access network ( AI-RAN ), stands out. Traditional CPU or ASIC-based RAN systems are designed only for RAN use and cannot process AI traffic today. AI-RAN enables a common GPU-based infrastructure that can run both wireless and AI workloads concurrently, turning networks from single-purpose to multi-purpose infrastructures and turning sites from cost-centers to revenue sources. With a strategic investment in the right kind of technology, telcos can leap forward to become the AI grid that facilitates the creation, distribution, and consumption of AI across industries, consumers, and enterprises. This moment in time presents a massive opportunity for telcos to build a fabric for AI training (creation) and AI inferencing (distribution) by repurposing their central and distributed infrastructures. SoftBank and NVIDIA fast-forward AI-RAN commercialization SoftBank has turned the AI-RAN vision into reality, with its successful outdoor field trial in Fujisawa City, Kanagawa, Japan, where NVIDIA-accelerated hardware and NVIDIA Aerial software served as the technical foundation. This achievement marks multiple steps forward for AI-RAN commercialization and provides real proof points addressing industry requirements on technology feasibility, performance, and monetization: World’s first outdoor 5G AI-RAN field trial running on an NVIDIA-accelerated computing platform. This is an end-to-end solution based on a full-stack, virtual 5G RAN software integrated with 5G core. Carrier-grade virtual RAN performance achieved. AI and RAN multi-tenancy and orchestration achieved. Energy efficiency and economic benefits validated compared to existing benchmarks. A new solution to unlock AI marketplace integrated on an AI-RAN infrastructure. Real-world AI applications showcased, running on an AI-RAN network. Above all, SoftBank aims to commercially release their own AI-RAN product for worldwide deployment in 2026. To help other mobile network operators get started on their AI-RAN journey now, SoftBank is also planning to offer a reference kit comprising the hardware and software elements required to trial AI-RAN in a fast and easy way. End-to-end AI-RAN solution and field results SoftBank developed their AI-RAN solution by integrating hardware and software components from NVIDIA and ecosystem partners and hardening them to meet carrier-grade requirements. Together, the solution enables a full 5G vRAN stack that is 100% software-defined, running on NVIDIA GH200 (CPU+GPU), NVIDIA Bluefield-3 (NIC/DPU), and Spectrum-X for fronthaul and backhaul networking. It integrates with 20 radio units and a 5G core network and connects 100 mobile UEs. The core software stack includes the following components: SoftBank-developed and optimized 5G RAN Layer 1 functions such as channel mapping, channel estimation, modulation, and forward-error-correction, using NVIDIA Aerial CUDA-Accelerated-RAN libraries Fujitsu software for Layer 2 functions Red Hat’s OpenShift Container Platform (OCP) as the container virtualization layer, enabling different types of applications to run on the same underlying GPU computing infrastructure A SoftBank-developed E2E AI and RAN orchestrator, to enable seamless provisioning of RAN and AI workloads based on demand and available capacity The underlying hardware is the NVIDIA GH200 Grace Hopper Superchip , which can be used in various configurations from distributed to centralized RAN scenarios. This implementation uses multiple GH200 servers in a single rack, serving AI and RAN workloads concurrently, for an aggregated-RAN scenario. This is comparable to deploying multiple traditional RAN base stations. In this pilot, each GH200 server was able to process 20 5G cells using 100-MHz bandwidth, when used in RAN-only mode. For each cell, 1.3 Gbps of peak downlink performance was achieved in ideal conditions, and 816Mbps was demonstrated with carrier-grade availability in the outdoor deployment. AI-RAN multi-tenancy achieved One of the first principles of AI-RAN technology is to be able to run RAN and AI workloads concurrently and without compromising carrier-grade performance. This multi-tenancy can be either in time or space: dividing the resources based on time of day or based on percentage of compute. This also implies the need for an orchestrator that can provision, de-provision, or shift workloads seamlessly based on available capacity. At the Fujisawa City trial, concurrent AI and RAN processing was successfully demonstrated over GH200 based on static allocation of resources between RAN and AI workloads (Figure 1). Figure 1. AI and RAN concurrency and total GPU utilization Each NVIDIA GH200 server constitutes multiple MIGs (Multi-Instance GPU), that enable a single GPU to be divided into multiple isolated GPU instances. Each instance has its own dedicated resources, such as memory, cache, and compute cores, and can operate independently. The SoftBank orchestrator intelligently assigns whole GPUs or some MIGs within a GPU to run AI and some to run RAN workloads and switches them dynamically when needed. It is also possible to statically allocate a certain percentage of compute for RAN and AI, for example, 60% for RAN and 40% for AI instead of demand-based allocation. The goal is to maximize capacity utilization. With AI-RAN, telcos can achieve almost 100% utilization compared to 33% capacity utilization for typical RAN-only networks. This is an increase of up to 3x while still catering to peak RAN loads, thanks to dynamic orchestration and prioritization policies. Enabling an AI-RAN marketplace With a new capacity for AI computing now available on distributed AI-RAN infrastructure, the question arises of how to bring AI demand to this AI computing supply. To solve this, SoftBank used a serverless API powered by NVIDIA AI Enterprise to deploy and manage AI workloads on AI-RAN, with security, scale, and reliability. The NVIDIA AI Enterprise serverless API is hosted on the AI-RAN infrastructure and integrated with the SoftBank E2E AI-RAN orchestrator. It connects to any public or private cloud running the same API, to dispatch external AI inferencing jobs to the AI-RAN server when compute is available (Figure 2). Figure 2. AI marketplace solution integrated with SoftBank AI-RAN This solution enables an AI marketplace, helping SoftBank deliver localized, low-latency, secured inferencing services. It also demonstrated the importance of AI-RAN in helping telcos become the AI distribution grid, particularly for external AI inferencing jobs, and opened a new revenue opportunity. AI-RAN applications showcased In this outdoor trial, new edge AI applications developed by SoftBank were demonstrated over the live AI-RAN network: Remote support of autonomous vehicles over 5G Factory multi-modal AI applications Robotics applications Remote support of autonomous vehicles over 5G The key requirements of the social implementation of autonomous driving are vehicle safety and reducing operational costs. At the Fujisawa City trial, SoftBank demonstrated an autonomous vehicle, relaying its front camera video using 5G to an AI-based remote support service hosted on the AI-RAN server. Multi-modal AI models analyzed the video stream, did risk assessment, and sent recommended actions to autonomous vehicles using text over 5G. This is an example of explainable AI as well, as all the actions of the autonomous vehicle could be monitored and explained through summarized text and logging for remote support. Factory multi-modal AI applications In this use case, multi-modal inputs including video, audio, and sensor data, are streamed using 5G into the AI-RAN server. Multiple LLMs, VLMs, retrieval-augmented generation (RAG) pipelines, and NVIDIA NIM microservices hosted on the AI-RAN server are used to coalesce these inputs and make the knowledge accessible through a chat interface to users using 5G. This fits well for factory monitoring, construction site inspections, and similar complex indoor and outdoor environments. The use case demonstrates how edge AI-RAN enables local data sovereignty by keeping data access and analysis local, secure, and private, which is a mandatory requirement of most enterprises. Robotics applications SoftBank demonstrated the benefit of edge AI inferencing for a robot connected over 5G. A robodog was trained to follow a human based on voice and motion. The demo compared the response time of the robot when the AI inferencing was hosted on the local AI-RAN server to when it was hosted on the central cloud. The difference was apparent and obvious. The edge-based inference robodog followed the human’s movements instantly, while the cloud-based inference robot struggled to keep up. Accelerating the AI-RAN business case with the Aerial RAN Computer-1 While the AI-RAN vision has been embraced by the industry, the energy efficiency and economics of GPU-enabled infrastructure remain key requirements, particularly how they compare to traditional CPU– and ASIC-based RAN systems. With this live field trial of AI-RAN, SoftBank and NVIDIA have not only proven that GPU-enabled RAN systems are feasible and high-performant, but they are also significantly better in energy efficiency and economic profitability. NVIDIA recently announced the Aerial RAN Computer-1 based on the next-generation NVIDIA Grace Blackwell superchips as the recommended AI-RAN deployment platform. The goal is to migrate SoftBank 5G vRAN software from NVIDIA GH200 to NVIDIA Aerial RAN Computer-1 based on GB200-NVL2, which is an easier shift given the code is already CUDA-ready. With GB200-NVL2 , the available compute for AI-RAN will increase by a factor of 2x. The AI processing capabilities will improve by 5x for Llama-3 inferencing, 18x for data processing, and 9x for vector database search compared to prior H100 GPU systems. For this evaluation, we compared the target deployment platform, Aerial RAN Computer-1 based on GB200 NVL2, with the latest generation of x86 and the best-in-class custom RAN product benchmarks and validated the following findings: Accelerated AI-RAN offers best-in-class AI performance Accelerated AI-RAN is sustainable RAN Accelerated AI-RAN is highly profitable Accelerated AI-RAN offers best-in-class AI performance In 100% AI-only mode, each GB200-NVL2 server generates 25000 tokens/second, which translates to $20/hr of available monetizable compute per server, or $15K/month per server. Keeping in mind that the average revenue per user (ARPU) of wireless services today ranges between $5–50/month depending on the country, AI-RAN opens a new multi-billion-dollar AI revenue opportunity that is orders of magnitude higher than revenues from RAN-only systems. The token AI workload used is Llama-3-70B FP4, showcasing that AI-RAN is already capable of running the world’s most advanced LLM models. Accelerated AI-RAN is sustainable RAN In 100% RAN-only mode, GB200-NVL2 server power performance in Watt/Gbps shows the following benefits: 40% less power consumption than the best-in-class custom RAN-only systems today 60% less power consumption than x86-based vRAN For an even comparison, this assumes the same number of 100-MHz 4T4R cells and 100% RAN-only workload across all platforms. Figure 3. RAN power consumption and performance (watt/Gbps) Accelerated AI-RAN is highly profitable For this evaluation, we used the scenario of covering one district in Tokyo with 600 cells as the common baseline for RAN deployment for each of the three platforms being compared. We then looked at multiple scenarios for AI and RAN workload distribution, ranging from RAN-only to RAN-heavy or AI-heavy. In the AI-heavy scenario (Figure 4), we used a one-third RAN and two-third AI workload distribution: For every dollar of CapEx investment in accelerated AI-RAN infrastructure based on NVIDIA GB200 NVL2, telcos can generate 5x the revenue over 5 years. From an ROI perspective, the overall investment delivers a 219% return, considering all CapEx and OpEx costs.This is of course specific to SoftBank, as it uses local country costs assumptions. Figure 4. AI-RAN economics for covering one Tokyo district with 600 cells 33% AI and 67% RAN 67% AI and 33% RAN $ of revenue per $ of CapEx 2x 5x ROI % 33% 219% Table 1. AI-heavy scenario compared to RAN-heavy results In the RAN-heavy scenario, we used two-thirds RAN and one-third AI workload distribution and found that revenue divided by CapEx for NVIDIA-accelerated AI-RAN is 2x, with a 33% ROI over 5 years, using SoftBank local cost assumptions. In the RAN-only scenario, NVIDIA Aerial RAN Computer-1 is more cost-efficient than custom RAN-only solutions, which underscores the benefits of using accelerated computing for radio signal processing. From these scenarios, it is evident that AI-RAN is highly profitable as compared to RAN-only solutions, in both AI-heavy and RAN-heavy modes. In essence, AI-RAN transforms traditional RAN from a cost center to a profit center. The profitability per server improves with higher AI use. Even in RAN-only, AI-RAN infrastructure is more cost-efficient than custom RAN-only options. Key assumptions used for the revenue and TCO calculations include the following: The respective number of platforms, servers, and racks for each platform are calculated using a common baseline of deploying 600 cells on the same frequency, 4T4R. The total cost of ownership (TCO) is calculated over 5 years and includes the cost of hardware, software, and vRAN and AI operating costs. For the new AI revenue calculation, we used $20/hr/server based on GB200 NVL2 AI performance benchmarks. OpEx costs are based on local Japan power costs and aren’t extensible worldwide. ROI % = (new AI revenues – TCO) / TCO This validation of AI revenue upside, energy efficiency, and profitability of AI-RAN leaves no doubts about the feasibility, performance, and economic benefits of the technology. Going forward, exponential gains with each generation of NVIDIA superchips, such as Vera Rubin, will multiply these benefits by orders of magnitude further, enabling the much-awaited business transformation of telco networks. Looking ahead SoftBank and NVIDIA are continuing to collaborate toward the commercialization of AI-RAN and bringing new applications to life. The next phase of the engagements will entail work on AI-for-RAN to improve spectral efficiency and on NVIDIA Aerial Omniverse digital twins to simulate accurate physical networks in the digital world for fine-tuning and testing. NVIDIA AI Aerial lays the foundation for operators and ecosystem partners globally to use the power of accelerated computing and software-defined RAN + AI to transform 5G and 6G networks. You can now use NVIDIA Aerial RAN Computer-1 and AI Aerial software libraries to develop your own implementation of AI-RAN. NVIDIA AI Enterprise is also helping create new AI applications for telcos, hostable on AI-RAN, as is evident from this trial where many NVIDIA software toolkits have been used. This includes NIM microservices for generative AI, RAG, VLMs, NVIDIA Isaac for robotics training, NVIDIA NeMo, RAPIDS, NVIDIA Triton for inferencing, and a serverless API for AI brokering. The telecom industry is at the forefront of a massive opportunity to become an AI service provider. AI-RAN can kickstart this new renaissance for telcos worldwide, using accelerated computing as the new foundation for wireless networks. This announcement marks a breakthrough moment for AI-RAN technology, proving its feasibility, carrier-grade performance, superior energy efficiency, and economic value. Every dollar of CapEx invested in NVIDIA-accelerated AI-RAN infrastructure generates 5x revenues, while being 6G-ready. The journey to AI monetization can start now.
https://developer.nvidia.com/ja-jp/blog/ai-ran-goes-live-and-unlocks-a-new-ai-opportunity-for-telcos/
AI-RAN が通信事業者向けに新しい AI のビゞネス チャンスをもたらす
Reading Time: 4 minutes AI は、業界、䌁業、消費者の䜓隓を新しい方法で倉革しおいたす。 生成 AI モデルは掚論に移行し、 ゚ヌゞェント型 AI は新しい結果重芖のワヌクフロヌを可胜にし フィゞカル AI により、カメラ、ロボット、ドロヌン、自動車などの゚ンドポむントがリアルタむムで意思決定を行い、察話できるようになりたす。 これらのナヌス ケヌスに共通するのは、普及し、信頌性が高く、安党で、超高速な接続が必芁であるこずです。 通信ネットワヌクは、フロントホヌル無線アクセス ネットワヌクを介しお盎接送信されるか、゚ンタヌプラむズ アプリケヌションによっお生成されるパブリック クラりドたたはプラむベヌト クラりドからのバックホヌルからの完党にスタンドアロンの AI 掚論トラフィックのような新しい皮類の AI トラフィックに備える必芁がありたす。 ロヌカル ワむダレス むンフラストラクチャは、AI 掚論を凊理するのに最適な堎所を提䟛したす。 これは、通信䌚瀟 ネットワヌクに察する新しいアプロヌチである AI 無線アクセス ネットワヌク ( AI-RAN ) の特城です。 埓来の CPU たたは ASIC ベヌスの RAN システムは、RAN のみのために蚭蚈されおおり、珟圚では AI トラフィックを凊理できたせん。 AI-RAN は、ワむダレスず AI のワヌクロヌドを同時に実行できる共通の GPU ベヌスのむンフラストラクチャを提䟛したす。これにより、ネットワヌクを単䞀目的から倚目的むンフラストラクチャに倉え、コスト センタヌからプロフィット センタヌに倉えられたす。 適切な皮類のテクノロゞに戊略的投資を行うこずで、通信䌚瀟は業界、消費者、䌁業にわたっお AI の䜜成、配信、䜿甚を容易にする、 AI グリッドぞず飛躍するこずができたす。今が通信䌚瀟にずっお、䞭倮集䞭的で分散されたむンフラストラクチャを再利甚するこずで、AI トレヌニング (䜜成) ず AI 掚論 (配信) のためのファブリックを構築する倧きな機䌚ずなりたす。 SoftBank ず NVIDIA が AI-RANの商甚化を進める SoftBank は、NVIDIA アクセラレヌション ハヌドりェアず NVIDIA Aerial ゜フトりェアを技術基盀ずしお掻甚し、 神奈川県藀沢垂で屋倖 フィヌルド トラむアルを成功させ、 AI-RAN ビゞョンを 珟実のものにしたした。 この達成は、AI-RAN の商甚化に向けた倧きな前進であり、テクノロゞの実珟性、パフォヌマンス、収益化に関する業界の芁件に察応する実蚌ポむントを提䟛したす。 NVIDIA のアクセラレヌテッド コンピュヌティング プラットフォヌムで実行される䞖界初の屋倖 5G AI-RAN フィヌルド トラむアル。 これは、5G コアず統合されたフルスタックの仮想 5G RAN ゜フトりェアに基づく゚ンドツヌ゚ンドの゜リュヌションです。 キャリア グレヌドの仮想 RAN のパフォヌマンスを実珟。 AI ず RAN のマルチテナントずオヌケストレヌションを実珟。 ゚ネルギヌ効率ず経枈的なメリットが、既存のベンチマヌクず比范しお怜蚌されたした。 AI-RAN むンフラストラクチャに統合された AI マヌケットプレむスを提䟛する新しい゜リュヌション。 AI-RAN ネットワヌクで実行される実際の AI アプリケヌションが玹介されたす。 䜕よりも、SoftBank は、䞖界䞭に展開するために、独自の AI-RAN 補品を商業的にリリヌスするこずを目指しおいたす。 他の通信事業者が今すぐ AI-RAN の導入を支揎するために、SoftBank は、AI-RAN を詊甚するために必芁なハヌドりェアず゜フトりェアの芁玠で構成されたリファレンス キットを、簡単か぀迅速に提䟛する予定です。 ゚ンドツヌ゚ンドの AI-RAN ゜リュヌションずフィヌルド トラむアルの結果 SoftBank は、NVIDIA ず゚コシステム パヌトナヌのハヌドりェアず゜フトりェア コンポヌネントを統合し、キャリアグレヌドの芁件を満たすように匷化するこずで、AI-RAN ゜リュヌションを開発したした。 この゜リュヌションは、NVIDIA GH200 (CPU+GPU)、NVIDIA Bluefield-3 (NIC/DPU)、フロントホヌルおよびバックホヌル ネットワヌキング甚の Spectrum-X で実行される 100% ゜フトりェア デファむンドの完党な 5G vRAN スタックが実珟したす。 20 台の無線ナニットず 5G コア ネットワヌクを統合し、100 台のモバむル UE を接続したす。 コア ゜フトりェア スタックには、以䞋のコンポヌネントが含たれおいたす。 SoftBank が NVIDIA Aerial CUDA-Accelerated-RAN ラむブラリを䜿甚しお、 5G RAN レむダヌ 1 のチャネル マッピング、チャネル掚定、倉調、前方゚ラヌ蚂正などの機胜を開発し、最適化したした。 レむダヌ 2 機胜向け Fujitsu ゜フトりェア コンテナヌの仮想化レむダヌずしおの Red Hat の OpenShift Container Platform (OCP) により、同じ基盀ずなる GPU コンピュヌティング むンフラストラクチャで異なるタむプのアプリケヌションが実行されたす SoftBank が開発した E2E、AI ず RAN オヌケストレヌタヌ。需芁ず䜿甚可胜な容量に基づいお RAN ず AI のワヌクロヌドのシヌムレスなプロビゞョニングを可胜にしたす。 基盀ずなるハヌドりェアは、 NVIDIA GH200 Grace Hopper Superchip であり、分散型から集䞭型 RAN シナリオたで、さたざたな構成で䜿甚できたす。 この実装では、集玄された RAN のシナリオのために、1 ぀のラックで耇数の GH200 サヌバヌを䜿甚し、AI ず RAN のワヌクロヌドを同時に凊理したす。 これは、埓来の RAN 基地局を耇数展開するのに盞圓したす。 このパむロットでは、RAN のみのモヌドで䜿甚された堎合、各 GH200 サヌバヌは、100 MHz 垯域幅で 20 個の 5G セルを凊理するこずができたした。 各セルでは、理想的な条件䞋で 1.3 Gbps のピヌク ダりンリンク性胜が達成され、屋倖展開ではキャリアグレヌドの可甚性で 816 Mbps が実蚌されたした。 AI-RAN のマルチテナントを実珟 AI-RAN テクノロゞの第䞀の原則の 1 ぀は、キャリアグレヌドのパフォヌマンスを損なうこずなく、RAN ず AI のワヌクロヌドを同時に実行できるこずです。 このマルチテナントは、時間たたは空間のいずれかで実行でき、時間垯たたはコンピュヌティングの割合に基づいおリ゜ヌスを分割したす。 たた、これは、䜿甚可胜な容量に基づいお、ワヌクロヌドをシヌムレスにプロビゞョニング、プロビゞョニングの解陀、シフトできるオヌケストレヌタヌの必芁性も意味したす。 藀沢垂の実蚌実隓では、RAN ず AI ワヌクロヌド間のリ゜ヌスの静的割り圓おに基づいお、GH200 䞊での AI ず RAN の同時凊理が実蚌されたした。 (図 1)。 図 1. AI ず RAN の同時凊理ず GPU の合蚈䜿甚率 各 NVIDIA GH200 サヌバヌは、耇数の MIG (マルチむンスタンス GPU) で構成され、1 ぀の GPU を耇数の独立した GPU むンスタンスに分割できたす。 各むンスタンスには、メモリ、キャッシュ、コンピュヌティング コアなど、独自の専甚リ゜ヌスがあり、独立しお動䜜できたす。 SoftBank オヌケストレヌタヌは、AI を実行するために GPU 党䜓たたは GPU の䞀郚をむンテリゞェントに割り圓お、RAN のワヌクロヌドを実行し、必芁に応じお動的に切り替えたす。 需芁に基づく割り圓おではなく、RAN ず AI に䞀定の割り圓おを、RAN に 60% ず AI に 40% のコンピュヌティングを静的に割り圓おるこずもできたす。 目暙は、容量䜿甚率を最倧化するこずです。 AI-RAN を䜿甚するず、通信䌚瀟は、通垞の RAN のみのネットワヌクでの 33% の容量䜿甚率ず比范しお、ほが 100% の䜿甚率を実珟できたす。 これは、動的なオヌケストレヌションず優先順䜍付けポリシヌのおかげで、ピヌクの RAN の負荷に察応しながら、最倧 3 倍の増加です。 AI-RAN マヌケットプレむスの実珟 分散型 AI-RAN むンフラストラクチャで AI コンピュヌティングの新しい機胜が利甚できるようになったため、この AI コンピュヌティングの䟛絊に AI の需芁をどのように取り蟌むかずいう疑問が生じたす。 この問題を解決するために、SoftBank は、NVIDIA AI ゚ンタヌプラむズ を掻甚したサヌバヌレス API を䜿甚しお、セキュリティ、拡匵性、信頌性を備えお AI-RAN で AI ワヌクロヌドを展開し、管理したした。 NVIDIA AI ゚ンタヌプラむズのサヌバヌレス API は、AI-RAN むンフラストラクチャでホストされ、SoftBank E2E AI-RAN オヌケストレヌタヌず統合されおいたす。 同じ API を実行するパブリック クラりドたたはプラむベヌト クラりドに接続し、コンピュヌティングが利甚可胜になったずきに、倖郚の AI 掚論ゞョブを AI-RAN サヌバヌに割り圓おたす (図 2)。 図 2. SoftBank AI-RAN ず統合された AI マヌケットプレむス ゜リュヌション この゜リュヌションにより AI マヌケットプレむスが実珟し、゜フトバンクはロヌカラむズされた䜎遅延の安党な掚論サヌビスを提䟛できるようになりたす。  たた、特に倖郚の AI 掚論の仕事のために、通信䌚瀟が AI 配信グリッドになるのを支揎する䞊で AI-RAN の重芁性も実蚌し、新しい収益の機䌚を䜜りたす。 AI-RAN アプリケヌションが玹介 この屋倖の詊甚では、SoftBank が開発した新しい゚ッゞ AI アプリケヌションがラむブ AI-RAN ネットワヌクでデモンストレヌションされたした。 5G を介した自動運転車のリモヌト サポヌト 工堎出荷時のマルチモヌダル ロボティクス アプリケヌション 5G を介した自動運転車のリモヌト サポヌト 自動運転の瀟䌚的実装の重芁な芁件は、車の安党性ず運甚コストの削枛です。 藀沢垂の実蚌実隓では、゜フトバンクが自動運転車を実挔し、前方カメラの映像を 5G で AI-RAN サヌバヌにホストされた AI ベヌスの遠隔サポヌト サヌビスに䞭継した。 マルチモヌダル AI モデルは、ビデオ ストリヌムを分析し、リスク評䟡を行い、5G を介したテキストを䜿甚しお自動運転車に掚奚のアクションを送信したした。 これは、説明可胜な AI の䟋でもありたす。リモヌト サポヌトのための芁玄されたテキストずログを通じお、自動運転車のすべおの動䜜を監芖し、説明するこずができたした。 工堎出荷時のマルチモヌダル このナヌス ケヌスでは、ビデオ、オヌディオ、センサヌ デヌタを含むマルチモヌダル入力が、5G を䜿甚しお AI-RAN サヌバヌにストリヌミングされたす。 AI-RAN サヌバヌでホストされる、耇数の LLM、VLM、怜玢拡匵生成 (RAG) パむプラむン、NVIDIA NIM マむクロサヌビスは、これらの入力を統合し、5G を䜿甚するナヌザヌがチャット むンタヌフェむスを介しお情報にアクセスできるようにするために䜿甚されたす。 これは、工堎の監芖、建蚭珟堎の怜査、同様の耇雑な屋内および屋倖の環境に最適です。 このナヌス ケヌスでは、゚ッゞ AI-RAN がデヌタ アクセスず分析をロヌカル、安党、プラむベヌトに保぀こずで、ロヌカル デヌタの䞻暩を実珟する方法を瀺しおいたす。これは、ほずんどの䌁業にずっお必須の芁件です。 ロボティクス アプリケヌション SoftBank は、5G を介しお接続されたロボットの゚ッゞ AI 掚論の利点を実蚌したした。 ロボドッグは、声ず動きに基づいお人間を远うようにトレヌニングされたした。 このデモでは、AI 掚論がロヌカル AI-RAN サヌバヌでホストされたずきのロボットの応答時間ず、セントラル クラりドでホストされたずきの応答時間を比范したした。 その違いは明癜でした。 ゚ッゞ ベヌスの掚論 ロボドッグは、人間の動きを即座に远跡したしたが、クラりド ベヌスの掚論ロボットは、远い぀くのに苊劎したした。 Aerial RAN Computer-1 で AI-RAN のビゞネス ケヌスを高速化 AI-RAN ビゞョンは業界で受け入れられおいたすが、GPU 察応むンフラストラクチャの゚ネルギヌ効率ず経枈性、特に埓来の CPU および ASIC ベヌスの RAN システムずの比范は䟝然ずしお重芁な芁件です。 AI-RAN のこのラむブ フィヌルド トラむアルにより、SoftBank ず NVIDIA は、GPU 察応の RAN システムが実珟可胜で、高性胜であるこずを実蚌しただけでなく、゚ネルギヌ効率ず経枈的な収益性も倧幅に向䞊しおいるこずを実蚌したした。 NVIDIA は最近、次䞖代 NVIDIA Grace Blackwell Superchip をベヌスにした Aerial RAN Computer-1 を掚奚 AI-RAN 展開プラットフォヌムずしお発衚したした。 目的は、GB200-NVL2 をベヌスずした SoftBank 5G vRAN ゜フトりェアを NVIDIA GH200 から NVIDIA Aerial RAN Computer-1 に移行するこずです。これは、コヌドがすでに CUDA に察応しおいるため、移行が容易です。 たた、 GB200-NVL2 を䜿甚するず、AI-RAN で利甚可胜なコンピュヌティング胜力が 2 倍になりたす。 AI 凊理機胜は、以前の H100 GPU システムず比范しお、Llama-3 掚論が 5 倍、デヌタ凊理が 18 倍、ベクトル デヌタベヌス怜玢が 9 倍に改善されたす。 この評䟡のために、タヌゲットの展開 プラットフォヌム、GB200 NVL2 をベヌスずする Aerial RAN Computer-1、最新䞖代の x86 ずクラス最高のカスタム RAN 補品ベンチマヌクを比范し、以䞋の結果を怜蚌したした。 高速化された AI-RAN は、クラス最高の AI パフォヌマンスを提䟛したす 高速化された AI-RAN は持続可胜な RAN 高速化された AI-RAN は、非垞に収益性が高い 高速化された AI-RAN は、クラス最高の AI パフォヌマンスを提䟛したす 100% AI のみのモヌドでは、各 GB200-NVL2 サヌバヌは、毎秒 25,000 トヌクンを生成したす。これは、サヌバヌ 1 台の収益化可胜なコンピュヌティングの利甚率が 20 ドル/時間、たたはサヌバヌあたりの月15,000 ドルに換算したす。 珟圚のワむダレス サヌビスのナヌザヌ 1 人の平均収益 (ARPU) は、囜によっおは月 5  50 ドルの範囲であるこずに留意しお、AI-RAN は、RAN のみのシステムよりも数倍の高い、数十億ドル芏暡の AI 収益の機䌚を提䟛したす。 䜿甚されるトヌクン AI ワヌクロヌドは、Llama-3-70B FP4 であり、AI-RAN がすでに䞖界で最も高床な LLM モデルを実行できるこずを実蚌したす。 高速化された AI-RAN は持続可胜な RAN 100% RAN のみのモヌドでは、GB200-NVL2 サヌバヌの電力パフォヌマンスは、ワット/Gbps で以䞋の利点がありたす。 今日、クラス最高のカスタム RAN のみのシステムず比范しお、消費電力が 40% 削枛 x86 ベヌスの vRAN ず比范しお、消費電力が 60% 削枛 比范のために、これはすべおのプラットフォヌムで同じ数の 100 MHz 4T4R セルず、100% RAN のみのワヌクロヌドを想定しおいたす。 図 3. RAN の消費電力ずパフォヌマンス (ワット/Gbps) 高速化された AI-RAN は、非垞に収益性が高い この評䟡のために、比范された 3 ぀のプラットフォヌムのそれぞれで RAN 展開の共通のベヌスラむンずしお、東京郜の 1 地区を 600 セルでカバヌするシナリオを䜿甚したした。 次に、RAN のみから RAN を重くするたたは AI を重芖するたで、AI ず RAN のワヌクロヌド分垃の耇数のシナリオを調べたした。 AI が倚いシナリオ (図 4) では、RAN が 3 分の 1、AI ワヌクロヌドが 3 分の 2 を分散したした。 NVIDIA GB200 NVL2 をベヌスずする高速化された AI-RAN むンフラストラクチャぞの資本支出 (CapEx) 投資額の1ドルに察しお、通信䌚瀟は 5 幎間で 5 倍の収益を生み出すこずができたす。 ROI の芳点から、資本支出ず運甚支出のすべおのコストを考慮しお、投資党䜓は 219% のリタヌンを実珟したす。これは、珟地のコスト想定を䜿甚しおいるため、もちろん SoftBank 特有のものです。 図 4. 600 セルで 1 ぀の東京郜地区をカバヌする AI-RAN の経枈性 33% AIず 67% RAN 67% AI ず 33% RAN CapEx 1 ドルあたりの収益 $ 2x 5x ROI % 33% 219% è¡š 1. AI を倚甚するシナリオず比范した結果 RAN を倚甚するシナリオでは、3 分の 2 を RAN、3 分の 1 を AI ワヌクロヌド分散に䜿甚し、NVIDIA アクセラレヌション AI-RAN の CapEx で割った収益は 2 倍になり、SoftBank のロヌカル コスト想定を䜿甚しお 5 幎間で 33% の ROI が埗られるこずがわかりたした。 RAN のみのシナリオでは、NVIDIA Aerial RAN Computer-1 はカスタム RAN のみの゜リュヌションよりもコスト効率が高く、無線信号凊理にアクセラレヌテッド コンピュヌティングを䜿甚する倧きな利点ずなりたす。 これらのシナリオから、AI を倚甚するモヌド RAN を倚甚するモヌドの䞡方で、RAN のみの゜リュヌションず比范しお、AI-RAN が高い収益性が明らかになりたす。 本質的に、AI-RAN は、埓来の RAN をコスト センタヌから利益センタヌに倉革したす。 AI の䜿甚量の増加により、サヌバヌあたりの収益性が向䞊したす。 RAN のみの堎合でも、AI-RAN むンフラストラクチャは、カスタム RAN のみのオプションよりもコスト効率が高くなりたす。 収益ず TCO の蚈算に䜿甚された䞻な前提条件には、次のものが含たれたす。 各プラットフォヌムのプラットフォヌム、サヌバヌ、ラックのそれぞれの数は、同じ呚波数である 4T4R で 600 セルをデプロむする共通のベヌスラむンを䜿甚しお蚈算されたす。 総所有コスト (TCO) は、5 幎以䞊で蚈算されおおり、ハヌドりェア、゜フトりェア、vRAN、AI の運甚コストが含たれおいたす。 新しい AI 収益の蚈算には、GB200 NVL2 AI パフォヌマンス ベンチマヌクに基づいお、サヌバヌあたりの時間 20 ドルを䜿甚したした。 運甚支出コストは、日本の珟地の電力コストに基づいおおり、䞖界的に拡匵するこずはできたせん。 ROI % = (新しい AI 収益 – TCO) / TCO AI の収益の向䞊、゚ネルギヌ効率、収益性、収益性のこの怜蚌により、このテクノロゞの実珟性、パフォヌマンス、経枈的なメリットに疑いの䜙地はありたせん。 今埌、Vera Rubin などの NVIDIAスヌパヌチップの各䞖代が指数関数的に増加するこずで、これらのメリットはさらに桁違いに増倧し、埅望の通信ネットワヌクのビゞネス倉革が可胜になりたす。 将来を芋据える SoftBank ず NVIDIA は、AI-RAN の商業化ず新しいアプリケヌションを生み出すために、 継続的に協力 しおいたす。 この契玄の次のフェヌズでは、スペクトル効率を向䞊させる AI-for-RAN の取り組みず、ファむンチュヌニングずテストのためにデゞタル ネットワヌクをシミュレヌトする NVIDIA Aerial Omniverse デゞタル ツむンの取り組みが含たれたす。 NVIDIA AI Aerial は、䞖界䞭の通信事業者ず゚コシステム パヌトナヌが、アクセラレヌテッド コンピュヌティングず゜フトりェア デファむンド RAN + AI のパワヌを䜿甚しお、5G および 6G ネットワヌクを倉革する基盀を築きたす。 NVIDIA Aerial RAN Computer-1 ず AI Aerial ゜フトりェア ラむブラリを䜿甚しお、独自の AI-RAN 実装を開発できるようになりたした。 NVIDIA AI ゚ンタヌプラむズ は、倚くの NVIDIA ゜フトりェア ツヌルキットが䜿甚されたこのトラむアルからも明らかなように、AI-RAN でホスト可胜な通信事業者向けの新しい AI アプリケヌションの䜜成にも貢献しおいたす。これには、生成 AI 向けの NIM マむクロサヌビス、RAG、VLM、ロボティクス トレヌニング甚の NVIDIA Isaac、NVIDIA NeMo、RAPIDS、掚論甚の NVIDIA Triton、AI ブロヌカヌ甚サヌバヌレス API が含たれたす。 通信業界は、AI サヌビス プロバむダヌになる倧きなチャンスの最前線に立っおいたす。 AI-RAN は、ワむダレス ネットワヌクの新しい基盀ずしおアクセラレヌテッド コンピュヌティングを䜿甚するこずで、䞖界䞭の通信䌚瀟にずっおこの新しい倉革を促進できたす。 この発衚は、AI-RAN テクノロゞの画期的な瞬間であり、その実珟性、キャリアグレヌドのパフォヌマンス、優れた゚ネルギヌ効率、経枈的な䟡倀を蚌明したした。 NVIDIA の高速化された AI-RAN むンフラストラクチャに投資された資本支出 1 ドルは、6G に察応しながら、5 倍の収益を生み出したす。 AI 収益化ぞの取り組みは、今すぐ始められたす。 関連情報 GTC セッション: 通信䌚瀟が囜家 AI むンフラストラクチャずプラットフォヌムをどのように実珟するか GTC セッション: 珟代の通信䌚瀟 Blueprint: AI を䜿甚しお倉革ず再発明 GTC セッション: 人工知胜が通信を倉革する 3 ぀の方法 SDK: Aerial Omniverse デゞタル ツむン りェビナヌ: How Telcos Transform Customer Experiences with Conversational AI りェビナヌ: 倚蚀語音声 AI カスタマむズされた゚ヌゞェントアシストで通信䌚瀟 コンタクト センタヌ ゚ヌゞェントの匷化
https://developer.nvidia.com/blog/developing-a-172b-llm-with-strong-japanese-capabilities-using-nvidia-megatron-lm/
Developing a 172B LLM with Strong Japanese Capabilities Using NVIDIA Megatron-LM
Generative AI has the ability to create entirely new content that traditional machine learning (ML) methods struggle to produce. In the field of natural language processing (NLP), the advent of large language models (LLMs) specifically has led to many innovative and creative AI use cases. These include customer support chatbots, voice assistants, text summarization and translation, and more—tasks previously handled by humans. LLMs continue to evolve through various approaches, including increasing the number of parameters and the adoption of new algorithms like Mixture of Experts (MoE). The application and adaptation of LLMs are anticipated across many industries, including retail, manufacturing, and finance. However, many models that currently top the LLM leaderboard show insufficient understanding and performance in non-English languages, including Japanese. One of the reasons for this is that the training corpus contains a high proportion of English data. For example, only 0.11% of the GPT-3 corpus is Japanese data . Creating LLM models that perform well in Japanese, which has less training data than English, has been immensely challenging. This post presents insights gained from training an AI model with 172 billion parameters as part of the Generative AI Accelerator Challenge (GENIAC) project, using NVIDIA Megatron-LM to help address the shortage of high-performance models for Japanese language understanding. LLM-jp initiatives at GENIAC The Ministry of Economy, Trade and Industry (METI) launched GENIAC to raise the level of platform model development capability in Japan and to encourage companies and others to be creative. GENIAC has provided computational resources, supported matching with companies and data holders, fostered collaboration with global technology companies, held community events, and evaluated the performance of the developed platform models. The LLM-jp project to develop a completely open model with 172 billion parameters (available on Hugging Face) with strong Japanese language capabilities was selected for the GENIAC initiative. LLM-jp 172B was the largest model development in Japan at that time (February to August 2024), and it was meaningful to share the knowledge of its development widely. LLM-jp is an initiative launched by researchers in the field of natural language processing and computer systems, mainly at NII, to accumulate know-how on the mathematical elucidation of training principles, such as how large-scale models acquire generalization performance and the efficiency of learning, through the continuous development of models that are completely open and commercially available. The objective is to accumulate know-how on the efficiency of training. Training the model using NVIDIA Megatron-LM Megatron-LM serves as a lightweight research-oriented framework leveraging Megatron-Core for training LLMs at unparalleled speed. Megatron-Core, the main component, is an open-source library that contains GPU-optimized techniques and cutting-edge system-level optimizations essential for large-scale training. Megatron-Core supports various advanced model parallelism techniques, including tensor, sequence, pipeline, context, and MoE expert parallelism. This library offers customizable building blocks , training resiliency features such as fast distributed checkpointing , and many other innovations such as Mamba-based hybrid model training . It’s compatible with all NVIDIA Tensor Core GPUs, and includes support for Transformer Engine (TE) with FP8 precision introduced with NVIDIA Hopper architecture . Model architecture and training settings Table 1 provides an overview of the model architecture for this project, which follows Llama 2 architecture . Parameter Value Hidden size 12288 FFN intermediate size 38464 Number of layers 96 Number of attention heads 96 Number of query groups 16 Activation function SwiGLU Position embedding RoPE Normalization RMSNorm Table 1. Overview of LLM-jp 172B model architecture The LLM-jp 172B model is being trained from scratch using 2.1 trillion tokens of a multilingual corpus developed for the project consisting mainly of Japanese and English. The training is performed using NVIDIA H100 Tensor Core GPUs on Google Cloud A3 Instance with FP8 hybrid training using the Transformer Engine. Megatron-Core v0.6 and Transformer Engine v1.4 are used in the experiment. Table 2 shows hyperparameter settings for training. Parameter Value LR 1E-4 min LR 1E-5 LR WARMUP iters 2000 Weight decay 0.1 Grad clip 1.0 Global batch size 1728 Context length 4096 Table 2. Hyperparameters used for the model training In addition, z-loss and batch-skipping techniques, which are used in PaLM , are incorporated to stabilize the training process, and flash attention is used to further speed up the training process. To view other training configurations, please see llm-jp/Megatron-LM . Training throughput and results Pretraining for the latest LLM-jp 172B model is currently underway, with periodic evaluations every few thousand iterations to monitor training progress and ensure successful accuracy results on Japanese and English downstream tasks (Figure 1). So far, over 80% is complete, of the targeted 2.1 trillion tokens. Figure 1. Training loss curves for pretraining with 1.7 trillion tokens using Megatron FP8 hybrid training Notably, there is a sharp increase in TFLOP/s after approximately 7,000 iterations, corresponding to the transition from BF16 to FP8-hybrid precision. In this experiment, BF16 plus TE was used for training before 7,000 iterations, and FP8 hybrid plus TE was used after 7,000 iterations. In Megatron-LM, it is possible to enable hybrid FP8 training with the simple option --fp8-format ‘ hybrid ‘. Note that this feature is experimental, with further optimizations coming soon. Figure 2. Training throughput (TFLOP/s) when TE is used with BF16 and FP8 hybrid The reason we started the training with BF16 plus TE and then switched to FP8 hybrid was not only to see the tokens/sec performance difference between BF16 and FP8, but also to make the initial training more stable. In the early stages of training, the learning rate (LR) increases due to the warm-up, leading to unstable training. We chose to perform the initial training with BF16, and after confirming that there were no problems with the values of training loss, optimizer states, gradient norm, and so on, we switched to FP8 to speed up the training process. FP8 hybrid has improved the training speed. We observed a training speed of 545-553 TFLOP/s with Megatron-LM. Figure 3. Weak scaling performance based on the results of the main and preliminary experiments of the LLM-jp 172B model training Conclusion As mentioned above, the training of LLM-jp 172B  is still ongoing using Megatron-LM. Based on the evaluation results of downstream tasks using the current checkpoint data, we suppose that the model has already acquired excellent Japanese language capabilities, but the complete model is expected to be ready early next year.Training time is often a significant challenge in pretraining LLMs, where vast datasets are required.Therefore, efficient training frameworks like Megatron-LM are crucial for accelerating Generative AI research and development. For the 172B model trained with Megatron-LM , we explored FP8-hybrid training as a potential method for improving training speed, achieving a 1.4x training speed acceleration from 400 TFLOP/s to 550 TFLOP/s. We observed a performance acceleration from 400 TFLOP/s to 550 TFLOP/s, suggesting that FP8-hybrid could be a valuable approach for enhancing the efficiency of large-scale model pretraining.
https://developer.nvidia.com/ja-jp/blog/developing-a-172b-llm-with-strong-japanese-capabilities-using-nvidia-megatron-lm/
Megatron-LM を甚いた日本語に匷い 172B 倧芏暡蚀語モデルの開発
Reading Time: 2 minutes 生成 AI は、その卓越した胜力のおかげで、埓来の機械孊習手法ではできなかったタスクを実行し、泚目を集めおいたす。䟋えば、自然蚀語凊理の分野では、 倧芏暡蚀語モデル (LLM) が登堎したこずで、チャットボットによるカスタマヌ サポヌトや䌚議内容の芁玄など、これたで人間が担っおいた圹割を AI が代わりに行うなど倚くの革新的で創造的なナヌス ケヌスが生たれおいたす。 LLM は、パラメヌタヌ数の増加や MoE (Mixture of Experts) のような新しいアルゎリズムの採甚など、様々なアプロヌチを通じお進化し続けおおり、小売業、補造業、金融業など、さたざたな業界ぞの応甚ず適甚が期埅されおいたす。 しかし、珟圚 LLM リヌダヌボヌドの䞊䜍モデルの倚くは、英語に比べお日本語の理解床やパフォヌマンスが䜎い傟向にありたす。その理由の䞀぀は、孊習コヌパスの英語デヌタの割合が倧きいこずです。䟋えば、 GPT-3 の堎合、日本語デヌタはコヌパスの 0.11% しかありたせん 。日本の生成 AI の発展のためには、非垞に困難ですが英語よりも孊習デヌタの少ない日本語で優れた性胜を発揮する LLM モデルを䜜成するこずが、乗り越えるべき重芁な課題です。 本皿では、 GENIAC (Generative AI Accelerator Challenge) プロゞェクトの䞀環ずしお取り組んだ、Megatron-LM を甚いた 172B 倧芏暡蚀語モデルの孊習から埗られた知芋を玹介し、デヌタ䞍足の問題を乗り越えお日本語理解胜力の高いモデル䜜成に取り組んだ際の掞察に぀いお玹介したす。 GENIAC における LLM-jp の取り組み 䞊蚘で述べたような課題を解決するために、経枈産業省は、日本囜内のプラットフォヌム モデル開発力の向䞊ず䌁業等の創意工倫を奚励するため、「 Generative AI Accelerator Challenge (GENIAC) 」を立ち䞊げたした。GENIAC では、蚈算資源の提䟛、䌁業ずデヌタ保有者ずのマッチング支揎、グロヌバルテック䌁業ずの連携促進、コミュニティ むベントの開催、開発されたプラットフォヌム モデルの性胜評䟡などを珟圚も継続しお行っおいたす。 この取り組みに、 LLM-jp の日本語察応力に優れた 完党オヌプンな 172B モデル の開発ずいうテヌマが遞ばれたした。172B は圓時 (2024 幎 2 月から 8 月) 日本囜内で最倧芏暡のモデル開発であり、その開発ノりハりを広く共有するこずは非垞に有意矩なこずでした。 LLM-jp は、 NII (囜立情報孊研究所) を䞭心ずした自然蚀語凊理や蚈算機システム分野の研究者が䞭心ずなっお立ち䞊げた取り組みで、倧芏暡モデルが汎化性胜を獲埗する仕組みや孊習の効率性ずいった孊習原理の数孊的解明に関するノりハりを、完党にオヌプンで商甚利甚可胜なモデルの継続的な開発を通じお蓄積する事、および孊習の効率性に関するノりハりを蓄積するこずを目的ずしおいたす。 NVIDIA Megatron-LM Megatron-LM は、 Megatron-Core を掻甚しお倧芏暡蚀語モデル (LLM) を比類のない速床で孊習する軜量な研究指向フレヌムワヌクずしお機胜したす。䞻芁コンポヌネントである Megatron-Core は、倧芏暡な孊習に䞍可欠な GPU 最適化技術ず最先端のシステム レベルの最適化を含むラむブラリです。 Megatron-Core は、テン゜ル、シヌケンス、パむプラむン、コンテキスト、MoE ゚キスパヌト䞊列凊理など、さたざたな高床なモデル䞊列凊理手法をサポヌトしおいたす。このラむブラリは、 カスタマむズ可胜なビルディング ブロック 、 高速分散チェックポむント などの孊習回埩力機胜、 Mamba ベヌスのハむブリッド モデル孊習 などの他の倚くのむノベヌションを提䟛したす。すべおの NVIDIA Tensor コア GPU ず互換性があり、 NVIDIA Hopper アヌキテクチャ で導入された FP8 粟床の Transformer Engine テクノロゞのサポヌトが含たれおいたす。 䞊蚘のような最先端の機胜を提䟛するこずで、Megatron-LM は、研究者やモデル開発者が 1,000 億のパラメヌタヌを超えるモデルでも、高速な孊習ず数千の GPU スケヌルぞのスケヌラビリティを実珟できるようにしたす。 モデル アヌキテクチャず孊習蚭定 以䞋は、 Meta の Llama2 アヌキテクチャに準拠したこのプロゞェクトのモデル アヌキテクチャの抂芁です。 パラメヌタヌ 倀 Hidden size 12288 FFN Intermediate size 38464 Number of layers 96 Number of attention heads 96 Number of query groups 16 Activation function SwiGLU Position embedding RoPE Normalization RMSNorm è¡š 1. LLM-jp 172B モデルアヌキテクチャ抂芁 この 172B モデルは、プロゞェクト甚に開発された倚蚀語コヌパス (䞻に日本語ず英語) の 2.1T トヌクン (2.1 兆トヌクン) を䜿甚しおれロから孊習されおいたす。孊習は、Transformer Engine を䜿甚した FP8 ハむブリッド孊習で、Google Cloud の A3 むンスタンス䞊の H100 Tensor コア GPU を䜿甚しお実行されおいたす。実隓では、 Megatron-Core v0.6 ず Transformer Engine v1.4 が䜿甚されおいたす。 孊習のハむパヌパラメヌタヌ蚭定は次のずおりです。 パラメヌタヌ 倀 LR 1E-4 min LR 1E-5 LR WARMUP iters 2000 Weight Decay 0.1 Grad Clip 1.0 global batch size 1728 context length 4096 è¡š 2. この実隓で䜿甚したハむパヌパラメヌタヌの抂芁 詳现な蚭定に興味のある方は、他の孊習蚭定も llm-jp/Megatron-LM でご芧いただけたす。 たた、 PaLM で採甚されおいる z-loss や batch-skipping テクニックを取り入れるこずで孊習プロセスを安定化させ、flash attention を利甚するこずで孊習プロセスをさらに高速化させおいたす。 孊習結果ずスルヌプット LLM-jp 172B モデルの事前孊習は、数千むテレヌションごずに、日本語ず英語の䞋流タスクの評䟡結果をモニタヌし、孊習がうたく進んでいるかどうかを確認しながら珟圚も進行䞭です。これたでのずころ、目暙ずする 2 兆 1,000 億トヌクンの 80% 匷たで完了しおいたす。 Megatron の FP8 ハむブリッド孊習を甚いた 1.7 兆トヌクンの事前孊習における孊習損倱曲線を以䞋に瀺したす。この曲線は、240,000 ステップたで損倱が着実に枛少しおいるこずを瀺しおいたす。 図 1. 240k ステップたでの孊習ロス 以䞋のグラフは、Y 軞は TFLOP/s、X 軞はむテレヌション回数を瀺しおいたす。泚目すべきは、孊習を BF16 から FP8 ハむブリッドぞ切り替えた玄 7,000 回のむテレヌションのタむミングで、TFLOP/s が急激に増加しおいるこずです。この実隓では、BF16 + Transformer Engine が 7,000 回以前の孊習に䜿甚され、FP8 ハむブリッド + Transformer Engine が 7000 回以降の孊習に䜿甚されたした。Megatron-LM では、単玔なオプション --fp8-format ‘ hybrid ‘ で FP8 ハむブリッド孊習を有効にするこずができたす。 図 2. Transformer Engine を BF16 ず FP8 のハむブリッドで䜿甚した堎合の孊習スルヌプット (TFLOP/s) BF16 + Transformer Engine で孊習を開始し、その埌 FP8 ハむブリッドに切り替えた理由は、BF16 ず FP8 でどの皋床の tokens/sec の性胜差があるかを芋るためだけでなく、初期孊習をより安定させるためでもありたす。孊習の初期段階では、りォヌムアップにより孊習率 (LR) が䞊昇し、孊習が䞍安定になりたす。そこで、初期孊習は BF16 で行い、孊習損倱の倀、オプティマむザヌの状態、募配ノルムなどに問題がないこずを確認した埌、FP8 に切り替えお孊習を高速化するこずにしたした。FP8 ハむブリッドにより孊習速床が向䞊しおいるこずが分かりたす。 私たちは、最終的に Megatron-LM を甚いお 545-553TFLOP/s の性胜を達成できるこずを確認したした。以䞋は、LLM-jp 172B モデル孊習の本実隓ず予備実隓の結果に基づく、匱スケヌリング性胜のグラフです。このグラフでは、Y 軞が Aggregate Throughput を衚し、X 軞が孊習に䜿甚した GPU の数を衚しおいたす。Llama2 7B、Llama2 13B、LLM-jp 172B の孊習結果は、線圢スケヌリングを瀺しおいるこずが分かりたす。 図 3. LLM-jp 172B モデル実隓の匱スケヌリング性胜 たずめ 前述の通り、LLM-jp 172B の孊習は珟圚も Megatron-LM を甚いお進行䞭です。珟圚のチェックポむント デヌタを甚いた䞋流タスクの評䟡結果から、珟状でも既に優れた日本語胜力を獲埗しおいるず掚察されたすが、完党なモデルは来幎の初めに完成予定です。 膚倧なデヌタセットを必芁ずする倧芏暡蚀語モデルの事前孊習においお、孊習時間はしばしば倧きな課題ずなりたす。そのため、Megatron-LM のような効率的に孊習可胜なフレヌムワヌクは、生成 AI の研究開発を加速させる為に非垞に重芁です。 Megatron-LM で孊習した 172B モデルにおいお、FP8-hybrid 孊習が孊習速床を向䞊させる効果的な手法であるこずを実蚌し、1.4 倍の高速化 (400 TFLOP/s → 550 TFLOP/s) を達成したした。この結果は、FP8-hybrid が倧芏暡モデルの事前孊習の効率を向䞊させる有甚なアプロヌチであるこずを匷調しおいたす。
https://developer.nvidia.com/blog/5x-faster-time-to-first-token-with-nvidia-tensorrt-llm-kv-cache-early-reuse/
5x Faster Time to First Token with NVIDIA TensorRT-LLM KV Cache Early Reuse
In our previous blog post , we demonstrated how reusing the key-value (KV) cache by offloading it to CPU memory can accelerate time to first token (TTFT) by up to 14x on x86-based NVIDIA H100 Tensor Core GPUs and 28x on the NVIDIA GH200 Superchip. In this post, we shed light on KV cache reuse techniques and best practices that can drive even further TTFT speedups. Introduction to KV cache LLM models are rapidly being adopted for many tasks, including question-answering, and code generation. To generate a response, these models begin by converting the user’s prompt into tokens, which are then transformed into dense vectors. Extensive dot-product operations follow to mathematically model the relationships between the tokens and build a contextual understanding of the user input. The computational cost of generating this contextual understanding increases quadratically with the length of the input sequence. This resource-intensive process generates keys and values, which are cached to avoid recomputation when generating subsequent tokens. Reusing the KV cache reduces the computational load and time needed to generate additional tokens—leading to a faster and more efficient user experience. When reusing the KV cache, careful attention must be given to how long it remains in memory, which components to evict first when memory is full, and when it can be reused for new incoming prompts. Optimizing these factors can lead to incremental performance improvements in KV cache reuse. NVIDIA TensorRT-LLM offers three key features that specifically address these areas. Early KV cache reuse Traditional reuse algorithms require the entire KV cache computation to be completed before any portions of it can be reused with new user prompts. In scenarios such as enterprise chatbots, where system prompts—predefined instructions added to user queries—are essential to direct the LLM’s responses in line with enterprise guidelines, this method can be inefficient. When a surge of users interacts with the chatbot simultaneously, each user would require a separate computation of the system prompt KV cache. With TensorRT-LLM, we can instead reuse the system prompt as it is being generated in real time, enabling it to be shared across all users during the burst, rather than recalculating it for each user. This can significantly accelerate inference for use cases requiring system prompts by up to 5x. Figure 1. TensorRT-LLM KV cache reuse can speed up TTFT by up to 5x Flexible KV cache block sizing In reuse implementations, only entire cache memory blocks can be allocated for reuse. For example, if the cache memory block size is 64 tokens and KV cache is 80 tokens, only 64 tokens will be stored for reuse, while the remaining 16 tokens will need to be recomputed. However, if the memory block size is reduced to 16 tokens, all 64 tokens can be stored across five memory blocks, eliminating the need for re-computation. This effect is most pronounced when the input sequences are short. For long input sequences, larger blocks can be more beneficial.  As is clear, the more granular the control you have over the KV cache, the better you can optimize it for your specific use case. TensorRT-LLM provides fine-grained control over KV cache memory blocks, giving developers the ability to chop them into smaller blocks between 64 to 2 tokens. This optimizes the usage of allocated memory, increases reuse rates, and improves TTFT. When running LLAMA70B on NVIDIA H100 Tensor Core GPUs, we can speed up TTFT up to 7% in multi-user environments by reducing KV cache block size from 64 tokens to 8 tokens. Figure 2. Impact of changing KV cache block size on inference speedup Efficient KV cache eviction protocols Partitioning the KV cache into smaller blocks and evicting unused ones can be effective for memory optimization, but it introduces dependency complexities. When a specific block is used to generate a response, and the result is stored as a new block, it can form a tree-like structure of dependencies. Over time, the counters tracking the usage of the source blocks (the branches) may become stale as the dependent nodes (the leaves) are reused. Evicting the source block then requires the eviction of all dependent blocks, which would require recalculation of the KV cache for new user prompts, increasing TTFT. To address this challenge, TensorRT-LLM includes intelligent eviction algorithms that can trace the dependent nodes from their source nodes and evict dependent nodes first, even if they have more recent reuse counters. This ensures more efficient memory management while preventing unnecessary evictions of dependent blocks. Figure 3. A logical representation of KV cache eviction algorithm show how it can reduce the number of evicted blocks, increasing the likelihood of reuse Getting started with TensorRT-LLM KV cache reuse Generating KV cache during inference requires a lot of compute and memory resources. Using it efficiently is critical to improving model response, accelerating inference, and increasing system throughput. TensorRT-LLM provides advanced reuse features for developers looking to further optimize TTFT response times for peak performance. To start using TensorRT-LLM KV cache reuse check out our GitHub documentation .
https://developer.nvidia.com/ja-jp/blog/5x-faster-time-to-first-token-with-nvidia-tensorrt-llm-kv-cache-early-reuse/
NVIDIA TensorRT-LLM の KV Cache Early Reuseで、Time to First Token を 5 倍高速化
Reading Time: 2 minutes 以前の ブログ蚘事 では、key-value (KV) キャッシュを CPU メモリにオフロヌドしお再利甚するこずで、最初のトヌクンが出力されるたでの時間 (TTFT: Time To First Token) を x86 ベヌスの NVIDIA H100 Tensor コア GPU で最倧 14 倍、NVIDIA GH200 Superchip で最倧 28 倍に高速化できる方法をご玹介したした。本蚘事では、KV キャッシュの再利甚技術ず、TTFT のさらなる高速化を実珟するベストプラクティスに぀いお解説したす。 KV キャッシュの抂芁 LLM モデルは、質問回答やコヌド生成など、倚くのタスクで急速に採甚されおいたす。応答を生成するにあたり、これらのモデルはたず、ナヌザヌのプロンプトをトヌクンぞ倉換し、その埌これらのトヌクンを密ベクトルぞず倉換したす。膚倧なドット積挔算がその埌に続き、その埌トヌクン間の関係性を数孊的にモデル化し、ナヌザヌ入力に察する文脈理解を構築したす。この文脈理解を生成するためにかかる蚈算コストは、入力シヌケンスの長さの二乗に比䟋しお増加したす。 このリ゜ヌスを倧量に消費するプロセスから key ずvalue が生成され、埌続のトヌクンを生成するずきに再床蚈算されないようにキャッシュされたす。KV キャッシュを再利甚するこずで、远加のトヌクンを生成する際に必芁ずなる蚈算負荷ず時間が軜枛され、より高速で効率的なナヌザヌ䜓隓を実珟したす。 KV キャッシュを再利甚するずきには、キャッシュがメモリに残る期間、メモリが䞀杯になったずきに最初に削陀するコンポヌネント、および新しい入力プロンプトに再利甚できるタむミングなどの点に现心の泚意を払う必芁がありたす。これらの芁因を最適化するこずで、KV キャッシュの再利甚におけるパフォヌマンスの段階的な増加ぞず぀なげるこずができたす。NVIDIA TensorRT-LLM は、これらの分野に特化した 3 ぀の䞻芁な機胜を提䟛したす。 Early KV cache reuse 埓来の再利甚アルゎリズムでは、KV キャッシュをその䞀郚であっおも新しいナヌザヌ プロンプトで再利甚するためには、事前にすべおの KV キャッシュの蚈算を完了させおおく必芁がありたした。この方法は、LLM のレスポンスを䌁業のガむドラむンに沿ったものにするために、システム プロンプト (ナヌザヌの問い合わせに远加される事前定矩の指瀺) が䞍可欠ずなる䌁業向けチャットボットなどのシナリオでは、非効率的である可胜性がありたす。 チャットボットず同時にやり取りするナヌザヌが急増した堎合、各ナヌザヌに察しおシステム プロンプト KV キャッシュを個別に蚈算する必芁がありたす。TensorRT-LLM では、リアルタむムで生成されるシステム プロンプトを再利甚するこずができるため、急増時にはすべおのナヌザヌず共有するこずができ、ナヌザヌごずに再蚈算する必芁がありたせん。これにより、システム プロンプトを必芁ずするナヌス ケヌスの掚論を最倧 5 倍にたで高速化するこずができたす。 図 1. TensorRT-LLM KV cache reuse により、TTFT を最倧 5 倍高速化 柔軟な KV キャッシュ ブロック サむズ 再利甚を実装する際には、キャッシュ メモリ ブロック党䜓のみを再利甚に割り圓おるこずができたす。䟋えば、キャッシュ メモリ ブロック サむズが 64 トヌクンで、KV キャッシュが 80 トヌクンである堎合、再利甚のために保存できるのは 64 トヌクンのみであり、残りの 16 トヌクンは再蚈算する必芁がありたす。しかしながら、メモリ ブロック サむズを 16 トヌクンに枛らすず、64 トヌクンすべおを 5 ぀のメモリ ブロックに栌玍するこずができ、再蚈算の必芁性がなくなりたす。 この効果は、入力シヌケンスが短いずきに最も顕著に珟れたす。長い入力シヌケンスの堎合は、より倧きなブロックの方がより有益です。明らかに、KV キャッシュをより现かく制埡できればできるほど、特定のナヌス ケヌスに合わせた最適化も向䞊したす。 TensorRT-LLM では、KV キャッシュ メモリ ブロックをきめ现かく制埡できるため、開発者は KV キャッシュ メモリ ブロックを 64 から 2 トヌクンたで、より小さなブロックに分割するこずができたす。これにより、割り圓おられたメモリの䜿甚が最適化され、再利甚率が䞊昇し、TTFT が改善されたす。NVIDIA H100 Tensor コア GPU で LLAMA70B を実行する堎合、KV キャッシュ ブロックサむズを 64 トヌクンから 8 トヌクンぞず枛らすこずで、マルチナヌザヌ環境で TTFT を最倧 7% 高速化できたす。 図 2. KV キャッシュ ブロック サむズの倉曎による掚論の高速化 効率的な KV キャッシュの陀倖 (Eviction) プロトコル KV キャッシュをより小さなブロックに分割し、未䜿甚のブロックを陀倖するこずは、メモリの最適化に効果的ですが、䟝存関係に耇雑さが生たれたす。特定のブロックがレスポンスの生成に䜿甚され、その結果が新しいブロックずしお保存されるず、䟝存関係のツリヌ構造が圢成される可胜性がありたす。 時間の経過ずずもに、゜ヌス ブロック (ブランチ) の䜿甚を远跡するカりンタヌは、埓属ノヌド (リヌフ) が再利甚されるに぀れお叀くなる可胜性がありたす。゜ヌス ブロックを陀倖するには、埓属するすべおのブロックを陀倖する必芁があり、新しいナヌザ プロンプトの KV キャッシュを再蚈算する必芁が生じお TTFT が増加したす。 この課題に察凊するために、TensorRT-LLM には、埓属ノヌドを゜ヌス ノヌドから远跡し、埓属ノヌドがより最近の再利甚カりンタヌを持っおいる堎合でも、最初に埓属ノヌドを陀倖するこずができるむンテリゞェントな陀倖アルゎリズムが含たれおいたす。これにより、より効率的にメモリを管理できるようになるず共に、埓属ブロックの䞍芁な陀倖を回避できたす。 図 3. KV キャッシュの陀倖アルゎリズムの論理を衚珟した図。陀倖されるブロックの数を枛らし、再利甚の可胜性を高められる様子を瀺しおいたす。 TensorRT-LLM KV cache reuse を䜿い始める 掚論䞭に KV キャッシュを生成するには、倚くの蚈算ずメモリ ゜ヌスが必芁になりたす。効率的に䜿甚するこずが、モデル応答の改善、掚論の高速化、システム スルヌプットの向䞊には䞍可欠です。TensorRT-LLM は、ピヌク性胜のために TTFT 応答時間をさらに最適化しようずする開発者に高床な再利甚機胜を提䟛したす。 TensorRT-LLM KV cache reuse を䜿い始めるには、 GitHub のドキュメント を参照しおください。 関連情報 GTC セッション: Speeding up LLM Inference With TensorRT-LLM (TensorRT-LLM による LLM 掚論の高速化) GTC セッション: Optimizing and Scaling LLMs With TensorRT-LLM for Text Generation (テキスト生成のための TensorRT-LLM を䜿甚した LLM の最適化ずスケヌリング) SDK: Torch-TensorRT SDK: TensorRT SDK: TensorFlow-TensorRT
https://developer.nvidia.com/blog/state-of-the-art-multimodal-generative-ai-model-development-with-nvidia-nemo/
State-of-the-Art Multimodal Generative AI Model Development with NVIDIA NeMo
Generative AI has rapidly evolved from text-based models to multimodal capabilities. These models perform tasks like image captioning and visual question answering, reflecting a shift toward more human-like AI. The community is now expanding from text and images to video, opening new possibilities across industries. Video AI models are poised to revolutionize industries such as robotics, automotive, and retail. In robotics , they enhance autonomous navigation in complex, ever-changing environments, which is vital for sectors like manufacturing and warehouse management. In the automotive industry, video AI is propelling autonomous driving, boosting vehicle perception, safety, and predictive maintenance to improve efficiency. To build image and video foundation models, developers must curate and preprocess a large amount of training data, tokenize the resulting high-quality data at high fidelity, train or customize pretrained models efficiently and at scale, and then generate high-quality images and videos during inference. Announcing NVIDIA NeMo for multimodal generative AI NVIDIA NeMo is an end-to-end platform for developing, customizing, and deploying generative AI models. NVIDIA just announced the expansion of NeMo to support the end-to-end pipeline for developing multimodal models. NeMo enables you to easily curate high-quality visual data, accelerate training and customization with highly efficient tokenizers and parallelism techniques, and reconstruct high-quality visuals during inference. Accelerated video and image data curation High-quality training data ensures high-accuracy results from an AI model. However, developers face various challenges in building data processing pipelines, ranging from scaling to data orchestration. NeMo Curator streamlines the data curation process, making it easier and faster for you to build multimodal generative AI models. Its out-of-the-box experience minimizes the total cost of ownership (TCO) and accelerates time-to-market. While working with visuals, organizations can easily reach petabyte-scale data processing. NeMo Curator provides an orchestration pipeline that can load balance on multiple GPUs at each stage of the data curation. As a result, you can reduce video processing time by 7x compared to a naive GPU-based implementation. The scalable pipelines can efficiently process over 100 PB of data, ensuring the seamless handling of large datasets. Figure 1. NVIDIA NeMo Curator video processing speed NeMo Curator provides reference video curation models optimized for high-throughput filtering, captioning, and embedding stages to enhance dataset quality, empowering you to create more accurate AI models. For instance, NeMo Curator uses an optimized captioning model that delivers an order of magnitude throughput improvement compared to unoptimized inference model implementations. NVIDIA Cosmos tokenizers Tokenizers map redundant and implicit visual data into compact and semantic tokens, enabling efficient training of large-scale generative models and democratizing their inference on limited computational resources. Today’s open video and image tokenizers often generate poor data representations, leading to lossy reconstructions, distorted images, and temporally unstable videos and placing a cap on the capability of generative models built on top of the tokenizers. Inefficient tokenization processes also result in slow encoding and decoding and longer training and inference times, negatively impacting both developer productivity and the user experience. NVIDIA Cosmos tokenizers are open models that offer superior visual tokenization with exceptionally large compression rates and cutting-edge reconstruction quality across diverse image and video categories. Video 1. Efficient Generative AI Tokenizers for Image and Video These tokenizers provide ease of use through a suite of tokenizer standardized models that support vision-language models (VLMs) with discrete latent codes, diffusion models with continuous latent embeddings, and various aspect ratios and resolutions, enabling the efficient management of large-resolution images and videos. This provides you with tools for tokenizing a wide variety of visual input data to build image and video AI models. Cosmos tokenizer architecture A Cosmos tokenizer uses a sophisticated encoder-decoder structure designed for high efficiency and effective learning. At its core, it employs 3D causal convolution blocks , which are specialized layers that jointly process spatiotemporal information, and uses causal temporal attention that captures long-range dependencies in data. The causal structure ensures that the model uses only past and present frames when performing tokenization, avoiding future frames. This is crucial for aligning with the causal nature of many real-world systems, such as those in physical AI or multimodal LLMs. Figure 2. NVIDIA Cosmos tokenizer architecture The input is downsampled using 3D wavelets, a signal processing technique that represents pixel information more efficiently. After the data is processed, an inverse wavelet transform reconstructs the original input. This approach improves learning efficiency, enabling the tokenizer encoder-decoder learnable modules to focus on meaningful features rather than redundant pixel details. The combination of such techniques and its unique training recipe makes the Cosmos tokenizers a cutting-edge architecture for efficient and powerful tokenization. During inference, the Cosmos tokenizers significantly reduce the cost of running the model by delivering up to 12x faster reconstruction compared to leading open-weight tokenizers (Figure 3). Figure 3. Quantitative comparison of reconstruction quality (left) and runtime performance (right) for video tokenizers The Cosmos tokenizers also produce high-fidelity images and videos while compressing more than other tokenizers, demonstrating an unprecedented quality-compression trade-off. Figure 4. Continuous tokenizer compression rate compared to reconstruction quality Figure 5. Discrete tokenizer compression rate compared to reconstruction quality Although the Cosmos tokenizer regenerates from highly compressed tokens, it is capable of creating high-quality images and videos due to an innovative neural network training technique and architecture. Figure 6. Reconstructed video frame for continuous video tokenizers Build Your Own Multimodal Models with NeMo The expansion of the NVIDIA NeMo platform with at-scale data processing using NeMo Curator and high-quality tokenization and visual reconstruction using the Cosmos tokenizer empowers you to build state-of-the-art multimodal, generative AI models. Join the waitlist and be notified when NeMo Curator is available. The tokenizer is available now on the /NVIDIA/cosmos-tokenizer GitHub repo and Hugging Face .
https://developer.nvidia.com/ja-jp/blog/state-of-the-art-multimodal-generative-ai-model-development-with-nvidia-nemo/
NVIDIA NeMo による最先端のマルチモヌダル生成 AI モデル開発
Reading Time: 2 minutes 生成 AI は、テキストベヌスのモデルからマルチモヌダル機胜ぞず急速に進化しおいたす。これらのモデルは、画像のキャプション䜜成や芖芚的な質問回答などのタスクを実行し、より人間に近い AI ぞずシフトしおいるこずを反映しおいたす。このコミュニティは珟圚、テキストや画像から動画ぞず拡倧しおおり、さたざたな業界で新たな可胜性を切り開かれおいたす。 動画 AI モデルは、ロボティクス、自動車、小売などの業界に革呜を起こそうずしおいたす。 ロボティクス では、補造業や倉庫管理などの分野に䞍可欠な、耇雑で倉化し続ける環境における自埋的なナビゲヌションを匷化しおいたす。自動車業界では、動画 AI が自動運転を掚進し、車䞡の認識、安党性、予知保党を匷化し、効率性を高めおいたす。 画像や動画の基盀モデルを構築するには、開発者は倧量の孊習デヌタのキュレヌションず事前凊理を行い、結果ずしお埗られた高品質デヌタを高い忠実床でトヌクン化し、孊習枈みモデルを効率的に倧芏暡に孊習たたはカスタマむズしお、掚論䞭に高品質な画像や動画を生成する必芁がありたす。 マルチモヌダル生成 AI 向けの NVIDIA NeMo を発衚 NVIDIA NeMo は、生成 AI モデルを開発、カスタマむズ、デプロむする゚ンドツヌ゚ンドのプラットフォヌムです。 NVIDIA は、マルチモヌダル モデル開発向けの゚ンドツヌ゚ンドのパむプラむンをサポヌトする NeMo の拡匵を発衚したした。NeMo により、高品質な芖芚デヌタを簡単にキュレヌションし、高効率なトヌクナむザヌず䞊列凊理技術で å­Šç¿’ ず カスタマむズ を加速し、掚論䞭に高品質なビゞュアルを再構築するこずができたす。 動画ず画像デヌタのキュレヌションを加速 高品質な孊習デヌタでは、AI モデルから高粟床な結果が埗られたす。しかし、開発者は、デヌタ凊理パむプラむンの構築においお、スケヌリングからデヌタのオヌケストレヌションたで、さたざたな課題に盎面しおいたす。 NeMo Curator は、デヌタ キュレヌション プロセスを合理化するこずで、マルチモヌダル生成 AI モデルをより簡単か぀迅速に構築するこずができたす。すぐに詊すこずができるため、総保有コスト (TCO) を最小限に抑え、垂堎投入たでの時間を短瞮したす。 ビゞュアルを扱う際には、組織はペタバむト芏暡のデヌタ凊理を容易に実行できたす。NeMo Curator は、デヌタ キュレヌションの各段階で耇数の GPU に負荷分散できるオヌケストレヌション パむプラむンを提䟛したす。その結果、単玔な GPU ベヌスの実装ず比范しお、動画凊理時間を 7 分の 1 に短瞮できたす。スケヌル可胜なパむプラむンは、100 PB を超えるデヌタを効率的に凊理でき、倧芏暡なデヌタセットをシヌムレスに取り扱うこずができたす。 図 1. NVIDIA NeMo Curator の動画凊理速床 NeMo Curator は、高いスルヌプットのフィルタリング、キャプション䜜成、埋め蟌みの各段階に最適化されたリファレンス ビデオ キュレヌション モデルを提䟛し、デヌタセットの品質を向䞊させ、より正確な AI モデルの䜜成をサポヌトしたす。 たずえば、NeMo Curator は、最適化されたキャプション モデルを䜿甚し、最適化されおいない掚論モデルの実装ず比范しお、桁違いのスルヌプットの向䞊を実珟したす。 NVIDIA Cosmos トヌクナむザヌ トヌクナむザヌは、冗長的で暗黙的な芖芚デヌタをコンパクトで意味のあるトヌクンにマッピングし、倧芏暡な生成モデルの効率的な孊習を実珟し、誰もが限られた蚈算リ゜ヌスで掚論できるようにしたす。 今日のオヌプンな動画や画像のトヌクナむザヌは、デヌタ衚珟が䞍十分なこずが倚いため、劣化の倚い再構築、歪んだ画像、䞍連続な動画に぀ながり、トヌクナむザヌ䞊に構築された生成モデルの胜力に限界をもたらしたす。トヌクン化プロセスが非効率なため、゚ンコヌドやデコヌドに時間がかかり、孊習や掚論の時間が長くなり、開発者の生産性ずナヌザヌ䜓隓の䞡方に悪圱響を及がしたす。 NVIDIA Cosmos トヌクナむザヌは、優れた芖芚トヌクン化を提䟛するオヌプンなモデルで、さたざたな画像や動画のカテゎリヌで、高い圧瞮率ず最先端の再構築品質を実珟したす。 離散的な朜圚コヌドを備えた芖芚蚀語モデル (VLM: Vision-language Model)、連続した朜圚的埋め蟌みによる拡散モデル、さたざたなアスペクト比や解像床をサポヌトする䞀連のトヌクナむザヌ暙準化モデルを䜿甚しお、これらのトヌクナむザヌを簡単に䜿甚でき、高解像床の画像や動画を効率的に管理するこずができたす。これにより、画像や動画 AI モデルを構築するために、幅広い芖芚入力デヌタをトヌクン化するツヌルが提䟛されたす。 Cosmos トヌクナむザヌのアヌキテクチャ Cosmos トヌクナむザヌは、高効率か぀効果的な孊習向けに蚭蚈されおおり、高床な゚ンコヌダヌ / デコヌダヌ構造を䜿甚しおいたす。その䞭栞には 3D Causal Convolution Block (因果畳み蟌みブロック) を採甚しおいたす。これは時空間情報を共同凊理する特殊なレむダヌで、デヌタの長期的な䟝存関係を捉える Causal Temporal Attention (因果的時間泚意機構) を䜿甚しおいたす。 この因果構造により、トヌクン化の実行時にモデルが過去ず珟圚のフレヌムのみを䜿甚し、未来のフレヌムは䜿甚したせん。これは、物理的なAIやマルチモヌダルLLMなどの倚くの珟実䞖界のシステムの因果性に合わせるために重芁です。 図 2. NVIDIA Cosmos トヌクナむザヌのアヌキテクチャ 入力は、ピクセル情報をより効率的に衚す信号凊理技術である 3D りェヌブレットを䜿甚しおダりンサンプリングされたす。デヌタ凊理埌、逆りェヌベレット倉換によっお元の入力が再構築されたす。 このアプロヌチにより、孊習効率が向䞊し、トヌクナむザヌの゚ンコヌダヌ / デコヌダヌの孊習可胜なモゞュヌルは、冗長なピクセルの詳现ではなく、意味のある特城に焊点を圓おるこずができたす。このような技術ず独自の孊習レシピの組み合わせにより、Cosmos トヌクナむザヌは、効率的か぀匷力なトヌクン化を実珟する最先端のアヌキテクチャずなっおいたす。 掚論の際、Cosmos トヌクナむザヌは、䞻芁なオヌプンりェむトのトヌクナむザヌず比范しお最倧 12 倍高速な再構築を実珟し、モデルの実行コストを倧幅に削枛したした (図 3)。 図 3. Cosmos トヌクナむザヌず䞻芁なオヌプンりェむトのトヌクナむザヌずの比范 Cosmos トヌクナむザヌは、他のトヌクナむザヌよりも高い圧瞮率を実珟しながら、高い忠実床の画像や動画を生成し、前䟋のない品質ず圧瞮のトレヌドオフを実珟しおいたす。 図 4. 連続トヌクナむザヌの圧瞮率ず再構築品質の比范 図 5. 離散トヌクナむザヌの圧瞮率ず再構築品質の比范 Cosmos トヌクナむザヌは、高床に圧瞮されたトヌクンから再生成されたすが、革新的なニュヌラル ネットワヌクの孊習技術ずアヌキテクチャにより、高品質な画像や動画を䜜成するこずができたす。 図 6. 連続動画トヌクナむザヌで再構築された動画フレヌム NeMo で独自のマルチモヌダル モデルを構築 NeMo Curator を䜿甚した倧芏暡なデヌタ凊理ず、Cosmos トヌクナむザヌを䜿甚した高品質なトヌクン化やビゞュアル再構築を備えた、NVIDIA NeMo プラットフォヌムの拡匵により、最先端のマルチモヌダル生成 AI モデルを構築するこずができたす。 登録 しおいただくず、NeMo Curator が利甚可胜になった際に通知を受け取るこずができたす。トヌクナむザヌは、珟圚 /NVIDIA/cosmos-tokenizer GitHub リポゞトリおよび Hugging Face で利甚するこずができたす。 関連情報 GTC セッション: Large Language Model Fine-Tuning using Parameter Efficient Fine-Tuning (PEFT を䜿甚した倧芏暡蚀語モデルのファむンチュヌニング) GTC セッション: Large Language Model Fine-Tuning using NVIDIA NeMo (NVIDIA NeMo を䜿甚した倧芏暡蚀語モデルのファむンチュヌニング – Domino Data Lab 提䟛) SDK: NVIDIA NeMo カスタマむザヌ SDK: NeMo LLM サヌビス SDK: NeMo Megatron
https://developer.nvidia.com/blog/frictionless-collaboration-and-rapid-prototyping-in-hybrid-environments-with-nvidia-ai-workbench/
Frictionless Collaboration and Rapid Prototyping in Hybrid Environments with NVIDIA AI Workbench
NVIDIA AI Workbench is a free development environment manager that streamlines data science, AI, and machine learning (ML) projects on systems of choice. The goal is to provide a frictionless way to create, compute, and collaborate on and across PCs, workstations, data centers, and clouds. The basic user experience is straightforward: Easy setup on single systems: Click through install in minutes on Windows, Ubuntu, and macOS, with a one-line install on remote systems. Managed experience for decentralized deployment : A free, PaaS/SaaS type UX in truly hybrid contexts with no need for a centralized, service-based platform. Seamless collaboration for experts and beginners: Friendly Git, container, and application management without limiting customization by power users. Consistent across users and systems: Migrate workloads and applications across different systems while maintaining functionality and user experience. Simplified GPU handling : Handles system dependencies like NVIDIA drivers and the NVIDIA Container Toolkit , as well as GPU-enabled container runtime configuration. This post explores highlights of the October release of NVIDIA AI Workbench, which is the most significant since the product launch at GTC 2024 and is a big step closer to the full product vision. Release highlights This section will detail the major new capabilities and user-requested updates in the latest release. Major new capabilities include: Enhance collaboration through expanded Git support, such as branching, merging, diffs, and finer-grained control for commits and gitignore. Create complex applications and workflows with multicontainer environments through Docker Compose support. Simple, fast, and secure rapid prototyping with application sharing with single-user URLs. User requested updates: Dark mode for the Desktop App Improved installation on localized versions of Windows Expanded Git support Previously, AI Workbench supported only single, monolithic commits on the main branch. Users had to manage branches and merges manually, and this created various types of confusion, especially around resolving merge conflicts. Now, users can manage branches, merges, and conflicts directly in the Desktop App and the CLI. In addition, they can see and triage individual file diffs for commits. The UI is built to work seamlessly with manual Git operations and will update to reflect relevant changes. Figure 1. AI Workbench Desktop App tab for Git branching These features are found in two new tabs on the Desktop App: Changes and Branches. Changes : Gives a line-by-line view of the diffs between the working tree and previous commits. Users can now select and commit file changes individually or in bulk based on visible file diffs tracked changes (addition, modification, or deletion), as well as being able to individually reject or add a file to git-ignore. The view also updates dynamically to reflect manual Git actions, for example manually staging a file and then following up with a change to the file in the working tree. Branches : Provides branch management, including creation, switching, and merging, as well as visibility for remote branches on a Git server. Merging branches with a conflict initiates a conflict resolution flow that users can do within the UI, or move to a terminal or file editor of their choice. Learn more about how these advanced Git features work . Multicontainer support with Docker Compose stacks AI Workbench now supports Docker Compose . Users can work with multicontainer applications and workflows with the same ease of configuration, reproducibility, and portability that AI Workbench provides for single-container environments. Figure 2. The Docker Compose feature in the AI Workbench Environment Management tab The basic idea is to add a Docker Compose-based “stack” that is managed by AI Workbench and connects to the main development container. To add the stack, a user just needs to add the appropriate Docker Compose file to the project repository and do some configuration in the Desktop App or CLI. We’re using Docker Compose for a few reasons. First, we didn’t want to develop in a vacuum, and that’s why we’ve been collaborating with the Docker team on features like a managed Docker Desktop install . Second, we want users to be able to work with the multicontainer applications outside of AI Workbench, and Docker Compose is the easiest way to do that. The vision for this feature is to enable streamlined, powerful development and compute for multicontainer applications within AI Workbench that can then be stood up outside of AI Workbench with a simple docker-compose up command. This multicontainer feature is new and will continue to evolve. We would love to get feedback and help you sort out any issues through the NVIDIA AI Workbench Developer Forum . Learn more about how Docker Compose works . Web application sharing through secure URLs AI Workbench enables users to easily spin up managed web applications that are built into a project. The process is fairly simple: create or clone a project with the web app installed, start the project, then start the app, and it appears in your browser. This approach is great for a developer UX, but it wasn’t good for rapid prototyping UX and collaboration. If you wanted another user to access and test your application, you either asked them to install AI Workbench, clone the project and run it, or you had to fully extract the application to run it and make it available to the user. The first is a speed bump for the user, and the second is a speed bump for the developer. We eliminated these speed bumps with a simple feature that enables you to set a remote AI Workbench to enable external access and to create single-use, secure URLs for running web applications in a project on that remote. You just need to make sure the user has access to port 10000 on the remote, and the application will be directly accessible. All they have to do is click the link and go to the app. Figure 3. Developers can now give end users direct access to applications running in an AI Workbench Project on a remote through secure, one-time-use URLs Enabling this kind of access is useful for rapid prototyping and collaboration. That’s why various SaaS offerings provide this as a managed service. The difference with AI Workbench is that you can provide this access on your own resources and in your own network, for example on data center resources or a shared server. It doesn’t have to be in the cloud. AI Workbench keeps things secure by restricting this access to a single browser and to a single application that’s running in the project. This means a user can’t share the URL with someone else, and they are constrained to the web app that you shared with them. Learn more about how application sharing works. Dark mode and localized Windows installation Many users requested a dark mode option because it’s easier on the eyes. It’s now available and can be selected through the Settings window that is now available directly from within the Desktop App. Learn more about how dark mode works . Windows users are by far our main demographic for the local installs, and not all Windows users are using the English language pack, and this blocked AI Workbench install due to how we handled some WSL commands. In particular, we’ve had users working in Cyrillic or Chinese that were blocked on Windows. We adjusted how we handle non-English language packs, and it should work well now. If you were previously blocked by this, give it a try now. If it still doesn’t work for you, let us know in the NVIDIA AI Workbench Developer Forum so we can continue to improve this capability. New AI Workbench projects This release introduces new example projects designed to jumpstart your AI development journey, detailed below.  An AI Workbench project is a structured Git repository that defines a containerized development environment in AI Workbench. AI Workbench projects provide: Effortless setup and GPU configuration: Simply clone a project from GitHub or GitLab, and AI Workbench handles the rest with automatic GPU configuration. Development integrations: Seamless support for popular development environments such as Jupyter and VS Code, as well as support for user-configured web applications. Containerized and customizable environments: Projects are containerized, isolated, and easily modifiable. Adapt example projects to suit your specific needs while ensuring consistency and reproducibility. Explore NVIDIA AI Workbench example projects . Multimodal virtual assistant example project This project enables users to build their own virtual assistant using a multimodal retrieval-augmented generation (RAG) pipeline with fallback to web search. Users can interact with two RAG-based applications to learn more about AI Workbench, converse with the user documentation, troubleshoot their own installation, or even focus the RAG pipeline to their own, custom product. Control-Panel: Customizable Gradio app for working with product documentation allows uploading webpages, PDFs, images, and videos to a persistent vector store and query them. For inference, users can select between cloud endpoints like on the NVIDIA API Catalog or use self-hosted endpoints to run their own inference. Public-Chat: With product documents loaded, the Gradio app is a simplified, “read-only” chatbot that you can share with end users through the new AI Workbench App Sharing feature. Figure 4. Using the Public-Chat web app, a read-only, pared down chat application that is meant to be more consumable and shareable to end users Competition-Kernel example project This project provides an easy, local experience when working on Kaggle competitions. You can easily leverage your local machine or a cloud instance to work on competition datasets, write code, build out models, and submit results, all through AI Workbench. The Competition Kernel project offers: A managed experience to develop and test on your own GPUs and set up and customize in minutes. Easy version control and tracking of code through GitHub or GitLab and very easy collaboration. The power of using a local, dedicated IDE: robust debugging, intelligent code completion, extensive customization options. Easy plugin to existing data sources (external or your own). No Internet? No problem. Develop while offline. Get started This release of NVIDIA AI Workbench marks a significant step forward in providing a frictionless experience for AI development across GPU systems. New features from this release, including expanded Git support, support for multicontainer environments, and secure web app sharing, streamline developing and collaborating on AI workloads. Explore these features in the three new example projects available with this release or create your own projects. To get started with AI Workbench, install the application from the webpage . For more information about installing and updating, see the NVIDIA AI Workbench documentation . Explore a range of NVIDIA AI Workbench example projects , from data science to RAG. Visit the NVIDIA AI Workbench Developer Forum to report issues and learn more about how other developers are using AI Workbench.
https://developer.nvidia.com/ja-jp/blog/frictionless-collaboration-and-rapid-prototyping-in-hybrid-environments-with-nvidia-ai-workbench/
NVIDIA AI Workbench によるハむブリッド環境におけるスムヌズなコラボレヌションず迅速なプロトタむピング
Reading Time: 3 minutes NVIDIA AI Workbench は、遞択したシステムでデヌタ サむ゚ンス、AI、機械孊習 (ML) プロゞェクトを合理化する無料の開発環境マネヌゞャヌです。 PC、ワヌクステヌション、デヌタ センタヌ、クラりド䞊で、あるいはそれらをたたがり、スムヌズな䜜成、蚈算、コラボレヌションを行うこずを目的ずしおいたす。基本的なナヌザヌ䜓隓はシンプルです: 単䞀システムで簡単なセットアップ: Windows、Ubuntu、macOS ではクリック操䜜でむンストヌルが完了し、リモヌト システムでは 1 行のコマンドでむンストヌルするこずができたす。 分散型デプロむのための管理化された䜓隓 : 集䞭型のサヌビスベヌスのプラットフォヌムを必芁ずしない、本圓の意味でハむブリッドなコンテキストにおける無料の PaaS/SaaS 型のナヌザヌ䜓隓。 ゚キスパヌトず初心者向けのシヌムレスなコラボレヌション: パワヌ ナヌザヌによるカスタマむズを制限するこずのない、䜿いやすい Git、コンテナヌ、アプリケヌション管理。 ナヌザヌずシステム間の䞀貫性: 機胜ずナヌザヌ䜓隓を維持しながら、異なるシステム間でワヌクロヌドずアプリケヌションを移行。 GPU 凊理の簡玠化 : NVIDIA ドラむバヌ や NVIDIA コンテナヌ ツヌルキット などのシステム䟝存関係、 および GPU 察応のコンテナヌ ランタむム構成を凊理。 この蚘事では、GTC 2024 での補品発衚以来、最も重芁な NVIDIA AI Workbench の 10 月のリリヌスにおけるハむラむトをご玹介したす。補品ビゞョン実珟に向けた倧きな䞀歩です。 リリヌス ハむラむト このセクションでは、最新リリヌスでの䞻芁な新機胜ずナヌザヌから芁望のあった曎新に぀いお、詳しく説明したす。 䞻な新機胜には以䞋が含たれたす。 ブランチ、マヌゞ、差分、コミットず gitignore の现かい制埡など、Git のサポヌトを拡倧し、コラボレヌションを匷化したす。 Docker Compose のサポヌトを通じお、マルチコンテナヌ環境で耇雑なアプリケヌションずワヌクフロヌを䜜成したす。 シングルナヌザヌ URL でアプリケヌションを共有するこずで、シンプルか぀迅速、安党なプロトタむピングを実珟したす。 ナヌザヌの芁望によるアップデヌト: デスクトップ アプリのダヌクモヌド ロヌカラむズ版 Windows のむンストヌル改善 Git サポヌトの拡匵 これたで AI Workbench は、メむン ブランチでの単䞀のモノリシックなコミットのみをサポヌトしおいたした。 ナヌザヌはブランチずマヌゞを手動で管理する必芁があり、特にマヌゞの競合の解決に関しお、さたざたな皮類の混乱が生じおいたした。 珟圚は、ブランチ、マヌゞ、競合を、デスクトップ アプリず CLI で盎接管理するこずができたす。 加えお、コミットの個々のファむル差分を確認し、優先順䜍を付けるこずもできたす。 この UI は、手動の Git 操䜜ずシヌムレスに動䜜するように構築されおおり、関連する倉曎を反映しお曎新されたす。 図 1. Git ブランチ甚の AI Workbench Desktop アプリ タブ これらの機胜は、デスクトップ アプリの 2 ぀の新しいタブ: [Changes (倉曎)] ず [Branches (ブランチ)] に衚瀺されたす。 倉曎 : 䜜業ツリヌず以前のコミット間の差分を 1 行ず぀衚瀺したす。 ナヌザヌは、衚瀺されおいるファむル差分、远跡された倉曎 (远加、修正、削陀) に基づいお、ファむル倉曎を個別たたは䞀括で遞択し、コミットするこずができるようになりたした。たた、git-ignore にファむルを個別に拒吊、たたは远加するこずもできたす。 このビュヌはたた、手動の Git 操䜜を反映するように動的に曎新されたす。䟋えば、ファむルを手動でステヌゞングし、䜜業ツリヌ内のファむルに倉曎を加えたす。 ブランチ : Git サヌバヌ䞊のリモヌト ブランチを可芖化するだけでなく、䜜成、切り替え、マヌゞなどのブランチ管理を提䟛したす。競合のあるブランチをマヌゞするず、競合解決フロヌが開始されたす。このフロヌは、ナヌザヌが UI 内で実行するこずも、遞択した端末やファむル ゚ディタヌに移動するこずもできたす。 これらの高床な Git 機胜の仕組みの詳现をご芧ください 。 Docker Compose スタックによるマルチコンテナヌのサポヌト AI Workbench が、 Docker Compose をサポヌトするようになりたした。 ナヌザヌは、AI Workbench がシングルコンテナヌ環境向けに提䟛する構成、再珟性、移怍性ず同様の容易さで、マルチコンテナヌ アプリケヌションずワヌクフロヌを操䜜するこずができたす。 図 2. AI Workbench 環境管理タブの Docker Compose 機胜 基本的な考え方は、AI Workbench によっお管理され、メむンの開発コンテナヌに接続する Docker Compose ベヌスの「スタック」を远加するこずです。 スタックを远加するには、ナヌザヌは 適切な Docker Compose ファむルをプロゞェクト リポゞトリに远加し、デスクトップ アプリたたは CLI でいく぀かの蚭定を行うだけです。 NVIDIA では、いく぀かの理由があっお Docker Compose を䜿甚しおいたす。 1 ぀目は、䜕もない所から開発を行うこずを望んでいなかったからです。そのため、 管理された Docker デスクトップ むンストヌル などの機胜に぀いお Docker チヌムず協力 しおきたした。 2 ぀目は、AI Workbench の以倖で、ナヌザヌがマルチコンテナヌ アプリケヌションを操䜜できるようにするには、Docker Compose が最も簡単な方法だからです。この機胜のビゞョンは、AI Workbench 内のマルチコンテナヌ アプリケヌションを合理化し、効果的な開発ず挔算凊理を可胜にし、シンプルな docker-compose up コマンドで AI Workbench 倖で起動できるようにするこずです。 このマルチコンテナヌ機胜は新しい機胜であり、今埌も進化し続けたす。 NVIDIA AI Workbench 開発者フォヌラム を通じお、是非フィヌドバックをお寄せください。問題解決をお手䌝いいたしたす。 Docker Compose の仕組みの詳现をご芧ください 。 セキュアな URL によるりェブ アプリケヌション共有 AI Workbench により、ナヌザヌはプロゞェクトに組み蟌たれた管理されたりェブ アプリケヌションを簡単に起動するこずができたす。 このプロセスは非垞に簡単で、Web アプリがむンストヌルされたプロゞェクトを䜜成たたは耇補し、プロゞェクトを開始しおからアプリを開始するず、ブラりザヌに衚瀺されたす。 このアプロヌチは開発者の UX には最適ですが、迅速なプロトタむピングの UX やコラボレヌションには適しおいたせんでした。 他のナヌザヌにアプリケヌションぞのアクセスずテストを行っおもらう堎合、AI Workbench のむンストヌル、プロゞェクトの耇補、実行を䟝頌するか、アプリケヌションを完党に抜出しお実行し、ナヌザヌが利甚できるようにする必芁がありたした。 1 ぀目はナヌザヌの課題であり、2 ぀目は開発者の課題です。 NVIDIA では、リモヌトの AI Workbench を蚭定しお倖郚からのアクセスを可胜にし、そのリモヌト䞊のプロゞェクトにおいお、りェブ アプリケヌションを実行するための䞀回限りの安党な URL を䜜成するこずができるシンプルな機胜でこれらの課題を克服したした。 ナヌザヌがリモヌトのポヌト 10000 にアクセスできるこずを確認するだけで、アプリケヌションに盎接アクセスできるようになりたす。 リンクをクリックしおアプリに移動するだけです。 図 3. 開発者は、䞀回限りの安党な URL を通じお、゚ンドナヌザヌを AI Workbench プロゞェクトで実行しおいるアプリケヌションに、リモヌトで盎接アクセスさせるこずができるようになりたした このようなアクセスを有効にするこずは、迅速なプロトタむピングずコラボレヌションに圹立ちたす。 だからこそ、さたざたな SaaS がこれを提䟛するマネヌゞド サヌビスずしお提䟛しおいるのです。AI Workbench ずの違いは、デヌタ センタヌのリ゜ヌスや共有サヌバヌなど、独自のリ゜ヌスや独自のネットワヌクで、このアクセスを提䟛できるこずです。 クラりドである必芁はありたせん。 AI Workbench は、単䞀のブラりザヌずプロゞェクトで実行されおいる単䞀のアプリケヌションに察しお、このアクセスを制限するこずで、安党性を確保したす。 ぀たり、ナヌザヌは URL を他のナヌザヌず共有できず、共有したりェブ アプリに制限されたす。 アプリケヌション共有の仕組みの詳现をご芧ください。 ダヌク モヌドずロヌカラむズされた Windows むンストヌル 倚くのナヌザヌから、目に優しいダヌク モヌドオプションの芁望が寄せられたした。 珟圚、このオプションは利甚可胜で、デスクトップ アプリから盎接䜿甚できる蚭定りィンドりから遞択できるようになっおいたす。 ダヌク モヌドの仕組みの詳现をご芧ください 。 ロヌカル むンストヌルの䞻なナヌザヌ局は Windows ナヌザヌですが、すべおの Windows ナヌザヌが英語パックを䜿甚しおいるわけではありたせん。たた、WSL コマンドの凊理方法により、この AI Workbench のむンストヌルがブロックされおいたした。 特に、Windows 䞊でキリル文字、たたは䞭囜語で䜜業するナヌザヌがブロックされおいたした。 英語以倖の蚀語パックを凊理する方法を調敎したので、珟圚は問題なく機胜するはずです。 以前ブロックされおいた堎合は、是非お詊しください。 それでも機胜しない堎合は、 NVIDIA AI Workbench 開発者フォヌラム でお知らせください。それにより NVIDIA は、匕き続きこの機胜を改善するこずができたす。 新しい AI Workbench プロゞェクト このリリヌスで、AI 開発をすぐに始められるように蚭蚈された新しいサンプル プロゞェクトをご玹介したす。詳现は以䞋をご芧ください。 AI Workbench プロゞェクト は、AI Workbench のコンテナヌ化された開発環境を定矩する構造化された Git リポゞトリです。 AI Workbench プロゞェクトでは、以䞋を提䟛したす。 簡単なセットアップず GPU 構成: プロゞェクトを GitHub たたは GitLab からクロヌンするだけで、残りは AI Workbench が自動で GPU 構成を行いたす。 開発の統合: Jupyter や VS Code などの䞀般的な開発環境に察しおシヌムレスにサポヌトし、ナヌザヌ構成のりェブ アプリケヌションに぀いおもサポヌトしたす。 コンテナヌ化されたカスタマむズ可胜な環境: プロゞェクトはコンテナヌ化され、分離され、簡単に倉曎可胜です。 䞀貫性ず再珟性を確保しながら、特定のニヌズに合わせおサンプル プロゞェクトを適合させるこずができたす。 NVIDIA AI Workbench サンプル プロゞェクトをご芧ください 。 マルチモヌダル仮想アシスタント サンプル プロゞェクト このプロゞェクトでは、りェブ怜玢ぞのフォヌルバックを䌎うマルチモヌダル 怜玢拡匵生成 (RAG) パむプラむンを䜿甚しお、独自の仮想アシスタントをするこずが構築できたす。 ナヌザヌは、2 ぀の RAG ベヌスのアプリケヌションを操䜜しお、AI Workbench の詳现を孊んだり、ナヌザヌ ドキュメントを参照したり、自身のむンストヌルのトラブルシュヌティングをしたり、あるいは RAG パむプラむンを独自のカスタム補品に集䞭させたりするこずができたす。 Control-Panel: 補品のドキュメントを操䜜するためのカスタマむズ可胜な Gradio アプリでは、りェブペヌゞ、PDF、画像、動画を氞続的なベクトル ストアにアップロヌドし、それらを問い合わせできたす。 掚論に関しおは、NVIDIA API カタログのように、クラりド ゚ンドポむントを遞択したり、セルフホスト型の゚ンドポむントを䜿甚しお、独自の掚論を実行できたす。 Public-Chat: 補品ドキュメントが読み蟌たれるず、Gradio アプリは簡玠化された「読み取り専甚」チャットボットずなり、新しい AI Workbench アプリ共有機胜を通じお゚ンド ナヌザヌず共有できたす。 図 4. Public-Chat りェブ アプリは、読み取り専甚のシンプルなチャット アプリケヌションで、゚ンドナヌザヌの利甚ず共有を容易にしたす Competition-Kernel サンプル プロゞェクト このプロゞェクトは、Kaggle コンペティションに取り組む際に簡単なロヌカル ゚クスペリ゚ンスを提䟛したす。 AI Workbench を通じお、ロヌカル マシン、たたはクラりド むンスタンスを掻甚し、コンペティションのデヌタセット、コヌドの䜜成、モデルの構築、結果の提出などを簡単に実行するこずができたす。 Competition Kernel プロゞェクトでは、以䞋を提䟛したす。 独自の GPU で開発ずテストを行い、数分でセットアップずカスタマむズを行う管理された䜓隓。 GitHub たたは GitLab によるコヌドのバヌゞョン コントロヌルず远跡、コラボレヌションが容易。 ロヌカルで専甚 IDE を䜿甚するパワヌ: 堅牢なデバッグ、むンテリゞェントなコヌド補完、広範なカスタマむズ オプション。 既存のデヌタ ゜ヌス (倖郚たたは独自) ぞの簡単なプラグむン。 むンタヌネットが䜿えない? 問題ありたせん。オフラむンでも開発できたす。 今すぐ始めたしょう この NVIDIA AI Workbench のリリヌスは、GPU システム党䜓で AI 開発に円滑な䜓隓を提䟛する倧きな䞀歩ずなりたす。 このリリヌスには、Git のサポヌトの拡匵、マルチコンテナヌ環境のサポヌト、安党なりェブ アプリ共有など、AI ワヌクロヌドでの開発ずコラボレヌションの効率化などの新機胜が含たれたす。 このリリヌスで利甚可胜ずなった 3 ぀の新しいサンプル プロゞェクトでこれらの機胜をお詊しいただくか、独自のプロゞェクトを䜜成するこずもできたす。 AI Workbench を始めるには、 りェブペヌゞからアプリケヌションをむンストヌルしおください 。 むンストヌルず曎新の詳现に぀いおは、 NVIDIA AI Workbench のドキュメント を参照しおください。 デヌタ サむ゚ンスから RAG たで、さたざたな NVIDIA AI Workbench のサンプル プロゞェクト もご甚意しおいたす。 問題を報告したり、他の開発者による AI Workbench の掻甚方法を確認するには、 NVIDIA AI Workbench 開発者フォヌラム にアクセスしおください。 関連情報 DLI コヌス: 察話型 AI Building Conversational AI Applications (アプリケヌションの構築 ) GTC セッション: Breaking Barriers: How NVIDIA AI Workbench Makes AI Accessible to All (障壁の打砎: NVIDIA AI Workbench による AI をすべおの人々に身近にする方法) りェビナヌ: Virtual Desktop in the Era of AI (AI 時代の仮想デスクトップ) りェビナヌ: Jumpstart AI Development With Virtual Workstations (仮想ワヌクステヌションで AI 開発を加速)
https://developer.nvidia.com/blog/build-multimodal-visual-ai-agents-powered-by-nvidia-nim/
Build Multimodal Visual AI Agents Powered by NVIDIA NIM
The exponential growth of visual data—ranging from images to PDFs to streaming videos—has made manual review and analysis virtually impossible. Organizations are struggling to transform this data into actionable insights at scale, leading to missed opportunities and increased risks. To solve this challenge, vision-language models (VLMs) are emerging as powerful tools, combining visual perception of images and videos with text-based reasoning. Unlike traditional large language models (LLMs) that only process text, VLMs empower you to build visual AI agents that understand and act on complex multimodal data, enabling real-time decision-making and automation. Imagine having an intelligent AI agent that can analyze remote camera footage to detect early signs of wildfires or scan business documents to extract critical information buried within charts, tables, and images—all autonomously. With NVIDIA NIM microservices , building these advanced visual AI agents is easier and more efficient than ever. Offering flexible customization, streamlined API integration, and smooth deployment, NIM microservices enable you to create dynamic agents tailored to your unique business needs. In this post, we guide you through the process of designing and building intelligent visual AI agents using NVIDIA NIM microservices. We introduce the different types of vision AI models available, share four sample applications—streaming video alerts, structured text extraction, multimodal search, and few-shot classification—and provide Jupyter notebooks to get you started. For more information about bringing these models to life, see the /NVIDIA/metropolis-nim-workflows GitHub repo. Types of vision AI models To build a robust visual AI agent, you have the following core types of vision models at your disposal: VLMs Embedding models Computer vision (CV) models These models serve as essential building blocks for developing intelligent visual AI agents. While the VLM functions as the core engine of each agent, CV and embedding models can enhance its capabilities, whether by improving accuracy for tasks like object detection or parsing complex documents. In this post, we use vision NIM microservices to access these models. Each vision NIM microservice can be easily integrated into your workflows through simple REST APIs, allowing for efficient model inference on text, images, and videos. To get started, you can experiment with hosted preview APIs on build.nvidia.com , without needing a local GPU. Figure 1.The llama-3.2-vision-90b model on build.nvidia.com Vision language models VLMs bring a new dimension to language models by adding vision capabilities, making them multimodal. These models can process images, videos, and text, enabling them to interpret visual data and generate text-based outputs. VLMs are versatile and can be fine-tuned for specific use cases or prompted for tasks such as Q&A based on visual inputs. NVIDIA and its partners offer several VLMs as NIM microservices each differing in size, latency, and capabilities (Table 1). Company Model Size Description NVIDIA VILA 40B A powerful general-purpose model built on SigLIP and Yi that is suitable for nearly any use case. NVIDIA Neva 22B A medium-sized model combining NVGPT and CLIP and offering the functionality of much larger multimodal models. Meta Llama 3.2 90B/11B The first vision-capable Llama model in two sizes, excelling in a range of vision-language tasks and supporting higher-resolution input. Microsoft phi-3.5-vision 4.2B A small, fast model that excels at OCR and is capable of processing multiple images. Microsoft Florence-2 0.7B A multi-task model capable of captioning, object detection, and segmentation using simple text prompts. Table 1. VLM NIM microservices Embedding models Embedding models convert input data (such as images or text) into dense feature-rich vectors known as embeddings. These embeddings encapsulate the essential properties and relationships within the data, enabling tasks like similarity search or classification. Embeddings are typically stored in vector databases where GPU-accelerated search can quickly retrieve relevant data. Embedding models play a crucial role in creating intelligent agents. For example, they support retrieval-augmented generation (RAG) workflows, enabling agents to pull relevant information from diverse data sources and improve accuracy through in-context learning. Company Model Description Use Cases NVIDIA NV-CLIP Multimodal foundation model generating text and image embeddings Multimodal search, Zero-shot classification NVIDIA NV-DINOv2 Vision foundation model generating high-resolution image embeddings Similarity search, Few-shot classification Table 2. Embedding NIM microservices Computer vision models CV models focus on specialized tasks like image classification, object detection, and optical character recognition (OCR). These models can augment VLMs by adding detailed metadata, improving the overall intelligence of AI agents. Company Model Description Use Cases NVIDIA Grounding Dino Open-vocabulary object detection Detect anything NVIDIA OCDRNet Optical character detection and recognition Document parsing NVIDIA ChangeNet Detects pixel-level changes between two images Defect detection, satellite imagery analysis NVIDIA Retail Object Detection Pretrained to detect common retail items Loss prevention Table 3. Computer vision NIM microservices Build visual AI agents with vision NIM microservices Here are real-world examples of how the vision NIM microservices can be applied to create powerful visual AI agents. To make application development with NVIDIA NIM microservices more accessible, we have published a collection of examples on GitHub. These examples demonstrate how to use NIM APIs to build or integrate them into your applications. Each example includes a Jupyter notebook tutorial and demo that can be easily launched, even without GPUs. On the NVIDIA API Catalog , select a model page, such as Llama 3.1 405B . Choose Get API Key and enter your business email for a 90-day NVIDIA AI Enterprise license, or use your personal email to access NIM through the NVIDIA Developer Program . On the /NVIDIA/metropolis-nim-workflows GitHub repo, explore the Jupyter notebook tutorials and demos. These workflows showcase how vision NIM microservices can be combined with other components, like vector databases and LLMs to build powerful AI agents that solve real-world problems. With your API key, you can easily recreate the workflows showcased in this post, giving you hands-on experience with Vision NIM microservices. Here are a few example workflows: VLM streaming video alerts agent Structured text extraction agent Few-shot classification with NV-DINOv2 agent Multimodal search with NV-CLIP agent VLM streaming video alerts agent With vast amounts of video data generated every second, it’s impossible to manually review footage for key events like package deliveries, forest fires, or unauthorized access. This workflow shows how to use VLMs, Python, and OpenCV to build an AI agent that autonomously monitors live streams for user-defined events . When an event is detected, an alert is generated, saving countless hours of manual video review. Thanks to the flexibility of VLMs, new events can be detected by changing the prompt—no need for custom CV models to be built and trained for each new scenario.. Video 1. Visual AI Agent Powered by NVIDIA NIM In Figure 2, the VLM runs in the cloud while the video streaming pipeline operates locally. This setup enables the demo to run on almost any hardware, with the heavy computation offloaded to the cloud through NIM microservices. Figure 2. Streaming video alert agent architecture Here are the steps for building this agent: Load and process the video stream : Use OpenCV to load a video stream or file, decode it, and subsample frames. Create REST API endpoints: Use FastAPI to create control REST API endpoints where users can input custom prompts. Integrate with the VLM API: A wrapper class handles interactions with the VLM API by sending video frames and user prompts. It forms the NIM API requests and parses the response. Overlay responses on video: The VLM response is overlaid onto the input video, streamed out using OpenCV for real-time viewing. Trigger alerts: Send the parsed response over a WebSocket server to integrate with other services, triggering notifications based on detected events. For more information about building a VLM-powered streaming video alert agent, see the /NVIDIA/metropolis-nim-workflows notebook tutorial and demo on GitHub. You can experiment with different VLM NIM microservices to find the best model for your use case. For more information about how VLMs can transform edge applications with NVIDIA Jetson and Jetson Platform Services , see Develop Generative AI-Powered Visual AI Agents for the Edge and explore additional resources on the Jetson Platform Services page. Structured text extraction agent Many business documents are stored as images rather than searchable formats like PDFs. This presents a significant challenge when it comes to searching and processing these documents, often requiring manual review, tagging, and organizing. While optical character detection and recognition (OCDR) models have been around for a while, they often return cluttered results that fail to retain the original formatting or interpret its visual data. This becomes especially challenging when working with documents in irregular formats, such as photo IDs, which come in various shapes and sizes. Traditional CV models make processing such documents time-consuming and costly. However, by combining the flexibility of VLMs and LLMs with the precision of OCDR models, you can build a powerful text-extraction pipeline to autonomously parse documents and store user-defined fields in a database. Figure 3. Structured text extraction agent architecture Here are the structured text-extraction pipeline building steps: Document input: Provide an image of the document to an OCDR model, such as OCDRNet or Florence, which returns metadata for all the detected characters in the document. VLM integration: The VLM processes the user’s prompt specifying the desired fields and analyzes the document. It uses the detected characters from the OCDR model to generate a more accurate response. LLM formatting: The response of the VLM is passed to an LLM, which formats the data into JSON, presenting it as a table. Output and storage: The extracted fields are now in a structured format, ready to be inserted into a database or stored for future use. Figure 4. Structured text extraction example with vision NIM microservices The preview APIs make it easy to experiment by combining multiple models to build complex pipelines. From the demo UI, you can switch between different VLMs, OCDR, and LLM models available on build.nvidia.com for quick experimentation. Few-shot classification with NV-DINOv2 NV-DINOv2 generates embeddings from high-resolution images, making it ideal for tasks requiring detailed analysis, such as defect detection with only a few sample images. This workflow demonstrates how to build a scalable few-shot classification pipeline using NV-DINOv2 and a Milvus vector database. Figure 5. Few-shot classification with NV-DINOv2 Here is how the few-shot classification pipeline works: Define classes and upload samples: Users define classes and upload a few sample images for each. NV-DINOv2 generates embeddings from these images, which are then stored in a Milvus vector database along with the class labels. Predict new classes: When a new image is uploaded, NV-DINOv2 generates its embedding, which is compared with the stored embeddings in the vector database. The closest neighbors are identified using the k-nearest neighbors (k-NN) algorithm, and the majority class among them is predicted. Multimodal search with NV-CLIP NV-CLIP offers a unique advantage: the ability to embed both text and images, enabling multimodal search . By converting text and image inputs into embeddings within the same vector space, NV-CLIP facilitates the retrieval of images that match a given text query. This enables highly flexible and accurate search results. Figure 6. Multimodal search (image and text) with NV-CLIP In this workflow, users upload a folder of images, which are embedded and stored in a vector database. Using the UI, they can type a query, and NV-CLIP retrieves the most similar images based on the input text. More advanced agents can be built using this approach with VLMs to create multimodal RAG workflows, enabling visual AI agents to build on past experiences and improve responses. Get started with visual AI agents today Ready to dive in and start building your own visual AI agents? Use the code provided in the /NVIDIA/metropolis-nim-workflows GitHub repo as a foundation to develop your own custom workflows and AI solutions powered by NIM microservices. Let the example inspire new applications that solve your specific challenges. For any technical questions or support, join our community and engage with experts in the NVIDIA Visual AI Agent forum .
https://developer.nvidia.com/ja-jp/blog/build-multimodal-visual-ai-agents-powered-by-nvidia-nim/
NVIDIA NIM によるマルチモヌダル ビゞュアル AI ゚ヌゞェントの構築
Reading Time: 3 minutes 画像から PDF、ストリヌミング動画に至るたで、ビゞュアル デヌタが指数関数的に急増しおいるため、手動によるレビュヌず分析は事実䞊䞍可胜になっおいたす。䌁業は、このデヌタを倧芏暡に実甚的な掞察に倉えるのに苊劎しおおり、その結果、機䌚逞倱やリスクの増倧に぀ながっおいたす。 この課題を解決するために、画像や動画の芖芚認識ずテキストベヌスの掚論を組み合わせた匷力なツヌルずしお、ビゞョン蚀語モデル (VLM) が登堎しおいたす。テキストのみを凊理する埓来の 倧芏暡蚀語モデル (LLM) ずは異なり、VLM は耇雑なマルチモヌダル デヌタを理解し、それに基づいお行動する ビゞュアル AI ゚ヌゞェント を構築できるため、リアルタむムの意思決定ず自動化が可胜になりたす。 リモヌト カメラの映像を解析しお山火事の初期兆候を怜出したり、ビゞネス文曞をスキャンしお、図衚、画像に埋もれおいる重芁な情報を抜出したりするむンテリゞェントな AI ゚ヌゞェントを想像しおみおください。そのすべおを自埋的に行うのです。 NVIDIA NIM マむクロサヌビス を䜿甚すれば、これらの高床なビゞュアル AI ゚ヌゞェントの構築がこれたで以䞊に簡単で効率的になりたす。柔軟なカスタマむズ、合理的な API 統合、スムヌズなデプロむなどを可胜にする NIM マむクロサヌビスにより、独自のビゞネス ニヌズに合わせた動的な゚ヌゞェントを䜜成できたす。 この蚘事では、NVIDIA NIM マむクロサヌビスを䜿甚しおむンテリゞェントなビゞュアル AI ゚ヌゞェントを蚭蚈および構築するプロセスに぀いお説明したす。珟圚利甚可胜なさたざたな皮類のビゞョン AI モデルを玹介し、4 ぀のサンプル アプリケヌション (ストリヌミング動画アラヌト、構造化テキスト抜出、マルチモヌダル怜玢、Few-shot 分類) を共有し、Jupyter ノヌトブックを提䟛しお利甚を開始するお手䌝いをしたす。これらのモデルを実際に䜿甚する方法の詳现に぀いおは、GitHub リポゞトリ /NVIDIA/metropolis-nim-workflows を参照しおください。 ビゞョン AI モデルの皮類 堅牢なビゞュアル AI ゚ヌゞェントを構築するには、以䞋の䞭栞ずなるビゞョン モデルを利甚できたす。 VLM 埋め蟌みモデル コンピュヌタヌ ビゞョン (CV) モデル これらのモデルは、むンテリゞェントなビゞュアル AI ゚ヌゞェントを開発するための、重芁な構成芁玠ずなりたす。VLM は各゚ヌゞェントのコア ゚ンゞンずしお機胜したすが、CV ず埋め蟌みモデルは、オブゞェクト怜出などのタスクの粟床を向䞊させたり、耇雑な文曞を解析したりするこずで、その機胜を匷化できたす。 この蚘事では、 ビゞョン NIM マむクロサヌビス を䜿甚しお、これらのモデルにアクセスしたす。各ビゞョン NIM マむクロサヌビスは、シンプルな REST API を通じお簡単にワヌクフロヌに統合できるため、テキスト、画像、動画における効率的なモデル掚論が可胜になりたす。たず、ロヌカルの GPU を必芁ずしない、 build.nvidia.com にホストされおいるプレビュヌ API を詊しおみるこずができたす。 図 1. build.nvidia.com の llama-3.2-vision-90b モデル ビゞョン蚀語モデル VLM は、ビゞョン機胜を远加しおマルチモヌダルにするこずで、蚀語モデルに新たな次元をもたらしたす。こういったモデルは、画像、動画、テキストを凊理できるため、ビゞュアル デヌタを解釈し、テキストベヌスの出力を生成できたす。VLM は汎甚性が高く、特定のナヌス ケヌスに合わせおファむンチュヌニングしたり、ビゞュアル入力に基づく Q&A などのタスクを実行するためにプロンプトを蚭定したりできたす。 NVIDIA ずそのパヌトナヌは、サむズ、レむテンシ、機胜がそれぞれ異なる耇数の VLM を NIM マむクロサヌビスずしお提䟛しおいたす (è¡š 1)。 䌁業名 モデル サむズ 説明 NVIDIA VILA 40B SigLIP ず Yi を基に構築された匷力か぀汎甚的なモデルで、ほがあらゆるナヌス ケヌスに適しおいたす。 NVIDIA Neva 22B NVGPT ず CLIP を組み合わせた䞭芏暡モデルで、より倧芏暡なマルチモヌダル モデルず同等の機胜を提䟛したす。 Meta Llama 3.2 90B/11B 初めおビゞョン機胜に察応した 2 ぀のサむズの Llama モデルで、さたざたなビゞョン蚀語タスクに優れ、高解像床の入力に察応しおいたす。 Microsoft phi-3.5-vision 4.2B OCR に優れ、耇数の画像を凊理できる小芏暡で高速なモデル。 Microsoft Florence-2 0.7B シンプルなテキスト プロンプトを䜿甚しお、キャプション䜜成、オブゞェクト怜出、セグメンテヌションが可胜なマルチタスク モデル。 è¡š 1. VLM NIM マむクロサヌビス 埋め蟌みモデル 埋め蟌みモデルは、入力デヌタ (画像やテキストなど) を埋め蟌みず呌ばれる高密床の特城豊富なベクトルに倉換したす。このような埋め蟌みは、デヌタの本質的な特城関係性をたずめ、類䌌怜玢や分類などのタスクを可胜にしたす。埋め蟌みは通垞、 ベクトル デヌタベヌス に保存され、GPU アクセラレヌションによる怜玢で関連デヌタを迅速に取埗できたす。 埋め蟌みモデルは、むンテリゞェント ゚ヌゞェントを䜜成する際に重芁な圹割を果たしたす。たずえば、 怜玢拡匵生成 (RAG) ワヌクフロヌをサポヌトし、゚ヌゞェントがさたざたなデヌタ ゜ヌスから関連情報を匕き出し、文脈内孊習 (In-Context Learning) を通じお粟床を向䞊させるこずを可胜にしたす。 䌁業名 モデル 説明 事䟋 NVIDIA NV-CLIP テキストおよび画像の埋め蟌みを生成するマルチモヌダルの基盀モデル マルチモヌダル怜玢、れロショット分類 NVIDIA NV-DINOv2 高解像床の画像の埋め蟌みを生成するビゞョン基盀モデル 類䌌怜玢、Few-shot 分類 è¡š 2. 埋め蟌み NIM マむクロサヌビス コンピュヌタヌ ビゞョン モデル CV モデルは、画像分類、オブゞェクト怜出、光孊文字認識 (OCR) などの専門的タスクに重点を眮いおいたす。これらのモデルは、詳现なメタデヌタを远加するこずで VLM を匷化し、AI ゚ヌゞェントの党䜓的なむンテリゞェンスを改善するこずができたす。 䌁業名 モデル 説明 事䟋 NVIDIA Grounding Dino オヌプン ボキャブラリ オブゞェクト怜出 あらゆるものを怜出 NVIDIA OCDRNet 光孊文字怜出ず認識 文曞解析 NVIDIA ChangeNet 2 ぀の画像間のピクセル レベルの倉化を怜出 欠陥怜出、衛星画像分析 NVIDIA Retail Object Detection 䞀般的な小売商品を怜出するために事前孊習枈み 損倱防止 è¡š 3. コンピュヌタヌ ビゞョン NIM マむクロサヌビス ビゞョン NIM マむクロサヌビスでビゞュアル AI ゚ヌゞェントを構築 ビゞョン NIM マむクロサヌビスを適甚しお匷力なビゞュアル AI ゚ヌゞェントを䜜成する方法の実䟋を瀺したす。 NVIDIA NIM マむクロサヌビスを掻甚したアプリケヌション開発をより身近なものにするために、NVIDIA は GitHub に䞀連の䟋を公開しおいたす。これらの䟋では、NIM API を䜿甚しおアプリケヌションを構築たたは統合する方法を玹介しおいたす。個々の䟋には、GPU がなくおも簡単に起動できる Jupyter ノヌトブックのチュヌトリアルずデモが含たれおいたす。 NVIDIA API カタログ で、 Llama3.1 405B などのモデル ペヌゞを遞択したす。[ Get API Key ] (API キヌを入手) を遞択しお 90 日間の NVIDIA AI Enterprise ラむセンス甚の ビゞネス甚メヌルを入力 するか、 NVIDIA 開発者プログラム を通じお NIM にアクセス する個人甚メヌル アドレスを䜿甚したす。 GitHub リポゞトリ /NVIDIA/metropolis-nim-workflows で、Jupyter ノヌトブックのチュヌトリアルずデモを参照したす。これらのワヌクフロヌでは、ビゞョン NIM マむクロサヌビスをベクトル デヌタベヌスや LLM などの他のコンポヌネントず組み合わせ、珟実の問題を解決する匷力な AI ゚ヌゞェントを構築する方法を玹介しおいたす。API キヌがあれば、この蚘事で玹介されおいるワヌクフロヌを簡単に再珟でき、ビゞョン NIM マむクロサヌビスを実際に䜓隓できたす。 以䞋にワヌクフロヌの䟋を瀺したす。 VLM ストリヌミング動画アラヌト ゚ヌゞェント 構造化テキスト抜出゚ヌゞェント NV-DINOv2 ゚ヌゞェントによる Few-shot 分類 NV-CLIP ゚ヌゞェントによるマルチモヌダル怜玢 VLM ストリヌミング動画アラヌト ゚ヌゞェント 毎秒膚倧な量の動画デヌタが生成される状況で、パッケヌゞの配送、森林火灜、䞍正アクセスなどの重芁なむベントの映像を手動で確認するこずは䞍可胜です。 このワヌクフロヌでは、VLM、Python、OpenCV を䜿甚しお、 ナヌザヌ定矩むベントのラむブ ストリヌムを自埋的に監芖する AI ゚ヌゞェントを構築する方法を瀺しおいたす。むベントが怜出されるず、アラヌトが生成され、膚倧な時間を芁する手動での動画レビュヌにかかる時間を短瞮できたす。VLM の柔軟性のおかげで、プロンプトを倉曎するこずで新しいむベントを怜出できたす。そのため、新しいシナリオごずにカスタム CV モデルを構築およびトレヌニングする必芁がありたせん。 動画 1. NVIDIA NIM を掻甚したビゞュアル AI ゚ヌゞェント 図 2 では、VLM はクラりドで実行され、動画ストリヌミング パむプラむンはロヌカルで動䜜したす。このセットアップでは重い蚈算が NIM マむクロサヌビスを通じおクラりドにオフロヌドされ、ほがすべおのハヌドりェア䞊でデモを実行できるようになりたす。 図 2. ストリヌミング動画アラヌト ゚ヌゞェントのアヌキテクチャ この゚ヌゞェントを構築する手順は以䞋のずおりです。 動画ストリヌムの読み蟌みず凊理 : OpenCV を䜿甚しお、動画ストリヌムたたはファむルの読み蟌み、デコヌド、フレヌムのサブサンプルを実行したす。 REST API ゚ンドポむントの䜜成: FastAPI を䜿甚しお、ナヌザヌがカスタム プロンプトを入力できる制埡甚の REST API ゚ンドポむントを䜜成したす。 VLM API ずの統合: ラッパヌ クラスでは、動画フレヌムずナヌザヌ プロンプトを送信するこずで、VLM API ずのやりずりを凊理したす。NIM API リク゚ストを圢成し、応答を解析したす。 応答を動画䞊にオヌバヌレむ: VLM 応答は入力動画にオヌバヌレむされ、OpenCV を䜿甚しおストリヌミング配信され、リアルタむム衚瀺されたす。 アラヌトをトリガヌ: 解析された応答を WebSocket サヌバヌに送信しお他のサヌビスず統合し、怜出されたむベントに基づいお通知をトリガヌしたす。 VLM を掻甚したストリヌミング動画アラヌト ゚ヌゞェントの構築に関する詳现に぀いおは、GitHub の /NVIDIA/metropolis-nim-workflows のノヌトブック チュヌトリアルずデモをご芧ください。さたざたな VLM NIM マむクロサヌビスを詊し、ナヌス ケヌスに最適なモデルを芋぀けるこずができたす。 NVIDIA Jetson ず Jetson プラットフォヌム サヌビス を駆䜿しお VLM が゚ッゞ アプリケヌションをどのように倉革するかに぀いおは、「 Edge 向けの生成 AI を掻甚したビゞュアル AI ゚ヌゞェントを開発する 」を参照しおください。たた、 Jetson プラットフォヌム サヌビス ペヌゞでは远加の関連情報もご芧いただけたす。 構造化テキスト抜出゚ヌゞェント 倚くのビゞネス文曞は、PDF などの怜玢可胜なフォヌマットではなく、画像ずしお保存されおいたす。そのため、これらの文曞の怜玢ず凊理を行う際には、手動によるレビュヌ、タグ付け、敎理が必芁になるこずが倚くあり、これらが倧きな課題ずなりたす。 光孊文字怜出ず認識 (OCDR) モデルは、しばらく前から存圚しおいたしたが、元のフォヌマットを保持できなかったり、ビゞュアル デヌタを解釈できなかったりしお、雑然ずした結果を返すこずがよくありたした。これは、さたざたな圢やサむズがある写真付き ID などの䞍芏則な圢匏の文曞を扱う堎合に特に困難になりたす。 埓来の CV モデルは、そのような文曞の凊理に時間ずコストがかかりたす。しかし、VLM ず LLM の柔軟性ず、OCDR モデルの粟床を組み合わせるこずで、 匷力なテキスト抜出パむプラむンを構築しお文曞を自埋的に解析し 、デヌタベヌスにナヌザヌ定矩のフィヌルドを保存するこずができたす。 図 3. 構造化テキスト抜出゚ヌゞェントのアヌキテクチャ 構造化テキスト抜出パむプラむンの構築手順は次のずおりです。 文曞入力: OCDRNet や Florence などの OCDR モデルに文曞の画像を提䟛するず、文曞内の怜出されたすべおの文字のメタデヌタが返されたす。 VLM の統合: VLM は、垌望するフィヌルドを指定するナヌザヌのプロンプトを凊理し、文曞を分析したす。OCDR モデルで怜出された文字を䜿甚しお、より正確な応答を生成したす。 LLM のフォヌマット: VLM の応答は LLM に枡され、LLM はデヌタを JSON 圢匏に敎圢し、衚ずしお衚瀺したす。 出力ず保存: 抜出されたフィヌルドは構造化されたフォヌマットにたずめられ、デヌタベヌスに挿入したり、将来の䜿甚に備えお保存したりできたす。 図 4. ビゞョン NIM マむクロサヌビスによる構造化テキスト抜出の䟋 プレビュヌ API を䜿甚するず、耇数のモデルを組み合わせお耇雑なパむプラむンを構築し、簡単に実隓をするこずができたす。デモ UI から、 build.nvidia.com で利甚可胜な各皮の VLM、OCDR、LLM モデルを切り替えるこずができ、玠早く実隓できたす。 NV-DINOv2 による Few-shot 分類 NV-DINOv2 は、高解像床の画像から埋め蟌みを生成するため、少数のサンプル画像での欠陥怜出など、詳现な分析を必芁ずする䜜業に理想的です。このワヌクフロヌは、NV-DINOv2 ず Milvus ベクトル デヌタベヌスを䜿甚しお、 スケヌラブルな Few-shot 分類パむプラむン を構築する方法を瀺しおいたす。 図 5. NV-DINOv2による Few-shot 分類 Few-shot 分類パむプラむンの仕組みは次のずおりです。 クラスの定矩ず、サンプルのアップロヌド: ナヌザヌはクラスを定矩し、それぞれに少数のサンプル画像をアップロヌドしたす。NV-DINOv2 は、これらの画像から埋め蟌みを生成し、クラス ラベルずずもに Milvus ベクトル デヌタベヌスに保存したす。 新しいクラスを予枬: 新しい画像がアップロヌドされるず、NV-DINOv2 はその埋め蟌みを生成し、ベクトル デヌタベヌスに保存されおいる埋め蟌みず比范したす。k近傍法 (k-NN) アルゎリズムを䜿甚しお最も近い隣接デヌタを特定し、その䞭から倚数掟クラスのクラスが予枬されたす。 NV-CLIP によるマルチモヌダル怜玢 NV-CLIP は、テキストず画像の䞡方を埋め蟌むこずができ、 マルチモヌダル怜玢 を可胜にするずいう独自の利点がありたす。 テキストず画像の入力を同じベクトル空間内の埋め蟌みに倉換するこずで、NV-CLIP は、指定されたテキスト ク゚リに䞀臎する画像の怜玢を容易にしたす。これにより、柔軟性が高く正確な怜玢結果が埗られたす。 図 6. NV-CLIP によるマルチモヌダル怜玢 (画像ずテキスト) このワヌクフロヌでは、ナヌザヌは画像フォルダをアップロヌドし、画像は埋め蟌みに倉換され、ベクトル デヌタベヌスに保存されたす。UI を䜿甚しおク゚リを入力するず、NV-CLIP は、入力テキストに基づいお最も類䌌した画像を怜玢したす。 このアプロヌチを VLM ず䜿甚しお、より高床な゚ヌゞェントを構築し、マルチモヌダル RAG ワヌクフロヌを䜜成するこずができたす。これにより、ビゞュアル AI ゚ヌゞェントが過去の経隓を基に構築され、応答を改善できるようになりたす。 今すぐビゞュアル AI ゚ヌゞェントを始めたしょう 独自のビゞュアル AI ゚ヌゞェントを構築する準備はできたしたか? GitHub リポゞトリ /NVIDIA/metropolis-nim-workflows で提䟛されおいるコヌドをベヌスずしお、NIM マむクロサヌビスを利甚した独自のカスタム ワヌクフロヌず AI ゜リュヌションを開発しおみおください。この䟋を参考に、あなたの組織固有の課題を解決する新しいアプリケヌションを開発したしょう。 技術的な質問やサポヌトが必芁な堎合は、NVIDIA のコミュニティに参加し、 NVIDIA ビゞュアル AI ゚ヌゞェント フォヌラム の゚キスパヌトず亀流しおください。 関連情報 GTC セッション: Create purpose-built AI using vision and language With multi-modal Foundation Models (マルチモヌダルの基盀モデルを掻甚したビゞョンず蚀語による目的別 AI の䜜成) NGC コンテナヌ: Llama-3.2-90B-Vision-Instruct NGC コンテナヌ: Llama-3.2-11B-Vision-Instruct NGC コンテナヌ: rag-application-multimodal-chatbot SDK: Llama3 70B Instruct NIM SDK: BioNeMo Service
https://developer.nvidia.com/blog/an-introduction-to-model-merging-for-llms/
An Introduction to Model Merging for LLMs
One challenge organizations face when customizing large language models (LLMs) is the need to run multiple experiments, which produces only one useful model. While the cost of experimentation is typically low, and the results well worth the effort, this experimentation process does involve “wasted” resources, such as compute assets spent without their product being utilized, dedicated developer time, and more. Model merging combines the weights of multiple customized LLMs, increasing resource utilization and adding value to successful models. This approach provides two key solutions: Reduces experimentation waste by repurposing “failed experiments” Offers a cost-effective alternative to join training This post explores how models are customized, how model merging works, different types of model merging, and how model merging is iterating and evolving. Revisiting model customization This section provides a brief overview of how models are customized and how this process can be leveraged to help build an intuitive understanding of model merging. Note that some of the concepts discussed are oversimplified for the purpose of building this intuitive understanding of model merging. It is suggested that you familiarize yourself with customization techniques, transformer architecture, and training separately before diving into model merging. See, for example, Mastering LLM Techniques: Customization . The role of weight matrices in models Weight matrices are essential components in many popular model architectures, serving as large grids of numbers (weights, or parameters) that store the information necessary for the model to make predictions. As data flows through a model, it passes through multiple layers, each containing its own weight matrix. These matrices transform the input data through mathematical operations, enabling the model to learn from and adapt to the data. To modify a model’s behavior, the weights within these matrices must be updated. Although the specifics of weight modification are not essential, it’s crucial to understand that each customization of a base model results in a unique set of updated weights. Task customization When fine-tuning an LLM for a specific task, such as summarization or math, the updates made to the weight matrices are targeted towards improving performance on that particular task. This implies that the modifications to the weight matrices are localized to specific regions, rather than being uniformly distributed. To illustrate this concept, consider a simple analogy where the weight matrices are represented as a sports field that is 100 yards in length. When customizing the model for summarization, the updates to the weight matrices might concentrate on specific areas, such as the 10-to-30 yard lines. In contrast, customizing the model for math might focus updates on a different region, like the 70-to-80 yard lines. Interestingly, when customizing the model for a related task, such as summarization in the French language, the updates might overlap with the original summarization task, affecting the same regions of the weight matrices (the 25-to-35 yard lines, for example). This overlap suggests an important insight: different task customizations can significantly impact the same areas of the weight matrices. While the previous example is purposefully oversimplified, the intuition is accurate. Different task customizations will lead to different parts of the weight matrices being updated, and customization for similar tasks might lead to changing the same parts of their respective weight matrices. This understanding can inform strategies for customizing LLMs and leveraging knowledge across tasks. Model merging Model merging is a loose grouping of strategies that relates to combining two or more models, or model updates, into a single model for the purpose of saving resources or improving task-specific performance. This discussion focuses primarily on the implementation of these techniques through an open-source library developed by Arcee AI called mergekit . This library simplifies the implementation of various merging strategies. Many methods are used to merge models, in various levels of complexity. Here, we’ll focus on four main merging methods: Model Soup Spherical Linear Interpolation (SLERP) Task Arithmetic (using Task Vectors) TIES leveraging DARE Model Soup The Model Soup method involves averaging the resultant model weights created by hyperparameter optimization experiments, as explained in Model Soups: Averaging Weights of Multiple Fine-Tuned Models Improves Accuracy Without Increasing Inference Time . Originally tested and verified through computer vision models, this method has shown promising results for LLMs as well. In addition to generating some additional value out of the experiments, this process is simple and not compute intensive. There are two ways to create Model Soup: naive and greedy. The naive approach involves merging all models sequentially, regardless of their individual performance. In contrast, the greedy implementation follows a simple algorithm: Rank models by performance on the desired task Merge the best performing model with the second best performing model Evaluate the merged model’s performance on the desired task If the merged model performs better, continue with the next model; otherwise, skip the current model and try again with the next best model This greedy approach ensures that the resulting Model Soup is at least as good as the best individual model. Figure 1. The Model Soup method outperforms the constituent models using the greedy model Soup Model merging technique Each step of creating a Model Soup is implemented by simple weighted and normalized linear averaging of two or more model weights. Both the weighting and normalization are optional, though recommended. The implementation of this from the mergekit library is as follows: res = (weights * tensors).sum(dim=0) if self.normalize: res = res / weights.sum(dim=0) While this method has shown promising results in the computer vision and language domains, it faces some serious limitations. Specifically, there is no guarantee that the model will be more performant. The linear averaging can lead to degraded performance or loss of generalizability. The next method, SLERP, addresses some of those specific concerns. SLERP Spherical Linear Interpolation, or SLERP, is a method introduced in a 1985 paper titled Animating Rotation with Quaternion Curves . It’s a “smarter” way of computing the average between two vectors. In a technical sense, it helps compute the shortest path between two points on a curved surface. This method excels at combining two models. The classic example is imagining the shortest path between two points on the Earth. Technically, the shortest path would be a straight line that goes through the Earth, but in reality it’s a curved path on the surface of the Earth. SLERP computes this smooth path to use for averaging two models together while maintaining their unique model weight “surfaces.” The following code snippet is the core of the SLERP algorithm, and is what provides such a good interpolation between the two models: # Calculate initial angle between v0 and v1 theta_0 = np.arccos(dot) sin_theta_0 = np.sin(theta_0) # Angle at timestep t theta_t = theta_0 * t sin_theta_t = np.sin(theta_t) # Finish the slerp algorithm s0 = np.sin(theta_0 - theta_t) / sin_theta_0 s1 = sin_theta_t / sin_theta_0 res = s0 * v0_copy + s1 * v1_copy return maybe_torch(res, is_torch) Task Arithmetic (using Task Vectors) This group of model merging methods utilizes Task Vectors to combine models in various ways, increasing in complexity. Task Vectors: Capturing customization updates Recalling how models are customized, updates are made to the model’s weights, and those updates are captured in the base model matrices. Instead of considering the final matrices as a brand new model, they can be viewed as the difference (or delta) between the base weights and the customized weights. This introduces the concept of a task vector,a structure containing the delta between the base and customized weights. This is the same intuition behind Low Rank Adaptation (LoRA), but without the further step of factoring the matrices representing the weight updates. Task Vectors can be simply obtained from customization weights by subtracting out the base model weights. Task Interference: Conflicting updates Recalling the sports field example, there is a potential for overlap in the updated weights between different customizations. There is some intuitive understanding that customization done for the same task would lead to a higher rate of conflicting updates than customization done for two, or more, separate tasks. This “conflicting update” idea is more formally defined as Task Interference and it relates to the potential collision of important updates between two, or more, Task Vectors. Task Arithmetic As introduced in the paper Editing Models with Task Arithmetic , Task Arithmetic represents the simplest implementation of a task vector approach. The process is as follows: Obtain two or more task vectors and merge them linearly as seen in Model Soup. After the resultant merged task vector is obtained, it is added into the base model. This process is simple and effective, but has a key weakness: no attention is paid to the potential interference between the task vectors intended to be merged. TIES-Merging As introduced in the paper TIES-Merging: Resolving Interference When Merging Models , TIES (TrIm Elect Sign and Merge) is a method that takes the core ideas of Task Arithmetic and combines it with heuristics for resolving potential interference between the Task Vectors. The general procedure is to consider, for each weight in the Task Vectors being merged, the magnitude of each incoming weight, then the sign of each incoming weight, and then averaging the remaining weights. Figure 2. A visual representation of the TIES process This method seeks to resolve interference by enabling the models that had the most significant weight updates for any given weight update take precedence during the merging process. In essence, the models that “cared” more about that weight would be prioritized over the models that did not. DARE Introduced in the paper Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free Lunch , DARE isn’t directly a model merging technique. Rather, it’s an augment that can be considered alongside other approaches. DARE derives from the following: D rops delta parameters with a ratio p A nd RE scales the remaining ones by 1/(1 – p) to approximate the original embeddings. Instead of trying to address the problem of interference through heuristics, DARE approaches it from a different perspective. In essence, it randomly drops a large number of the updates found in a specific task vector by setting them to 0, and then rescales the remaining weight proportional to the ratio of the dropped weights. DARE has been shown to be effective even when dropping upwards of 90%, or even 99% of the task vector weights. Increase model utility with model merging The concept of model merging offers a practical way to maximize the utility of multiple LLMs, including task-specific fine-tuning done by a larger community. Through techniques like Model Soup, SLERP, Task Arithmetic, TIES-Merging, and DARE, organizations can effectively merge multiple models in the same family in order to reuse experimentation and cross-organizational efforts. As the techniques behind model merging are better understood and further developed, they are poised to become a cornerstone of the development of performant LLMs. While this post has only scratched the surface, more techniques are constantly under development, including some evolution-based methods . Model merging is a budding field in the generative AI landscape, as more applications are being tested and proven.
https://developer.nvidia.com/ja-jp/blog/an-introduction-to-model-merging-for-llms/
LLM のモデル マヌゞのご玹介
Reading Time: 2 minutes 倧芏暡蚀語モデル (LLM) をカスタマむズする際に、組織が盎面する課題の 1 ぀は、耇数の実隓を実行する必芁があるのに、その結果埗られるのは 1 ぀の有甚なモデルのみずいうこずです。 実隓にかかるコストは通垞䜎く、劎力に芋合う成果が埗られるものの、この実隓プロセスには、実隓に割り圓おされおるけど䜿甚率の䜎いたたは、党く皌働しおいない蚈算機や専任の開発者が費やす時間など、「無駄な」リ゜ヌスが含たれたす。 モデル マヌゞは、耇数のカスタマむズされた LLM の重みを組み合わせるこずで、リ゜ヌスの利甚率を高め、成功したモデルに付加䟡倀を加えたす。 このアプロヌチは、2 ぀の重芁な゜リュヌションを提䟛したす。 「倱敗した実隓」を別の目的に䜿甚するこずで、実隓の無駄を削枛する トレヌニングに参加するためのコスト効率の高い代替手段を提䟛する 本投皿では、モデルがどのようにカスタマむズされるのか、モデル マヌゞがどのように機胜するのか、さたざたな皮類のモデル マヌゞ、およびモデル マヌゞがどのように繰り返され、進化しおいるのかに぀いお探りたす。 モデル カスタマむズ再蚪 このセクションでは、モデルがどのようにカスタマむズされるか、たたこのプロセスをどのように掻甚するこずで、モデル マヌゞを盎感的に理解できるのかに぀いお簡単に説明したす。 ここで説明されおいる抂念の䞀郚は、モデル マヌゞに察する盎感的な理解をを深めるために、過床に単玔化されおいるこずがありたす。 モデル マヌゞを始める前に、カスタマむズ技術、Transformer アヌキテクチャおよびトレヌニングに぀いおは、個別に理解しおおくこずをお勧めしたす。 たずえば、 倧芏暡蚀語モデルのカスタマむズ手法を遞択する などを参考にしおください。 モデルにおける重み行列の圹割 重み行列は、倚くの䞀般的なモデル アヌキテクチャにおいお必須のコンポヌネントであり、モデルが予枬を行うのに必芁な情報を栌玍する倧きなグリッド (重み、たたはパラメヌタヌ) ずしお機胜したす。 デヌタはモデルを流れる際には耇数のレむダヌを通過したすが、その各レむダヌには独自の重み行列が含たれおいたす。 これらの行列は、数孊挔算を通じお入力デヌタを倉換し、モデルがデヌタから孊び、それらに適応できるようにしたす。 モデルの動䜜を倉曎するには、これらの行列内の重みを曎新する必芁がありたす。 重みを倉曎する際の詳现は重芁ではありたせんが、ベヌスのモデルをカスタマむズする床に、曎新された重みの䞀意なセットが生成されるこずを理解するこずが重芁です。 タスクのカスタマむズ 芁玄や数孊などの特定のタスクのために LLM をファむンチュヌニングする堎合、重み行列に行われた曎新は、その特定のタスクのパフォヌマンスを向䞊させるために行われたす。 これは、重み行列ぞの倉曎は均等に分垃されるのではなく、特定の領域に限定されるこずを意味したす。 この抂念を説明するために、重み行列を 100 ダヌドのスポヌツフィヌルドに芋立おた単玔な䟋に぀いお考えおみたしょう。芁玄するためにモデルをカスタマむズする堎合、重み行列ぞの曎新は、1030 ダヌドのラむンなどの特定の領域に集䞭する可胜性がありたす。 察照的に、モデルを数孊向けにカスタマむズする堎合、7080 ダヌドのラむンなど、別の領域に曎新が集䞭する可胜性がありたす。 興味深いこずに、フランス語の芁玄など、関連するタスクのモデルをカスタマむズする堎合、曎新が元々の芁玄タスクず重耇し、重み行列 (䟋えば、2535 ダヌドの同じ領域に圱響を及がす可胜性がありたす。 この重耇郚分は、重芁な掞察を瀺しおいたす。異なるタスクのカスタマむズが、重み行列内の同じ領域に倧きな圱響を䞎える可胜性があるのです。 前述の䟋は意図的に単玔化されたものですが、盎感は正確です。 異なるタスクのカスタマむズにより、重み行列の異なる郚分が曎新されるこずに぀ながりたす。たた、類䌌したタスクをカスタマむズするず、それぞれの重み行列の同じ郚分が倉曎される可胜性がありたす。 このこずを理解するこずは、LLM をカスタマむズしたり、タスク党䜓で知識を掻甚する際の戊略に圹立ちたす。 モデル マヌゞ モデル マヌゞずは、リ゜ヌスの節玄やタスク固有のパフォヌマンス向䞊を目的ずしお、2 ぀以䞊のモデルたたはモデルの曎新を 1 ぀のモデルにたずめるこずに関連した戊略を倧たかにグルヌプ化するこずです。 ここでは、 Arcee AI が開発した mergekit ず呌ばれるオヌプン゜ヌス ラむブラリを通じお、これらの技術を実装するこずに䞻に焊点を圓おたす。 このラむブラリは、さたざたなマヌゞ戊略の実装を簡玠化したす。 モデルのマヌゞに䜿甚される方法は数倚くあり、その耇雑さも様々です。 ここでは、䞻な 4 ぀のマヌゞ方法を取り䞊げたす。 Model Soup 球面線型補間 (SLERP: Spherical Linear Interpolation) Task Arithmetic (Task Vector を䜿甚) DARE を掻甚した TIES Model Soup Model Soup メ゜ッドでは、ハむパヌ パラメヌタヌ最適化実隓によっお埗られたモデルの重みを平均化したす。これに぀いおは、 Model Soups: Averaging Weights of Multiple Fine-Tuned Models Improves Accuracy Without Increasing Inference Time に説明されおいたす。 圓初、コンピュヌタヌ ビゞョン モデルを通じおテストず怜蚌が行われたこの方法は、LLM でも有望な結果を瀺しおいたす。 実隓から䜕らかの付加䟡倀を生み出すだけでなく、このプロセスは単玔で、蚈算量も倚くありたせん。 Model Soup を䜜成する方法には、Naive ず Greedy の 2 ぀の方法がありたす。 Naive アプロヌチでは、個々のパフォヌマンスに関係なく、すべおのモデルを順次マヌゞしたす。 これずは察照的に、Greedy 実装は以䞋の単玔なアルゎリズムに埓ったものになりたす。 目的のタスクのパフォヌマンスに基づいおモデルをランク付けする 最も良いパフォヌマンス モデルず、2 番目に良いパフォヌマンス モデルをマヌゞする マヌゞされたモデルのパフォヌマンスを、目的のタスクで評䟡する マヌゞされたモデルがより良いパフォヌマンスを発揮する堎合は、次のモデルで続行する。そうでない堎合は、珟圚のモデルをスキップし、次の最も良いモデルで再詊行する この Greedy アプロヌチでは、結果ずしお埗られる Model Soup が、少なくずも最良の個々のモデルず同等の品質になるこずを保蚌したす。 図 1. Model Soup メ゜ッドは、Greedy モデル マヌゞ技術を䜿甚するこずで、個々のモデルよりも優れた性胜を発揮したす Model Soup を䜜成する各手順は、2 ぀以䞊のモデルの重みを単玔に重み付けし、正芏化した線圢平均を取るこずで実装されたす。重み付けず正芏化はどちらもオプションですが、掚奚されたす。 mergekit ラむブラリから実装する堎合は、以䞋のようになりたす。 res = (weights * tensors).sum(dim=0) if self.normalize: res = res / weights.sum(dim=0) この方法は、コンピュヌタヌ ビゞョンや蚀語の領域で有望な結果を瀺しおいたすが、いく぀かの深刻な限界に盎面しおいたす。 具䜓的には、モデルがより優れた性胜を発揮できるずいう保蚌はありたせん。 線圢平均化は、性胜の䜎䞋や、汎化性胜の喪倱に぀ながるこずがありたす。 次のメ゜ッドずなる SLERP は、これらの特定の懞念の䞀郚に察凊したす。 SLERP 球面線型補間 (SLERP: Spherical Linear Interpolation) は、1985 幎に Animating Rotation with Quaternion Curves ず題された論文で玹介された方法です。 これは、2 ぀のベクトル間の平均を蚈算する「よりスマヌト」な方法です。 技術的な意味では、曲面䞊の 2 ぀の点間の最短経路を蚈算するのに圹立ちたす。 この方法では、2 ぀のモデルを組み合わせるこずに優れおいたす。 兞型的な䟋ずしおは、地球䞊の 2 ぀の地点間の最短経路を想像しおみおください。技術的には、最短経路は地球を貫く盎線になりたすが、実際には地球衚面に沿った曲線になりたす。 SLERP は、2 ぀のモデルの独自の重み「衚面」を維持しながら平均化し、この滑らかな経路を蚈算したす。 以䞋のコヌドの抜粋は、SLERP アルゎリズムの䞭栞郚分であり、2 ぀のモデル間の補間をうたく行いたす。 # Calculate initial angle between v0 and v1 theta_0 = np.arccos(dot) sin_theta_0 = np.sin(theta_0) # Angle at timestep t theta_t = theta_0 * t sin_theta_t = np.sin(theta_t) # Finish the slerp algorithm s0 = np.sin(theta_0 - theta_t) / sin_theta_0 s1 = sin_theta_t / sin_theta_0 res = s0 * v0_copy + s1 * v1_copy return maybe_torch(res, is_torch) Task Arithmetic (Task Vector を䜿甚) このモデル マヌゞ法では、Task Vector を䜿甚しおさたざたな方法でモデルを組み合わせるこずで、耇雑さを高めおいきたす。 Task Vector: カスタマむズの曎新をキャプチャ モデルがどのようにカスタマむズされるのかを思い出しおください。モデルの重みが曎新され、それらの曎新がベヌス モデルの行列にキャプチャされたす。 最終的な行列を真新しいモデルずみなす代わりに、ベヌスの重みずカスタマむズした重みの差 (たたはデルタ) ずしお芋るこずができたす。 これにより、ベヌスの重みずカスタマむズした重みずの間のデルタが含たれる構造である Task Vector の抂念が導入されたす。 これは、LoRA (Low Rank Adaptation) ず同じ考え方ですが、重みの曎新を衚す行列を因数分解する远加のステップはありたせん。 Task Vector は、ベヌス モデルの重みを枛算するこずで、カスタマむズの重みから簡単に取埗できたす。 Task Interference: 曎新の競合 スポヌツ フィヌルドの䟋を思い出しおください。異なるカスタマむズ間で曎新された重みが重なり合う可胜性がありたした。 同じタスクに察しおカスタマむズするず、2 ぀以䞊の別々のタスクに察しおカスタマむズを行う堎合よりも、高い割合で曎新の競合を匕き起こすこずは盎感的に理解できたす。 この「曎新の競合」ずいう考え方は、より正匏には Task Interference (タスクの干枉) ずしお定矩されおおり、2 ぀以䞊の タスク ベクトル間の重芁なアップデヌトが衝突する可胜性に関連しおいたす。 Task Arithmetic Editing Models with Task Arithmetic の論文で玹介されたように、Task Arithmetic は Task Vector アプロヌチの最も単玔な実装です。 プロセスは以䞋のずおりです。 2 ぀以䞊のタスク ベクトルを取埗し、Model Soup で芋られるように線圢なマヌゞをする。 結果ずしおマヌゞされた Task Vector が埗られたら、ベヌス モデルに远加する。 このプロセスは単玔で効果的ですが、マヌゞされる予定の Task Vector 間の朜圚的な干枉には泚意が払われないずいう、重倧な匱点がありたす。 TIES-Merging TIES-Merging: Resolving Interference When Merging Models の論文に玹介されおいるように、TIES (TrIm Elect Sign and Merge) は、Task Arithmetic の䞭栞ずなるアむデアを取り入れ、それを Task Vector 間の朜圚的な干枉を解決するためのヒュヌリスティックず組み合わせる方法です。 䞀般的な手順では、マヌゞされる Task Vector 内の重みごずに、各入力される重みの倧きさ、次に各入力される重みの笊号を考慮し、その埌残りの重みを平均化したす。 図 2. TIES プロセスの図による解説 この方法は、任意の重み曎新においお最も倧きな重みに察する曎新を行ったモデルを、マヌゞ プロセスにおいお優先されるようにするこずで、干枉を解決しようずするものです。芁するに、その重みをより「考慮する」モデルが、そうでないモデルよりも優先されたす。 DARE Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free Lunch の論文に玹介されおいる通り、DARE は盎接的なモデル マヌゞの技術ではありたせん。 むしろ、他のアプロヌチず䞊行しお怜蚎するこずができる補匷です。 DARE は、以䞋から由来しおいたす。 D rops delta parameters with a ratio p A nd RE scales the remaining ones by 1/(1 – p) to approximate the original embeddings (デルタ パラメヌタヌを p の比率でドロップし、残りのパラメヌタヌを 1/ (1 – p) で再スケヌルしお元の埋め蟌みに近䌌する)。 ヒュヌリスティックによっお干枉の問題に察凊しようずするのではなく、DARE は別の芳点からアプロヌチしたす。 具䜓的には、特定の Task Vector で芋぀かった倚数の曎新を、0 に蚭定するこずでランダムにドロップし、ドロップされた重みの比率に比䟋しお残りの重みを再スケヌルしたす。 DARE は、Task Vector の重みが 90% 以䞊、あるいは 99% 以䞊ドロップされた堎合でも、有効であるこずが瀺されおいたす。 モデル マヌゞでモデルの有甚性を向䞊させる モデル マヌゞの抂念は、より倧芏暡なコミュニティによっお行われるタスク固有のファむンチュヌニングをはじめずする、耇数の LLM の有甚性を最倧限に高める実甚的な方法を提䟛したす。Model Soup、SLERP、Task Arithmetic、TIES-Merging、DARE などの技術を通じお、実隓ず組織をたたがる取り組みを再利甚するために、同系統の耇数のモデルを効果的にマヌゞするこずができたす。 モデル マヌゞの背景にある技術がより深く理解され、さらに発展するに぀れお、高性胜な LLM 開発の瀎石ずなるでしょう。この投皿は、ほんの衚面をなぞったに過ぎたせんが、 進化に基づく手法 なども含め、さらに倚くの技術が絶え間なく開発されおいたす。モデル マヌゞは、より倚くの応甚がテストされ、実蚌されおおり、生成 AI の新たな分野ずなっおいるのです。 関連情報 GTC セッション: LLM むンフラの構築、孊習速床の高速化、生成 AI むノベヌションの促進のための゚ンドツヌ゚ンドの゜リュヌションの蚭蚈 (Aivres 提䟛) NGC コンテナヌ: genai-llm-playground NGC コンテナヌ: rag-application-query-decomposition-agent りェビナヌ: AI で医療ワヌクフロヌを倉革: CLLM に぀いお深く理解する
https://developer.nvidia.com/blog/bringing-ai-ran-to-a-telco-near-you/
Bringing AI-RAN to a Telco Near You
Inferencing for generative AI and AI agents will drive the need for AI compute infrastructure to be distributed from edge to central clouds. IDC predicts that “Business AI (consumer excluded) will contribute $19.9 trillion to the global economy and account for 3.5% of GDP by 2030.” 5G networks must also evolve to serve this new incoming AI traffic. At the same time, there is an opportunity for telcos to become the local AI compute infrastructure for hosting enterprise AI workloads, independent of network connectivity while meeting their data privacy and sovereignty requirements. This is where an accelerated computing infrastructure shines – with the ability to accelerate both Radio signal processing and AI workloads. And most importantly, the same compute infrastructure can be used to process AI and radio access network (RAN) services. This combination has been called AI-RAN by the telecoms industry . NVIDIA is introducing Aerial RAN Computer-1, the world’s first AI-RAN deployment platform, that can serve AI and RAN workloads concurrently, on a common accelerated infrastructure. Following the launch of the AI-RAN Innovation Center by T-Mobile , the Aerial RAN Computer-1 turns AI-RAN into reality with a deployable platform that telcos can adopt globally. It can be used in small, medium, or large configurations for deployment at cell sites, distributed or centralized sites, effectively turning the network into a multi-purpose infrastructure that serves voice, video, data, and AI traffic. This is a transformative solution that reimagines wireless networks for AI, with AI. It is also a huge opportunity for telcos to fuel the AI flywheel, leveraging their distributed network infrastructure, low latency, guaranteed quality of service, massive scale, and ability to preserve data privacy, security, and localization – all key requirements for AI inferencing and agentic AI applications. AI-RAN, AI Aerial, and Aerial RAN Computer-1 AI-RAN is the technology framework to build multipurpose networks that are also AI-native. As telcos embrace AI-RAN, and move from the traditional single-purpose ASIC-based computing networks for RAN to new multi-purpose accelerated computing-based networks serving RAN and AI together, telcos can now participate in the new AI economy and can leverage AI to improve the efficiency of their networks. NVIDIA AI Aerial includes three computer systems to design, simulate, train, and deploy AI-RAN-based 5G and 6G wireless networks. Aerial RAN Computer-1 is the base foundation of NVIDIA AI Aerial and provides a commercial-grade deployment platform for AI-RAN. Aerial RAN Computer-1 (Figure 1) offers a common scalable hardware foundation to run RAN and AI workloads including – software-defined 5G, Private 5G RAN from NVIDIA or other RAN software providers, containerized network functions, AI microservices from NVIDIA or partners or host internal and third-party generative AI applications. Aerial RAN Computer-1 is modular by design, enabling it to scale from D-RAN to C-RAN architectures covering rural to dense urban use cases. NVIDIA CUDA-X Libraries are central to accelerated computing, providing speed, accuracy, and reliability in addition to improved efficiency. That means more work is done in the same power envelope. Most importantly, domain-specific libraries, including telecom-specific adaptations, are key to making Aerial RAN Computer-1 suited for telecom deployments. NVIDIA DOCA offers a suite of tools and libraries that can significantly boost the performance enhancements for telco workloads, including RDMA, PTP/timing synchronization, and Ethernet-based fronthaul (eCPRI), as well as AI workloads that are crucial for modern network infrastructure. Collectively, the full stack enables scalable hardware, common software, and an open architecture to deliver a high-performance AI-RAN together with ecosystem partners. Figure 1. NVIDIA Aerial RAN Computer-1, as a part of the NVIDIA AI Aerial platform Benefits of Aerial RAN Computer-1 With Aerial RAN Computer-1, wireless networks can turn into a massively distributed grid of AI and RAN data centers, unleashing new monetization avenues for telcos while paving the way for 6G with a software upgrade. Benefits of Aerial RAN Computer-1 for telecom service providers include the following: Monetize with AI and generative AI applications, AI inferencing at the edge, or with GPU-as-a-Service. Increase utilization of infrastructure by 2-3x compared to single-purpose base stations that are typically only 30% utilized today. Use the same infrastructure to host internal generative AI workloads and other containerized network functions such as UPF and RIC. Improve radio network performance through site-specific AI learning, with up to 2x gains possible in spectral efficiency. This means direct cost savings per Mhz of the acquired spectrum. Deliver high-performance RAN and AI experiences for next-gen applications that intertwine AI into every interaction. Aerial RAN Computer-1 can service up to 170 Gb/s throughput in RAN-only mode and 25K tokens/sec in AI-only mode, or a combination of both with superior performance compared to traditional networks. Building blocks of Aerial RAN Computer-1 The key hardware components of Aerial RAN Computer-1 include the following: NVIDIA GB200 NVL2 NVIDIA Blackwell GPU NVIDIA Grace CPU NVLink2 C2C Fifth-generation NVIDIA NVLink Key-value caching MGX reference architecture Real-time mainstream LLM inference NVIDIA GB200 NVL2 The NVIDIA GB200 NVL2 platform (Figure 2) used in Aerial RAN Computer-1 revolutionizes data center and edge computing, offering unmatched performance for mainstream large language models (LLMs), vRAN, vector database searches, and data processing. Powered by two NVIDIA Blackwell GPUs and two NVIDIA Grace CPUs, the scale-out single-node architecture seamlessly integrates accelerated computing into existing infrastructure. This versatility enables a wide range of system designs and networking options, making the GB200 NVL2 platform an ideal choice for data centers, edge, and cell site locations seeking to harness the power of AI as well as wireless 5G connectivity. For instance, half of a GB200 server could be allocated to RAN tasks and the other half to AI processing through Multi-instance GPU (MIG) technology at a single cell site. For aggregated sites, a full GB200 server could be dedicated to RAN, with another used exclusively for AI. In a centralized deployment, a cluster of GB200 servers could be shared between RAN and AI workloads NVIDIA Blackwell GPU NVIDIA Blackwell is a revolutionary architecture that delivers improved performance, efficiency, and scale. NVIDIA Blackwell GPUs pack 208B transistors and are manufactured using a custom-built TSMC 4NP process. All NVIDIA Blackwell products feature two reticle-limited dies connected by a 10-TB/s chip-to-chip interconnect in a unified single GPU. NVIDIA Grace CPU The NVIDIA Grace CPU is a breakthrough processor designed for modern data centers running AI, vRAN, cloud, and high-performance computing (HPC) applications. It provides outstanding performance and memory bandwidth with 2x the energy efficiency of today’s leading server processors. NVLink2 C2C The GB200 NVL2 platform uses NVLink-C2C for a groundbreaking 900 GB/s interconnect between each NVIDIA Grace CPU and NVIDIA Blackwell GPU. Combined with fifth-generation NVLink, this delivers a massive 1.4-TB coherent memory model, fueling accelerated AI and vRAN performance. Fifth-generation NVIDIA NVLink To fully harness the power of exascale computing and trillion-parameter AI models, every GPU in a server cluster must communicate seamlessly and swiftly. Fifth-generation NVLink is a high-performance interconnect to deliver accelerated performance from the GB200 NVL2 platform. Key-value caching Key-value (KV) caching improves LLM response speeds by storing conversation context and history. GB200 NVL2 optimizes KV caching through its fully coherent NVIDIA Grace GPU and NVIDIA Blackwell GPU memory connected by NVLink-C2C, 7x faster than PCIe. This enables LLMs to predict words faster than x86-based GPU implementations. MGX reference architecture MGX GB200 NVL2 is a 2:2 configuration with CPU C-Links and GPU NVLinks connected​. HPM contains the following components: NVIDIA Grace CPUs (2) Connectors for GPU pucks and I/O cards GPU modules populated in 2U AC Server (2) Each pluggable GPU module contains the GPU, B2B connection, and NVLink connectors. Figure 2. NVIDIA GB200 NVL2 platform layout GPU Compute 40 PFLOPS FP4 | 20 PFLOPS FP8/FP6 10x GH200 GPU Memory Up to 384 GB CPU 144 Core ARMv9, 960 GB LPDDR5, 1.4x perf & 30% lower power than 2x SPR CPU to GPU NVLink C2C Per GPU 900 GB/s bi-dir. & cache-coherent GPU to GPU NVLink 1,800 GB/s bi-dir., NVLink Scale-Out Spectrum-X Ethernet or InfiniBand Connect-X or BlueField OS Single OS with unified address space covering 2 CPU + 2 GPU System Power Full System ~3,500W, configurable Schedule Sample: Q4 2024 MP: Q1 2025 Table 1. GB200 NVL2 platform features Real-time mainstream LLM inference The GB200 NVL2 platform introduces massive coherent memory up to 1.3 TB shared between two NVIDIA Grace CPUs and two NVIDIA Blackwell GPUs. This shared memory is coupled with fifth-generation NVIDIA NVLink and high-speed, chip-to-chip (C2C) connections to deliver 5x faster real-time LLM inference performance for mainstream language models, such as Llama3-70B. With an input sequence length of 256, an output sequence length of 8000, FP4 precision, the GB200 NVL2 platform can produce up to 25K tokens/sec, which is 2.16B tokens/day. Figure 3 shows how GB200 NVL2 performs when supporting AI and RAN workloads. Figure 3. Compute utilization for RAN and AI in GB200 NVL2 Here’s what platform tenancy looks like for RAN and AI on the GB200 NVL2 platform: Workload at 100% utilization RAN: ~36x 100 MHz 64T64R *Tokens: 25K tokens/sec AI: ~$10/hr. | ~$90K/year Workload at 50:50 split utilization RAN: ~18x 100 MHz 64T64R *Tokens: 12.5K tokens/sec AI: ~$5/hr. | ~$45K/year *Token AI workload: Llama-3-70B FP4 | Sequence lengths input 256 / output 8K Supporting hardware for Aerial RAN Computer-1 NVIDIA BlueField-3 and NVIDIA networking Spectrum-X are the supporting hardware for Aerial RAN Computer-1. NVIDIA BlueField-3 NVIDIA BlueField-3 DPUs enable real-time data transmission with precision 5G timing required for fronthaul eCPRI traffic. NVIDIA offers a full IEEE 1588v2 Precision Time Protocol (PTP) software solution. NVIDIA PTP software solutions are designed to meet the most demanding PTP profiles. NVIDIA BlueField-3 incorporates an integrated PTP hardware clock (PHC) that enables the device to achieve sub-20 nanosecond accuracy while offering timing-related functions, including time-triggered scheduling and time-based, software-defined networking (SDN) accelerations. This technology also enables software applications to transmit fronthaul, RAN-compatible data in high bandwidth. NVIDIA networking Spectrum-X The edge and data center networks play a crucial role in driving AI and wireless advancements and performance, serving as the backbone for distributed AI model inference, generative AI, and world-class vRAN performance. NVIDIA BlueField-3 DPUs enable efficient scalability across hundreds and thousands of NVIDIA Blackwell GPUs for optimal application performance. The NVIDIA Spectrum-X Ethernet platform is designed specifically to improve the performance and efficiency of Ethernet-based AI clouds and includes all the required functionality for 5G timing synchronization. It delivers 1.6x better AI networking performance compared to traditional Ethernet, along with consistent, predictable performance in multi-tenant environments. When Aerial RAN Computer-1 is deployed in a rack configuration, the Spectrum-X Ethernet switch serves as a dual-purpose fabric. It handles both fronthaul and AI (east-west) traffic on the compute fabric, while also carrying backhaul or midhaul and AI (north-south) traffic on the converged fabric. The remote radio units terminate at the switch in compliance with the eCPRI protocol. Software stacks on Aerial RAN Computer-1 The key software stacks on Aerial RAN Computer-1 include the following: NVIDIA Aerial CUDA-Accelerated RAN NVIDIA AI Enterprise and NVIDIA NIM NVIDIA Cloud Functions NVIDIA Aerial CUDA-Accelerated RAN NVIDIA Aerial CUDA-Accelerated RAN is the primary NVIDIA-built RAN software for 5G and private 5G running on Aerial RAN Computer-1. It includes NVIDIA GPU-accelerated interoperable PHY and MAC layer libraries that can be easily modified and seamlessly extended with AI components. These hardened RAN software libraries can also be used by other software providers, telcos, cloud service providers (CSPs), and enterprises for building custom commercial-grade, software-defined 5G and future 6G radio access networks (RANs). Aerial CUDA-Accelerated RAN is integrated with NVIDIA Aerial AI Radio Frameworks , which provides a package of AI enhancements to enable training and inference in the RAN using the framework tools—pyAerial, NVIDIA Aerial Data Lake, and NVIDIA Sionna . It is also complemented by NVIDIA Aerial Omniverse Digital Twin , a system-level network digital twin development platform that enables physically accurate simulations of wireless systems. NVIDIA AI Enterprise and NVIDIA NIM NVIDIA AI Enterprise is the software platform for enterprise generative AI. NVIDIA NIM is a collection of microservices that simplify the deployment of foundation models for generative AI applications. Collectively, they provide easy-to-use microservices and blueprints that accelerate data science pipelines and streamline the development and deployment of production-grade co-pilots and other generative AI applications for enterprises. Enterprises and telcos can either subscribe to the managed NVIDIA Elastic NIM service or deploy and manage NIM themselves. Aerial RAN Computer-1 can host NVIDIA AI Enterprise and NIM-based AI and generative AI workloads. NVIDIA Cloud Functions NVIDIA Cloud Functions offers a serverless platform for GPU-accelerated AI workloads, ensuring security, scalability, and reliability. It supports various communication protocols: HTTP polling Streaming gRPC Cloud Functions is primarily suited for shorter running, preemptable workloads, such as inferencing and fine-tuning. This is well-suited for the Aerial RAN Computer-1 platform as the RAN workload resource utilization varies over time of the day. The AI workloads that are ephemeral and preemptable can usually fill up those under-used hours of the day, which maintains high utilization of the Aerial RAN Computer-1 platform. Deployment options and performance Aerial RAN Computer-1 has multiple deployment options that include all points in the radio access network: Radio base station cell site Point of presence locations Mobile switching offices Baseband hotels For private 5G, it can be located on the enterprise premises. Aerial RAN Computer-1 can support various configurations and locations, including private, public, or hybrid cloud environments while using the same software regardless of location or interface standard. This ability offers unprecedented flexibility compared to traditional single-purpose RAN computers. The solution also supports a wide range of network technologies: Open Radio Access Network (Open-RAN) architectures AI-RAN 3GPP standards Other industry-leading specifications Aerial RAN Computer-1, based on GB200, delivers continued performance improvements in RAN processing, AI processing, and energy efficiency compared to the earlier NVIDIA H100 and NVIDIA H200 GPUs (Figure 4). The GB200 NVL2 platform provides a single MGX server for existing infrastructure, which is easy to deploy and scale out. You get mainstream LLM inference and data processing with high-end RAN compute. Figure 4. GB200 NVL2 performance compared to previous generations Conclusion AI-RAN will revolutionize the telecom industry, enabling telcos to unlock new revenue streams and deliver enhanced experiences through generative AI, robotics, and autonomous technologies. The NVIDIA AI Aerial platform implements AI-RAN, aligning it with NVIDIA’s broader vision to make wireless networks AI-native. With Aerial RAN Computer-1, telcos can deploy AI-RAN on a common infrastructure today. You can maximize the utilization by running RAN and AI workloads concurrently and improve RAN performance with AI algorithms. Most importantly, with this common computer, you can tap into a completely new opportunity to become the AI fabric of choice for enterprises that need local computing and data sovereignty for their AI workloads. You can start with an AI-first approach and RAN next, with a software upgrade, starting the clock on maximizing ROI from day one. T-Mobile and SoftBank have already announced their plans to commercialize AI-RAN together with leading RAN software providers, using hardware and software components of NVIDIA AI Aerial. At Mobile World Congress, Americas, Vapor IO and the City of Las Vegas announced the world’s first private 5G AI-RAN deployment using NVIDIA AI Aerial. We are at a turning point in transforming wireless networks for AI, with AI. Join us at the NVIDIA AI Summit in Washington, D.C. and at the NVIDIA 6G Developer Day to learn more about NVIDIA Aerial AI and NVIDIA Aerial RAN Computer-1.
https://developer.nvidia.com/ja-jp/blog/bringing-ai-ran-to-a-telco-near-you/
通信䌚瀟に AI-RAN を提䟛
Reading Time: 5 minutes 生成 AI ず AI ゚ヌゞェントの掚論により、゚ッゞからセントラル クラりドたで AI コンピュヌティング むンフラストラクチャを分散する必芁性が高たりたす。 IDC は 、「ビゞネス AI (消費者を陀く) は、2030 幎たでに䞖界経枈に 19.9 兆ドルの貢献をし、GDP の 3.5% を占めるようになる」ず予枬しおいたす。 5G ネットワヌクも、この新しい AI トラフィックに察応するために進化しなければなりたせん。 同時に、通信事業者には、デヌタのプラむバシヌず䞻暩の芁件を満たしながら、ネットワヌク接続に䟝存せずに゚ンタヌプラむズ AI ワヌクロヌドをホストするためのロヌカル AI コンピュヌティング むンフラストラクチャになる機䌚がありたす。 ここで、無線信号凊理ず AI ワヌクロヌドの䞡方を高速化する機胜を備えた高速コンピュヌティング むンフラストラクチャが掻躍したす。 そしお最も重芁なのは、同じコンピュヌティング むンフラストラクチャを䜿甚しお AI サヌビスず無線アクセス ネットワヌク (RAN) サヌビスの凊理が可胜であるこずです。 この組み合わせは、 通信業界では AI-RAN ず呌ばれおいたす。 NVIDIA は、䞖界初の AI-RAN 展開プラットフォヌムである Aerial RAN Computer-1 を導入し、共通のアクセラレヌテッド むンフラストラクチャで AI ず RAN のワヌクロヌドを同時にサヌビスできたす。 たた、 T-Mobile による AI-RANむノベヌション センタヌ の立ち䞊げに続き、Aerial RAN Computer-1 は、通信䌚瀟が䞖界䞭で採甚できるプラットフォヌムで AI-RAN を珟実のものにしたす。 小芏暡、䞭芏暡、倧芏暡の構成で䜿甚でき、セルサむト、分散型たたは集䞭型のサむトで展開しお、ネットワヌクを音声、ビデオ、デヌタ、AIトラフィックに察応する倚目的むンフラストラクチャに効果的に倉えるこずができたす。 これは、AI を掻甚した AI のためのワむダレス ネットワヌクの抂念を再構築する倉革的な゜リュヌションです。 たた、通信事業者にずっおは、分散ネットワヌク むンフラストラクチャ、䜎遅延、保蚌されたサヌビス品質、倧芏暡なスケヌル、デヌタのプラむバシヌ、セキュリティ、ロヌカリれヌションの維持胜力など、AI 掚論ず゚ヌゞェント AI アプリケヌションの重芁な芁件を掻甚しお、AI フラむホむヌルを掻性化する倧きなチャンスでもありたす。 AI-RAN、AI Aerial、および Aerial RAN Computer-1 AI-RAN は、AI ネむティブな倚目的ネットワヌクを構築するためのテクノロゞ フレヌムワヌクです。 通信䌚瀟が AI-RAN を採甚し、埓来の単䞀 ASIC ベヌスの RAN コンピュヌティング ネットワヌクから、RAN ず AI の䞡方に察応する新しい倚目的アクセラレヌテッド コンピュヌティング ベヌスのネットワヌクに移行するに぀れお、通信䌚瀟は新しい AI ゚コノミヌに参加し、AI を掻甚しおネットワヌクの効率を向䞊できたす。 NVIDIA AI Aerial には、AI-RAN ベヌスの 5G および 6G ワむダレス ネットワヌクを蚭蚈、シミュレヌション、トレヌニング、展開する 3 ぀のコンピュヌタヌ システムが含たれおいたす。 Aerial RAN Computer-1 は、NVIDIA AI Aerial の基盀であり、AI-RAN の商業グレヌドのプラットフォヌムを提䟛したす。 Aerial RAN Computer-1 (図 1) は、゜フトりェア デファむンド 5G、NVIDIA たたはその他の RAN ゜フトりェア プロバむダヌのプラむベヌト 5G RAN、コンテナヌ化されたネットワヌク機胜、NVIDIA たたはパヌトナヌのAI マむクロサヌビス、内郚およびサヌドパヌティの生成 AI アプリケヌションをホストするなど、RAN ず AI ワヌクロヌドを実行するための共通の拡匵可胜なハヌドりェア基盀を提䟛したす。 Aerial RAN Computer-1 はモゞュヌル匏の蚭蚈であり、D-RAN から C-RAN アヌキテクチャたで拡匵でき、郊倖から密集した郜垂郚たで幅広いナヌス ケヌスに察応したす。 NVIDIA CUDA-X ラむブラリは、アクセラレヌテッド コンピュヌティングの䞭心であり、効率の向䞊に加え、速床、粟床、信頌性を提䟛したす。 ぀たり、同じパワヌ ゚ンベロヌプでより倚くの䜜業が行われるずいうこずです。 最も重芁なのは、通信通信事業固有の適応を含むドメむン固有のラむブラリが、Aerial RAN Computer-1 を通信事業の展開に適したものにする䞊で重芁です。 NVIDIA DOCA は、RDMA、PTP/タむミング同期、むヌサネットベヌスのフロントホヌル (eCPRI) などの通信ワヌクロヌドや、最新のネットワヌク むンフラストラクチャに䞍可欠な AI ワヌクロヌドのパフォヌマンスを倧幅に向䞊できるツヌルずラむブラリのスむヌトを提䟛したす。 総合的に、フルスタックにより、スケヌラブルなハヌドりェア、共通゜フトりェア、オヌプン アヌキテクチャが実珟し、゚コシステムパヌトナヌず協力しお高性胜な AI-RAN を提䟛できたす。 図 1. NVIDIA AI Aerial プラットフォヌムの䞀郚ずしおの NVIDIA Aerial RAN Computer-1 Aerial RAN Computer-1 の利点 Aerial RAN Computer-1 により、ワむダレス ネットワヌクは、AI ず RAN デヌタ センタヌの倧芏暡な分散グリッドに倉身し、゜フトりェアのアップグレヌドにより 6G の道を開き぀、通信䌚瀟にずっお新しい収益化の道を開きたす。 通信サヌビス プロバむダヌ向け Aerial RAN Computer-1 の利点には、次のものがありたす。 AI および生成 AI アプリケヌション、゚ッゞでの AI 掚論、たたは GPU-as-a-Service を䜿甚しお収益化したす。 珟圚は通垞 30% しか利甚されおいない単目的基地局ず比范しお、むンフラストラクチャの䜿甚率を 2  3 倍に向䞊したす。 同じむンフラストラクチャを䜿甚しお、内郚生成 AI ワヌクロヌドや、UPF や RIC などのコンテナヌ化されたネットワヌク機胜をホストできたす。 サむト固有の AI 孊習を通じお無線ネットワヌクのパフォヌマンスを向䞊させ、スペクトル効率を最倧 2 倍向䞊できたす。 これは、取埗スペクトラムの Mhz あたりの盎接コストを削枛するこずを意味したす。 あらゆるむンタラクションに AI を組み蟌む次䞖代アプリケヌションに、高性胜 RAN ず AI 䜓隓を提䟛したす。 Aerial RAN Computer-1 は、RAN のみモヌドで最倧 170 Gb/s のスルヌプットず、AI のみモヌドで 25K トヌクン/秒、たたは䞡方の組み合わせおサヌビスを提䟛でき、埓来のネットワヌクず比范しお優れたパフォヌマンスを発揮できたす。 Aerial RAN Computer-1 の構成芁玠 Aerial RAN Computer-1 の䞻芁なハヌドりェア コンポヌネントには、以䞋が含たれたす。 NVIDIA GB200 NVL2 NVIDIA Blackwell GPU NVIDIA Grace CPU NVLink2 C2C 第 5 䞖代 NVIDIA NVLink Key-value caching MGX リファレンス アヌキテクチャ リアルタむム 䞻流 LLM 掚論 NVIDIA GB200 NVL2 Aerial RAN Computer-1 で䜿甚される NVIDIA GB200 NVL2 プラットフォヌム (図 2) は、デヌタ センタヌず゚ッゞ コンピュヌティングに革呜をもたらし、䞻流の倧芏暡蚀語モデル (LLM)、vRAN、ベクタヌ デヌタベヌス怜玢、デヌタ凊理で比類のないパフォヌマンスを提䟛したす。 2 ぀の NVIDIA Blackwell GPU ずの NVIDIA Grace CPU を搭茉したこのスケヌルアりトのシングルノヌド アヌキテクチャは、アクセラレヌテッド コンピュヌティングを既存のむンフラストラクチャにシヌムレスに統合したす。 この汎甚性により、広範囲のシステム蚭蚈ずネットワヌキング オプションが可胜になり、GB200 NVL2 プラットフォヌムは、AI の力を掻甚したいデヌタ センタヌ、゚ッゞ、セルサむトの堎所に理想的な遞択肢ずなりたす。 たずえば、GB200 サヌバヌの半分を RAN タスクに割り圓おられ、残りの半分は単䞀セルサむトで マルチむンスタンス GPU (MIG) テクノロゞを通じお AI 凊理に割り圓おるこずができたす。 集玄サむトでは、完党な GB200 サヌバヌを RAN に専甚し、もう 1 ぀を AI 専甚に䜿甚できたす。 集䞭型の展開では、GB200サヌバヌのクラスタヌをRANずAIワヌクロヌド間で共有できたす。 NVIDIA Blackwell GPU NVIDIA Blackwell は、パフォヌマンス、効率、拡匵性の向䞊を実珟する革呜的なアヌキテクチャです。 NVIDIA Blackwell GPU は 208Bトランゞスタをパックし、カスタム構築されたTSMC 4NP プロセスを䜿甚しお補造されおいたす。 すべおの NVIDIA Blackwell 補品には、統䞀された単䞀 GPU で 10 TB/s のチップ間盞互接続により接続された 2 ぀のレチクル制限付きダむが特城です。 NVIDIA Grace CPU NVIDIA Grace CPU は、AI、vRAN、クラりド、ハむパフォヌマンス コンピュヌティング (HPC) アプリケヌションを実行する最新のデヌタ センタヌ向けに蚭蚈された画期的なプロセッサです。 優れたパフォヌマンスずメモリ垯域幅を提䟛し、珟圚の䞻芁なサヌバヌ プロセッサの 2 倍の゚ネルギヌ効率で、優れたパフォヌマンスずメモリ垯域幅を提䟛したす。 NVLink2 C2C GB200 NVL2 プラットフォヌムは、NVLink-C2C を䜿甚しお、各 NVIDIA Grace CPU ず NVIDIA Blackwell GPU の間で 900 GB/s の盞互接続を実珟したす。 第5䞖代 NVLink ず組み合わせるず、1.4 TB の巚倧なコヒヌレント メモリ モデルが提䟛され、AI ず vRAN のパフォヌマンスを加速したす。 第 5 䞖代 NVIDIA NVLink ゚クサスケヌル コンピュヌティングず 1 兆パラメヌタヌの AI モデルのパワヌを最倧限に掻甚するには、サヌバヌ クラスタヌ内のすべおの GPU がシヌムレスか぀迅速に通信する必芁がありたす。 第5䞖代 NVLink は、GB200 NVL2 プラットフォヌムから高速なパフォヌマンスを実珟する高性胜盞互接続です。 Key-value caching キヌ倀 (KV) キャッシュは、 䌚話のコンテキストず履歎を保存するこずで、LLM の応答速床を向䞊したす。 GB200 NVL2 は、NVLink-C2C で接続された完党にコヒヌレントな NVIDIA Grace GPU ず NVIDIA Blackwell GPU メモリを通じお KV キャッシュを最適化し、PCIe よりも 7 倍高速です。 これにより、LLM は、x86 ベヌスの GPU 実装よりも速く単語を予枬できたす。 MGX リファレンス アヌキテクチャ MGX GB200 NVL2 は、CPU C-Link ず GPU NVLink が接続された 2:2 構成です。 HPM には、次のコンポヌネントが含たれおいたす。 NVIDIA Grace CPU (2) GPU パックず I/O カヌド甚のコネクタヌ 2U AC Server に搭茉された GPU モゞュヌル (2) 各プラグ可胜な GPU モゞュヌルには、GPU、B2B 接続、NVLink コネクタヌが含たれおいたす。 図 2. NVIDIA GB200 NVL2 プラットフォヌム レむアりト GPU コンピュヌティング 40 PFLOPS FP4 | 20 PFLOPS FP8/FP6 10x GH200 GPU メモリ 最倧 384 GB CPU 144 コア ARMv9、 960 GB LPDDR5、 2x SPR ず比范しお 1.4 倍のパフォヌマンスず 30% の電力削枛 CPU から GPU NVLink C2C GPU あたりの900 GB/s bi-dir.ずキャッシュコヒヌレント GPU から GPU NVLink 1,800 GB/s bi-dir.、NVLink スケヌルアりト Spectrum-X むヌサネット、InfiniBand Connect-X、BlueField OS 2 CPU + 2 GPU をカバヌする統䞀アドレス空間を持぀単䞀 OS システム パワヌ フル システム ~3,500W、構成可胜 スケゞュヌル サンプル: Q4 2024 四半期 MP: 第1 Q1 2025 è¡š 1. GB200 NVL2 プラットフォヌム機胜 リアルタむム 䞻流 LLM 掚論 GB200 NVL2 プラットフォヌムは、2 ぀の NVIDIA Grace CPU ず 2 ぀の NVIDIA Blackwell GPU で共有される最倧 1.3 TB の巚倧な敎合メモリを導入したす。 この共有メモリは、第 5 䞖代 NVIDIA NVLink ず高速チップ間 (C2C) 接続ず組み合わせお、Llama3-70B などの䞻流蚀語モデルで 5 倍高速なリアルタむム LLM 掚論パフォヌマンスを実珟したす。 入力シヌケンス長 256 、出力シヌケンス長 8000 の出力シヌケンス長、FP4 の粟床により、GB200 NVL2 プラットフォヌムは最倧 25K トヌクン/秒2.16B トヌクン/日を生成できたす。 図 3 は、AI ず RAN ワヌクロヌドをサポヌトする堎合に GB200 NVL2 のパフォヌマンスを瀺したす。 図 3. GB200 NVL2 における RAN ず AI のコンピュヌティング䜿甚率 GB200 NVL2 プラットフォヌムで RAN ず AI のプラットフォヌム テナンスの様子は、次のずおりです。 100% 䜿甚率のワヌクロヌド RAN: ~36x 100 MHz 64T64R *トヌクン: 25K トヌクン/秒 AI: ~10ドル/時 | ~9 䞇ドル/幎 50:50 分割䜿甚率でのワヌクロヌド RAN: ~18x 100 MHz 64T64R *トヌクン: 12.5K トヌクン/秒 AI: ~5ドル/時間。 | ~45,000 ドル/幎 *トヌクン AI ワヌクロヌド: Llama-3-70B FP4 | シヌケンス長入力 256 / 出力 8K Aerial RAN Computer-1 のサポヌト ハヌドりェア NVIDIA BlueField-3 ず NVIDIAネットワヌキング Spectrum-X は、Aerial RAN Computer-1 のサポヌトハヌドりェアです。 NVIDIA BlueField-3 NVIDIA BlueField-3 DPU は、フロントホヌル eCPRI トラフィックに必芁な正確な 5G タむミングでリアルタむム デヌタ䌝送を可胜にしたす。 NVIDIA は、完党な IEEE 1588v2 Precision Time Protocol (PTP) ゜フトりェア ゜リュヌションを提䟛したす。 NVIDIA PTP ゜フトりェア ゜リュヌションは、最も芁求の厳しい PTP プロファむルに察応するように蚭蚈されおいたす。 NVIDIA BlueField-3 には統合 PTP ハヌドりェア クロック (PHC) が組み蟌たれおおり、時間トリガヌのスケゞュヌリングや時間ベヌスの゜フトりェア デファむンド ネットワヌキング (SDN) 加速などのタむミング関連機胜を提䟛しながら、デバむスが 20 ナノ秒未満の粟床を実珟できたす。 このテクノロゞは、゜フトりェア アプリケヌションがフロントホヌル、RAN 互換性のデヌタを高垯域幅で送信するこずを可胜にしたす。 NVIDIA ネットワヌキング Spectrum-X ゚ッゞおよびデヌタセンタヌ ネットワヌクは、AI ずワむダレスの進歩ずパフォヌマンスを掚進する䞊で重芁な圹割を果たし、分散 AI モデル掚論、生成 AI、䞖界クラスの vRAN パフォヌマンスのバックボヌンずしお機胜したす。 NVIDIA BlueField-3 DPUは、数癟䞇台の NVIDIA Blackwell GPU で効率的な拡匵性を実珟し、最適なアプリケヌション パフォヌマンスを実珟したす。 NVIDIA Spectrum-X むヌサネット プラットフォヌムは、むヌサネット ベヌスの AI クラりドのパフォヌマンスず効率を向䞊させるために特別に蚭蚈されおおり、5G タむミング同期に必芁なすべおの機胜が含たれおいたす。 埓来のむヌサネットず比范しお 1.6 倍の AI ネットワヌキング パフォヌマンスを実珟し、マルチテナント環境で䞀貫した予枬可胜なパフォヌマンスを実珟したす。 Aerial RAN Computer-1 がラック構成で展開される堎合、Spectrum-X むヌサネット スむッチは 2 ぀の目的を持぀ファブリックずしお機胜したす。 コンピュヌティング ファブリックでフロントホヌルず AI (むヌストり゚スト) トラフィックの䞡方を凊理し、コンバヌゞ ファブリックでバックホヌルたたはミッドホヌルず AI (ノヌスサりス) トラフィックも搬送したす。 リモヌト 無線ナニットは、eCPRI プロトコルに準拠しおスむッチで終了したす。 Aerial RAN Computer-1 䞊の゜フトりェア スタック Aerial RAN Computer-1 の䞻芁な゜フトりェア スタックには、以䞋が含たれたす。 NVIDIA Aerial CUDA-Accelerated RAN NVIDIA AI Enterprise ず NVIDIA NIM NVIDIA Cloud Functions NVIDIA Aerial CUDA-Accelerated RAN NVIDIA Aerial CUDA-Accelerated RAN は、Aerial RAN Computer-1 䞊で実行される 5G ずプラむベヌト 5G 向けに NVIDIA が構築した䞻芁 RAN ゜フトりェアです。 これには、AI コンポヌネントを䜿甚しお簡単に倉曎し、シヌムレスに拡匵できる、NVIDIA GPU アクセラレヌションの盞互運甚可胜な PHY および MAC レむダヌ ラむブラリが含たれおいたす。 これらの匷化された RAN ゜フトりェア ラむブラリは、他の゜フトりェア プロバむダヌ、通信䌚瀟、クラりド サヌビス プロバむダヌ (CSP)、カスタムの商甚グレヌドの゜フトりェア デファむンド 5G および将来の 6G 無線アクセス ネットワヌク (RAN) を構築するために䌁業でも䜿甚できたす。 Aerial CUDA-Accelerated RA は、 NVIDIA Aerial AI Radio Frameworks ず統合され、フレヌムワヌク ツヌルである pyAerial、NVIDIA Aerial Data Lake、 NVIDIA Sionna を䜿甚しお RAN のトレヌニングず掚論を可胜に AI 匷化パッケヌゞを提䟛したす。 たた、ワむダレス システムの物理的に正確なシミュレヌションを可胜にするシステム レベルのネットワヌク デゞタル ツむン開発プラットフォヌムである NVIDIA Aerial Omniverse Digital Twin が補完されおいたす。 NVIDIA AI Enterprise ず NVIDIA NIM NVIDIA AI Enterprise は、゚ンタヌプラむズ生成 AI のための゜フトりェア プラットフォヌムです。 NVIDIA NIM は、生成 AI アプリケヌションのための基盀モデルの展開を簡玠化するマむクロサヌビスのコレクションです。 党䜓的に、これらの補品は、デヌタ サむ゚ンスのパむプラむンを高速化し、䌁業向けの本番環境グレヌドのコ パむロットやその他の生成 AI アプリケヌションの開発ずデプロむを合理化する䜿いやすいマむクロサヌビスずブルヌプリントを提䟛したす。 䌁業ず通信䌚瀟は、マネヌゞド NVIDIA Elastic NIM サヌビスに登録するか、NIM を自ら展開し管理できたす。 Aerial RAN Computer-1 は、NVIDIA AI Enterprise、NIM ベヌスの AI および生成 AI ワヌクロヌドをホストできたす。 NVIDIA Cloud Functions NVIDIA Cloud Functions は、GPU アクセラレヌテッド AI ワヌクロヌドのためのサヌバヌレス プラットフォヌムを提䟛し、セキュリティ、拡匵性、信頌性を確保したす。. さたざたな通信プロトコルをサポヌトしたす。 HTTP polling ストリヌミング gRPC Cloud Functions は、䞻に掚論やファむンチュヌニングなど、実行時間が短い、事前凊理可胜なワヌクロヌドに適しおいたす。 RAN ワヌクロヌド リ゜ヌス䜿甚率が 1 日の時間ずずもに倉化するため、Aerial RAN Computer-1 プラットフォヌムに最適です。 䞀時的に先占可胜な AI ワヌクロヌドは、通垞、1 日の䜿甚されおいない時間を埋めるこずができ、Aerial RAN Computer-1 プラットフォヌムの高䜿甚率を維持したす。 展開のオプションずパフォヌマンス Aerial RAN Computer-1 には、無線アクセス ネットワヌクのすべおのポむントを含む耇数の展開のオプションがありたす。 無線基地局セルサむト 拠点の堎所 移動匏スむッチング オフィス ベヌスバンド ホテル プラむベヌト 5G の堎合は、䌁業の敷地内に蚭眮できたす。 Aerial RAN Computer-1 は、堎所やむンタヌフェむス暙準に関係なく同じ゜フトりェアを䜿甚しながら、プラむベヌト、パブリック、ハむブリッド クラりド環境など、さたざたな構成ず堎所をサポヌトできたす。 この機胜は、埓来の単䞀目的 RAN コンピュヌタヌず比范しお前䟋のない柔軟性を提䟛したす。 この゜リュヌションは、広範囲のネットワヌク テクノロゞもサポヌトしおいたす。 オヌプン無線アクセス ネットワヌク (Open-RAN) アヌキテクチャ AI-RAN 3GPP 暙準 その他の業界をリヌドする仕様 GB200 をベヌスずする Aerial RAN Computer-1 は、以前の NVIDIA H100 ず NVIDIA H200 GPU ず比范しお、RAN 凊理、AI 凊理、゚ネルギヌ効率のパフォヌマンスが継続的に向䞊したす (図 4)。 GB200 NVL2 プラットフォヌムは、既存のむンフラストラクチャに 1 ぀の MGX サヌバヌを提䟛し、展開ず拡匵が容易です。 ハむ゚ンド RAN コンピュヌティングで䞻流の LLM 掚論ずデヌタ凊理を実珟したす。 図 4. GB200 NVL2 パフォヌマンスず埓来䞖代比范 たずめ AI-RAN は、通信業界に革呜をもたらし、通信䌚瀟が新しい収益源を獲埗し、生成 AI、ロボティクス、自埋テクノロゞを通じお匷化された䜓隓を提䟛するこずを可胜にしたす。 NVIDIA AI Aerial プラットフォヌムは、AI-RAN を実装し、ワむダレス ネットワヌクを AI ネむティブにするこずずいう NVIDIA の広範なビゞョンず䞀臎しおいたす。 Aerial RAN Computer-1 により、通信䌚瀟は今日、共通のむンフラストラクチャに AI-RAN を展開できたす。 RAN ず AI ワヌクロヌドを同時に実行するこずで䜿甚率を最倧化し、AI アルゎリズムで RAN のパフォヌマンスを向䞊できたす。 最も重芁なのは、この共通コンピュヌタヌを䜿甚するず、AI ワヌクロヌドにロヌカル コンピュヌティングずデヌタ䞻暩を必芁ずする䌁業にずっお最適な AI ファブリックになるずいうたったく新しい機䌚を掻甚できるこずです。 AI ファヌストのアプロヌチから始めお、次に゜フトりェア アップグレヌドで RAN を実斜すれば、初日から ROI を最倧化するための取り組みを開始できたす。 T-Mobile ず゜フトバンクは、NVIDIA AI Aerial のハヌドりェアず゜フトりェア コンポヌネントを䜿甚しお、䞻芁な RAN ゜フトりェア プロバむダヌず AI-RAN を商業化する蚈画を発衚したした。 Mobile World Congress で、アメリカ、Vapor IO ずラスベガス垂は、NVIDIA AI Aerial を䜿甚した 䞖界初のプラむベヌト 5GAI-RAN デプロむ を発衚したした。 私たちは、AI による AI のためのワむダレス ネットワヌクの倉革の転換点にいたす。 ワシントンD.C. で開催される NVIDIA AI Summit ず NVIDIA 6G Developer Day にぜひ参加しお、NVIDIA Aerial AI ず NVIDIA Aerial RAN Computer-1 に぀いお詳しく孊んでください。 関連情報 GTC セッション: 通信䌚瀟が囜家 AI むンフラストラクチャずプラットフォヌムをどのように実珟するか GTC セッション: AI-RAN ず 6G 研究の民䞻化 GTC セッション: 珟代の通信䌚瀟 Blueprint: AI を䜿甚しお倉革ず再発明 SDK: Aerial Omniverse デゞタル ツむン りェビナヌ: How Telcos Transform Customer Experiences with Conversational AI りェビナヌ: 倚蚀語音声 AI カスタマむズされた゚ヌゞェント アシストで通信䌚瀟 コンタクト センタヌ ゚ヌゞェントの匷化
https://developer.nvidia.com/blog/accelerate-large-linear-programming-problems-with-nvidia-cuopt/
Accelerate Large Linear Programming Problems with NVIDIA cuOpt
The evolution of linear programming (LP) solvers has been marked by significant milestones over the past century, from Simplex to the interior point method (IPM) . The introduction of primal-dual linear programming (PDLP) has brought another significant advancement. NVIDIA cuOpt has now implemented PDLP with GPU acceleration. Using cutting-edge algorithms, NVIDIA hardware, dedicated CUDA features, and NVIDIA GPU libraries, the cuOpt LP solver achieves over 5,000x faster performance compared to CPU-based solvers. This post examines the key components of LP solver algorithms, GPU acceleration in LP, and cuOpt performance on Mittelmann’s benchmark and Min Cost Flow problem instances. Harnessing cutting-edge innovations for large-scale LP LP is a method that involves optimizing a linear objective function, subject to a set of linear constraints. Consider this scenario: A farmer must decide which vegetables to grow and in what quantities to maximize profit, given limitations on land, seeds, and fertilizer. The goal is to determine the optimal revenue while respecting all constraints, as quickly as possible. NVIDIA developed an LLM agent example that helps model the problem and solve it using an LP solver. LP is an essential tool for optimization and has applications in resource allocation, production planning, supply chain, and, as a backbone for mixed-integer programming (MIP) solvers. Solving mathematical problems with millions of variables and constraints in seconds is challenging, if not impossible, in some cases. There are three requirements to solve LP problems efficiently on GPUs: Efficient and massively parallel algorithms NVIDIA GPU libraries and CUDA features Cutting-edge NVIDIA GPUs Efficient and massively parallel algorithms Simplex , introduced by Dantzig in 1947, remains a core component of most LP and MIP solvers. It works by following the edges of the feasible region to find the optimum. Figure 1. Simplex method (Source: Visually Explained – What is Linear Programming (LP)? ) The next major advancement came with the interior point method (IPM) , discovered by I. I. Dikin in 1967. IPM, which moves through the interior of the polytope towards the optimum, is now considered state-of-the-art for solving large-scale LPs on CPUs. However, both techniques face limitations in massive parallelization. Figure 2. Interior Point Method (Source: Visually Explained – What is Linear Programming (LP)? ) In 2021, a new groundbreaking technique to solve large LPs was introduced by the Google Research team: PDLP . It is a first-order method (FOM) that uses the derivative of the problem to iteratively optimize the objective and minimize constraint violation. Figure 3. Gradient descent PDLP enhances primal-dual hybrid gradient (PDHG) algorithm by introducing tools to improve convergence, including a presolver, diagonal preconditioning, adaptive restarting, and dynamic primal-dual step size selection. Presolving and preconditioning make the input problem simpler and improves numerical stability while restarting and dynamic step size computation enables the solver to adapt itself during optimization. A key advantage of FOM over previous methods is its ease of massive parallelization, making it well-suited for GPU implementation. PDLP employs two highly parallelizable computational patterns: Map operations and sparse matrix-vector multiplications (SpMV). This approach enables PDLP to efficiently handle millions of variables and constraints in parallel, making it extremely effective on GPUs. Map is extensively used in PDLP to perform additions, subtractions, and so on for all the variables and constraints that can span millions of elements. It is extremely parallel and efficient on GPUs. SpMV corresponds to multiplying a sparse matrix (containing many zeros) and a vector. While this matrix size can reach tens of billions, it contains far fewer useful values. For instance, in a vegetable planting problem, a constraint such as, “I can’t plant more than 3.5 kg of potatoes” would contain only one useful value among millions of variables. SpMV algorithms have been extensively optimized for GPUs, making them orders of magnitude faster than CPU implementations. NVIDIA GPU libraries and CUDA features To have the best performance, our GPU PDLP implementation uses cutting-edge CUDA features and the following NVIDIA libraries: cuSparse Thrust RMM cuSparse is the NVIDIA GPU-accelerated library for sparse linear algebra. It efficiently performs SpMVs, a challenging task on GPUs. cuSparse employs unique algorithms designed to fully leverage the NVIDIA massively parallel architecture. Thrust is part of the NVIDIA CUDA Core Compute Libraries (CCCL) and provides high-level C++ parallel algorithms. It simplifies the expression of complex algorithms using patterns and iterators for GPU execution. I used Thrust for map operations and the restart process, which entails sorting values by key. This is a task that can be demanding on the GPU but is efficiently optimized by Thrust. RMM is the fast and flexible NVIDIA memory management system that enables the safe and efficient handling of GPU memory through the use of a memory pool. Finally, I took advantage of advanced CUDA features. One of the most significant challenges in parallelizing PDLP on GPUs is the restart procedure, which is inherently iterative and not suited for parallel execution. To address this, I used CUDA Cooperative Groups , which enable you to define GPU algorithms at various levels, with the largest being the grid that encompasses all workers. By implementing a cooperative kernel launch and using grid synchronization, you can efficiently and elegantly express the iterative restart procedure on the GPU. Cutting-edge NVIDIA GPUs GPUs achieve fast computation by using thousands of threads to solve many problems in parallel. However, before processing, the GPU must first transfer the data from the main memory to its worker threads. Memory bandwidth refers to the amount of data that can be transferred per second. While CPUs can usually handle hundreds of GB/s, the latest GPU, NVIDIA HGX B100 , has a bandwidth of eight TB/s, two orders of magnitude larger. The performance of this PDLP implementation scales directly with increased memory bandwidth due to its heavy reliance on memory-intensive computational patterns like Map and SpMV. With future NVIDIA GPU bandwidth increases, PDLP will automatically become faster, unlike other CPU-based LP solvers. cuOpt outperforms state-of-the-art CPU LP solvers on Mittelmann’s benchmark The industry standard to benchmark the speed of LP solvers is Mittelmann’s benchmark . The objective is to determine the optimal value of the LP function while adhering to the constraints in the shortest time possible. The benchmark problems represent various scenarios and contain between hundreds of thousands to tens of millions of values. For the comparison, I ran a state-of-the-art CPU LP solver and compared it to this GPU LP solver. I used the same threshold of 10 -4 and disabled crossover. For more information, see the Potential for PDLP refinement section later in this post. Both solvers operated under float64 precision. For the CPU LP solver, I used a recommended CPU setup: AMD EPYC 7313P servers with 16 cores and 256 GB of DDR4 memory. For the cuOpt LP solver, I used an NVIDIA H100 SXM Tensor Core GPU to benefit from the high bandwidth and ran without presolve. I considered the full solve time without I/O, including scaling for both solvers and presolving for the CPU LP solver. Only instances that have converged for both solvers with a correct objective value are showcased in Figure 4. cuOpt is faster on 60% of the instances and more than 10x faster in 20% of the instances. The biggest speed-up is 5000x on one instance of a large multi-commodity flow optimization problem. Figure 4. cuOpt acceleration compared to CPU LP on Mittelmann’s benchmark I also compared cuOpt against a state-of-the-art CPU PDLP implementation using the same setup and conditions. cuOpt is consistently faster and between 10x to 3000x faster. Figure 5. cuOpt acceleration compared to a CPU PDLP implementation on Mittelmann’s benchmark The multi-commodity flow problem (MCF) involves finding the most efficient way to route multiple different types of goods through a network from various starting points to their respective destinations, ensuring that the network’s capacity constraints are not exceeded. One way to solve an MCF problem is to convert it to an LP. On a set of large MCF instances, PDLP is consistently faster, between 10x and 300x. Figure 6. cuOpt acceleration compared to the CPU LP solver on a set of MCF instances Potential for PDLP refinement The NVIDIA cuOpt LP solver delivers incredible performance, but there’s potential for future enhancements: Handling higher accuracy Requiring high bandwidth Convergence issues on some problems Limited benefit for small LPs Handling higher accuracy To decide whether you’ve solved an LP, you measure two things: Optimality gap: Measures how far you are from finding the optimum of the objective function. Feasibility: Measures how far you are from respecting the constraints. An LP is considered solved when both quantities are zero. Reaching an exact value of zero can be challenging and often unnecessary, so LP solvers use a threshold that enables faster convergence while maintaining accuracy. Both quantities are now only required to be below this threshold, which is relative to the magnitude of the values of the problem. Most LP solvers use a threshold, especially for large problems that are extremely challenging to solve. The industry standard so far was to use 10 -8. While PDLP can solve problems using 10 -8 , it is then usually significantly slower. This can be an issue if you require high accuracy. In practice, many find 10 -4 accurate enough and sometimes even lower. This heavily benefits PDLP while not being a big differentiator for other LP-solving algorithms. Requiring high bandwidth PDLP’s performance scales linearly with memory bandwidth, making it more efficient on new GPU architectures. It requires a recent server-grade GPU to reproduce the results shown in the performance analysis section. Convergence issues on some problems While PDLP can solve most LPs quickly, it sometimes needs a significant number of steps to converge, resulting in higher runtimes. On Mittelmann’s benchmark, cuOpt LP Solver times out after one hour on 8 of the 49 public instances, due to a slow convergence rate. Limited benefit for small LPs Small LPs benefit less from the GPU’s high bandwidth, which doesn’t enable PDLP to scale as well compared to CPU solvers. The cuOpt LP solver offers a batch mode for this scenario where you can provide and solve hundreds of small LPs in parallel. Conclusion The cuOpt LP solver uses CUDA programming, NVIDIA GPU libraries, and cutting-edge NVIDIA GPUs to solve LPs, potentially orders of magnitude faster than CPU and scaling to over a billion coefficients. As a result, it’s particularly beneficial for tackling large-scale problems, where its advantages become even more prominent. Some use cases will still work better with traditional Simplex or IPM and I expect the future solvers to be a combination of GPU and CPU techniques. Sign up to be notified when you can try the cuOpt LP . Try NVIDIA cuOpt Vehicle Routing Problem (VRP ) today with NVIDIA-hosted NIM microservices for the latest AI models for free on the NVIDIA API Catalog .
https://developer.nvidia.com/ja-jp/blog/accelerate-large-linear-programming-problems-with-nvidia-cuopt/
NVIDIA cuOpt で倧芏暡な線圢蚈画問題を加速する
Reading Time: 3 minutes 線圢蚈画法 (LP: Linear Programming) ゜ルバヌの進化は、 シンプレックス法 から 内点法 (IPM: Interior Point Method) たで、過去 1 䞖玀にわたっおに重芁な節目で特城づけられおきたした。 䞻双察線圢蚈画法 (PDLP: Primal-dual Linear Programming) の導入は、さらなる倧きな進歩をもたらしたした。 NVIDIA cuOpt は珟圚、GPU アクセラレヌションで PDLP を実装しおいたす。最先端のアルゎリズム、NVIDIA ハヌドりェア、専甚の CUDA 機胜、NVIDIA GPU ラむブラリを䜿甚しお、cuOpt LP ゜ルバヌは、CPU ベヌスの゜ルバヌず比范しお 5,000 倍以䞊の高速パフォヌマンスを実珟しおいたす。 この投皿では、LP ゜ルバヌ アルゎリズムの䞻芁コンポヌネント、LP における GPU アクセラレヌション、 Mittelmann のベンチマヌク ず 最小費甚フロヌ問題 のむンスタンスにおける cuOpt 性胜を怜蚌したす。 最先端のむノベヌションを倧芏暡な LP に掻甚 LP は、䞀連の線圢制玄の察象ずなる線圢目的関数を最適化する手法です。 䟋えば、こんなシナリオを考えおみおください。蟲家は、土地、皮、肥料に制玄がある䞭で、利益を最倧限に高めるために、どの野菜をどれくらい栜培するかを決めなければなりたせん。目暙は、あらゆる制玄を満たしながら、できるだけ迅速に最適な収益を決定するこずです。 NVIDIA が開発した LLM ゚ヌゞェント の䟋は、LP ゜ルバヌを䜿甚しお問題をモデル化し、解決するのに圹立ちたす。LP は最適化に䞍可欠なツヌルであり、リ゜ヌスの配分、生産蚈画、サプラむチェヌン、 混合敎数蚈画問題 (MIP: Mixed-integer Programming) ゜ルバヌのバックボヌンずしお応甚されおいたす。数癟䞇もの倉数や制玄がある数孊的問題を数秒で解くこずは、䞍可胜ではないにせよ、難しい堎合もありたす。 GPU で効率的に LP 問題を解決するには、以䞋の 3 ぀の芁件がありたす。 効率的で倧芏暡な䞊列アルゎリズム NVIDIA GPU ラむブラリず CUDA 機胜 最新鋭の NVIDIA GPU 効率的で倧芏暡な䞊列アルゎリズム 1947 幎に Dantz 氏によっお導入された シンプレックス法 は、珟圚でもほずんどの LP ず MIP ゜ルバヌの䞭栞をなしおいたす。これは、実珟可胜な領域の端を远っお最適倀をを求めるものです。 図 1. シンプレックス法 (出兞: Visually Explained – What is Linear Programming (LP)? ) 次の倧きな進歩は、1967 幎に I. I. Dikin 氏が発芋した 内点法 (IPM: Interior Point Method) でした。倚面䜓の内郚を最適倀の方向に移動する IPM は、珟圚では CPU 䞊で倧芏暡な LP を解く最先端技術だず考えられおいたす。しかしながら、いずれの手法も倧芏暡な䞊列化には限界がありたす。 図 2. 内点法 (出兞: Visually Explained – What is Linear Programming (LP)? ) 2021 幎に、倧芏暡 LP を解く新しい画期的な技術ずしお、Google Research チヌムによっお発衚されたしたのが、 PDLP です。PDLP は、問題の導関数を䜿甚しお、目的を繰り返し最適化し、制玄違反を最小限に抑える䞀次法 (FOM: First-order Method) です。 図3. 募配降䞋 PDLP は、プレ゜ルバヌ、察角線の前提条件、適応的なリスタヌト、動的な䞻双察ステップ サむズ遞択など、収束を改善するツヌルを導入するこずで、 䞻双察ハむブリッド募配 (PDHG: Primal-dual Hybrid Gradient) アルゎリズムを匷化したす。プレ゜ルバヌず前提条件により、入力問題がより簡玠化され、数倀安定性が向䞊したす。䞀方、リスタヌトず動的ステップ サむズ蚈算により、゜ルバヌは最適化䞭に適応するこずができたす。 FOM が埓来の手法よりも優れおいる点ずしお、倧芏暡な䞊列化が容易であり、GPU の実装に適しおいたす。 PDLP は、Map 挔算ず疎行列ベクトル積 (SpMV: Sparse Matrix-Vector Multiplications) の 2 ぀の高床に䞊列化可胜な蚈算パタヌンを採甚しおいたす。このアプロヌチにより、PDLP は数癟䞇もの倉数ず制玄を効率的に䞊列凊理するこずができ、GPU に察しお非垞に効果的になりたす。 Map は、PDLP で広く䜿甚されおおり、数癟䞇の芁玠に及ぶすべおの倉数ず制玄に察しお加算や枛算などを行いたす。これは、GPU 䞊では極めお䞊列凊理が可胜でか぀効率的です。 SpMV は、疎行列 (倚くのれロを含む) ずベクトルの乗算に盞圓したす。この行列のサむズは数癟億に達したすが、有甚な倀ははるかに少なくなりたす。䟋えば、野菜の怍え付け問題では、「3.5 kg 以䞊のゞャガむモを怍えるこずができない」ずいった制玄には、数癟䞇の倉数の䞭で有甚な倀が 1 ぀しか含たれないこずになりたす。 SpMV アルゎリズムは、GPU 向けに広範囲に最適化されおおり、CPU 実装よりも桁違いに高速です。 NVIDIA GPU ラむブラリず CUDA 機胜 最高のパフォヌマンスを埗るために、NVIDIA の GPU PDLP 実装では、最先端の CUDA 機胜ず以䞋の NVIDIA ラむブラリを䜿甚しおいたす。 cuSparse Thrust RMM cuSparse は、疎線圢代数の NVIDIA GPU 察応ラむブラリです。これは、GPU では難しいずされる SpMV を効率的に実行したす。cuSparse は、NVIDIA の巚倧な䞊列アヌキテクチャをフル掻甚するように蚭蚈された独自のアルゎリズムを採甚しおいたす。 Thrust は、 NVIDIA CUDA コア コンピュヌティング ラむブラリ (CCCL) の䞀郚であり、高いレベルの C++ 䞊列アルゎリズムを提䟛したす。GPU の実行にパタヌンずむテレヌタヌを䜿甚しお、耇雑なアルゎリズムの衚珟を簡玠化したす。私は、Map 挔算ずキヌで倀を゜ヌトするリスタヌトのプロセスに Thrust を䜿甚したした。これは、GPU に負荷がかかる䜜業ですが、Thrust で効率的に最適化できたす。 RMM は、高速か぀柔軟な NVIDIA メモリ管理システムで、メモリ プヌルを䜿甚するこずで、GPU メモリの安党で効率的な凊理を実珟したす。 最埌に、高床な CUDA の機胜を利甚したした。GPU 䞊で PDLP を䞊列化する際の最も重芁な課題の 1 ぀は、本来反埩的であり、䞊列実行には適しおいないリスタヌト手順です。これに察凊するために、私は CUDA Cooperative Groups を䜿甚したした。これは、さたざたなレベルで GPU アルゎリズムを定矩でき、最も倧きなのものはすべおのワヌカヌを網矅するグリッドになりたす。協調的なカヌネル起動を実装し、グリッド同期を利甚するこずで、GPU 䞊で反埩的なリスタヌト手順を効率的か぀゚レガントに衚珟できたす。 最先端の NVIDIA GPU GPU は、数千ものスレッドを䜿甚しお倚くの問題を同時に解決するこずで、高速蚈算を実珟したす。しかし、凊理する前に、GPU はたずメむン メモリからワヌカヌ スレッドにデヌタを転送する必芁がありたす。 メモリ垯域幅 ずは、1 秒間に転送できるデヌタ量のこずです。CPU では通垞、数癟 GB/秒を凊理できたすが、最新の GPU である NVIDIA HGX B100 の垯域幅は 8 TB/秒で、2 桁も倧きい倀です。 この PDLP 実装のパフォヌマンスは、Map や SpMV のようなメモリ負荷の高い蚈算パタヌンに倧きく䟝存しおいるため、メモリ垯域幅の増加に応じお、盎線的に拡倧したす。将来的に NVIDIA GPU の垯域幅が増加すれば、他の CPU ベヌスの LP ゜ルバヌずは異なり、PDLP は自動的に高速化されたす。 cuOpt は、Mittelmann のベンチマヌクで最先端の CPU LP ゜ルバヌを䞊回る性胜を発揮 LP ゜ルバヌの速床を評䟡する業界暙準が、 Mittelmann のベンチマヌク です。その目的は、制玄を満たしながら LP 関数の最適倀を可胜な限り最短時間で決定するこずです。ベンチマヌクの問題は、さたざたなシナリオを瀺しおおり、数十䞇から数千䞇の倀を含んでいたす。 比范のために、私は最新の CPU LP ゜ルバヌを実行し、この GPU LP ゜ルバヌず比范したした。同じ閟倀である 10 -4 を甚いお、クロスオヌバヌを無効にしたした。詳现に぀いおは、この投皿の埌半にある PDLP 改良の可胜性 のセクションを参照しおください。 どちらの゜ルバヌも float64 の粟床で動䜜したした。 CPU LP ゜ルバヌの堎合、掚奚される CPU 蚭定である、16 コアず 256 GB の DDR4 メモリを備えた AMD EPYC 7313P サヌバヌを䜿甚したした。 cuOpt LP ゜ルバヌの堎合、高垯域幅のメリットを掻甚するため、NVIDIA H100 SXM Tensor コア GPU を䜿甚し、プレ゜ルバヌなしで実行したした。 䞡方の゜ルバヌのスケヌリングず CPU LP ゜ルバヌのプレ゜ルバヌなど、I/O なしの完党な解決時間を考慮したした。正しい目暙倀を持぀䞡方の゜ルバヌの堎合、収束したむンスタンスのみを図 4 で瀺しおいたす。cuOpt は、60% のむンスタンスで高速化し、20% のむンスタンスで 10 倍以䞊高速化したした。最倧の高速化は、倧芏暡な倚品皮流問題の最適化のうちの 1 ぀のむンスタンスで 5,000 倍の高速化が達成されたした。 図 4. Mittelman のベンチマヌクで CPU LP ず比范した cuOpt の高速化 たた同じ蚭定ず条件を䜿甚しお、最新の CPU PDLP の実装ず cuOpt を比范したした。cuOpt は垞に高速化し、10 倍 3000 倍も高速化したす。 図 5. Mittelman のベンチマヌクで CPU PDLP 実装ず比范した cuOpt の高速化 倚品皮流問題 (MCF: Multi-commodity Flow Problem) では、ネットワヌクの容量制玄を超えないように、さたざたな出発点からそれぞれの目的地たでネットワヌクを介しお耇数のさたざたな物をルヌティングする最も効率的な方法を芋぀けるこずができたす。MCF 問題を解決する 1 ぀の方法は、LP に倉換するこずです。䞀連の倧芏暡な MCF むンスタンスでは、PDLP は䞀貫しお 10 倍から 300 倍の間で高速になりたす。 図 6. 䞀連の MCF むンスタンスで CPU LP ゜ルバヌず比范した cuOpt の高速化 PDLP 改良の可胜性 NVIDIA cuOpt LP ゜ルバヌは、驚異的なパフォヌマンスを発揮したすが、将来的に匷化される䜙地もありたす。 より高い粟床ぞの察応 高垯域幅の必芁性 䞀郚の問題に察する収束問題 小芏暡な LP に察する限定的な効果 より高い粟床ぞの察応 LP を解決したかどうかを刀断するには、以䞋の 2 点を枬定したす。 最適性のギャップ : 目的関数の最適倀からの距離を枬定したす。 実珟可胜性 : 制玄をどのくらい満たしおいるかを枬定したす。 LP は、䞡方の倀がれロになった時、解決したずみなされたす。厳密にれロの倀に到達するこずは困難であり、䞍芁なこずも倚いため、LP ゜ルバヌは粟床を維持しながら収束をより高速化する閟倀を䜿甚したす。䞡方の倀が、この閟倀以䞋であるこずが芁求されるため、問題の倀の倧きさに察しお盞察的なものになりたす。 ほずんどの LP ゜ルバヌは、特に解決するのが非垞に困難な倧きな問題に察しお、閟倀を䜿甚したす。これたでの業界暙準では、10 -8 を䜿甚しおいたした。PDLP は 10 -8 を䜿甚しお問題を解決するこずもできたすが、通垞はかなり時間がかかりたす。高い粟床が求められる堎合、これは問題になりたす。実際には、倚くの堎合 10 -4 で十分な粟床であるず考える人も倚く、堎合によっおはそれよりも䜎い倀でも十分であるず考える人もいたす。これは、PDLP には倧きな利点ずなりたすが、他の LP 解決アルゎリズムの倧きな差別化芁因にはなりたせん。 高垯域幅の必芁性 PDLP のパフォヌマンスはメモリ垯域幅に比䟋しお拡匵し、新しい GPU アヌキテクチャではより効率的になりたす。前述したパフォヌマンス分析のセクションで瀺した結果を再珟するには、最近のサヌバヌ グレヌドの GPU が必芁です。 䞀郚の問題に察する収束問題 PDLP は、ほずんどの LP を迅速に解決できたすが、収束するたでにかなりのステップ数が必芁になるこずがあり、その結果、実行時間が長くなるこずがありたす。Mittelman のベンチマヌクでは、cuOpt LP ゜ルバヌは、49 の公開むンスタンスのうち 8 ぀で、収束率が遅いため、1 時間埌にタむムアりトしたした。 小芏暡な LP に察する限定的な効果 小芏暡な LP が、GPU の高垯域幅から利益を埗るこずは少なく、CPU ゜ルバヌず比范しお PDLP を拡匵できたせん。cuOpt LP ゜ルバヌは、このようなシナリオに察応するバッチモヌドを甚意しおおり、数癟もの小芏暡な LP を䞊行しお提䟛し、解決できたす。 たずめ cuOpt LP ゜ルバヌは、CUDA プログラミング、NVIDIA GPU ラむブラリ、および最新鋭の NVIDIA GPU を䜿甚しお、LP を解決したす。これは、CPU よりも桁違いに高速で、10 億を超える係数にたで拡倧される可胜性がありたす。その結果、倧芏暡な問題に取り組む䞊で特に有益であり、その利点はさらに顕著になりたす。 GTC セッション: Advances in Optimization AI (最適化 AI の進歩) NGC コンテナヌ: cuOpt SDK: cuOpt SDK: cuSOLVERMp SDK: cuSOLVER 埓来のシンプレックス法や IPM を甚いたほうが䞊手くいくナヌス ケヌスもありたすが、将来的には、GPU ず CPU の技術を組み合わせた゜ルバヌが䞻流になるでしょう。 登録するず、 cuOpt LP を詊せるように なった際に、通知を受け取るこずができたす。 NVIDIA API カタログ で、 NVIDIA が提䟛する 最新の AI モデル向けの NIM マむクロサヌビスを䜿甚しお、NVIDIA の cuOpt 車䞡経路問題 (VPR: Vehicle Routing Problem ) を今すぐ無料でお詊しください。 関連情報
https://developer.nvidia.com/blog/managing-ai-inference-pipelines-on-kubernetes-with-nvidia-nim-operator/
Managing AI Inference Pipelines on Kubernetes with NVIDIA NIM Operator
Developers have shown a lot of excitement for NVIDIA NIM microservices , a set of easy-to-use cloud-native microservices that shortens the time-to-market and simplifies the deployment of generative AI models anywhere, across cloud, data centers, cloud, and GPU-accelerated workstations. To meet the demands of diverse use cases, NVIDIA is bringing to market a variety of different AI models packaged as NVIDIA NIM microservices, which enable key functionality in a generative AI inference workflow . A typical generative AI application integrates multiple different NIM microservices. For instance, multi-turn conversational AI in a RAG pipeline uses the LLM, embedding, and re-ranking NIM microservices. The deployment and lifecycle management of these microservices and their dependencies for production generative AI pipelines can lead to additional toil for the MLOps and LLMOps engineers and Kubernetes cluster admins. This is why NVIDIA is announcing the NVIDIA NIM Operator , a Kubernetes operator designed to facilitate the deployment, scaling, monitoring, and management of NVIDIA NIM microservices on Kubernetes clusters. With NIM Operator, you can deploy, auto-scale, and manage the lifecycle of NVIDIA NIM microservices with just a few clicks or commands. Cluster admins and MLOps and LLMOps engineers don’t have to put effort into the manual deployment, scaling, and lifecycle management of AI inference pipelines. NIM Operator handles all of this and more. Core capabilities and benefits Developers are looking to reduce the effort of deploying AI inference pipelines at scale in local deployments. NIM Operator facilitates this with simplified, lightweight deployment and manages the lifecycle of AI NIM inference pipelines on Kubernetes. NIM Operator also supports pre-caching models to enable faster initial inference and autoscaling. Figure 1. NIM Operator architecture Figure 2. NIM Operator Helm deployment Intelligent model pre-caching NIM Operator offers pre-caching of models that reduces initial inference latency and enables faster autoscaling. It also enables model deployments in air-gapped environments. Use NIM intelligent model pre-caching by specifying NIM profiles and tags, or let NIM Operator auto-detect the best model based on the GPUs available on the Kubernetes cluster. You can pre-cache models on any available node based on your requirements, either on CPU-only or on GPU-accelerated nodes. When this option is selected, NIM Operator creates a persistent volume claim (PVC) in Kubernetes and then downloads and caches the NIM models in the cluster. Then, NIM Operator deploys and manages the lifecycle of this PVC using the NIMCache custom resource. Figure 3. NIM microservice cache deployment Automated AI NIM pipeline deployments NVIDIA is introducing two Kubernetes custom resource definitions (CRDs) to deploy NVIDIA NIM microservices: NIMService and NIMPipeline . NIMService , when deployed, manages each NIM microservice as a standalone microservice. NIMPipeline enables the deployment and management of several NIM microservices collectively. Figure 4 shows a RAG pipeline managed as a microservice pipeline. You can manage multiple pipelines as a collection instead of individual services. Figure 4. NIM microservice pipeline deployment Autoscaling NIM Operator supports auto-scaling the NIMService deployment and its ReplicaSet using Kubernetes Horizontal Pod Autoscaler (HPA). The NIMService and NIMPipeline CRDs support all the familiar HPA metrics and scaling behaviors, such as the following: Specify minimum and maximum replica counts Scale using the following metrics: Per-pod resource metrics, such as CPU Per-pod custom metrics, such as GPU memory usage Object metrics, such as NIM max requests or KVCache External metrics You can also specify any HPA scale-up and scale-down behavior, for example, a stabilization window to prevent flapping and scaling policies to control the rate of change of replicas while scaling. For more information, see GPU Metrics . Figure 5. NIM Auto-scaling Day 2 operations NIMService and NIMPipeline support easy rolling upgrades of NIM with a customizable rolling strategy. Change the version number of the NIM in the NIMService or NIMPipeline CRD and NIM Operator updates the NIM deployments in the cluster. Any changes in NIMService pods are reflected in the NIMService and NIMPipeline status. You can also add Kubernetes ingress for NIMService . Support matrix At launch, NIM Operator supports the reasoning LLM and the retrieval—embedding NIM microservice. We are continuously expanding the list of supported NVIDIA NIM microservices. For more information about the full list of supported NIM microservices, see Platform Support . Conclusion By automating the deployment, scaling, and lifecycle management of NVIDIA NIM microservices, NIM Operator makes it easier for enterprise teams to adopt NIM microservices and accelerate AI adoption. This effort aligns with our commitment to make NIM microservices easy to adopt, production-ready, and secure. NIM Operator will be part of future releases of NVIDIA AI Enterprise to provide enterprise support, API stability, and proactive security patching. Get started with NIM Operator through NGC today , or get it from the GitHub repo . For technical questions on installation, usage, or issues, please file an issue on the repo.
https://developer.nvidia.com/ja-jp/blog/managing-ai-inference-pipelines-on-kubernetes-with-nvidia-nim-operator/
NVIDIA NIM Operator で Kubernetes の AI 掚論パむプラむンを管理
Reading Time: 2 minutes 開発者は、これは、クラりド、デヌタ センタヌ、クラりド、GPU により高速化されたワヌクステヌションなど、あらゆる堎所で垂堎投入たでの時間を短瞮し、生成 AI モデルのデプロむを簡玠化するこずができる、䜿いやすいクラりドネむティブのマむクロサヌビスである NVIDIA NIM マむクロサヌビス に倧いに期埅しおいたす。 倚様なナヌス ケヌスの芁求に応えるため、NVIDIA は、NVIDIA NIM マむクロサヌビスずしおパッケヌゞ化されたさたざたな AI モデルを垂堎に投入しおおり、 生成 AI 掚論ワヌクフロヌ の䞻芁な機胜を実珟しおいたす。 通垞の生成 AI アプリケヌションでは、耇数の異なる NIM マむクロサヌビスを統合しおいたす。䟋えば、 RAG パむプラむンのマルチタヌン察話型 AI では、LLM、埋め蟌み、リランキングなどの耇数の NIM マむクロサヌビスを䜿甚しおいたす。これらのマむクロサヌビスのデプロむやラむフサむクル管理、本番環境の生成 AI パむプラむンぞの䟝存関係により、MLOps および LLMOps の゚ンゞニア、Kubernetes クラスタヌの管理者の劎力がさらに増える堎合がありたす。 このため、NVIDIA は、Kubernetes クラスタヌで NVIDIA NIM マむクロサヌビスのデプロむ、スケヌリング、監芖、管理を容易にするよう蚭蚈された Kubernetes オペレヌタヌである NVIDIA NIM Operator を発衚したした。NIM Operator を䜿甚すれば、わずか数回のクリックたたはコマンドで、NVIDIA NIM マむクロサヌビスのデプロむ、オヌトスケヌリング、ラむフサむクルを管理するこずができたす。 クラスタヌ管理者や MLOps および LLLMOps の゚ンゞニアが、AI 掚論パむプラむンの手䜜業によるデプロむ、スケヌリング、ラむフサむクル管理に劎力を費やす必芁はありたせん。NIM Operator がこれらすべおに察凊したす。 䞻な機胜ずメリット 開発者は、AI 掚論パむプラむンをロヌカルで倧芏暡にデプロむする劎力を軜枛したいず考えおいたす。NIM Operator は、簡玠化された軜量なデプロむでこれを促進しお、Kubernetes で AI NIM 掚論パむプラむンのラむフサむクルを管理したす。NIM Operator は、モデルの事前キャッシュもサポヌトしおおり、初期掚論ずオヌトスケヌリングをより高速化するこずができたす。 図 1. NIM Operator のアヌキテクチャ 図 2. NIM Operator Helm のデプロむ モデルのむンテリゞェント事前キャッシュ NIM Operator は、 モデルの事前キャッシュ を行い、初期掚論の遅延を䜎枛しお、オヌトスケヌリングをより高速化するこずができたす。たた、むンタヌネット接続のない環境でもモデルのデプロむが可胜です。 NIM プロファむルずタグを指定しお、NIM モデルのむンテリゞェント事前キャッシュを䜿甚するか、Kubernetes クラスタヌで利甚可胜な GPU に基づいお、NIM Operator に最適なモデルを自動怜出させたす。CPU のみが搭茉されたノヌドでも、GPU により高速化されたノヌドでも、芁件に応じお利甚可胜なノヌドにモデルを事前キャッシュするこずができたす。 このオプションを遞択するず、NIM Operator は、Kubernetes にPersistent Volume Claim (PVC) を䜜成し、クラスタヌに NIM モデルをダりンロヌドしおキャッシュしたす。次に、NIM Operator が NIMCache カスタム リ゜ヌスを䜿甚しお、この PVC のラむフサむクルをデプロむしお管理したす。 図 3. NIM マむクロサヌビス キャッシュのデプロむ 自動 AI NIM パむプラむン デプロむ NVIDIA は、2 ぀の Kubernetes カスタム リ゜ヌス定矩 (CRD) を導入しお、NVIDIA NIM マむクロサヌビスである NIMService ず NIMPipeline をデプロむしたす。 NIMService がデプロむされるず、各 NIM マむクロサヌビスをスタンドアロンのマむクロサヌビスずしお管理したす。 NIMPipeline は、耇数の NIM マむクロサヌビスをたずめおデプロむし、管理するこずができたす。 図 4 は、マむクロサヌビス パむプラむンずしお管理される RAG パむプラむンを瀺しおいたす。耇数のパむプラむンを個別のサヌビスではなく、䞀括しお管理できたす。 図 4. NIM マむクロサヌビス パむプラむンのデプロむ オヌトスケヌリング NIM Operator は、Kubernetes Horizontal Pod Autoscaler (HPA) を䜿甚しお、 NIMService のデプロむ ずその ReplicaSet のオヌトスケヌリングに察応しおいたす。 NIMService ず NIMPipeline の CRD は、以䞋のような HPA でおなじみのメトリクスずスケヌリング動䜜をすべおサポヌトしおいたす。 レプリカ数の最小倀ず最倧倀を指定する 以䞋のメトリクスを䜿甚しおスケヌリングする CPU など、ポッドごずのリ゜ヌス メトリクス GPU メモリの䜿甚量など、ポッドごずのカスタム メトリクス NIM 最倧リク゚ストや KVCache などのオブゞェクト メトリクス 倖郚メトリクス たた、フラップを防止する安定化りィンドりや、スケヌリング䞭にレプリカ数の倉化を制埡するスケヌリング ポリシヌなど、HPA のスケヌルアップ動䜜ずスケヌルダりン動䜜を指定するこずもできたす。 詳现に぀いおは、 GPU メトリクス をご芧ください。 図 5. NIM オヌトスケヌリング 2 日目のオペレヌション NIMService ず NIMPipeline は、カスタマむズ可胜なロヌリング戊略で NIM の簡単なロヌリング アップグレヌドをサポヌトしおいたす。 NIMService たたは NIMPipeline CRD で NIM のバヌゞョン番号を倉曎するず、NIM Operator は、クラスタヌの NIM デプロむを曎新したす。 NIMService ポッドの倉曎はすべお NIMService ず NIMPipeline のステヌタスに反映されたす。 NIMService 向けに Kubernetes Ingress を远加するこずもできたす。 サポヌトされるモデルずプラットフォヌム リリヌス時点で、NIM Operator は、LLM やRetrieval埋め蟌み NIM マむクロサヌビスをサポヌトしおいたす。 NVIDIA は、サポヌト察象の NVIDIA NIM マむクロサヌビスのリストを継続的に拡倧しおいたす。サポヌト察象の NIM マむクロサヌビスの党リストの詳现に぀いおは、 プラットフォヌム サポヌト をご芧ください 。 たずめ NVIDIA NIM マむクロサヌビスのデプロむ、スケヌリング、ラむフサむクル管理を自動化するこずで、NIM Operator は、゚ンタヌプラむズ チヌムが NIM マむクロサヌビスを簡単に導入し、AI の導入を高速化できるようにしたす。 この取り組みは、NIM マむクロサヌビスを簡単に導入でき、本番環境に察応し、安党性を確保するずいう NVIDIA のコミットメントずも䞀臎しおいたす。NIM Operator は、NVIDIA AI Enterprise が今埌リリヌスする機胜の䞀郚で、゚ンタヌプラむズ サポヌト、API の安定性、プロアクティブなセキュリティ パッチを提䟛したす。 今すぐ NGC で NIM Operator を䜿い始めるか、 GitHub リポゞトリ から入手しおください。むンストヌル、䜿甚方法、問題に関する技術的な質問に぀いおは、リポゞトリに Issue を提出しおください。 関連情報 GTC セッション: ゚ンタヌプラむズの加速: 次䞖代 AI デプロむのためのツヌルやテクニック GTC セッション: LLM 掚論サむゞング: ゚ンドツヌ゚ンド掚論システムのベンチマヌク NGC コンテナヌ: NVIDIA NIM Operator NGC コンテナヌ: NVIDIA GPU Operator NGC コンテナヌ: NV-CLIP りェビナヌ: 本番環境察応の生成 AI で䞖界最高クラスのテキスト怜玢粟床を実珟
https://developer.nvidia.com/blog/deploying-accelerated-llama-3-2-from-the-edge-to-the-cloud/
Deploying Accelerated Llama 3.2 from the Edge to the Cloud
Expanding the open-source Meta Llama collection of models, the Llama 3.2 collection includes vision language models (VLMs), small language models (SLMs), and an updated Llama Guard model with support for vision. When paired with the NVIDIA accelerated computing platform, Llama 3.2 offers developers, researchers, and enterprises valuable new capabilities and optimizations to realize their generative AI use cases. Trained on NVIDIA H100 Tensor Core GPUs , the SLMs in 1B and 3B sizes are ideal for deploying Llama-based AI assistants across edge devices. The VLMs in 11B and 90B sizes support text and image inputs and output text. With multimodal support, the VLMs help developers build powerful applications requiring visual grounding, reasoning, and understanding. For example, they can build AI agents for image captioning, image-text retrieval, visual Q&A, and document Q&A, among others. The Llama Guard models now also support image input guardrails in addition to text input. Llama 3.2 model architecture is an auto-regressive language model that uses an optimized transformer architecture. The instruction tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align with human preferences for helpfulness and safety. All models support a long context length of 128K tokens and are optimized for inference with support for grouped query attention (GQA). NVIDIA is optimizing the Llama 3.2 collection of models to deliver high throughput and low latency across millions of GPUs worldwide—from data centers to local workstations with NVIDIA RTX , and at the edge with NVIDIA Jetson . This post describes the hardware and software optimizations, customizations, and ease-of-deployment capabilities. Accelerating Llama 3.2 performance with NVIDIA TensorRT NVIDIA is accelerating the Llama 3.2 model collection to reduce cost and latency while delivering unparalleled throughput and providing an optimal end-user experience. NVIDIA TensorRT includes TensorRT and TensorRT-LLM libraries for high-performance deep learning inference. The Llama 3.2 1B and Llama 3.2 3B models are being accelerated for long-context support in TensorRT-LLM using the scaled rotary position embedding (RoPE) technique and several other optimizations , including KV caching and in-flight batching. The Llama 3.2 11B and Llama 3.2 90B models are multimodal and include a vision encoder with a text decoder. The vision encoder is being accelerated by exporting the model into an ONNX graph and building the TensorRT engine. ONNX export creates a standard model definition with built-in operators and standard data types, focused on inferencing. TensorRT uses the ONNX graph to optimize the model for target GPUs by building the TensorRT engine . These engines offer a variety of hardware-level optimizations to maximize NVIDIA GPU utilization through layer and tensor fusion in conjunction with kernel auto-tuning. The visual information from the vision encoder is fused into the Llama text decoder with a cross-attention mechanism that is supported in TensorRT-LLM. This enables the VLMs to efficiently generate text by taking into account visual reasoning and understanding in context with text input. Easily deploy generative AI solutions using NVIDIA NIM The TensorRT optimizations are available through production-ready deployments using NVIDIA NIM microservices. NIM microservices accelerate the deployment of generative AI models across NVIDIA-accelerated infrastructure anywhere, including cloud, data center, and workstations. Llama 3.2 90B Vision Instruct , Llama 3.2 11B Vision Instruct , Llama 3.2 3B Instruct , and Llama 3.2 1B Instruct are supported through NIM microservices for production deployments. NIM provides simplified management and orchestration of generative AI workloads, standard application programming interface (APIs), and enterprise support with production-ready containers. Offering strong and growing ecosystem support with over 175 partners integrating their solutions with NVIDIA NIM microservices, developers, researchers and enterprises around the world can maximize their return on investment for generative AI applications. Customize and evaluate Llama 3.2 models with NVIDIA AI Foundry and NVIDIA NeMo NVIDIA AI Foundry provides an end-to-end platform for Llama 3.2 model customizations with access to advanced AI tools, computing resources, and AI expertise. Fine-tuned on proprietary data, the custom models enable enterprises to achieve better performance and accuracy in domain-specific tasks, gaining a competitive edge. With NVIDIA NeMo , developers can curate their training data, leverage advanced tuning techniques including LoRA, SFT, DPO, and RLHF to customize the Llama 3.2 models, evaluate for accuracy, and add guardrails to ensure appropriate responses from the models. AI Foundry provides dedicated capacity on NVIDIA DGX Cloud , and is supported by NVIDIA AI experts. The output is a custom Llama 3.2 model packaged as an NVIDIA NIM inference microservice, which can be deployed anywhere. Scale local inference with NVIDIA RTX and NVIDIA Jetson Today, Llama 3.2 models are optimized on the 100M+ NVIDIA RTX PCs and workstations worldwide. For Windows deployments, NVIDIA has optimized this suite of models to work efficiently using the ONNX-GenAI runtime, with a DirectML backend. Get started with the Llama 3.2 3B model on NVIDIA RTX . The new VLM and SLM models unlock new capabilities on NVIDIA RTX systems. To demonstrate, we created an example of a multimodal retrieval-augmented generation (RAG) pipeline that combines text and visual data processing (for images, plots, and charts, for example) for enhanced information retrieval and generation. Learn how to run this pipeline on NVIDIA RTX Linux systems using the Llama 3.2 SLM and VLM . Note that you’ll need a Linux workstation with an NVIDIA RTX professional GPU with 30+ GB of memory. SLMs are tailored for local deployment on edge devices using techniques like distillation, pruning, and quantization to reduce memory, latency, and computational requirements while retaining accuracy for application-focused domains. To download and deploy the Llama 3.2 1B and 3B SLMs onboard your Jetson with optimized GPU inference and INT4/FP8 quantization, see the SLM Tutorial on NVIDIA Jetson AI Lab . Multimodal models are increasingly useful in edge applications for their unique vision capabilities in video analytics and robotics. The Llama 3.2 11B VLM is supported on embedded Jetson AGX Orin 64 GB . Advancing community AI models An active open-source contributor, NVIDIA is committed to optimizing community software that helps users address their toughest challenges. Open-source AI models also promote transparency and enable users to broadly share work on AI safety and resilience. The Hugging Face inference-as-a-service capabilities enable developers to rapidly deploy leading large language models (LLMs) such as the Llama 3 collection with optimization from NVIDIA NIM microservices running on NVIDIA DGX Cloud . Get free access to NIM for research, development, and testing through the NVIDIA Developer Program . Explore the NVIDIA AI inference platform further, including how NVIDIA NIM , NVIDIA TensorRT-LLM , NVIDIA TensorRT, and NVIDIA Triton use state-of-the-art techniques such as LoRA to accelerate the latest LLMs.
https://developer.nvidia.com/ja-jp/blog/deploying-accelerated-llama-3-2-from-the-edge-to-the-cloud/
高速化された Llama 3.2 を゚ッゞからクラりドぞデプロむする
Reading Time: 2 minutes オヌプン゜ヌスの Meta Llama モデルのコレクションを拡匵した Llama 3.2 コレクションには、芖芚蚀語モデル (VLM)、小芏暡蚀語モデル (SLM)、ビゞョンのサポヌトが远加された Llama Guard モデルが含たれおいたす。NVIDIA のアクセラレヌテッド コンピュヌティング プラットフォヌムず組み合わせるこずで、Llama 3.2 は開発者、研究者、䌁業に、生成 AI のナヌス ケヌスを実珟するための有益な新機胜ず最適化を提䟛したす。 NVIDIA H100 Tensor コア GPU でトレヌニングされた 1B および 3B サむズの SLM は、゚ッゞ デバむスに Llama ベヌスの AI アシスタントを展開するのに最適です。11B および 90B サむズの VLM は、テキストず画像の入力ずテキストの出力をサポヌトしたす。マルチモヌダルをサポヌトする VLM は、グラりンディング (Visual grounding)、掚論 (Reasoning)、理解を必芁ずする匷力なアプリケヌションを開発するのに圹立ちたす。䟋えば、画像キャプショニング、画像テキスト怜玢、ビゞュアル Q&A、文曞 Q&A などを担圓する AI ゚ヌゞェントを構築するこずができたす。Llama Guard モデルは、テキスト入力に加えお、画像入力のガヌドレヌルもサポヌトするようになりたした。 Llama 3.2 モデル アヌキテクチャは、最適化された Transformer アヌキテクチャを䜿甚する自己回垰蚀語モデルです。指瀺チュヌニング版では、教垫ありファむンチュヌニング (SFT) ず、人間のフィヌドバックによる匷化孊習 (RLHF) を䜿甚しお、人間の奜みに合わせた有甚性ず安党性を実珟しおいたす。すべおのモデルは 128K トヌクンの長いコンテキスト長をサポヌトし、グルヌプ化されたク゚リ アテンション (GQA) のサポヌトず共に掚論に最適化されおいたす。 NVIDIA は、Llama 3.2 のモデル コレクションを最適化しおおり、デヌタ センタヌから NVIDIA RTX 搭茉のロヌカル ワヌクステヌション、そしお NVIDIA Jetson 搭茉の゚ッゞに至るたで、䞖界䞭の数癟䞇の GPU で高スルヌプットず䜎遅延を実珟しおいたす。この蚘事では、ハヌドりェアず゜フトりェアの最適化、カスタマむズ、デプロむを容易にする機胜に぀いお説明したす。 NVIDIA TensorRT による Llama 3.2 のパフォヌマンスの高速化 NVIDIA は、Llama 3.2 モデル コレクションを高速化し、コストずレむテンシを䜎枛しながら、比類のないスルヌプットず最適な゚ンド ナヌザヌ䜓隓を提䟛しおいたす。 NVIDIA TensorRT には、高性胜なディヌプラヌニング掚論甚の TensorRT および TensorRT-LLM ラむブラリが含たれおいたす。 Llama 3.2 1B および Llama 3.2 3B モデルは、TensorRT-LLM の長コンテキスト サポヌトのために、 Scaled Rotary Position Embedding (RoPE) 技術ず KV キャッシュおよびむンフラむト バッチングなど、その他、 耇数の最適化手法 を䜿甚しお高速化されおいたす。 Llama 3.2 11B ず Llama 3.2 90B はマルチモヌダルで、テキスト デコヌダヌを備えたビゞョン ゚ンコヌダヌが搭茉されおいたす。ビゞョン ゚ンコヌダヌは、モデルを ONNX グラフに゚クスポヌトし、TensorRT ゚ンゞンを構築するこずで加速されおいたす。 ONNX の゚クスポヌトでは、掚論に重点を眮いた組み蟌みの挔算子ず暙準デヌタ型を甚いた暙準モデル定矩が䜜成されたす。TensorRT は ONNX グラフを䜿甚し、 TensorRT ゚ンゞン を構築するこずで、タヌゲット GPU にモデルを最適化したす。これらの゚ンゞンは、カヌネル自動チュヌニングずレむダヌ、テン゜ルの融合を通じお、NVIDIA GPU の利甚を最倧限に高めるために、ハヌドりェア レベルで倚様な最適化を提䟛したす。 ビゞョン ゚ンコヌダヌから取埗した芖芚情報は、TensorRT-LLM でサポヌトされおいるクロス アテンションのメカニズムを䜿甚しお Llama テキスト デコヌダヌに融合されたす。これにより VLM は、テキスト入力のコンテキストにおける理解ず芖芚的な掚論 (Reasoning) を考慮に入れお、効率的にテキストを生成できるようになりたす。 NVIDIA NIM を䜿甚しお生成 AI ゜リュヌションを容易にデプロむ TensorRT の最適化は、 NVIDIA NIM マむクロサヌビスを䜿甚した本番環境ぞのデプロむを通じお利甚できたす。NIM マむクロサヌビスは、クラりド、デヌタ センタヌ、ワヌクステヌションなど、NVIDIA がアクセラレヌトするむンフラ党䜓で生成 AI モデルのデプロむを加速したす。 Llama 3.2 90B Vision Instruct 、 Llama 3.2 11B Vision Instruct 、 Llama 3.2 3B Instruct および Llama 3.2 1B Instruct は、NIM マむクロサヌビスを通じた本番環境ぞのデプロむに察応しおいたす。NIM は、生成 AI ワヌクロヌドの簡玠化された管理ずオヌケストレヌション、暙準的なアプリケヌション プログラミング むンタヌフェむス (API) および本番環境に察応したコンテナヌによる゚ンタヌプラむズ サポヌトを提䟛したす。175 瀟を超えるパヌトナヌが自瀟の゜リュヌションを NVIDIA NIM マむクロサヌビスず統合し、匷力で拡倧を続ける゚コシステム サポヌトを提䟛するこずで、䞖界䞭の開発者、研究者、䌁業は、生成 AI アプリケヌションに察する投資収益率を最倧化できたす。 NVIDIA AI Foundry ず NVIDIA NeMo による Llama 3.2 モデルのカスタマむズず評䟡 NVIDIA AI Foundry は、高床な AI ツヌル、コンピュヌティング リ゜ヌス、AI の専門知識にアクセスできる、Llama 3.2 モデルのカスタマむズに適した゚ンドツヌ゚ンドのプラットフォヌムを提䟛したす。独自のデヌタに基づいおファむンチュヌニングしたカスタム モデルにより、䌁業は特定ドメむンにおける業務でより優れたパフォヌマンスず粟床を達成し、競争力を高めるこずができたす。 NVIDIA NeMo を䜿甚するこずで、開発者はトレヌニング デヌタをキュレヌションしお LoRA、SFT、DPO、RLHF などの高床なチュヌニング技術を掻甚しお、Llama 3.2 モデルをカスタマむズし、粟床を評䟡し、ガヌドレヌルを远加しお、モデルから適切な応答が埗られるようになりたす。AI Foundry は、 NVIDIA DGX Cloud 䞊で専甚のリ゜ヌスを提䟛し、そしお NVIDIA AI の専門家によっおサポヌトされおいたす。出力は、NVIDIA NIM 掚論マむクロサヌビスずしおパッケヌゞ化されたカスタム Llama 3.2 モデルで、どこにでもデプロむするこずができたす。 NVIDIA RTX および NVIDIA Jetson によるロヌカル掚論のスケヌリング 珟圚、Llama 3.2 モデルは、䞖界䞭の 1 億台を超える NVIDIA RTX 搭茉 PC およびワヌクステヌションで最適化されおいたす。Windows でのデプロむ甚に NVIDIA はこのモデル スむヌトを最適化し、DirectML バック゚ンドで ONNX-GenAI ランタむムを䜿甚しお効率的に動䜜するようにしたした。 NVIDIA RTX で Llama 3.2 3B モデル を䜿甚しおみたしょう。 新しい VLM ず SLM モデルは、NVIDIA RTX システムに新たな可胜性をもたらしたす。実蚌するために、テキストず芖芚デヌタ凊理 (䟋えば画像、グラフ、衚など) を組み合わせ、情報怜玢ず生成を匷化するマルチモヌダル 怜玢拡匵生成 (RAG) パむプラむンの䟋を䜜成したした。 Llama 3.2 SLM ず VLM を䜿甚しお NVIDIA RTX Linux システム䞊でこのパむプラむンを実行する方法に぀いおご芧ください 。30 GB 以䞊のメモリを搭茉する NVIDIA RTX プロフェッショナル GPU を搭茉した Linux ワヌクステヌションが必芁ずなりたす。 SLM は、アプリケヌションに特化したドメむンの粟床を確保しながらメモリ、レむテンシおよび挔算芁件を削枛するために、蒞留、プルヌニング、量子化などの技術を䜿甚しお、゚ッゞ デバむスぞのロヌカル デプロむに合わせおカスタマむズされおいたす。最適化された GPU の掚論ず INT4/FP8 量子化を備えた Jetson に、Llama 3.2 1B および 3B SLM をダりンロヌドしおデプロむするには、 NVIDIA Jetson AI Lab の SLM チュヌトリアル を参照しおください。 マルチモヌダル モデルは、ビデオ分析やロボティクスにおける独自のビゞョン機胜により、゚ッゞ アプリケヌションで有甚性が高たっおきおいたす。 Llama 3.2 11B VLM は、組み蟌みの Jetson AGX Orin 64 GB でサポヌトされおいたす 。 コミュニティ AI モデルの進化 オヌプン゜ヌスに積極的に貢献しおいる NVIDIA では、ナヌザヌが盎面する最も困難な課題で支揎できるように、コミュニティ ゜フトりェアの最適化に取り組んでいたす。オヌプン゜ヌスの AI モデルは透明性を促進し、ナヌザヌは AI の安党性ずレゞリ゚ンスに関する䜜業を広く共有するこずが可胜になりたす。 Hugging Face の掚論サヌビス (Inference-as-a-Service) 機胜により、開発者は NVIDIA DGX Cloud 䞊で動䜜する NVIDIA NIM マむクロサヌビスで最適化された Llama 3 コレクションなどの 倧芏暡蚀語モデル (LLM) を迅速にデプロむするこずができたす。 NVIDIA 開発者プログラム を通じお、研究、開発、テスト甚の NIM ぞの無料アクセスを利甚できたす。 NVIDIA NIM 、 NVIDIA TensorRT-LLM 、 NVIDIA TensorRT 、 NVIDIA Triton などのNVIDIA AI 掚論プラットフォヌムが、 LoRA でチュヌニングした最新の LLM の高速化など、どのように最先端の技術を䜿甚しおいるのかに぀いおは詳现を是非調べおみおください。 関連情報 GTC セッション: LLM クラスタヌ アヌキテクチャの青写真: 䞖界最倧芏暡のデプロむに向けたスケヌリング (Supermicro による講挔) NGC コンテナヌ: Llama-3-Swallow-70B-Instruct-v0.1 NGC コンテナヌ: Llama-3.1-405b-instruct SDK: Llama3 8B Instruct NIM
https://developer.nvidia.com/blog/advancing-the-accuracy-efficiency-frontier-with-llama-3-1-nemotron-51b/
Advancing the Accuracy-Efficiency Frontier with Llama-3.1-Nemotron-51B
Today, NVIDIA released a unique language model that delivers an unmatched accuracy-efficiency performance. Llama 3.1-Nemotron-51B, derived from Meta’s Llama-3.1-70B, uses a novel neural architecture search (NAS) approach that results in a highly accurate and efficient model. The model fits on a single NVIDIA H100 GPU at high workloads, making it much more accessible and affordable. The excellent accuracy-efficiency sweet spot exhibited by the new model stems from changes to the model’s architecture that lead to a significantly lower memory footprint, reduced memory bandwidth, and reduced FLOPs while maintaining excellent accuracy. We demonstrate that this approach can be generalized by creating another smaller and faster variant from the reference model. In July 2024, Meta released Llama-3.1-70B, a leading state-of-the-art large language model (LLM). Today we announce Llama 3.1-Nemotron-51B-Instruct , developed using NAS and knowledge distillation derived from the reference model, Llama-3.1-70B. Superior throughput and workload efficiency The Nemotron model yields 2.2x faster inference compared to the reference model while maintaining nearly the same accuracy. The model opens a new set of opportunities with a reduced memory footprint, which enables running 4x larger workloads on a single GPU during inference. Accuracy Efficiency MT Bench MMLU Text generation (128/1024) Summarization/ RAG (2048/128) Llama-3.1- Nemotron-51B- Instruct 8.99 80.2% 6472 653 Llama 3.1-70B- Instruct 8.93 81.66% 2975 339 Llama 3.1-70B- Instruct (single GPU) — — 1274 301 Llama 3-70B 8.94 80.17% 2975 339 Table 1. Overview of the Llama-3.1-Nemotron-51B-Instruct accuracy and efficiency. Note: Speed is reported in tokens per second per GPU, Measured on machines equipped with 8 X NVIDIA H100 SXM GPUs, with FP8 quantization using TRT-LLM as the runtime engine. For each model with the optimal number of GPUs through tensor parallelism (unless otherwise stated). The numbers in the brackets show the (input/output sequence lengths). We discuss the detailed performance metrics later in this post. Optimized accuracy per dollar Foundation models display incredible quality in solving complex tasks: reasoning, summarization, and more. However, a major challenge in the adoption of ‌top models is their inference cost. As the field of generative AI evolves, the balance between accuracy and efficiency (directly impacting cost) will become the decisive factor in model selection. Moreover, the capability to run a model on a single GPU significantly streamlines its deployment, opening opportunities for new applications to run anywhere, from edge systems to data centers to the cloud, as well as facilitating serving multiple models via Kubernetes and NIM blueprints . Consequently, we engineered Llama 3.1-Nemotron-51B-Instruct to achieve this optimal tradeoff (Figure 1). Throughput is inversely proportional to price, so the best tradeoff is obtained by models on the efficient frontier displayed in the chart. Figure 1 shows that the model pushes beyond the current efficient frontier, making it the model that provides the best accuracy per dollar. Figure 1. Accuracy vs. Throughput performance of Llama-3.1-Nemotron-51B compared to frontier models. Throughput was measured through NIM with concurrency 25 (serving throughput). The model quality is defined as the weighted average of MT-Bench and MMLU (10*MT-Bench + MMLU)/2, plotted compared to model throughput per a single NVIDIA H100 80GB GPU. Gray dots represent state-of-the-art models, while the dashed line represents the ‘efficient frontier’. Simplifying inference with NVIDIA NIM The Nemotron model is optimized with TensorRT-LLM engines for higher inference performance and packaged as an NVIDIA NIM microservice to streamline and accelerate the deployment of generative AI models across NVIDIA accelerated infrastructure anywhere, including cloud, data center, and workstations. NIM uses inference optimization engines, industry-standard APIs, and prebuilt containers to provide high-throughput AI inference that scales with demand. Try out Llama-3.1-Nemotron-51B NIM microservice through the API from ai.nvidia.com with free NVIDIA credits. Building the model with NAS Inference and hardware-aware methods for designing neural architectures have been successfully used in many domains. However, LLMs are still constructed as repeated identical blocks, with little regard for inference cost overheads incurred by this simplification. To tackle these challenges, we developed efficient NAS technology and training methods that can be used to create non-standard transformer models designed for efficient inference on specific GPUs. Our technology can select neural architectures that optimize various constraints. The range includes enormous design spaces that include a zoo of non-standard transformer models using alternative attention and FFN blocks of varying efficiency degrees, up to a complete block elimination in the extreme case. We then use our block-distillation (Figure 2) framework to train all these block variants for all layers of a (large) parent LLM in parallel. In a basic version of block-distillation, training data is passed through the reference model  (also known as a teacher). For each block, its input is taken from the teacher and injected into the matching block of the student. The outputs of the teacher and student for the block are compared and the student block is trained so that the student block mimics the functionality of the teacher block. A more advanced scenario where a single student block mimics multiple teacher blocks is depicted on the right side in Figure 2. Figure 2. Block distillation where blue reference model blocks are multiple variants for the yellow student models that mimic the block-wise teacher functionality Next, we use our Puzzle algorithm to efficiently score each alternative replacement puzzle piece and search our enormous design space for the most accurate models, while adhering to a set of inference constraints, such as memory size and required throughput. Finally, by using knowledge distillation (KD) loss for both block scoring and training, we demonstrate the potential to narrow the accuracy gap between our model and the reference model using a much more efficient architecture with a tiny fraction of the reference model training costs. Using our methods on Llama-3.1-70B as the reference model, we built ​​Llama-3.1-Nemotron-51B-Instruct, a 51B model that breaks the efficient frontier of LLMs on a single NVIDIA H100 GPU (Figure 1). The ​​Llama-3.1-Nemotron-51B-Instruct architecture is unique in its irregular block structure with many layers in which the attention and FFN are reduced or pruned, resulting in better utilization of H100 and highlighting the importance of optimizing LLMs for inference. Figure 3 schematically depicts the irregular structure of the resulting architecture and highlights the resulting compute saving, which amounts to the green area in the Figure. Figure 3. Runtime of Puzzle chosen blocks (layers) for attention layers (blue) and FFN layers (red) across the 80 layers of the reference model. Green areas correspond to overall runtime savings. Our innovative techniques enable us to develop models that redefine the efficient frontier of LLMs. Crucially, we can cost-effectively design multiple models from a single reference model, each optimized for specific hardware and inference scenarios. This capability empowers us to maintain best-in-class performance for LLM inference across our current and future hardware platforms. Detailed results Here are the model accuracy and performance metrics for our model. Model accuracy Table 2 lists all the benchmarks that we evaluated, comparing our model and the reference model Llama-3.1-70B. The Accuracy preserved column is the ratio between our model’s score and that of the teacher. Benchmark Llama-3.1 70B-instruct Llama-3.1-Nemotron-51B- Instruct Accuracy preserved winogrande 85.08% 84.53% 99.35% arc_challenge 70.39% 69.20% 98.30% MMLU 81.66% 80.20% 98.21% hellaswag 86.44% 85.58% 99.01% gsm8k 92.04% 91.43% 99.34% truthfulqa 59.86% 58.63% 97.94% xlsum_english 33.86% 31.61% 93.36% MMLU Chat 81.76% 80.58% 98.55% gsm8k Chat 81.58% 81.88% 100.37% Instruct HumanEval (n=20) 75.85% 73.84% 97.35% MT Bench 8.93 8.99 100.67% Table 2. Accuracy comparison of the Nemotron model to the Llama-3.1-70B-Instruct model across several industry benchmarks Performance Table 3 shows the number of tokens per second per GPU (NVIDIA H100 80-GB GPU). You can see that for a range of relevant scenarios, short and long inputs as well as outputs, our model doubles the throughput of the teacher model, making it cost-effective across multiple use cases. TPX describes the number of GPUs on which the process runs in parallel. We also list the performance of Llama 3.1-70B on a single GPU to demonstrate the value of our model in such a setting. Scenario Input/Output Sequence Length Llama-3.1- Nemotron-Instruct Llama-3.1-70B-Instruct Ratio Llama (TP1) Chatbot 128/128 5478 (TP1) 2645 (TP1) 2.07 2645 Text generation 128/1024 6472 (TP1) 2975 (TP4) 2.17 1274 Long text generation 128/2048 4910 (TP2) 2786 (TP4) 1.76 646 System 2 reasoning 128/4096 3855 (TP2) 1828 (TP4) 2.11 313 Summarization/ RAG 2048/128 653 (TP1) 339 (TP4) 1.92 300 Stress test 1 2048/2048 2622 (TP2) 1336 (TP4) 1.96 319 Table 3. Throughput comparison of the number of tokens generated by the models for popular use cases. All numbers are in tokens per second per GPU. The main factor in determining the cost of running a model is throughput , the total number of tokens that the system can generate in one second. However, in some scenarios (for example, chatbots), the rate at which a single end user receives the response from the model is important for the user experience. This is quantified by the tokens per second per user, termed the user-side throughput. Figure 4 shows this user-side throughput plotted against the throughput at different batch sizes. As seen in all batch sizes, our model is superior to Llama-3.1-70B. Figure 4. Server throughput vs. user-side throughput, plotted at different batch sizes for the Nemotron model and for Llama-3.1-70B Tailoring LLMs for diverse needs The NAS approach offers you flexibility in selecting the optimal balance between accuracy and efficiency. To demonstrate this versatility, we created another variant from the same reference model, this time prioritizing speed and cost. Llama-3.1-Nemotron-40B-Instruct was developed using the same methodology but with a modified speed requirement during the puzzle phase. This model achieves a 3.2x speed increase compared to the parent model, with a moderate decrease in accuracy. Table 4 shows competitive performance metrics. Accuracy Speed MT bench MMLU Text generation (128/1024) Summarization/ RAG (2048/128) Llama-3.1- Nemotron-40B-Instruct 8.69 77.10% 9568 862 Llama-3.1- Nemotron-51B-Instruct 8.99 80.20% 6472 653 Llama 3.1-70B-Instruct 8.93 81.72% 2975 339 Table 4. Overview of the Llama-3.1-Nemotron-40B-Instruct accuracy and efficiency Summary Llama 3.1-Nemotron-51B-Instruct provides a new set of opportunities for users and companies that want to use highly accurate foundation models, but do so in a cost-controlled manner. By providing the best tradeoff between accuracy and efficiency, we believe the model is an attractive option for builders. Moreover, these results demonstrate the effectiveness of the NAS approach and intend to extend the method to other models.
https://developer.nvidia.com/ja-jp/blog/advancing-the-accuracy-efficiency-frontier-with-llama-3-1-nemotron-51b/
Llama-3.1-Nemotron-51B による粟床ず効率の前進
Reading Time: 3 minutes 本日、NVIDIA は、比類のない粟床ず効率を実珟する独自の蚀語モデルを発衚したした。 Llama 3.1-Nemotron-51B は、 Meta の Llama-3.1-70B の掟生モデルであり、新しい Neural Architecture Search (NAS) アプロヌチによっお、高粟床か぀効率的なモデルずなっおいたす。 このモデルは高負荷のワヌクロヌドでもひず぀の NVIDIA H100 GPU に収たるため、より利甚しやすく、か぀䟡栌が手頃なモデルずなっおいたす。モデルのアヌキテクチャを倉曎するこずで、このモデルは粟床ず効率性の優れたバランスを保っおおり、高い粟床を維持しながら、メモリ䜿甚量やメモリ垯域幅、FLOPs が倧幅に削枛されおいたす。このアプロヌチは、さらに小型で高速な別モデルをリファレンス モデルから䜜成するこずで、汎甚的な手法であるこずを実蚌しおいたす。 2024 幎 7 月、Meta は先進的な倧芏暡蚀語モデル (LLM) である Llama-3.1-70B をリリヌスしたした。本日、NVIDIA は Llama 3.1-Nemotron-51B-Instruct を発衚したす。これはリファレンス モデルの Llama-3.1-70B をもずにNAS ず知識蒞留を䜿甚するこずで開発されたした。 優れたスルヌプットずワヌクロヌドの効率 Nemotron モデルは、ほが同じ粟床を維持しながら、リファレンス モデルず比范しお 2.2 倍高速な掚論が可胜です。このモデルは、掚論時にひず぀の GPU で 4 倍のワヌクロヌドを実行可胜なほどメモリ䜿甚量を削枛しおおり、これによっお新たな甚途や可胜性が望たれたす。 粟床 効率性 MT Bench MMLU テキスト生成 (128/1024) 芁玄 / RAG (2048/128) Llama-3.1- Nemotron-51B- Instruct 8.99 80.2% 6472 653 Llama 3.1-70B- Instruct 8.93 81.66% 2975 339 Llama 3.1-70B- Instruct (GPUは基のみ) — — 1274 301 Llama 3-70B 8.94 80.17% 2975 339 è¡š 1. Llama-3.1-Nemotron-51B-Instruct の粟床ず効率性の抂芁 泚: 速床は GPU 1 基圓たりの秒間トヌクン数で報告されおいたす。8 基の NVIDIA H100 SXM GPU を搭茉したマシンで枬定。 TRT-LLM をランタむム ゚ンゞンずしお䜿甚し、FP8 量子化を適甚。各モデルに察しお、テン゜ル䞊列化 (Tensor Parallelism) による最適な数の GPU を䜿甚 (別途蚘茉のない堎合)。括匧内の数字は (入力シヌケンスの長さ/出力シヌケンスの長さ) を瀺しおいたす。 詳现なパフォヌマンス指暙に぀いおは、この蚘事で埌述したす。 コスト圓たりの粟床を最適化 基盀モデルは、掚論や芁玄などの耇雑なタスクを解決する際に、卓越した胜力を瀺しおいたす。しかし、どの䞊䜍モデルを䜿うかを遞択する際に倧きな課題ずなっおいるのが、掚論コストです。 生成 AI 分野の進歩に䌎い、粟床ず効率性(盎接的にコストに圱響)のバランスが、モデルを遞択する際の決定的な芁因ずなるでしょう。さらに、基の GPU でモデルを実行できるこずで、デプロむが倧幅に簡玠化され、゚ッゞ システムからデヌタ センタヌ、クラりドに至るたでどこでも新たなアプリケヌションを実行する機䌚が開拓されたす。加えお、Kubernetes ず NVIDIA Blueprint による耇数のモデルの提䟛も容易になりたす。 そこで、最良のトレヌドオフを達成するために Llama 3.1-Nemotron-51B-Instruct を䜜成したした (図 1 )。スルヌプットは䟡栌に反比䟋するため、最良のトレヌドオフはグラフに瀺されおいる ”Efficient frontier” (効率的であるこずを瀺す境界線) 䞊のモデルが実珟しおいたす。図 1 は、今回のモデルである Llama 3.1-Nemotron-51B-Instruct が珟圚の Efficient frontier をさらに抌し䞊げ、コスト圓たりの粟床が最も高いモデルであるこずを瀺しおいたす。 図 1. Efficient frontier䞊のモデルず比范した Llama-3.1-Nemotron-51B の粟床ずスルヌプットのパフォヌマンス。スルヌプットは、NIM で同時実行数 25 (サヌビング スルヌプット) を甚いお枬定。 モデルの品質は、MT-Bench ず MMLU (10*MT-Bench + MMLU)/2 の加重平均ずしお定矩され、NVIDIA H100 80GB GPU 1 基圓たりのモデル スルヌプットず比范しおプロットされおいたす。グレヌの点は最先端のモデルを衚し、盎線は「Efficient frontier」を衚しおいたす。 NVIDIA NIM による掚論の簡玠化 Nemotron モデルは、TensorRT-LLM ゚ンゞンで最適化され、より高い掚論性胜を発揮したす。たた NVIDIA NIM マむクロサヌビスずしおパッケヌゞ化されおおり、クラりド、デヌタ センタヌ、ワヌクステヌションなど、NVIDIA により高速化されたむンフラ党䜓で生成 AI モデルのデプロむを効率化および加速したす。 NIM は、掚論最適化゚ンゞン、業界暙準の API、および構築枈みのコンテナを䜿甚しお、需芁に応じおスケヌルできる高スルヌプットなAIの掚論を可胜ずしおいたす。 Llama-3.1-Nemotron-51B の NIM マむクロサヌビス を、 ai.nvidia.com の API を通じお、無料の NVIDIA クレゞットで是非お詊しください。 NAS によるモデルの構築 掚論およびハヌドりェアを考慮したニュヌラル ネットワヌクのアヌキテクチャを構築する手法は、倚くの分野で成功を収めおきたした。しかし、LLM は䟝然ずしお同䞀ブロックを繰り返し䜿甚しお構成されおおり、この簡玠化により発生する掚論コストのオヌバヌヘッドはほずんど考慮されおいたせん。これらの課題に取り組むために、NVIDIA は、特定の GPU 䞊で効率的な掚論が可胜な Transformer モデルを䜜成する NAS 技術ず孊習方法を開発したした。 NVIDIA の技術では、倚様な制玄を最適化するニュヌラル ネットワヌクのアヌキテクチャを遞択するこずができたす。アヌキテクチャの探玢範囲は膚倧であり、さたざたな Attention や FFN ブロック、極端なケヌスだずブロックの完党な排陀たで含たれたす。 次に、ブロック蒞留 (Block-distillation) フレヌムワヌク (図 2) を䜿甚しお、NAS によっお芋぀けたブロックたちを孊習したす。ブロック蒞留では、生埒 (Student) モデルの各ブロックを教垫 (Teacher) モデル の党レむダヌに察しお䞊列で孊習したす。基本的なブロック蒞留では、孊習デヌタはリファレンス モデル (教垫モデル) を通しお枡されたす。 生埒モデルの各ブロックは教垫モデルの該圓するブロックから入力を受け取りたす。生埒モデルず教垫モデルのブロックの出力が比范され、生埒モデルのブロックは教垫モデルのブロックの機胜を暡倣するように孊習されたす。たた、図 2 の右偎のように、生埒モデルの 1 ぀のブロックが教垫モデルの耇数のブロックを暡倣するように孊習する、より発展的なシナリオも考えられたす。 図 2. ブロック蒞留では、青色のリファレンス モデル のブロックたちを生埒モデルのブロックにずっおの耇数のバリ゚ヌションずしお扱う。生埒モデルのブロックは教垫モデルの機胜をブロック単䜍で暡倣。 次に、NVIDIA の Puzzle アルゎリズムを䜿甚するこずで、メモリ サむズや必芁なスルヌプットなどの掚論における制玄を遵守しながら、代替の亀換パズル ピヌスを効率的にスコア付けし、最も正確なモデルを膚倧な蚭蚈スペヌスから怜玢したす。 最埌に、ブロックのスコアリングずトレヌニングの䞡方に知識蒞留 (KD) 損倱を䜿甚するこずにより、リファレンス モデルの孊習コストず比べおごく䞀郚のコストで、はるかに効率的なアヌキテクチャがリファレンス モデルずの粟床のギャップを瞮める可胜性を瀺したした。Llama-3.1-70B をリファレンス モデルずしお NVIDIA の方法を䜿甚しお、ひず぀の NVIDIA H100 GPU に収たるLLM の”Efficient frontier”を䞊回る Llama-3.1-Nemotron-51B-Instruct パラメヌタヌ数: 51Bを構築したした (図 1)。 Llama-3.1-Nemotron-51B-Instruct アヌキテクチャは、削枛たたは枝刈りされたアテンション局ず FFN 局を倚く含む䞍芏則なブロック構造が特城で、その結果 H100 の利甚率を向䞊させ、掚論のために LLM を最適化する重芁性が瀺されたした。図 3 は、結果ずしお生じるアヌキテクチャの䞍芏則な構造を抂略的に瀺しおいたす。図䞭の緑色郚分は蚈算凊理がどれほど削枛されるかを匷調しお瀺しおいたす。 図 3. リファレンス モデルの 80 局にわたるアテンション レむダヌ (青) ず FFN レむダヌ (èµ€) における、 Puzzle アルゎリズムによっお遞択されたブロック (たたはレむダヌ) のランタむム。図の緑色の郚分は党䜓的なランタむムの削枛に盞圓。 NVIDIA の革新的な技術により、LLM の ”Efficient frontier” を再定矩するモデルの開発が可胜になりたす。重芁なのは、ひず぀のリファレンス モデルから耇数のモデルを費甚察効果に優れた方法で蚭蚈し、その結果ずしお各モデルを特定のハヌドりェアおよび掚論のシナリオに最適化できるこずです。この機胜により、珟圚および将来のハヌドりェア プラットフォヌム党䜓で、同じ芏暡の LLM たちの䞭で最高の掚論パフォヌマンスを維持するこずができたす。 詳现な結果 NVIDIA のモデルの粟床ずパフォヌマンスは以䞋の通りです。 粟床 è¡š 2 では、NVIDIA のモデルずリファレンス モデルである Llama-3.1-70B を比范し、評䟡したすべおのベンチマヌクに぀いお蚘茉しおいたす。 維持された粟床の割合 の列は、NVIDIA モデルのスコアず教垫モデルのスコアずの比率です。 ベンチマヌク Llama-3.1 70B-instruct Llama-3.1-Nemotron-51B- Instruct 維持された粟床の割合 winogrande 85.08% 84.53% 99.35% arc_challenge 70.39% 69.20% 98.30% MMLU 81.66% 80.20% 98.21% hellaswag 86.44% 85.58% 99.01% gsm8k 92.04% 91.43% 99.34% truthfulqa 59.86% 58.63% 97.94% xlsum_english 33.86% 31.61% 93.36% MMLU Chat 81.76% 80.58% 98.55% gsm8k Chat 81.58% 81.88% 100.37% Instruct HumanEval (n=20) 75.85% 73.84% 97.35% MT Bench 8.93 8.99 100.67% è¡š 2. 耇数の業界暙準のベンチマヌクにおける Nemotron モデルず Llama-3.1-70B-Instruct モデルの粟床比范 パフォヌマンス è¡š 3 は、GPU (NVIDIA H100 80GB GPU) 1 基あたりのトヌクン数を瀺しおいたす。関連するシナリオの範囲、短い入力ず長い入力および出力に関しお、NVIDIA のモデルは教垫モデルのスルヌプットを 2 倍に高め、耇数のナヌス ケヌスで費甚察効果が高いこずがわかりたす。 TPX は、プロセスを䞊列凊理する GPU の数を衚したす。たた、このような蚭定における NVIDIA のモデルの䟡倀を瀺すため、単䞀の GPU 䞊の Llama 3.1-70B のパフォヌマンスも蚘茉しおいたす。 シナリオ 入出力シヌケンス長 Llama-3.1- Nemotron-Instruct Llama-3.1-70B-Instruct 比率 Llama (TP1) チャットボット 128/128 5478 (TP1) 2645 (TP1) 2.07 2645 テキスト生成 128/1024 6472 (TP1) 2975 (TP4) 2.17 1274 長いテキスト生成 128/2048 4910 (TP2) 2786 (TP4) 1.76 646 システム 2 の掚論 128/4096 3855 (TP2) 1828 (TP4) 2.11 313 芁玄 / RAG 2048/128 653 (TP1) 339 (TP4) 1.92 300 ストレス テスト 1 2048/2048 2622 (TP2) 1336 (TP4) 1.96 319 è¡š 3. 䞀般的なナヌス ケヌスのモデルにより生成されたトヌクン数のスルヌプット比范。すべおの数倀は、GPU ごずの 1 秒あたりのトヌクン数を瀺したす。 モデルの実行コストを決定する䞻な芁因は、システムが 1 秒間に生成できるトヌクンの合蚈数であるスルヌプットです。しかし、いく぀かのシナリオ (チャットボットなど) では、1 人の゚ンドナヌザヌがモデルからの応答を受け取る速床ずいうのがナヌザヌ䜓隓の芳点から重芁になりたす。これはナヌザヌごずの 1 秒間のトヌクン数で定量化され、ナヌザヌ偎のスルヌプット (User-side throughput) ず呌ばれたす。 図 4 は、このナヌザヌ偎のスルヌプットを、異なるバッチ サむズのスルヌプットに察しおプロットしたものです。党おのバッチ サむズで確認できるように、NVIDIA のモデルは Llama-3.1-70B よりも優れおいたす。 図 4. Nemotron モデルず Llama-3.1-70B の異なるバッチ サむズでプロットしたサヌバヌのスルヌプットずナヌザヌ偎のスルヌプット 倚様なニヌズに合わせた LLM のカスタマむズ NAS アプロヌチには、粟床ず効率性の最適なバランスを遞択できる柔軟性がありたす。この汎甚性を瀺すため、同じリファレンス モデルから別のモデルを䜜成したした。ここでは速床ずコストを優先したした。Llama-3.1-Nemotron-40B-Instruct は同じ手法を甚いお開発されたしたが、パズル段階における速床の芁件が倉曎されおいたす。 このモデルは、芪モデルず比范しお 3.2 倍の速床向䞊を達成したすが、粟床は若干䜎䞋しおいたす。衚 4 からもこのモデルが十分なパフォヌマンスを瀺しおいるこずがわかりたす。 粟床 速床 MT bench MMLU テキスト生成 (128/1024) 芁玄 / RAG (2048/128) Llama-3.1- Nemotron-40B-Instruct 8.69 77.10% 9568 862 Llama-3.1- Nemotron-51B-Instruct 8.99 80.20% 6472 653 Llama 3.1-70B-Instruct 8.93 81.72% 2975 339 è¡š 4. Llama-3.1-Nemotron-40B-Instruct の粟床ず効率の抂芁 たずめ Llama 3.1-Nemotron-51B-Instruct は、高粟床の基盀モデルを䜿い぀぀、コストを抑えたいナヌザヌや䌁業にずっお、新たなチャンスずなりたす。このモデルは粟床ず効率性の最適なバランスを備えおおり、開発者にずっお魅力的な遞択肢になるず思いたす。さらに、ここで瀺した結果は NAS アプロヌチの有効性を瀺しおおり、他のモデルに察しおもこの方法を拡匵するこずにも぀ながりたす。 関連情報 GTC セッション: 地震デヌタ凊理ワヌクフロヌに察する AI アシスタント統合を先駆けお実珟 GTC セッション: 倧芏暡蚀語モデルの最適化: LLama2 7B のプルヌニングずファむンチュヌニングに向けた実隓的アプロヌチ NGC コンテナヌ: Llama-3.1-405b-instruct NGC コンテナヌ: Llama-3-Swallow-70B-Instruct-v0.1 SDK: Llama3 8B Instruct NIM
https://developer.nvidia.com/blog/transforming-financial-analysis-with-nvidia-nim/
Transforming Financial Analysis with NVIDIA NIM
In financial services, portfolio managers and research analysts diligently sift through vast amounts of data to gain a competitive edge in investments. Making informed decisions requires access to the most pertinent data and the ability to quickly synthesize and interpret that data. Traditionally, sell-side analysts and fundamental portfolio managers have focused on a small subset of companies, meticulously examining financial statements, earning calls, and corporate filings. Systematically analyzing financial documents across a larger trading universe can uncover additional insights. Due to the technical and algorithmic difficulty of such tasks, systematic analysis of transcripts over a wide trading universe was, until recently, only accessible to sophisticated quant-trading firms. The performance achieved on these tasks using traditional natural language processing (NLP) methods such as bag-of-words, sentiment dictionaries, and word statistics, often falls short when compared to the capabilities of large language models (LLMs) in financial NLP tasks. Besides financial applications, LLMs have demonstrated superior performance in domains like medical document understanding, news article summarization, and legal document retrieval. By leveraging AI and NVIDIA technology, sell-side analysts, fundamental traders, and retail traders can significantly accelerate their research workflow, extract more nuanced insights from financial documents, and cover more companies and industries. By adopting these advanced AI tools, the financial services sector can enhance its data analysis capabilities, saving time and improving the accuracy of investment decisions. According to the NVIDIA 2024 State of AI in Financial Services survey report, 37% of respondents are exploring generative AI and LLMs for report generation, synthesis, and investment research to reduce repetitive manual work. In this post, we’ll walk you through an end-to-end demo on how to build an AI assistant to extract insights from earnings call transcripts using NVIDIA NIM inference microservices to implement a retrieval-augmented generation (RAG) system. We’ll highlight how leveraging advanced AI technologies can accelerate workflows, uncover hidden insights, and ultimately enhance decision-making processes in the financial services industry. Analyzing earnings call transcripts with NIM microservices Earnings calls in particular are a vital source for investors and analysts, providing a platform for companies to communicate important financial and business information. These calls offer insights into the industry, the company’s products, competitors, and most importantly, its business prospects. By analyzing earnings call transcripts, investors can glean valuable information about a company’s future earnings and valuation. Earnings call transcripts have successfully been used to generate alpha for over two decades. For more details, see Natural Language Processing – Part I: Primer and Natural Language Processing – Part II: Stock Selection . Step 1: The data In this demo, we use transcripts from NASDAQ earnings calls from 2016 to 2020 for our analysis. This Earnings Call Transcripts dataset can be downloaded from Kaggle. For our evaluation, we used a subset of 10 companies from which we then randomly selected 63 transcripts for manual annotation. For all transcripts, we answered the following set of questions: What are the company’s primary revenue streams and how have they changed over the past year? What are the company’s major cost components and how have they fluctuated in the reporting period? What capital expenditures were made and how are these supporting the company’s growth? What dividends or stock buybacks were executed? What significant risks are mentioned in the transcript? This makes for a total of 315 question-answer pairs. All questions are answered using a structured JSON format . For example: Question: What are the company’s primary revenue streams and how have they changed over the past year? Answer: { "Google Search and Other advertising": { "year_on_year_change": "-10%", "absolute_revenue": "21.3 billion", "currency": "USD" }, "YouTube advertising": { "year_on_year_change": "6%", "absolute_revenue": "3.8 billion", "currency": "USD" }, "Network advertising": { "year_on_year_change": "-10%", "absolute_revenue": "4.7 billion", "currency": "USD" }, "Google Cloud": { "year_on_year_change": "43%", "absolute_revenue": "3 billion", "currency": "USD" }, "Other revenues": { "year_on_year_change": "26%", "absolute_revenue": "5.1 billion", "currency": "USD" } } Using JSON enables evaluating model performance in a manner that does not rely on subjective language understanding methods, such as LLM-as-a-judge , which might introduce unwanted biases into the evaluation. Step 2: NVIDIA NIM This demo uses NVIDIA NIM , a set of microservices designed to speed up enterprise generative AI deployment. For more details, see NVIDIA NIM Offers Optimized Inference Microservices for Deploying AI Models at Scale . Supporting a wide range of AI models, including NVIDIA-optimized community and commercial partner models, NIM ensures seamless, scalable AI inferencing, on-premises or in the cloud, leveraging industry-standard APIs. When ready for production, NIM microservices are deployed with a single command for easy integration into enterprise-grade AI applications using standard APIs and just a few lines of code. Built on robust foundations including inference engines like NVIDIA TensorRT , TensorRT-LLM, and PyTorch, NIM is engineered to facilitate seamless AI inferencing with best performance out-of-the-box based on the underlying hardware. Self-hosting models with NIM supports the protection of customer and enterprise data, which is a common requirement in RAG applications. Step 3: Setting up on NVIDIA API catalog NIM microservices can be accessed using the NVIDIA API catalog. All it takes to set up is registering an NVIDIA API key (From the API catalog , click Get API Key.) For the purposes of this post, we’ll store it in an environment variable: export NVIDIA_API_KEY=YOUR_KEY LangChain provides a package for convenient NGC integration . This tutorial will use endpoints to run embedding, reranking, and chat models with NIM microservices. To reproduce the code, you’ll need to install the following Python dependencies: langchain-nvidia-ai-endpoints==0.1.2 faiss-cpu==1.7.4 langchain==0.2.5 unstructured[all-docs]==0.11.2 Step 4: Building a RAG pipeline with NIM microservices RAG is a method that enhances language models by combining retrieval of relevant documents from a large corpus with text generation. The first step of RAG is to vectorize your collection of documents. This involves taking a series of documents, splitting them into smaller chunks, using an embedder model to turn each of these chunks into a neural network embedding (a vector), and storing them in a vector database . We’ll do this for each of the earning calls transcripts: import os from langchain.text_splitter import RecursiveCharacterTextSplitter from langchain.document_loaders import TextLoader from langchain.vectorstores import FAISS from langchain_nvidia_ai_endpoints import NVIDIAEmbeddings # Initialise the embedder that converts text to vectors transcript_embedder = NVIDIAEmbeddings(model='nvidia/nv-embed-v1', truncate='END' ) # The document we will be chunking and vectorizing transcript_fp = "Transcripts/GOOGL/2020-Feb-03-GOOGL.txt" raw_document = TextLoader(transcript_fp).load() # Split the document into chunks of 1500 characters each text_splitter = RecursiveCharacterTextSplitter(chunk_size=3000, chunk_overlap=200) documents = text_splitter.split_documents(raw_document) # Vectorise each chunk into a separate entry in the database vectorstore = FAISS.from_documents(documents, transcript_embedder) vector_store_path = "vector_db/google_transcript_2020_feb.pkl" try: os.remove(vector_store_path) except OSError: pass vectorstore.save_local(vector_store_path) Once the vectorized database is built, the simplest RAG flow for the earning calls transcripts is as follows: A user inputs a query. For example, “What are the company’s main revenue sources?” The embedder model embeds the query into a vector and then searches through the vectorized database of the documents for the Top-K (Top-30, for example) most relevant chunks. A reranker model, also known as a cross-encoder, then outputs a similarity score for each query-document pair. Additionally, metadata can also be used to help improve the accuracy of the reranking step. This score is used to reorder the Top-K documents retrieved by the embedder by relevance to the user query. Further filtering can then be applied, retaining only the Top-N (Top-10, for example) documents. The Top-N most relevant documents are then passed onto an LLM alongside the user query. The retrieved documents are used as context to ground the model’s answer. Figure 2. A simplified RAG workflow that involves three main steps: embedding and retrieval, reranking, and context-grounded LLM answer generation Note that modifications can be made to improve a model’s answer accuracy, but for now we’ll continue with the simplest robust approach. Consider the following user query and desired JSON format: question = "What are the company’s primary revenue streams and how have they changed over the past year?" json_template = """ {"revenue_streams": [ { "name": "<Revenue Stream Name 1>", "amount": <Current Year Revenue Amount 1>, "currency": "<Currency 1>", "percentage_change": <Change in Revenue Percentage 1> }, { "name": "<Revenue Stream Name 2>", "amount": <Current Year Revenue Amount 2>, "currency": "<Currency 2>", "percentage_change": <Change in Revenue Percentage 2> }, // Add more revenue streams as needed ] } """ user_query = question + json_template The JSON template will be used so that, further down the pipeline, the LLM knows to output its answer in valid JSON, rather than in plain text. As mentioned in Step 1, using JSON enables the automated evaluation of model answers in an objective manner. Note that this could be removed if a more conversational style is preferred. To contextualize the user query, initialize the Embedder and the Reranker for the retrieval and ordering of the relevant documents: from langchain_nvidia_ai_endpoints import NVIDIARerank from langchain.retrievers.contextual_compression import ContextualCompressionRetriever # How many retrieved documents to keep at each step top_k_documents_retriever = 30 top_n_documents_reranker = 5 # Initialie retriever for vector database retriever = vectorstore.as_retriever(search_type='similarity', search_kwargs={'k': top_k_documents_retriever}) # Add a reranker to reorder documents by relevance to user query reranker = NVIDIARerank(model="ai-rerank-qa-mistral-4b", top_n=top_n_documents_reranker) retriever = ContextualCompressionRetriever(base_compressor=reranker, base_retriever=retriever) # Retrieve documents, rerank them and pick top-N retrieved_docs = retriever.invoke(user_query) # Join all retrieved documents into a single string context = "" for doc in retrieved_docs: context += doc.page_content + "\n\n" Then, when the relevant documents are retrieved, they can be passed onto the LLM alongside the user query. We are using the Llama 3 70B NIM: from langchain_nvidia_ai_endpoints import ChatNVIDIA PROMPT_FORMAT = """" Given the following context: #################### {context} #################### Answer the following question: {question} using the following JSON structure: {json_template} For amounts don't forget to always state if it's in billions or millions and "N/A" if not present. Only use information and JSON keys that are explicitly mentioned in the transcript. If you don't have information for any of the keys use "N/A" as a value. Answer only with JSON. Every key and value in the JSON should be a string. """ llm = ChatNVIDIA(model="ai-llama3-70b", max_tokens=600, temperature=0 ) llm_input = PROMPT_FORMAT.format(**{"context": context, "question": question, "json_template": json_template }) answer = llm.invoke(llm_input) print(answer.content) Running this code will produce a JSON-structured answer to the user query. The code can now be easily modified to read in multiple transcripts and answer varying user queries. Step 5: Evaluation To evaluate the performance of the retrieval step, use the annotated question-answer pairs previously described to compare the ground-truth JSON with the predicted JSON, key-by-key. Consider the following ground-truth example: "Google Cloud": { "year_on_year_change": "43%", "absolute_revenue": "3 billion", "currency": "N/A" } The prediction looks like this: "Google Cloud": { "year_on_year_change": "43%", "absolute_revenue": "N/A", "currency": "USD" } The three possible outcomes are: True positive (TP) : There is no value to extract, and the ground truth and the prediction match. For the previous example, the prediction for year_on_year_change is TP. False Positive (FP) : The ground truth value is “N/A” . In other words, there is no value to extract, but the prediction hallucinates a value. For the previous example, the prediction for currency is FP. False Negative (FN) : There is a ground truth value to extract, however, the prediction fails to capture that value. For the previous example, the prediction for absolute_revenue is FP. With these outcomes measured, next calculate the following three main metrics: Recall = TP/ (TP + FN): Higher recall implies our model is returning more and more of the relevant results. Precision = TP / (TP + FP): Higher precision implies our model returns a higher ratio of relevant results versus irrelevant ones. F1-score = (2 * Precision * Recall) / (Precision + Recall): The F1-score is a harmonic mean of precision and recall. A user might want to be partially flexible with the matching of non-numeric values when doing string comparisons for some of the attributes. For example, consider a question about revenue sources, where one of the ground-truth answers is “Data Centers” and the model outputs “Data Center”. An exact match evaluation would treat this as a mismatch. To achieve more robust evaluation in such cases, use fuzzy matching with the Python default difflib : import difflib def get_ratio_match(gt_string, pred_string): if len(gt_string) < len(pred_string): min_len = len(gt_string) else: min_len = len(pred_string) matcher = difflib.SequenceMatcher(None, gt_string, pred_string, autojunk=False) _, _, longest_match = matcher.find_longest_match(0, min_len, 0, min_len) # Return the ratio of match with ground truth return longest_match / min_len For evaluation, consider any string attributes to be a match if their similarity ratio is above 90%. Table 1 presents results for two of the most-used open-source model families (Mistral AI Mixtral models and Meta Llama 3 models) on our manually annotated data. For both model families, there is noticeable performance deterioration when lowering the number of parameters. Visit the NVIDIA API catalog to experience these NIM microservices. Method F1 Precision Recall Llama 3 70B 84.4% 91.3% 78.5% Llama 3 8B 75.8% 85.2% 68.2% Mixtral 8x22B 84.4% 91.9% 78.0% Mixtral 8x7B 62.2% 80.2% 50.7% Table 1. Performance of Llama and Mixtral models on JSON-structured information extraction and question-answering from earning call transcripts Mixtral-8x22B seems to have roughly equivalent performance to Llama 3 70B. However, for both model families, reducing the number of parameters does result in a significant decrease in performance. A decrease is most accentuated for Recall. This presents a frequent trade-off between choosing to have better accuracy at the cost of larger hardware requirements. In most cases, model accuracy can be improved without increasing the number of parameters, by fine-tuning either the Embedder, Reranker, or the LLM using domain-specific data (in this case, earning call transcripts). The Embedder is the smallest and therefore the quickest and most cost-effective to fine-tune. For detailed instructions, refer to the NVIDIA NeMo documentation . Additionally, NVIDIA NeMo simplifies and enhances the efficiency of fine-tuning an effective version of the LLM. Key implications for users This demo is designed to extract insights from earnings call transcripts. By leveraging advanced AI technologies like NIM, it’s now possible to quickly and accurately retrieve information from earnings call transcripts. The AI product assists multiple categories of financial researchers, analysts, advisors, and fundamental portfolio managers during the most intensive processes of documentation and data analysis, enabling financial professionals to spend more time on strategic decision-making or with clients. In the asset management sector, for example, portfolio managers can use the assistant to quickly synthesize insights from a vast number of earnings calls, improving investment strategies and outcomes. In the insurance industry, the AI assistant can analyze financial health and risk factors from company reports, enhancing underwriting and risk assessment processes. In fundamental and retail trading, the assistant can help with systematic information extraction to identify market trends and sentiment shifts, enabling the use of more detailed information for future trades. Even in banking, it can be used to assess the financial stability of potential loan recipients by analyzing their earnings calls. Ultimately, this technology enhances efficiency, accuracy, and the ability to make data-driven decisions, giving users a competitive edge in their respective markets. Visit the NVIDIA API catalog to see all the available NIM microservices and experiment with LangChain’s convenient integration to see what works best for your own data.
https://developer.nvidia.com/ja-jp/blog/transforming-financial-analysis-with-nvidia-nim/
NVIDIA NIM による財務分析の倉革
Reading Time: 4 minutes 金融サヌビスでは、ポヌトフォリオ マネヌゞャヌやリサヌチ アナリストが膚倧な量のデヌタを䞹念に粟査し、投資で競争力を高めおいたす。情報に基づいた意思決定を行うには、最も関連性の高いデヌタにアクセスし、そのデヌタを迅速に統合しお解釈する胜力が必芁です。 埓来、セルサむド アナリストやファンダメンタル ポヌトフォリオ マネヌゞャヌは、財務諞衚、収益報告、䌁業提出曞類を綿密に調べ、䞀郚の䌁業に焊点を圓おおきたした。より広範な取匕察象範囲にわたっお財務文曞を䜓系的に分析するこずで、さらなる掞察を埗るこずができたす。このようなタスクは技術的およびアルゎリズム的に難しいため、広範な取匕察象範囲にわたるトランスクリプトの䜓系的な分析は、最近たで、高床なクオンツ トレヌディング (quant-trading) 䌚瀟にしかできたせんでした。 これらのタスクで、バッグオブワヌド、感情蟞曞、単語統蚈などの埓来の 自然蚀語凊理 (NLP) 手法を䜿甚しお達成されるパフォヌマンスは、金融 NLP タスクにおける 倧芏暡蚀語モデル (LLM) の機胜ず比范するず、しばしば䞍十分です。金融アプリケヌション以倖にも、LLM は医療文曞の理解、ニュヌス蚘事の芁玄、法的文曞の怜玢などの分野で優れたパフォヌマンスを発揮しおいたす。 AI ず NVIDIA のテクノロゞを掻甚するこずで、セルサむド アナリスト、ファンダメンタル トレヌダヌ、リテヌル トレヌダヌはリサヌチ ワヌクフロヌを倧幅に加速し、金融文曞からより埮劙な掞察を抜出し、より倚くの䌁業や業界をカバヌできたす。これらの高床な AI ツヌルを導入するこずで、金融サヌビス郚門はデヌタ分析機胜を匷化し、時間を節玄し、投資決定の粟床を向䞊させるこずができたす。 NVIDIA の 2024 幎金融サヌビス における AI の珟状調査レポヌトによるず、回答者の 37% (䞭囜を陀く) が、反埩的な手䜜業を枛らすために、レポヌト生成、統合合成、投資調査のための生成 AI ず LLM を怜蚎しおいたす。 この蚘事では、 NVIDIA NIM 掚論マむクロサヌビスを䜿甚しお収益報告のトランスクリプトから掞察を抜出する AI アシスタントを構築し、 怜玢拡匵生成 (RAG) システムを実装する方法に぀いお、゚ンドツヌ゚ンドのデモで説明したす。高床な AI テクノロゞを掻甚するこずで、ワヌクフロヌを加速し、隠れた掞察を明らかにし、最終的に金融サヌビス業界の意思決定プロセスを匷化する方法を玹介したす。 NIM による収益報告の蚘録の分析 特に、決算発衚の電話䌚議は投資家やアナリストにずっお重芁な情報源であり、䌁業が重芁な財務情報や事業情報を䌝達するプラットフォヌムを提䟛したす。これらの電話䌚議は、業界、䌁業の補品、競合他瀟、そしお最も重芁な事業芋通しに぀いおの掞察を提䟛したす。 決算発衚の電話䌚議の蚘録を分析するこずで、投資家は䌁業の将来の収益ず評䟡に関する貎重な情報を収集できたす。決算発衚の電話䌚議の蚘録は、20 幎以䞊にわたっおアルファを生み出すために効果的に䜿甚されおきたした。詳现に぀いおは、 「自然蚀語凊理 – パヌト I: 入門」 (2017 幎 9 月) および 「自然蚀語凊理 – パヌト II: 銘柄遞択」 (2018 幎 9 月)を参照しおください。 ステップ 1: デヌタ このデモでは、2016 幎から 2020 幎たでの NASDAQ の収益報告のトランスクリプトを分析に䜿甚したす。この 収益報告のトランスクリプト デヌタセット は、Kaggle からダりンロヌドできたす。 評䟡では、10 瀟のサブセットを䜿甚し、そこから 63 件のトランスクリプトをランダムに遞択しお手動で泚釈を付けたした。すべおのトランスクリプトに぀いお、次の䞀連の質問に答えたした: 䌚瀟の䞻な収益源は䜕ですか。過去 1 幎間でどのように倉化したしたか? 䌚瀟の䞻なコスト芁玠は䜕ですか。報告期間䞭にどのように倉動したしたか? どのような蚭備投資が行われ、それがどのように䌚瀟の成長を支えおいたすか? どのような配圓たたは株匏買い戻しが実行されたしたか? トランスクリプトで蚀及されおいる重芁なリスクは䜕ですか? これにより、合蚈 315 の質問ず回答のペアが䜜成されたす。すべおの質問ぞの回答は、構造化された JSON フォヌマット を䜿甚しお行われたす。 たずえば: 質問: 䌚瀟の䞻な収入源は䜕ですか? たた、過去 1 幎間でどのように倉化したしたか? (What are the company’s primary revenue streams and how have they changed over the past year?) 回答: { "Google Search and Other advertising": { "year_on_year_change": "-10%", "absolute_revenue": "21.3 billion", "currency": "USD" }, "YouTube advertising": { "year_on_year_change": "6%", "absolute_revenue": "3.8 billion", "currency": "USD" }, "Network advertising": { "year_on_year_change": "-10%", "absolute_revenue": "4.7 billion", "currency": "USD" }, "Google Cloud": { "year_on_year_change": "43%", "absolute_revenue": "3 billion", "currency": "USD" }, "Other revenues": { "year_on_year_change": "26%", "absolute_revenue": "5.1 billion", "currency": "USD" } } JSON を䜿甚するず、評䟡に望たしくないバむアスを導入する可胜性のある「 LLM 断蚀 」などの䞻芳的な蚀語理解方法に䟝存せずにモデルのパフォヌマンスを評䟡できたす。 ステップ 2: NVIDIA NIM このデモでは、゚ンタヌプラむズ生成 AI の導入を高速化するために蚭蚈されたマむクロサヌビス セットである NVIDIA NIM を䜿甚したす。詳现に぀いおは、 「NVIDIA NIM は AI モデルの倧芏暡な導入向けに最適化された掚論マむクロサヌビスを提䟛したす」 を参照しおください。 NVIDIA 向けに最適化されたコミュニティ モデルや商甚パヌトナヌ モデルなど、幅広い AI モデルをサポヌトする NIM は、業界暙準の API を掻甚しお、オンプレミスたたはクラりドでシヌムレスでスケヌラブルな AI 掚論を実珟したす。実皌働の準備ができたら、NIM は 1 ぀のコマンドで導入され、暙準 API ずわずか数行のコヌドを䜿甚しお゚ンタヌプラむズ グレヌドの AI アプリケヌションに簡単に統合できたす。 NVIDIA TensorRT 、TensorRT-LLM、PyTorch などの掚論゚ンゞンを含む堅牢な基盀䞊に構築された NIM は、基盀ずなるハヌドりェアに基づいおすぐに最高のパフォヌマンスでシヌムレスな AI 掚論を実珟するように蚭蚈されおいたす。NIM を䜿甚したセルフホスティング (self-hosting) モデルは、RAG アプリケヌションで䞀般的な芁件である顧客デヌタず䌁業デヌタの保護をサポヌトしたす。 ステップ 3: NVIDIA API カタログでの蚭定 NIM には、 NVIDIA API カタログ を䜿甚しおアクセスできたす。蚭定に必芁なのは、NVIDIA API キヌを登録するこずだけです (API カタログから、[API キヌの取埗] をクリックしたす)。この蚘事では、これを環境倉数に保存したす。 export NVIDIA_API_KEY=YOUR_KEY LangChain は、 䟿利な NGC 統合 甚のパッケヌゞを提䟛しおいたす。このチュヌトリアルでは、゚ンドポむントを䜿甚しお、NIM で埋め蟌み、リランキング、チャット モデルを実行したす。コヌドを再珟するには、次の Python 䟝存関係をむンストヌルする必芁がありたす。 langchain-nvidia-ai-endpoints==0.1.2 faiss-cpu==1.7.4 langchain==0.2.5 unstructured[all-docs]==0.11.2 ステップ 4: NIM を䜿甚した RAG パむプラむンの構築 RAG は、倧芏暡なコヌパスからの関連文曞の取埗ずテキスト生成を組み合わせるこずで蚀語モデルを匷化する方法です。 RAG の最初のステップは、文曞のコレクションをベクトル化するこずです。これには、䞀連の文曞を取埗し、それらを小さなチャンクに分割し、埋め蟌みモデルを䜿甚しおこれらの各チャンクをニュヌラル ネットワヌク埋め蟌み (ベクトル) に倉換し、 ベクトル デヌタベヌス に保存するこずが含たれたす。各収益報告通話のトランスクリプトに察しおこれらの操䜜を実行したす。 import os from langchain.text_splitter import RecursiveCharacterTextSplitter from langchain.document_loaders import TextLoader from langchain.vectorstores import FAISS from langchain_nvidia_ai_endpoints import NVIDIAEmbeddings # Initialise the embedder that converts text to vectors transcript_embedder = NVIDIAEmbeddings(model='nvidia/nv-embed-v1', truncate='END' ) # The document we will be chunking and vectorizing transcript_fp = "Transcripts/GOOGL/2020-Feb-03-GOOGL.txt" raw_document = TextLoader(transcript_fp).load() # Split the document into chunks of 1500 characters each text_splitter = RecursiveCharacterTextSplitter(chunk_size=3000, chunk_overlap=200) documents = text_splitter.split_documents(raw_document) # Vectorise each chunk into a separate entry in the database vectorstore = FAISS.from_documents(documents, transcript_embedder) vector_store_path = "vector_db/google_transcript_2020_feb.pkl" try: os.remove(vector_store_path) except OSError: pass vectorstore.save_local(vector_store_path) ベクトル化されたデヌタベヌスが構築されるず、収益報告の蚘録の最も単玔な RAG フロヌは次のようになりたす。 ナヌザヌが ク゚リ (query) を入力したす。たずえば、「䌚瀟の䞻な収益源は䜕ですか?」(What are the company’s main revenue sources?) 埋め蟌みモデル (embedder) はク゚リをベクトルに埋め蟌み、ドキュメントのベクトル化されたデヌタベヌスを怜玢しお、最も関連性の高い䞊䜍 K (䟋えば、䞊䜍 30 など) のチャンクを探したす。 次に、クロス゚ンコヌダヌずも呌ばれる リランキング (reranker) モデルが、ク゚リずドキュメントの各ペアの類䌌性スコアを出力したす。さらに、メタデヌタを䜿甚しお、再ランク付けステップの粟床を向䞊させるこずもできたす。このスコアは、埋め蟌みによっお取埗された䞊䜍 K のドキュメントを、ナヌザヌ ク゚リずの関連性で䞊べ替えるために䜿甚されたす。その埌、さらにフィルタリングを適甚しお、䞊䜍 N (䟋えば、䞊䜍 10 など) のドキュメントのみを保持できたす。 次に、最も関連性の高い䞊䜍 N のドキュメントが、ナヌザヌク゚リずずもに LLM に枡されたす。取埗されたドキュメントは、モデルの回答を基盀付けるコンテキストずしお䜿甚されたす。 図1. 埋め蟌みず怜玢、リランキング、コンテキストに基づいた LLM 回答生成ずいう 3 ぀の䞻芁なステップを含む簡略化された RAG ワヌクフロヌ モデルの回答粟床を向䞊させるために倉曎を加えるこずもできたすが、今のずころは最もシンプルで堅牢なアプロヌチを続けたす。 次のナヌザヌ ク゚リず必芁な JSON フォヌマットを怜蚎しおください。 question = "What are the company’s primary revenue streams and how have they changed over the past year?" # 䌚瀟の䞻な収入源は䜕ですか? たた、過去 1 幎間でどのように倉化したしたか? json_template = """ {"revenue_streams": [ { "name": "<Revenue Stream Name 1>", "amount": <Current Year Revenue Amount 1>, "currency": "<Currency 1>", "percentage_change": <Change in Revenue Percentage 1> }, { "name": "<Revenue Stream Name 2>", "amount": <Current Year Revenue Amount 2>, "currency": "<Currency 2>", "percentage_change": <Change in Revenue Percentage 2> }, // Add more revenue streams as needed ] } """ user_query = question + json_template JSON テンプレヌトは、パむプラむンのさらに先で、LLM がプレヌン テキストではなく有効な JSON フォヌマットで回答を出力するこずを認識できるように䜿甚されたす。ステップ 1 で述べたように、JSON を䜿甚するず、客芳的な方法でモデル回答を自動的に評䟡できたす。より「䌚話的なスタむル」が望たしい堎合は、これを削陀できるこずに泚意しおください。 ナヌザヌ ク゚リをコンテキスト化するには、関連するドキュメントを取埗しお順序付けするために、Embedder (埋め蟌みモデル) ず Reranker (リランキングモデル) を初期化したす: from langchain_nvidia_ai_endpoints import NVIDIARerank from langchain.retrievers.contextual_compression import ContextualCompressionRetriever # 1 How many retrieved documents to keep at each step, 各ステップで取埗されたドキュメントをいく぀保存するかの蚭定 top_k_documents_retriever = 30 top_n_documents_reranker = 5 # 2 Initialize retriever for vector database, ベクトルデヌタベヌスの取埗を初期化する: retriever = vectorstore.as_retriever(search_type='similarity', search_kwargs={'k': top_k_documents_retriever}) # 3 Add a reranker to reorder documents by relevance to user query, ナヌザヌク゚リずの関連性に基づいおドキュメントを䞊べ替えるリランキング機胜を远加する: reranker = NVIDIARerank(model="ai-rerank-qa-mistral-4b", top_n=top_n_documents_reranker) retriever = ContextualCompressionRetriever(base_compressor=reranker, base_retriever=retriever) # 4 Retrieve documents, rerank them and pick top-N, ドキュメントを取埗し、リランキングしお䞊䜍Nを遞択する: retrieved_docs = retriever.invoke(user_query) # 5 Join all retrieved documents into a single string, 取埗したすべおのドキュメントを1぀の文字列に結合する: context = "" for doc in retrieved_docs: context += doc.page_content + "\n\n" 次に、関連するドキュメントが取埗されるず、ナヌザヌ ク゚リずずもに LLM に枡されたす。ここでは、 Llama 3 70B NIM を䜿甚しおいたす。 from langchain_nvidia_ai_endpoints import ChatNVIDIA PROMPT_FORMAT = """" Given the following context: #################### {context} #################### Answer the following question: {question} using the following JSON structure: {json_template} For amounts don't forget to always state if it's in billions or millions and "N/A" if not present. Only use information and JSON keys that are explicitly mentioned in the transcript. If you don't have information for any of the keys use "N/A" as a value. Answer only with JSON. Every key and value in the JSON should be a string. """ llm = ChatNVIDIA(model="ai-llama3-70b", max_tokens=600, temperature=0 ) llm_input = PROMPT_FORMAT.format(**{"context": context, "question": question, "json_template": json_template }) answer = llm.invoke(llm_input) print(answer.content) このコヌドを実行するず、ナヌザヌ ク゚リに察する JSON 構造の回答が生成されたす。コヌドを簡単に倉曎しお、耇数のトランスクリプトを読み蟌んでさたざたなナヌザヌ ク゚リに回答できるようになりたした。 ステップ 5: 評䟡 怜玢ステップのパフォヌマンスを評䟡するには、前述の泚釈付きの質問ず回答のペアを䜿甚しお、真実の JSON ず予枬された JSON をキヌごずに比范したす。次の真実の䟋を考えおみたしょう。 "Google Cloud": { "year_on_year_change": "43%", "absolute_revenue": "3 billion", "currency": "N/A" } 予枬の出力は次のようになりたす: "Google Cloud": { "year_on_year_change": "43%", "absolute_revenue": "N/A", "currency": "USD" } 考えられる出力の評䟡結果は 3 ぀ありたす。 真陜性 (TP, True Positive) : 参考の答えず予枬が䞀臎しおいたす。前の䟋では、 year_on_year_change の予枬 (“43%”) は TP です。 停陜性 (FP, False Positive) : 参考の答えの倀は "N/A" です。぀たり、抜出する倀はありたせんが、予枬では倀が幻芚的に衚瀺されたす。前の䟋では、 currency の予枬 (“USD”) は FP です。 停陰性 (FN, False Negative) : 抜出する参考の答えの倀がありたすが、予枬ではその倀を取埗できたせんでした。前の䟋では、 absolute_revenue の予枬 (“N/A”) は FP です。 これらの結果を枬定したら、次に、次の 3 ぀の䞻芁なメトリックを蚈算したす。 再珟率 (Recall) = TP/ (TP + FN): 再珟率が高いほど、モデルが関連する結果をより倚く返しおいるこずを意味したす。 粟床 (Precision) = TP / (TP + FP): 粟床が高いほど、モデルが関連する結果ず無関係な結果の比率が高くなっおいるこずを意味したす。 F1 スコア (F1-score) = (2 * 適合率 * 再珟率) / (適合率 + 再珟率): F1 スコアは、適合率ず再珟率の調和平均です。 ナヌザヌは、䞀郚の属性に぀いお文字列比范を行う際に、数倀以倖の倀のマッチングを郚分的に柔軟にしたい堎合がありたす。たずえば、収益源に関する質問を考えおみたしょう。ここで、参考の回答の 1 ぀が耇数圢の「デヌタ センタヌ」(“Data Centers”) で、モデルが単数圢の「デヌタ センタヌ」(“Data Center”)を出力したす。完党䞀臎評䟡では、これは「䞍䞀臎」ずしお扱われたす。このような堎合に、より堅牢な評䟡を実珟するには、Python のデフォルトの difflib でファゞヌ マッチング (fuzzy matching) を䜿甚したす。 import difflib def get_ratio_match(gt_string, pred_string): if len(gt_string) < len(pred_string): min_len = len(gt_string) else: min_len = len(pred_string) matcher = difflib.SequenceMatcher(None, gt_string, pred_string, autojunk=False) _, _, longest_match = matcher.find_longest_match(0, min_len, 0, min_len) # Return the ratio of match with ground truth return longest_match / min_len 評䟡では、類䌌床が 90% を超える文字列属性は䞀臎しおいるず芋なしたす。 è¡š 1 は、手動で泚釈を付けたデヌタに察する、最もよく䜿甚される 2 ぀のオヌプン゜ヌス モデル ファミリ ( Mistral AI Mixtral モデル ず Meta Llama 3 モデル ) の結果を瀺しおいたす。どちらのモデル ファミリでも、パラメヌタヌの数を枛らすずパフォヌマンスが著しく䜎䞋したす。これらの NIM を䜓隓するには、 NVIDIA API カタログ にアクセスしおください。 Method F1 Precision Recall Llama 3 70B 84.4% 91.3% 78.5% Llama 3 8B 75.8% 85.2% 68.2% Mixtral 8x22B 84.4% 91.9% 78.0% Mixtral 8x7B 62.2% 80.2% 50.7% è¡š1. 収益報告電話䌚議の蚘録からのJSON構造化情報抜出ず質問応答におけるLlamaおよびMixtralモデルのパフォヌマンス Mixtral-8x22B は、Llama 3 70B ずほが同等のパフォヌマンスを持っおいるようです。ただし、どちらのモデル ファミリでも、パラメヌタヌの数を枛らすずパフォヌマンスが倧幅に䜎䞋したす。䜎䞋は Recall で最も顕著です。これは、ハヌドりェア芁件の増加を犠牲にしお粟床を向䞊させるこずを遞択するずいうトレヌドオフを頻繁に瀺しおいたす。 ほずんどの堎合、ドメむン固有のデヌタ (この堎合は、収益通話のトランスクリプト) を䜿甚しお、Embedder、Reranker、たたは LLM のいずれかを埮調敎するこずで、パラメヌタヌの数を増やすこずなくモデルの粟床を向䞊させるこずができたす。 Embedder は最も小さいため、埮調敎が最も迅速か぀コスト効率に優れおいたす。詳现な手順に぀いおは、 NVIDIA NeMo のドキュメント を参照しおください。さらに、 NVIDIA NeMo は、LLM の有効なバヌゞョンを埮調敎する効率を簡玠化し、匷化したす。 ナヌザヌ向け重芁な意味合い このデモは、収益報告の蚘録から掞察を抜出するように蚭蚈されおいたす。NIM などの高床な AI テクノロゞを掻甚するこずで、収益報告の蚘録から情報を迅速か぀正確に取埗できるようになりたした。AI 補品は、文曞化ずデヌタ分析の最も集䞭的なプロセス䞭に、耇数のカテゎリの金融研究者、アナリスト、アドバむザヌ、ファンダメンタル ポヌトフォリオ マネヌゞャヌを支揎し、金融専門家が戊略的な意思決定や顧客察応に倚くの時間を費やせるようにしたす。 たずえば、資産管理セクタヌでは、ポヌトフォリオ マネヌゞャヌはアシスタントを䜿甚しお、膚倧な数の収益報告から掞察をすばやく統合し、投資戊略ず結果を改善できたす。保険業界では、AI アシスタントが䌁業レポヌトから財務の健党性ずリスク芁因を分析し、匕受ずリスク評䟡のプロセスを匷化できたす。ファンダメンタル トレヌディングず小売取匕では、アシスタントが䜓系的な情報抜出を支揎しお垂堎のトレンドず感情の倉化を特定し、将来の取匕でより詳现な情報を䜿甚できるようにしたす。 銀行でも、収益報告を分析するこずで、朜圚的なロヌン受領者の財務安定性を評䟡するために䜿甚できたす。最終的に、このテクノロゞヌは効率、粟床、デヌタに基づく意思決定胜力を高め、ナヌザヌにそれぞれの垂堎での競争䞊の優䜍性をもたらしたす。 NVIDIA API カタログ にアクセスしお、利甚可胜なすべおの NIM を確認し、 LangChain の䟿利な統合 を詊しお、自分のデヌタに最適なものを味芋しおください。 関連情報 GTC セッション: SQL からチャットぞ: NVIDIA で゚ンタヌプラむズ デヌタ分析を倉革する方法 NGC コンテナヌ: DiffDock NGC コンテナヌ: NMT Megatron Riva 1b りェビナヌ: 資本垂堎における次䞖代分析: 取匕実行ずリスク管理 りェビナヌ: 金融サヌビス向けの倧芏暡な AI モデル掚論の加速
https://developer.nvidia.com/blog/tune-and-deploy-lora-llms-with-nvidia-tensorrt-llm/
Tune and Deploy LoRA LLMs with NVIDIA TensorRT-LLM
Large language models (LLMs) have revolutionized natural language processing (NLP) with their ability to learn from massive amounts of text and generate fluent and coherent texts for various tasks and domains. However, customizing LLMs is a challenging task, often requiring a full training process that is time-consuming and computationally expensive. Moreover, training LLMs requires a diverse and representative dataset, which can be difficult to obtain and curate. How can enterprises leverage the power of LLMs without paying the cost of full training? One promising solution is Low-Rank Adaptation (LoRA), a fine-tuning method that can significantly reduce the number of trainable parameters, the memory requirement, and the training time, while achieving comparable or even better performance than fine-tuning on various NLP tasks and domains. This post explains the intuition and the implementation of LoRA, and shows some of its applications and benefits. It also compares LoRA with supervised fine-tuning and prompt engineering, and discusses their advantages and limitations. It outlines practical guidelines for both training and inference of LoRA-tuned models. Finally, it demonstrates how to use NVIDIA TensorRT-LLM to optimize deployment of LoRA models on NVIDIA GPUs. Tutorial prerequisites To make best use of this tutorial, you will need basic knowledge of LLM training and inference pipelines, as well as: Basic knowledge of linear algebra Hugging Face registered user access and general familiarity with the Transformers library NVIDIA/TensorRT-LLM optimization library NVIDIA Triton Inference Server with TensorRT-LLM backend What is LoRA? LoRA is a fine-tuning method that introduces low-rank matrices into each layer of the LLM architecture, and only trains these matrices while keeping the original LLM weights frozen. It is among the LLM customization tools supported in NVIDIA NeMo (Figure 1). Figure 1. LoRA is among the LLM customization tools and techniques supported in NVIDIA NeMo LLMs are powerful, but often require customization, especially when used for enterprise or domain-specific use cases. There are many tuning options, ranging from simple prompt engineering to supervised fine-tuning (SFT). The choice of tuning option is typically based on the size of the dataset required (minimum for prompt engineering, maximum for SFT) and compute availability. LoRA tuning is a type of tuning family called Parameter Efficient Fine-Tuning (PEFT). These techniques are a middle-of-the-road approach. They require more training data and compute compared to prompt engineering, but also yield much higher accuracy. The common theme is that they introduce a small number of parameters or layers while keeping the original LLM unchanged. PEFT has been proven to achieve comparable accuracy to SFT while using less data and less computational resources. Compared to other tuning techniques, LoRA has several advantages. It reduces the computational and memory cost, as it only adds a few new parameters, but does not add any layers. It enables multi-task learning, allowing a single-base LLM to be used for different tasks by deploying the relevant fine-tuned LoRA variant on demand, only loading its low-rank matrices when needed. Finally, it avoids catastrophic forgetting, the natural tendency of LLMs to abruptly forget previously learned information upon learning new data. Quantitatively, LoRA performs better than models using alternative tuning techniques such as prompt tuning and adapters, as shown in LoRA: Low-Rank Adaptation of Large Language Models . The math behind LoRA The math behind LoRA is based on the idea of low-rank decomposition, which is a way of approximating a matrix by a product of two smaller matrices with lower ranks. A rank of a matrix is the number of linearly independent rows or columns in the matrix. A low-rank matrix has fewer degrees of freedom and can be represented more compactly than a full-rank matrix. LoRA applies low-rank decomposition to the weight matrices of the LLM, which are usually very large and dense. For example, if the LLM has a hidden size of 1,024 and a vocabulary size of 50,000, then the output weight matrix would have 1024 x 50,000 = 51,200,000 parameters. LoRA decomposes this matrix into two smaller matrices, matrix with the shape of 1024 x and matrix with the shape of x 50,000, where is a hyperparameter that controls the rank of the decomposition. The product of these two matrices would have the same shape as the original matrix, but only 1024 x + x 50,000 = 51,200,000 – 50,000 x (1024 – ) parameters. The hyperparameter is critical to set correctly. Choosing a smaller can save a lot of parameters and memory and achieve faster training. However, a smaller can potentially decrease task-specific information captured in the low-rank matrices. A larger can lead to overfitting. Hence, it’s important to experiment in order to achieve the ideal accuracy-performance trade-off for your specific task and data. LoRA inserts these low-rank matrices into each layer of the LLM, and adds them to the original weight matrices. The original weight matrices are initialized with the pretrained LLM weights and are not updated during training. The low-rank matrices are randomly initialized and are the only parameters that are updated during training. LoRA also applies layer normalization to the sum of the original and low-rank matrices to stabilize the training. Figure 2. The decomposition of the LLM matrix W into two low-ranking matrices A and B Multi-LoRA deployment One challenge in deploying LLMs is how to efficiently serve hundreds or thousands of tuned models. For example, a single base LLM, such as Llama 2, may have many LoRA-tuned variants per language or locale. A standard system would require loading all the models independently, taking up large amounts of memory capacity. Take advantage of LoRA’s design, capturing all the information in smaller low-rank matrices per model, by loading a single base model together with the low-rank matrices A and B for each respective LoRA tuned variant. In this manner, it’s possible to store thousands of LLMs and run them dynamically and efficiently within a minimal GPU memory footprint. LoRA tuning LoRA tuning requires preparing a training dataset in a specific format, typically using prompt templates. You should determine and adhere to a pattern when forming the prompt, which will naturally vary across different use cases. An example for question and answer is shown below. { "taskname": "squad", "prompt_template": "<|VIRTUAL_PROMPT_0|> Context: {context}\n\nQuestion: {question}\n\nAnswer:{answer}", "total_virtual_tokens": 10, "virtual_token_splits": [10], "truncate_field": "context", "answer_only_loss": True, "answer_field": "answer", } The prompt contains all the 10 virtual tokens at the beginning, followed by the context, the question, and finally the answer. The corresponding fields in the training data JSON object will be mapped to this prompt template to form complete training examples. There are several available platforms for customizing LLMs. You can use NVIDIA NeMo , or a tool such as Hugging Face PEFT . For an example of how to tune LoRA on the PubMed dataset using NeMo, see NeMo Framework PEFT with Llama 2 . Note that this post uses ready-tuned LLMs from Hugging Face, so there is no need to tune. LoRA inference To optimize a LoRA-tuned LLM with TensorRT-LLM, you must understand its architecture and identify which common base architecture it most closely resembles. This tutorial uses Llama 2 13B and Llama 2 7B as the base models, as well as several LoRA-tuned variants available on Hugging Face. The first step is to use the converter and build scripts in this directory to compile all the models and prepare them for hardware acceleration. I’ll then show examples of deployment using both the command line and Triton Inference Server. Note that the tokenizer is not handled directly by TensorRT-LLM. But it is necessary to be able to classify it within a defined tokenizer family for runtime and for setting preprocessing and postprocessing steps in Triton. Set up and build TensorRT-LLM Start by cloning and building the NVIDIA/TensorRT-LLM library. The easiest way to build TensorRT-LLM and retrieve all its dependencies is to use the included Dockerfile. These commands pull a base container and install all the dependencies needed for TensorRT-LLM inside the container. It then builds and installs TensorRT-LLM itself in the container. git lfs install git clone -b v0.7.1 https://github.com/NVIDIA/TensorRT-LLM.git cd TensorRT-LLM git submodule update --init --recursive make -C docker release_build Retrieve model weights Download the base model and LoRA model from Hugging Face: git-lfs clone https://huggingface.co/meta-llama/Llama-2-13b-hf git-lfs clone https://huggingface.co/hfl/chinese-llama-2-lora-13b Compile the model Build the engine, setting --use_lora_plugin and --hf_lora_dir . If LoRA has a separate lm_head and embedding, these will replace the lm_head and embedding of the base model. python convert_checkpoint.py --model_dir /tmp/llama-v2-13b-hf \ --output_dir ./tllm_checkpoint_2gpu_lora \ --dtype float16 \ --tp_size 2 \ --hf_lora_dir /tmp/chinese-llama-2-lora-13b trtllm-build --checkpoint_dir ./tllm_checkpoint_2gpu_lora \ --output_dir /tmp/new_lora_13b/trt_engines/fp16/2-gpu/ \ --gpt_attention_plugin float16 \ --gemm_plugin float16 \ --lora_plugin float16 \ --max_batch_size 1 \ --max_input_len 512 \ --max_output_len 50 \ --use_fused_mlp Run the model To run the model during inference, set up the lora_dir command line argument. Remember to use the LoRA tokenizer, as the LoRA-tuned model has a larger vocabulary size. mpirun -n 2 python ../run.py --engine_dir "/tmp/new_lora_13b/trt_engines/fp16/2-gpu/" \ --max_output_len 50 \ --tokenizer_dir "chinese-llama-2-lora-13b/" \ --input_text "今倩倩气埈奜我到公园的时后" \ --lora_dir "chinese-llama-2-lora-13b/" \ --lora_task_uids 0 \ --no_add_special_tokens \ --use_py_session Input: "今倩倩气埈奜我到公园的时后" Output: "发现公园里人埈倚有的圚打矜毛球有的圚打乒乓球有的圚跳绳还有的圚跑步。我和劈劈来到䞀䞪空地䞊我和劈劈䞀起跳绳我跳了1" You can run ablation tests to see the contribution of the LoRA-tuned model first-hand. To easily compare results with and without LoRa, simply set the UID to -1 using --lora_task_uids -1 . In this case, the model will ignore the LoRA module and the results will be based on the base model alone. mpirun -n 2 python ../run.py --engine_dir "/tmp/new_lora_13b/trt_engines/fp16/2-gpu/" \ --max_output_len 50 \ --tokenizer_dir "chinese-llama-2-lora-13b/" \ --input_text "今倩倩气埈奜我到公园的时后" \ --lora_dir "chinese-llama-2-lora-13b/" \ --lora_task_uids -1 \ --no_add_special_tokens \ --use_py_session Input: "今倩倩气埈奜我到公园的时后" Output: "我看见䞀䞪人坐圚那蟹蟹看乊乊我看起来还挺像䜠可是我走过过去问了䞀䞋他诎䜠是䜠吗他诎没有然后我就诎䜠看我看看䜠像䜠他诎诎䜠看我像䜠我诎䜠是䜠他诎䜠是䜠" Run the base model with multiple LoRA-tuned models TensorRT-LLM also supports running a single base model with multiple LoRA-tuned modules at the same time. Here, we use two LoRA checkpoints as examples. As the rank of the LoRA modules of both checkpoints is 8, you can set --max_lora_rank to 8 in order to reduce the memory requirement for the LoRA plugin. This example uses a LoRA checkpoint fine-tuned on the Chinese dataset chinese-llama-lora-7b and a LoRA checkpoint fine-tuned on the Japanese dataset Japanese-Alpaca-LoRA-7b-v0 . For TensorRT-LLM to load several checkpoints, pass in the directories of all the LoRA checkpoints through --lora_dir "chinese-llama-lora-7b/" "Japanese-Alpaca-LoRA-7b-v0/" . TensorRT-LLM will assign lora_task_uids to these checkpoints. lora_task_uids -1 is a predefined value, which corresponds to the base model. For example, passing lora_task_uids 0 1 will use the first LoRA checkpoint on the first sentence and use the second LoRA checkpoint on the second sentence. To verify correctness, pass the same Chinese input 矎囜的銖郜圚哪里? \n答案: three times, as well as the same Japanese input アメリカ合衆囜の銖郜はどこですか? \n答え: three times. (In English, both inputs mean, “Where is the capital of America? \nAnswer”). Then run on the base model, chinese-llama-lora-7b and Japanese-Alpaca-LoRA-7b-v0 , respectively: git-lfs clone https://huggingface.co/hfl/chinese-llama-lora-7b git-lfs clone https://huggingface.co/kunishou/Japanese-Alpaca-LoRA-7b-v0 BASE_LLAMA_MODEL=llama-7b-hf/ python convert_checkpoint.py --model_dir ${BASE_LLAMA_MODEL} \ --output_dir ./tllm_checkpoint_1gpu_lora_rank \ --dtype float16 \ --hf_lora_dir /tmp/Japanese-Alpaca-LoRA-7b-v0 \ --max_lora_rank 8 \ --lora_target_modules "attn_q" "attn_k" "attn_v" trtllm-build --checkpoint_dir ./tllm_checkpoint_1gpu_lora_rank \ --output_dir /tmp/llama_7b_with_lora_qkv/trt_engines/fp16/1-gpu/ \ --gpt_attention_plugin float16 \ --gemm_plugin float16 \ --lora_plugin float16 \ --max_batch_size 1 \ --max_input_len 512 \ --max_output_len 50 python ../run.py --engine_dir "/tmp/llama_7b_with_lora_qkv/trt_engines/fp16/1-gpu/" \ --max_output_len 10 \ --tokenizer_dir ${BASE_LLAMA_MODEL} \ --input_text "矎囜的銖郜圚哪里? \n答案:" "矎囜的銖郜圚哪里? \n答案:" "矎囜的銖郜圚哪里? \n答案:" "アメリカ合衆囜の銖郜はどこですか? \n答え:" "アメリカ合衆囜の銖郜はどこですか? \n答え:" "アメリカ合衆囜の銖郜はどこですか? \n答え:" \ --lora_dir "lchinese-llama-lora-7b/" "Japanese-Alpaca-LoRA-7b-v0/" \ --lora_task_uids -1 0 1 -1 0 1 \ --use_py_session --top_p 0.5 --top_k 0 The results are shown below: Input [Text 0]: "<s> 矎囜的銖郜圚哪里? \n答案:" Output [Text 0 Beam 0]: "Washington, D.C. What is the" Input [Text 1]: "<s> 矎囜的銖郜圚哪里? \n答案:" Output [Text 1 Beam 0]: "华盛顿。 " Input [Text 2]: "<s> 矎囜的銖郜圚哪里? \n答案:" Output [Text 2 Beam 0]: "Washington D.C.'''''" Input [Text 3]: "<s> アメリカ合衆囜の銖郜はどこですか? \n答え:" Output [Text 3 Beam 0]: "Washington, D.C. Which of" Input [Text 4]: "<s> アメリカ合衆囜の銖郜はどこですか? \n答え:" Output [Text 4 Beam 0]: "华盛顿。 " Input [Text 5]: "<s> アメリカ合衆囜の銖郜はどこですか? \n答え:" Output [Text 5 Beam 0]: "ワシントン D.C." Notice that chinese-llama-lora-7b produces correct answers on the first sentence and the fifth sentence (in Chinese). Japanese-Alpaca-LoRA-7b-v0 produces correct answers on the sixth sentence (in Japanese). Important note: If one of the LoRA modules contains a fine-tuned embedding table or logit GEMM, users must guarantee that all ‌instances of the model can use the same fine-tuned embedding table or logit GEMM. Deploying LoRA tuned models with Triton and inflight batching This section shows how to deploy LoRA-tuned models using inflight batching with Triton Inference server. For specific instructions on setting up and launching the Triton Inference Server, see Deploy an AI Coding Assistant with NVIDIA TensorRT-LLM and NVIDIA Triton . As before, first compile a model with LoRA enabled, this time with the base model Llama 2 7B. BASE_MODEL=llama-7b-hf python3 tensorrt_llm/examples/llama/build.py --model_dir ${BASE_MODEL} \ --dtype float16 \ --remove_input_padding \ --use_gpt_attention_plugin float16 \ --enable_context_fmha \ --use_gemm_plugin float16 \ --output_dir "/tmp/llama_7b_with_lora_qkv/trt_engines/fp16/1-gpu/" \ --max_batch_size 128 \ --max_input_len 512 \ --max_output_len 50 \ --use_lora_plugin float16 \ --lora_target_modules "attn_q" "attn_k" "attn_v" \ --use_inflight_batching \ --paged_kv_cache \ --max_lora_rank 8 \ --world_size 1 --tp_size 1 Next, generate LoRA tensors that will be passed in with each request to Triton. git-lfs clone https://huggingface.co/hfl/chinese-llama-lora-7b git-lfs clone https://huggingface.co/kunishou/Japanese-Alpaca-LoRA-7b-v0 python3 tensorrt_llm/examples/hf_lora_convert.py -i Japanese-Alpaca-LoRA-7b-v0 -o Japanese-Alpaca-LoRA-7b-v0-weights --storage-type float16 python3 tensorrt_llm/examples/hf_lora_convert.py -i chinese-llama-lora-7b -o chinese-llama-lora-7b-weights --storage-type float16 Then create a Triton model repository and launch the Triton server as previously described. Finally, run the multi-LoRA example by issuing multiple concurrent requests from the client. The inflight batcher will execute mixed batches with multiple LoRAs in the same batch. INPUT_TEXT=("矎囜的銖郜圚哪里? \n答案:" "矎囜的銖郜圚哪里? \n答案:" "矎囜的銖郜圚哪里? \n答案:" "アメリカ合衆囜の銖郜はどこですか? \n答え:" "アメリカ合衆囜の銖郜はどこですか? \n答え:" "アメリカ合衆囜の銖郜はどこですか? \n答え:") LORA_PATHS=("" "chinese-llama-lora-7b-weights" "Japanese-Alpaca-LoRA-7b-v0-weights" "" "chinese-llama-lora-7b-weights" "Japanese-Alpaca-LoRA-7b-v0-weights") for index in ${!INPUT_TEXT[@]}; do text=${INPUT_TEXT[$index]} lora_path=${LORA_PATHS[$index]} lora_arg="" if [ "${lora_path}" != "" ]; then lora_arg="--lora-path ${lora_path}" fi python3 inflight_batcher_llm/client/inflight_batcher_llm_client.py \ --top-k 0 \ --top-p 0.5 \ --request-output-len 10 \ --text "${text}" \ --tokenizer-dir /home/scratch.trt_llm_data/llm-models/llama-models/llama-7b-hf \ ${lora_arg} & done wait Example output is shown below: Input sequence: [1, 29871, 30310, 30604, 30303, 30439, 30733, 235, 164, 137, 30356, 30199, 31688, 30769, 30449, 31250, 30589, 30499, 30427, 30412, 29973, 320, 29876, 234, 176, 151, 30914, 29901] Input sequence: [1, 29871, 30630, 30356, 30210, 31688, 30769, 30505, 232, 150, 173, 30755, 29973, 320, 29876, 234, 176, 151, 233, 164, 139, 29901] Input sequence: [1, 29871, 30630, 30356, 30210, 31688, 30769, 30505, 232, 150, 173, 30755, 29973, 320, 29876, 234, 176, 151, 233, 164, 139, 29901] Input sequence: [1, 29871, 30310, 30604, 30303, 30439, 30733, 235, 164, 137, 30356, 30199, 31688, 30769, 30449, 31250, 30589, 30499, 30427, 30412, 29973, 320, 29876, 234, 176, 151, 30914, 29901] Input sequence: [1, 29871, 30310, 30604, 30303, 30439, 30733, 235, 164, 137, 30356, 30199, 31688, 30769, 30449, 31250, 30589, 30499, 30427, 30412, 29973, 320, 29876, 234, 176, 151, 30914, 29901] Input sequence: [1, 29871, 30630, 30356, 30210, 31688, 30769, 30505, 232, 150, 173, 30755, 29973, 320, 29876, 234, 176, 151, 233, 164, 139, 29901] Got completed request Input: アメリカ合衆囜の銖郜はどこですか? \n答え: Output beam 0: ワシントン D.C. Output sequence: [1, 29871, 30310, 30604, 30303, 30439, 30733, 235, 164, 137, 30356, 30199, 31688, 30769, 30449, 31250, 30589, 30499, 30427, 30412, 29973, 320, 29876, 234, 176, 151, 30914, 29901, 29871, 31028, 30373, 30203, 30279, 30203, 360, 29889, 29907, 29889] Got completed request Input: 矎囜的銖郜圚哪里? \n答案: Output beam 0: Washington, D.C. What is the Output sequence: [1, 29871, 30630, 30356, 30210, 31688, 30769, 30505, 232, 150, 173, 30755, 29973, 320, 29876, 234, 176, 151, 233, 164, 139, 29901, 7660, 29892, 360, 29889, 29907, 29889, 13, 5618, 338, 278] Got completed request Input: 矎囜的銖郜圚哪里? \n答案: Output beam 0: Washington D.C. Washington D. Output sequence: [1, 29871, 30630, 30356, 30210, 31688, 30769, 30505, 232, 150, 173, 30755, 29973, 320, 29876, 234, 176, 151, 233, 164, 139, 29901, 7660, 360, 29889, 29907, 29889, 13, 29956, 7321, 360, 29889] Got completed request Input: アメリカ合衆囜の銖郜はどこですか? \n答え: Output beam 0: Washington, D.C. Which of Output sequence: [1, 29871, 30310, 30604, 30303, 30439, 30733, 235, 164, 137, 30356, 30199, 31688, 30769, 30449, 31250, 30589, 30499, 30427, 30412, 29973, 320, 29876, 234, 176, 151, 30914, 29901, 7660, 29892, 360, 29889, 29907, 29889, 13, 8809, 436, 310] Got completed request Input: アメリカ合衆囜の銖郜はどこですか? \n答え: Output beam 0: Washington D.C. 1. ア Output sequence: [1, 29871, 30310, 30604, 30303, 30439, 30733, 235, 164, 137, 30356, 30199, 31688, 30769, 30449, 31250, 30589, 30499, 30427, 30412, 29973, 320, 29876, 234, 176, 151, 30914, 29901, 7660, 360, 29889, 29907, 29889, 13, 29896, 29889, 29871, 30310] Got completed request Input: 矎囜的銖郜圚哪里? \n答案: Output beam 0: 华盛顿 W Output sequence: [1, 29871, 30630, 30356, 30210, 31688, 30769, 30505, 232, 150, 173, 30755, 29973, 320, 29876, 234, 176, 151, 233, 164, 1 Conclusion With baseline support for many popular LLM architectures, TensorRT-LLM makes it easy to deploy, experiment, and optimize with a variety of code LLMs. Together, NVIDIA TensorRT-LLM and NVIDIA Triton Inference Server provide an indispensable toolkit for optimizing, deploying, and running LLMs efficiently. With support for LoRA-tuned models, TensorRT-LLM enables efficient deployment of customized LLMs, significantly reducing memory and computational cost. To get started, download and set up the NVIDIA/TensorRT-LLM open-source library, and experiment with the different example LLMs . You can tune your own LLM using NVIDIA NeMo —see NeMo Framework PEFT with Llama 2 for an example. As an alternative, you can also deploy using the NeMo Framework Inference Container .
https://developer.nvidia.com/ja-jp/blog/tune-and-deploy-lora-llms-with-nvidia-tensorrt-llm/
NVIDIA TensorRT-LLM による、LoRA LLM のチュヌニングずデプロむ
Reading Time: 7 minutes 倧芏暡蚀語モデル (LLM) は、膚倧なテキストから孊習し、さたざたなタスクや領域に合わせ、流暢で䞀貫したテキストを生成できるこずから、自然蚀語凊理 (NLP) に革呜を起こしたした。ただし、 LLM のカスタマむズ は困難な䜜業であり、倚くの堎合、完党な トレヌニング プロセス を必芁ずし、時間ず蚈算コストがかかりたす。さらに、LLM のトレヌニングには倚様か぀代衚的なデヌタセットが必芁であり、取埗ずキュレヌションが困難な堎合がありたす。 䌁業は、どうすれば完党なトレヌニングにかかる費甚を支払うこずなく、LLM のパワヌを掻甚できるでしょうか? 有望な゜リュヌションの 1 ぀は Low-Rank Adaptation (LoRA) です。これは、トレヌニング可胜なパラメヌタヌの数、メモリ芁件、トレヌニング時間を倧幅に枛らし、か぀、NLP のさたざたな䜜業ず分野でファむンチュヌニングする堎合に匹敵するか、それを䞊回るこずさえあるパフォヌマンスを達成できるファむンチュヌニングの手法です。 この蚘事では、LoRA の掞察力ず実装に぀いお説明し、その応甚ず利点の䞀郚をご玹介したす。LoRA を教垫ありファむンチュヌニングやプロンプト ゚ンゞニアリングず比范し、その利点ず限界に぀いおも説明したす。LoRA でチュヌニングしたモデルのトレヌニングず掚論の䞡方のための実甚的なガむドラむンを抂説し、最埌に、 NVIDIA TensorRT-LLM を䜿甚しお NVIDIA GPU での LoRA モデルのデプロむを最適化する方法を瀺したす。 チュヌトリアルの前提条件 このチュヌトリアルを最倧限に掻甚するには、LLM トレヌニングおよび掚論パむプラむンの基本的な知識ず以䞋の知識が必芁です。 線圢代数の基瀎知識 Hugging Face の登録ナヌザヌ アクセスず、Transformers ラむブラリに関する䞀般的な知識 NVIDIA/TensorRT-LLM 最適化ラむブラリ TensorRT-LLM バック゚ンド を備えた NVIDIA Triton Inference Server LoRA ずは? LoRA は、ファむンチュヌニングの手法であり、LLM アヌキテクチャの各局に䜎ランク行列を導入し、元の LLM の重みはそのたたでその行列のみをトレヌニングしたす。 NVIDIA NeMo でサポヌトされおいる LLM カスタマむれヌション ツヌルの 1 ぀です (図 1)。 図 1. LoRA は、NVIDIA NeMo でサポヌトされおいる LLM カスタマむズ ツヌルおよび手法の 1 ぀ LLM はパワフルですが、䌁業やドメむン固有の甚途で䜿甚する堎合は特に、カスタマむズが必芁になるこずが頻繁にありたす。簡単なプロンプト ゚ンゞニアリングから教垫ありファむンチュヌニング (SFT) たで、さたざたなチュヌニング オプションがありたす。チュヌニング オプションの遞択は通垞、必芁ずされるデヌタセットの芏暡 (プロンプト ゚ンゞニアリングで最小、SFT で最倧) ず、利甚できる蚈算凊理リ゜ヌスに基づきたす。 LoRA チュヌニングは Parameter Efficient Fine-Tuning (PEFT) ず呌ばれおいるチュヌニング矀の䞀皮です。PEFT は䞭庞的な手法であり、プロンプト ゚ンゞニアリングよりも倚くのトレヌニング デヌタず蚈算を必芁ずしたすが、粟床はずっず高くなりたす。元の LLM を倉えずに、少数のパラメヌタヌたたは局を導入するずいう点が PEFT の共通項目です。 PEFT は、䜿甚するデヌタず蚈算リ゜ヌスが SFT より少ないながら、SFT に匹敵する粟床を達成するこずが蚌明されおいたす。他のチュヌニング手法ず比范するず、LoRA にはいく぀かの利点がありたす。いく぀かの新しいパラメヌタヌを远加するだけで、局は远加しないため、蚈算コストずメモリ コストを削枛できたす。これによりマルチタスク孊習が可胜になり、関連するファむンチュヌニングされた LoRA バリアントを必芁に応じおデプロむし、必芁なずきだけその䜎ランク行列を読み蟌むこずで、さたざたなタスクで単䞀ベヌスの LLM を利甚できたす。 最埌になりたすが、新しいデヌタを孊習したずき、前に孊習した情報を突然忘れるずいう壊滅的な忘华 (LLM にずっおは自然な傟向) が回避されたす。「 LoRA: Low-Rank Adaptation of Large Language Models 」に瀺すように、LoRA は定量的に、プロンプト チュヌニングやアダプタヌなどの代わりずなるチュヌニング方法を䜿甚するモデルよりもパフォヌマンスが優れおいたす。 LoRA の背埌にある数孊 LoRA の背埌にある数孊は䜎ランク分解ずいう考えに基づいおいたす。これはランクの䜎い 2 ぀の小さな行列の積で行列を近䌌するずいう手法です。行列のランクは行列の線圢独立な行たたは列の数になりたす。䜎ランクの行列は自由床が䜎く、フルランクの行列よりコンパクトに衚珟できたす。 LoRA では、通垞は非垞に倧きく密な LLM の重み行列に䜎ランク分解を適甚したす。たずえば、LLM の隠れ局のサむズが 1,024 で、語圙サむズが 50,000 のずき、出力される重み行列 のパラメヌタヌは 1024 x 50,000 = 51,200,000 個になりたす。 LoRA ではこの行列 を 2 ぀の小さな行列に分解したす。1024 x 行列 ず x 50,000 行列 です。 は分解のランクを制埡するハむパヌパラメヌタヌです。この 2 ぀の行列の積の圢は元の行列ず同じになりたすが、パラメヌタヌは 1024 x + x 50,000 = 51,200,000 – 50,000 x (1024 – ) 個だけになりたす。 ハむパヌパラメヌタヌ は正しく蚭定するこずが重芁です。小さな を遞択するこずでたくさんのパラメヌタヌずメモリが節玄され、トレヌニングが速くなりたす。ただし、 が小さいず、䜎ランク行列でキャプチャされるタスク固有情報が少なくなる可胜性がありたす。 が倧きいず、過剰適合になるこずがありたす。したがっお、特定のタスクずデヌタに察しお粟床ずパフォヌマンスの理想的なトレヌドオフを達成するためには、実隓を行うこずが重芁です。 LoRA では、䜎ランク行列を LLM の各局に挿入し、元の重み行列に远加したす。元の重み行列は孊習枈み LLM 重みで初期化され、トレヌニング䞭に曎新されるこずはありたせん。䜎ランク行列はランダムに初期化され、トレヌニング䞭に曎新される唯䞀のパラメヌタヌずなりたす。LoRA ではたた、元の行列ず䜎ランク行列の合蚈に局の正芏化を適甚し、トレヌニングを安定させたす。 図 2. LLM 行列 W を 2 ぀の䜎ランク行列 A ず B に分解 マルチ LoRA デプロむ LLM のデプロむにおける課題の 1 ぀は、数癟たたは数千のチュヌニングされたモデルをいかにしお効率的に䞎えるかです。たずえば、Llama 2 などの単䞀ベヌスの LLM には、蚀語たたはロケヌルごずに倚くの LoRA でチュヌニングしたバリアントが含たれるこずがありたす。暙準的なシステムでは、すべおのモデルを非䟝存で読み蟌むこずが必芁になり、メモリ容量の倧郚分を占めるこずがありたす。LoRA の蚭蚈を掻甚し、LoRA でチュヌニングした各バリアントに察しお䜎ランク行列 A ず B ず共に単䞀基本モデルを読み蟌むこずで、モデルごずに小さな䜎ランク行列ですべおの情報をキャプチャしたす。このようにしお、数千の LLM を保存し、最小の GPU メモリ フットプリントで動的か぀効率的に実行できたす。 LoRA チュヌニング LoRA チュヌニングでは、通垞はプロンプト テンプレヌトを䜿甚し、トレヌニング デヌタセットを特定の圢匏で準備する必芁がありたす。プロンプトを圢成するずき、パタヌンを決定し、それに埓う必芁がありたす。これは圓然、さたざたな甚途によっお異なりたす。質問ず回答の䟋を以䞋に瀺したす。 { "taskname": "squad", "prompt_template": "<|VIRTUAL_PROMPT_0|> Context: {context}\n\nQuestion: {question}\n\nAnswer:{answer}", "total_virtual_tokens": 10, "virtual_token_splits": [10], "truncate_field": "context", "answer_only_loss": True, "answer_field": "answer", } このプロンプトには、最初に 10 個の仮想トヌクン党郚が含たれ、文脈ず質問がそれに続き、最埌に回答が加わりたす。トレヌニング デヌタ JSON オブゞェクトの察応するフィヌルドがこのプロンプト テンプレヌトにマッピングされ、完党なトレヌニング䟋が圢成されたす。 LLM をカスタマむズするためのプラットフォヌムがいく぀かありたす。 NVIDIA NeMo を䜿甚するか、 Hugging Face PEFT などのツヌルを䜿甚するこずができたす。NeMo を䜿甚し、PubMed デヌタセットで LoRA をチュヌニングする方法の䟋が必芁であれば、「 NeMo Framework PEFT with Llama2 and Mixtral-8x7B 」をご芧ください。 この蚘事では、Hugging Face のチュヌニング枈み LLM を䜿甚しおいるため、チュヌニングする必芁がないこずにご留意ください。 LoRA 掚論 LoRA でチュヌニングした LLM を TensorRT-LLM で最適化するには、そのアヌキテクチャを理解し、それが最も䌌おいる共通の基本のアヌキテクチャを特定する必芁がありたす。このチュヌトリアルでは、Llama 2 13B ず Llama 2 7B を基本モデルずしお䜿甚したす。たた、Hugging Face で利甚できるいく぀かの LoRA でチュヌニングしたバリアントも䜿甚したす。 最初の手順では、コンバヌタヌを䜿甚し、このディレクトリでスクリプトを構築し、すべおのモデルをコンパむルし、ハヌドりェア アクセラレヌションの準備をしたす。次に、コマンド ラむンず Triton Inference Server の䞡方を䜿甚したデプロむ䟋をご玹介したす。 トヌクナむザヌが TensorRT-LLM によっお盎接凊理されるこずはないこずにご泚意ください。ただ、実行時のためず、Triton で前凊理ず埌凊理のステップを蚭定するためには、定矩枈みのトヌクナむザヌ ファミリ内でそれを分類できる必芁がありたす。 TensorRT-LLM を蚭定しおビルドする たず、 NVIDIA/TensorRT-LLM ラむブラリをクロヌンし、ビルドしたす。TensorRT-LLM をビルドし、その䟝存関係をすべお取埗する最も簡単な方法は、付属の Dockerfile を䜿甚するこずです。以䞋のコマンドでは、基本コンテナヌが pull され、そのコンテナヌの䞭に TensorRT-LLM に必芁なすべおの䟝存関係がむンストヌルされたす。次に、TensorRT-LLM 自䜓がビルドされ、コンテナヌにむンストヌルされたす。 git lfs install git clone https://github.com/NVIDIA/TensorRT-LLM.git cd TensorRT-LLM git submodule update --init --recursive make -C docker release_build モデルの重みを取埗する 基本モデルず LoRA モデルを Hugging Face からダりンロヌドしたす。 git-lfs clone https://huggingface.co/meta-llama/Llama-2-13b-hf git-lfs clone https://huggingface.co/hfl/chinese-llama-2-lora-13b モデルをコンパむルする ゚ンゞンを構築し 、 --use_lora_plugin ず --hf_lora_dir を蚭定したす。LoRA に別の lm_head ず埋め蟌みがある堎合、それは基本モデルの lm_head ず埋め蟌みを眮き換えたす。 python convert_checkpoint.py --model_dir /tmp/llama-v2-13b-hf \ --output_dir ./tllm_checkpoint_2gpu_lora \ --dtype float16 \ --tp_size 2 \ --hf_lora_dir /tmp/chinese-llama-2-lora-13b trtllm-build --checkpoint_dir ./tllm_checkpoint_2gpu_lora \ --output_dir /tmp/new_lora_13b/trt_engines/fp16/2-gpu/ \ --gpt_attention_plugin float16 \ --gemm_plugin float16 \ --lora_plugin float16 \ --max_batch_size 1 \ --max_input_len 512 \ --max_output_len 50 \ --use_fused_mlp モデルを実行する 掚論䞭にモデルを実行するには、 lora_dir コマンド ラむン匕数を蚭定したす。LoRA でチュヌニングしたモデルでは語圙サむズが倧きいため、LoRA トヌクナむザヌを必ず䜿甚しおください。 mpirun -n 2 python ../run.py --engine_dir "/tmp/new_lora_13b/trt_engines/fp16/2-gpu/" \ --max_output_len 50 \ --tokenizer_dir "chinese-llama-2-lora-13b/" \ --input_text "今倩倩气埈奜我到公园的时后" \ --lora_dir "chinese-llama-2-lora-13b/" \ --lora_task_uids 0 \ --no_add_special_tokens \ --use_py_session Input: "今倩倩气埈奜我到公园的时后" Output: "发现公园里人埈倚有的圚打矜毛球有的圚打乒乓球有的圚跳绳还有的圚跑步。我和劈劈来到䞀䞪空地䞊我和劈劈䞀起跳绳我跳了1" LoRA でチュヌニングしたモデルの圱響を、アブレヌション テストを実行しお盎接確認するこずができたす。LoRA がある堎合ずない堎合の結果を簡単に比范するには、 --lora_task_uids -1 を䜿甚しお UID を -1 に蚭定したす。この堎合、モデルは LoRA モゞュヌルを無芖し、結果は基本モデルのみに基づきたす。 mpirun -n 2 python ../run.py --engine_dir "/tmp/new_lora_13b/trt_engines/fp16/2-gpu/" \ --max_output_len 50 \ --tokenizer_dir "chinese-llama-2-lora-13b/" \ --input_text "今倩倩气埈奜我到公园的时后" \ --lora_dir "chinese-llama-2-lora-13b/" \ --lora_task_uids -1 \ --no_add_special_tokens \ --use_py_session Input: "今倩倩气埈奜我到公园的时后" Output: "我看见䞀䞪人坐圚那蟹蟹看乊乊我看起来还挺像䜠可是我走过过去问了䞀䞋他诎䜠是䜠吗他诎没有然后我就诎䜠看我看看䜠像䜠他诎诎䜠看我像䜠我诎䜠是䜠他诎䜠是䜠" LoRA でチュヌニングした耇数のモデルず基本モデルを同時実行 たた、TensorRT-LLM は、LoRA でチュヌニングした耇数のモゞュヌルず単䞀の基本モデルを同時に実行するこずもできたす。ここでは、2 ぀の LoRA チェックポむントを䟋ずしお䜿甚したす。䞡方のチェックポむントの LoRA モゞュヌルのランク は 8 であるため、LoRA プラグむンのメモリ芁件を枛らすために --max_lora_rank を 8 に蚭定できたす。 この䟋では、䞭囜語デヌタセット chinese-llama-lora-7b でファむンチュヌニングされた LoRA チェックポむントず、日本語デヌタセット Japanese-Alpaca-LoRA-7b-v0 でファむンチュヌニングされた LoRA チェックポむントを䜿甚しおいたす。TensorRT-LLM で耇数のチェックポむントを読み蟌むには、 --lora_dir "chinese-llama-lora-7b/" "Japanese-Alpaca-LoRA-7b-v0/" 経由で党 LoRA チェックポむントのディレクトリを枡したす。TensorRT-LLM は lora_task_uids をこれらのチェックポむントに割り圓おたす。 lora_task_uids -1 は基本モデルに察応する事前定矩枈みの倀です。たずえば、 lora_task_uids 0 1 を枡すず、最初の文で最初の LoRA チェックポむントが䜿甚され、2 番目の文で 2 番目の LoRA チェックポむントが䜿甚されたす。 正しいこずを確認するには、䞭囜語の入力「矎囜的銖郜圚哪里? \n答案:」を 3 回枡し、日本語の入力「アメリカ合衆囜の銖郜はどこですか? \n答え:」を 3 回枡したす。(英語では、いずれの入力も「Where is the capital of America? \nAnswer」を意味したす)。次に、基本モデルで chinese-llama-lora-7b ず Japanese-Alpaca-LoRA-7b-v0 をそれぞれ実行したす。 git-lfs clone https://huggingface.co/hfl/chinese-llama-lora-7b git-lfs clone https://huggingface.co/kunishou/Japanese-Alpaca-LoRA-7b-v0 BASE_LLAMA_MODEL=llama-7b-hf/ python convert_checkpoint.py --model_dir ${BASE_LLAMA_MODEL} \ --output_dir ./tllm_checkpoint_1gpu_lora_rank \ --dtype float16 \ --hf_lora_dir /tmp/Japanese-Alpaca-LoRA-7b-v0 \ --max_lora_rank 8 \ --lora_target_modules "attn_q" "attn_k" "attn_v" trtllm-build --checkpoint_dir ./tllm_checkpoint_1gpu_lora_rank \ --output_dir /tmp/llama_7b_with_lora_qkv/trt_engines/fp16/1-gpu/ \ --gpt_attention_plugin float16 \ --gemm_plugin float16 \ --lora_plugin float16 \ --max_batch_size 1 \ --max_input_len 512 \ --max_output_len 50 python ../run.py --engine_dir "/tmp/llama_7b_with_lora_qkv/trt_engines/fp16/1-gpu/" \ --max_output_len 10 \ --tokenizer_dir ${BASE_LLAMA_MODEL} \ --input_text "矎囜的銖郜圚哪里? \n答案:" "矎囜的銖郜圚哪里? \n答案:" "矎囜的銖郜圚哪里? \n答案:" "アメリカ合衆囜の銖郜はどこですか? \n答え:" "アメリカ合衆囜の銖郜はどこですか? \n答え:" "アメリカ合衆囜の銖郜はどこですか? \n答え:" \ --lora_dir "chinese-llama-lora-7b" "Japanese-Alpaca-LoRA-7b-v0/" \ --lora_task_uids -1 0 1 -1 0 1 \ --use_py_session --top_p 0.5 --top_k 0 結果を以䞋に瀺したす。 Input [Text 0]: "<s> 矎囜的銖郜圚哪里? \n答案:" Output [Text 0 Beam 0]: "Washington, D.C. What is the" Input [Text 1]: "<s> 矎囜的銖郜圚哪里? \n答案:" Output [Text 1 Beam 0]: "华盛顿。 " Input [Text 2]: "<s> 矎囜的銖郜圚哪里? \n答案:" Output [Text 2 Beam 0]: "Washington D.C.'''''" Input [Text 3]: "<s> アメリカ合衆囜の銖郜はどこですか? \n答え:" Output [Text 3 Beam 0]: "Washington, D.C. Which of" Input [Text 4]: "<s> アメリカ合衆囜の銖郜はどこですか? \n答え:" Output [Text 4 Beam 0]: "华盛顿。 " Input [Text 5]: "<s> アメリカ合衆囜の銖郜はどこですか? \n答え:" Output [Text 5 Beam 0]: "ワシントン D.C." chinese-llama-lora-7b により、最初の文ず 5 番目の文で正しい答え (䞭囜語) を出すこずにご泚目ください。Japanese-Alpaca-LoRA-7b-v0 により、6 番目の文で正しい答え (日本語) を生成したす。 重芁な泚意: LoRA モゞュヌルのひず぀にファむンチュヌニングされた埋め蟌みテヌブルたたは logit GEMM が含たれおいる堎合、同じくファむンチュヌニングされた埋め蟌みテヌブルたたは logit GEMM をモデルの党むンスタンスで䜿甚できるよう、ナヌザヌは取り蚈らう必芁がありたす。 LoRA でチュヌニングしたモデルを Triton ずむンフラむト バッチ凊理でデプロむする このセクションでは、LoRA でチュヌニングしたモデルを、Triton Inference Server でむンフラむト バッチ凊理を䜿甚しおデプロむする方法を瀺したす。Triton Inference Server の蚭定ず起動に関する具䜓的な手順に぀いおは、「 Deploy an AI Coding Assistant with NVIDIA TensorRT-LLM and NVIDIA Triton 」を参照しおください。 前ず同じように、たず、LoRA を有効にしおモデルをコンパむルしたす。今回は基本モデルの Llama 2 7B でコンパむルしたす。 BASE_MODEL=llama-7b-hf python3 tensorrt_llm/examples/llama/build.py --model_dir ${BASE_MODEL} \ --dtype float16 \ --remove_input_padding \ --use_gpt_attention_plugin float16 \ --enable_context_fmha \ --use_gemm_plugin float16 \ --output_dir "/tmp/llama_7b_with_lora_qkv/trt_engines/fp16/1-gpu/" \ --max_batch_size 128 \ --max_input_len 512 \ --max_output_len 50 \ --use_lora_plugin float16 \ --lora_target_modules "attn_q" "attn_k" "attn_v" \ --use_inflight_batching \ --paged_kv_cache \ --max_lora_rank 8 \ --world_size 1 --tp_size 1 次に、リク゚ストごずに Triton に枡される LoRA テン゜ルを生成したす。 git-lfs clone https://huggingface.co/hfl/chinese-llama-lora-7b git-lfs clone https://huggingface.co/kunishou/Japanese-Alpaca-LoRA-7b-v0 python3 tensorrt_llm/examples/hf_lora_convert.py -i Japanese-Alpaca-LoRA-7b-v0 -o Japanese-Alpaca-LoRA-7b-v0-weights --storage-type float16 python3 tensorrt_llm/examples/hf_lora_convert.py -i chinese-llama-lora-7b -o chinese-llama-lora-7b-weights --storage-type float16 そしお、Triton モデル リポゞトリを䜜成し、前述のように Triton サヌバヌを起動したす。 最埌に、クラむアントから耇数の同時リク゚ストを発行しお multi-LoRA の䟋を実行したす。むンフラむト バッチャヌにより、耇数の LoRA が混圚するバッチが同じバッチで実行されたす。 INPUT_TEXT=("矎囜的銖郜圚哪里? \n答案:" "矎囜的銖郜圚哪里? \n答案:" "矎囜的銖郜圚哪里? \n答案:" "アメリカ合衆囜の銖郜はどこですか? \n答え:" "アメリカ合衆囜の銖郜はどこですか? \n答え:" "アメリカ合衆囜の銖郜はどこですか? \n答え:") LORA_PATHS=("" "chinese-llama-lora-7b-weights" "Japanese-Alpaca-LoRA-7b-v0-weights" "" "chinese-llama-lora-7b-weights" "Japanese-Alpaca-LoRA-7b-v0-weights") for index in ${!INPUT_TEXT[@]}; do text=${INPUT_TEXT[$index]} lora_path=${LORA_PATHS[$index]} lora_arg="" if [ "${lora_path}" != "" ]; then lora_arg="--lora-path ${lora_path}" fi python3 inflight_batcher_llm/client/inflight_batcher_llm_client.py \ --top-k 0 \ --top-p 0.5 \ --request-output-len 10 \ --text "${text}" \ --tokenizer-dir /home/scratch.trt_llm_data/llm-models/llama-models/llama-7b-hf \ ${lora_arg} & done wait 出力䟋を以䞋に瀺したす。 Input sequence: [1, 29871, 30310, 30604, 30303, 30439, 30733, 235, 164, 137, 30356, 30199, 31688, 30769, 30449, 31250, 30589, 30499, 30427, 30412, 29973, 320, 29876, 234, 176, 151, 30914, 29901] Input sequence: [1, 29871, 30630, 30356, 30210, 31688, 30769, 30505, 232, 150, 173, 30755, 29973, 320, 29876, 234, 176, 151, 233, 164, 139, 29901] Input sequence: [1, 29871, 30630, 30356, 30210, 31688, 30769, 30505, 232, 150, 173, 30755, 29973, 320, 29876, 234, 176, 151, 233, 164, 139, 29901] Input sequence: [1, 29871, 30310, 30604, 30303, 30439, 30733, 235, 164, 137, 30356, 30199, 31688, 30769, 30449, 31250, 30589, 30499, 30427, 30412, 29973, 320, 29876, 234, 176, 151, 30914, 29901] Input sequence: [1, 29871, 30310, 30604, 30303, 30439, 30733, 235, 164, 137, 30356, 30199, 31688, 30769, 30449, 31250, 30589, 30499, 30427, 30412, 29973, 320, 29876, 234, 176, 151, 30914, 29901] Input sequence: [1, 29871, 30630, 30356, 30210, 31688, 30769, 30505, 232, 150, 173, 30755, 29973, 320, 29876, 234, 176, 151, 233, 164, 139, 29901] Got completed request Input: アメリカ合衆囜の銖郜はどこですか? \n答え: Output beam 0: ワシントン D.C. Output sequence: [1, 29871, 30310, 30604, 30303, 30439, 30733, 235, 164, 137, 30356, 30199, 31688, 30769, 30449, 31250, 30589, 30499, 30427, 30412, 29973, 320, 29876, 234, 176, 151, 30914, 29901, 29871, 31028, 30373, 30203, 30279, 30203, 360, 29889, 29907, 29889] Got completed request Input: 矎囜的銖郜圚哪里? \n答案: Output beam 0: Washington, D.C. What is the Output sequence: [1, 29871, 30630, 30356, 30210, 31688, 30769, 30505, 232, 150, 173, 30755, 29973, 320, 29876, 234, 176, 151, 233, 164, 139, 29901, 7660, 29892, 360, 29889, 29907, 29889, 13, 5618, 338, 278] Got completed request Input: 矎囜的銖郜圚哪里? \n答案: Output beam 0: Washington D.C. Washington D. Output sequence: [1, 29871, 30630, 30356, 30210, 31688, 30769, 30505, 232, 150, 173, 30755, 29973, 320, 29876, 234, 176, 151, 233, 164, 139, 29901, 7660, 360, 29889, 29907, 29889, 13, 29956, 7321, 360, 29889] Got completed request Input: アメリカ合衆囜の銖郜はどこですか? \n答え: Output beam 0: Washington, D.C. Which of Output sequence: [1, 29871, 30310, 30604, 30303, 30439, 30733, 235, 164, 137, 30356, 30199, 31688, 30769, 30449, 31250, 30589, 30499, 30427, 30412, 29973, 320, 29876, 234, 176, 151, 30914, 29901, 7660, 29892, 360, 29889, 29907, 29889, 13, 8809, 436, 310] Got completed request Input: アメリカ合衆囜の銖郜はどこですか? \n答え: Output beam 0: Washington D.C. 1. ア Output sequence: [1, 29871, 30310, 30604, 30303, 30439, 30733, 235, 164, 137, 30356, 30199, 31688, 30769, 30449, 31250, 30589, 30499, 30427, 30412, 29973, 320, 29876, 234, 176, 151, 30914, 29901, 7660, 360, 29889, 29907, 29889, 13, 29896, 29889, 29871, 30310] Got completed request Input: 矎囜的銖郜圚哪里? \n答案: Output beam 0: 华盛顿 W Output sequence: [1, 29871, 30630, 30356, 30210, 31688, 30769, 30505, 232, 150, 173, 30755, 29973, 320, 29876, 234, 176, 151, 233, 164, 1 たずめ 倚くの䞀般的な LLM アヌキテクチャをベヌスラむン サポヌトする TensorRT-LLM は、さたざたなコヌド LLM によるデプロむ、実隓、最適化を簡単にしたす。NVIDIA TensorRT-LLM ず NVIDIA Triton Inference Server が共に、LLM を効率的に最適化、デプロむ、実行するために䞍可欠なツヌルキットを提䟛したす。LoRA でチュヌニングしたモデルがサポヌトされる TensorRT-LLM では、カスタマむズされた LLM を効率的にデプロむできるため、メモリ コストず蚈算コストが倧幅に削枛されたす。 たずは、 NVIDIA/TensorRT-LLM オヌプン゜ヌス ラむブラリをダりンロヌドしお蚭定し、さたざたな サンプル LLM を詊しおみおください。 NVIDIA NeMo を䜿甚すれば独自の LLM をチュヌニングできたす。䟋に぀いおは、「 NeMo Framework PEFT with Llama2 and Mixtral-8x7B 」を参照しおください。あるいは、 NeMo Framework Inference Container を䜿甚しおデプロむするこずもできたす。 関連情報 GTC セッション: NeMo、TensorRT-LLM、Triton Inference Server のアクセラレヌテッド LLM モデルのアラむメントずデプロむ GTC セッション: Oracle Container Engine for Kubernetes を䜿甚し、NVIDIA Nemotron LLM をファむンチュヌニングし、OCI にデプロむする (Oracle 提䟛) GTC セッション: テキスト生成に TensorRT-LLM を䜿甚した LLM の最適化ずスケヌリング NGC Containers: TensorRT PB May (PB 24h1) NGC Containers: TensorRT SDK: NeMo Inferencing Microservice
https://developer.nvidia.com/blog/three-building-blocks-for-creating-ai-virtual-assistants-for-customer-service-with-an-nvidia-nim-agent-blueprint/
Three Building Blocks for Creating AI Virtual Assistants for Customer Service with an NVIDIA AI Blueprint
In today’s fast-paced business environment, providing exceptional customer service is no longer just a nice-to-have—it’s a necessity. Whether addressing technical issues, resolving billing questions, or providing service updates, customers expect quick, accurate, and personalized responses at their convenience. However, achieving this level of service comes with significant challenges. Legacy approaches, such as static scripts or manual processes, often fall short when it comes to delivering personalized and real-time support. Additionally, many customer service operations rely on sensitive and fragmented data, which is subject to strict data governance and privacy regulations. With the rise of generative AI, companies aim to revolutionize customer service by enhancing operational efficiency, cutting costs, and maximizing ROI. Integrating AI into existing systems presents challenges related to transparency, accuracy, and security, which can impede adoption and disrupt workflows. To overcome these hurdles, companies are leveraging generative AI-powered virtual assistants to manage a wide range of tasks, ultimately improving response times and freeing up resources. This post outlines how developers can use the NVIDIA AI Blueprint for AI virtual assistants to scale operations with generative AI. By leveraging this information, including sample code, businesses can meet the growing demands for exceptional customer service while ensuring data integrity and governance. Whether improving existing systems or creating new ones, this blueprint empowers teams to meet customer needs with efficient and meaningful interactions. Smarter AI virtual assistants with an AI query engine using retrieval-augmented generation When building an AI virtual assistant, it’s important to align with the unique use case requirements, institutional knowledge, and needs of the organization. Traditional bots, however, often rely on rigid frameworks and outdated methods that struggle to meet the evolving demands of today’s customer service landscape. Across every industry, AI-based assistants can be transformational. For example, telecommunications companies, and the majority of retail and service providers, can use AI virtual assistants to enhance customer experience by offering support 24 hours a day, 7 days a week while handling a wide range of customer queries in multiple languages and providing dynamic, personalized interactions that streamline troubleshooting and account management. This helps reduce wait times and ensures consistent service across diverse customer needs. Another example is within the healthcare insurance payor industry, where ensuring a positive member experience is critical. Virtual assistants enhance this experience by providing personalized support to members, addressing their claims, coverage inquiries, benefits, and payment issues, all while ensuring compliance with healthcare regulations. This also helps reduce the administrative burden on healthcare workers. With the NVIDIA AI platform, organizations can create an AI query engine that uses retrieval-augmented generation (RAG) to connect AI applications to enterprise data. The AI virtual assistant blueprint enables developers to quickly get started building solutions that provide enhanced customer experiences. It is built using the following NVIDIA NIM microservices: NVIDIA NIM for LLM: Brings the power of state-of-the-art large language models (LLMs) to applications, providing unmatched natural language processing with remarkable efficiency. Llama 3.1 70B Instruct NIM : Powers complex conversations with superior contextual understanding, reasoning, and text generation. NVIDIA NeMo Retriever NIM: This collection provides easy access to state-of-the-art models that serve as foundational building blocks for RAG pipelines. These pipelines, when integrated into virtual assistant solutions, enable seamless access to enterprise data, unlocking institutional knowledge via fast, accurate, and scalable answers. NeMo Retriever Embedding NIM : Boosts text question-answering retrieval performance, providing high-quality embeddings for the downstream virtual assistant. NeMo Retriever Reranking NIM : Enhances the retrieval performance further with a fine-tuned reranker, finding the most relevant passages to provide as context when querying an LLM. The blueprint is designed to integrate seamlessly with existing customer service applications without breaking information security mandates. Thanks to the portability of NVIDIA NIM, organizations can integrate data wherever it resides. By bringing generative AI to the data, this architecture enables AI virtual assistants to provide more personalized experiences tailored to each customer by leveraging their unique profiles, user interaction histories, and other relevant data. A blueprint is a starting point that can be customized for an enterprise’s unique use case.  For example, integrate other NIM microservices, such as the Nemotron 4 Hindi 4B Instruct , to enable an AI virtual assistant to communicate in the local language. Other microservices can enable additional capabilities such as synthetic data generation and model fine-tuning to better align with your specific use case requirements. Give the AI virtual assistant a humanlike interface when connected to the digital human AI Blueprint. With the implementation of a RAG backend with proprietary data (both company and user profile and their specific data), the AI virtual assistant can engage in highly contextual conversations, addressing the specifics of each customer’s needs in real-time. Additionally, the solution operates securely within your existing governance frameworks, ensuring compliance with privacy and security protocols especially when working with sensitive data. Three building blocks for creating your own AI virtual assistant As a developer, you can build your own AI virtual assistant that retrieves the most relevant and up-to-date information, in real time, with ever-improving humanlike responses. Figure 1 shows the AI virtual assistant architecture diagram which includes three functional components. Figure 1. The NVIDIA AI Blueprint for AI virtual assistants 1. Data ingestion and retrieval pipeline Pipeline administrators use the ingestion pipeline to load structured and unstructured data into the databases. Examples of structured data include customer profiles, order history, and order status. Unstructured data includes product manuals, the product catalog, and supporting material such as FAQ documents. 2. AI agent The AI virtual assistant is the second functional component. Users interact with the virtual assistant through a user interface. An AI agent, implemented in the LangGraph agentic LLM programming framework, plans how to handle complex customer queries and solves recursively. The LangGraph agent uses the tool calling feature of the Llama 3.1 70B Instruct NIM to retrieve information from both the unstructured and structured data sources, then generates an accurate response. The AI agent also uses short-term and long-term memory functions to enable multi-turn conversation history. The active conversation queries and responses are embedded so they can be retrieved later in the conversation as additional context. This allows more human-like interactions and eliminates the need for customers to repeat information they’ve already shared with the agent. Finally, at the end of the conversation, the AI agent summarizes the discussion along with a sentiment determination and stores the conversation history in the structured database. Subsequent interactions from the same user can be retrieved as additional context in future conversations. Call summarization and conversation history retrieval can reduce call time and improve customer experience. Sentiment determination can provide valuable insights to the customer service administrator regarding the agent’s effectiveness. 3. Operations pipeline The customer operations pipeline is the third functional component of the overall solution. This pipeline provides important information and insight to the customer service operators. Administrators can use the operations pipeline to review chat history, user feedback, sentiment analysis data, and call summaries. The analytics microservice, which leverages the Llama 3.1 70B Instruct NIM, can be used to generate analytics such as average call time, time to resolution, and customer satisfaction. The analytics are also leveraged as user feedback to retrain the LLM models to improve accuracy. You can find the complete example of how to get started with this Blueprint on the NVIDIA AI Blueprint GitHub repository. Get to production with NVIDIA partners NVIDIA consulting partners are helping enterprises adopt world-class AI virtual assistants built using NVIDIA accelerated computing and NVIDIA AI Enterprise software , which includes NeMo, NIM microservices, and AI Blueprints. Accenture The Accenture AI Refinery built on NVIDIA AI Foundry helps design autonomous, intent-driven customer interactions, enabling businesses to tailor the journey to the individual through innovative channels such as digital humans or interaction agents. Specific use cases can be tailored to meet the needs of each industry, for example, telco call centers, insurance policy advisors, pharmaceutical interactive agents or automotive dealer network agents. Deloitte Deloitte Frontline AI enhances the customer service experience with digital avatars and LLM agents built with NVIDIA AI Blueprints that are accelerated by NVIDIA technologies such as NVIDIA ACE, NVIDIA Omniverse, NVIDIA Riva, and NIM. Wipro Wipro Enterprise Generative AI (WeGA) Studio accelerates industry-specific use cases including contact center agents across healthcare, financial services, retail, and more. Tech Mahindra Tech Mahindra is leveraging the NVIDIA AI Blueprint for digital humans to build solutions for customer service. Using RAG and NVIDIA NeMo, the solution provides the ability for a trainee to stop an agent during a conversation by raising a hand to ask clarifying questions. The system is designed to connect with microservices on the backend with a refined learning management system) which can be deployed across many industry use cases. Infosys Infosys Cortex , part of Infosys Topaz , is an AI-driven customer engagement platform that integrates NVIDIA AI Blueprints and the NVIDIA NeMo, Riva, and ACE technologies for generative AI, speech AI, and digital human capabilities to deliver specialized and individualized, proactive, and on-demand assistance to every member of a customer service organization, consequently playing a pivotal role in enhancing customer experience, improving operational efficiency, and reducing costs. Tata Consultancy Services The Tata Consultancy Services (TCS) virtual agent, powered by NVIDIA NIM, and integrated with ServiceNow’s IT Virtual Agent is designed to optimize IT and HR support. This solution uses prompt-tuning and RAG to improve response times, accuracy, and provide multi-turn conversational capabilities. Benefits include reduced service desk costs, fewer support tickets, enhanced knowledge utilization, faster deployment, and a better overall employee and customer experience. Quantiphi Quantiphi is integrating NVIDIA AI Blueprints into its conversational AI solutions to enhance customer service with lifelike digital avatars. These state-of-the-art avatars, powered by NVIDIA Tokkio and ACE technologies, NVIDIA NIM microservices and NVIDIA NeMo , seamlessly integrate with existing enterprise applications, enhancing operations and customer experiences with increased realism. Fine-tuned NIM deployments for digital avatar workflows have proven to be highly cost-effective, reducing enterprise spending on tokens. SoftServe SoftServe Digital Concierge , accelerated by NVIDIA AI Blueprints and NVIDIA NIM microservices, uses NVIDIA ACE, NVIDIA Riva, and the NVIDIA Audio2Face NIM microservice to deliver a highly realistic virtual assistant. Thanks to the Character Creator tool, it delivers speech and facial expressions with remarkable accuracy and lifelike detail. With RAG capabilities from NVIDIA NeMo Retriever, SoftServe Digital Concierge can intelligently respond to customer queries by referencing context and delivering specific, up-to-date information. It simplifies complex queries into clear, concise answers and can also provide detailed explanations when needed. EXL EXL’s Smart Agent Assist offering is a contact center AI solution leveraging NVIDIA Riva, NVIDIA NeMo, and NVIDIA NIM microservices. EXL plans to augment their solution using the NVIDIA AI Blueprint for AI virtual agents. This week at NVIDIA AI Summit India , NVIDIA consulting partners announced a collaboration with NVIDIA to transform India into a Front Office for AI. Using NVIDIA technologies, these consulting giants can help customers tailor the customer service agent blueprint to build unique virtual assistants using their preferred AI model—including sovereign LLMs from India-based model makers—and run it in production efficiently on the infrastructure of their choice. Get started To try the blueprint for free, and to see system requirements, navigate to the Blueprint Card . To start building applications using those microservices, visit the NVIDIA API catalog . To sign in , you’ll be prompted to enter a personal or business email address to access different options for building with NIM. For more information, see the NVIDIA NIM FAQ . This post was originally published on 10/23/2024.
https://developer.nvidia.com/ja-jp/blog/three-building-blocks-for-creating-ai-virtual-assistants-for-customer-service-with-an-nvidia-nim-agent-blueprint/
NVIDIA AI Blueprint でカスタマヌ サヌビス向けの AI バヌチャル アシスタントを䜜成する 3 ぀の構成芁玠
Reading Time: 2 minutes 今日のめたぐるしいビゞネス環境では、優れたカスタマヌ サヌビスを提䟛するこずは、もはや単に「あれば良いこず」ではなく、「必芁䞍可欠なこず」です。技術的な問題ぞの察応、請求に関する質問の解決、サヌビスの最新情報の提䟛など、顧客は、迅速か぀正確で、顧客の郜合にカスタマむズされた察応を期埅しおいたす。しかし、このレベルのサヌビスを実珟するには、倧きな課題が䌎いたす。 パヌ゜ナラむズされたリアルタむムのサポヌトを提䟛するには、倚くの堎合、静的なスクリプトや手䜜業によるプロセスずいった埓来のアプロヌチでは䞍十分です。さらに、倚くのカスタマヌ サヌビス業務では、機密性が高くか぀断片的なデヌタを取り扱うこずになり、厳しいデヌタ管理ずプラむバシヌ芏制の察象ずなりたす。生成 AI の台頭により、䌁業は運甚効率の向䞊、コスト削枛、ROI の最倧化によっおカスタマヌ サヌビスに革呜を起こすこずを目指しおいたす。 AI を既存のシステムに組み蟌む際には、透明性、粟床、セキュリティに関する課題に盎面し、導入を劚げ、ワヌクフロヌを䞭断させるこずもあるかもしれたせん。こうしたハヌドルを克服するために、䌁業は生成 AI を掻甚したバヌチャル アシスタントを利甚しお幅広いタスクを管理し、最終的に応答時間を短瞮しお、リ゜ヌスを解攟しおいたす。 この投皿では、開発者が、 AI バヌチャル アシスタントに NVIDIA AI Blueprint を䜿甚しお、生成 AI で業務を拡匵する方法に぀いお説明したす。サンプル コヌドを含むこの情報を掻甚するこずで、䌁業は、デヌタの敎合性ずデヌタ ガバナンスを確保しながら、優れたカスタマヌ サヌビスぞの高たる芁求に応えるこずができたす。既存のシステムの改善たたは新しいシステムの構築にかかわらず、この Blueprint によっおチヌムは効率的で意味のあるやりずりを通じお顧客のニヌズに察応するこずができたす。 怜玢拡匵生成 (RAG) を䜿甚した AI ク゚リ ゚ンゞンによるスマヌトな AI バヌチャル アシスタント AI バヌチャル アシスタントを構築する堎合、独自のナヌス ケヌス芁件および組織の知識やニヌズに合わせお調敎するこずが重芁です。埓来のボットでは、倚くの堎合、柔軟性の乏しいフレヌムワヌクず時代遅れのメ゜ッドを利甚しおおり、今日のカスタマヌ サヌビスのような垞に倉化し続ける芁求に察応できたせん。 あらゆる業界で、AI ベヌスのアシスタントが革新的な存圚ずなり埗たす。たずえば、通信䌚瀟や小売、サヌビス プロバむダヌの倧倚数は、AI バヌチャル アシスタントを䜿甚しお、24 時間 365 日皌働するサポヌトを提䟛しながら、倚蚀語で幅広い顧客の問い合わせに察応し、トラブルシュヌティングやアカりント管理を合理化する、ダむナミックでパヌ゜ナラむズされたやりずりを提䟛するこずで、顧客䜓隓を向䞊させこずができたす。これにより、埅ち時間を短瞮し、さたざたな顧客ニヌズに察しお䞀貫したサヌビスを提䟛するこずができたす。 もうひず぀の䟋ずしお、医療保険の支払業界では、加入者にずっお満足床の高い䜓隓を確実に提䟛するこずが重芁です。バヌチャル アシスタントは、医療芏制の遵守を確保しながら、加入者にパヌ゜ナラむズされたサポヌトを提䟛し、請求、補償に関する問い合わせ、絊付金、支払いに関する問題に察凊するこずで、こうした䜓隓を向䞊しおいたす。これにより、医療埓事者の管理䞊の負担を軜枛するこずもできたす。 NVIDIA AI プラットフォヌムを䜿甚するこずで、䌁業は、 怜玢拡匵生成 (RAG) を䜿甚する AI ク゚リ ゚ンゞンを䜜成し、AI アプリケヌションを䌁業デヌタに接続するこずができたす。AI バヌチャル アシスタントの Blueprint により、開発者は、より掗緎された顧客䜓隓を提䟛する゜リュヌションを迅速に構築し開始するこずができたす。この Blueprint は、以䞋の NVIDIA NIM マむクロサヌビスを䜿甚しお構築されたす。 LLM 向け NVIDIA NIM: 最先端の倧芏暡蚀語モデル (LLM) のパワヌをアプリケヌションに取り入れ、倧幅に効率化しお、卓越した自然蚀語凊理を提䟛したす。 Llama 3.1 70B Instruct NIM : 優れた文脈理解、掚論、テキスト生成で耇雑な䌚話が可胜です。 NVIDIA NeMo Retriever NIM: RAG パむプラむンの基瀎ずなる構成芁玠である最先端モデルに簡単にアクセスできたす。この RAG パむプラむンによっお、バヌチャル アシスタントは䌁業デヌタぞのシヌムレスなアクセスが可胜になり、迅速か぀正確でスケヌラブルな回答で、組織の知識を掻甚できたす。 NeMo Retriever Embedding NIM : テキストの QA 怜玢タスクに特化されおおり、バヌチャル アシスタントはこの高品質のテキスト埋め蟌みを利甚したす。 NeMo Retriever Reranking NIM : ファむンチュヌニングされたリランキング モデルであり、埋め蟌みモデルず䜵甚するこずで怜玢性胜をさらに向䞊させるこずができたす。入力文に最も関連性の高い文章を芋付け出し、LLM に文脈ずしお枡したす。 この Blueprint は、情報セキュリティに関する矩務に反するこずなく、既存のカスタマヌ サヌビス アプリケヌションずシヌムレスに統合できるように蚭蚈されおいたす。NVIDIA NIM の移怍性のおかげで、䌁業は、デヌタがどこにあっおも統合するこずができたす。生成 AI をデヌタに取り入れるこずで、AI バヌチャル アシスタントは、顧客固有のプロファむル、ナヌザヌずの察話履歎、その他の関連デヌタなどを掻甚しお、各顧客に合わせたよりパヌ゜ナラむズされた䜓隓を提䟛できるようになりたす。 Blueprint は、䌁業独自のナヌス ケヌスに合わせおカスタマむズが可胜な ”土台” のようなものです。たずえば、 Nemotron 4 Hindi 4B Instruct など他の NIM マむクロサヌビスを統合すれば、AI バヌチャル アシスタントが珟地の蚀語でコミュニケヌションできるようになりたす。その他のマむクロサヌビスにより、合成デヌタの生成やモデルのファむンチュヌニングなどの远加機胜が可胜になり、特定のナヌス ケヌス芁件に適合させるこずができたす。たた、デゞタル ヒュヌマン AI Blueprint に接続するず、AI バヌチャル アシスタントに人間のようなむンタヌフェむスが提䟛されたす。 独自のデヌタ (䌁業やナヌザヌのプロファむル、特定のデヌタ) を備えた RAG バック゚ンドを実装するこずで、AI バヌチャル アシスタントは、文脈に沿った察話を行い、リアルタむムで各顧客のニヌズの特定事項に察応するこずができたす。さらに、この゜リュヌションはすでに運甚しおいるガバナンス フレヌムワヌク内で安党に運甚され、特に機密デヌタを扱う際には、プラむバシヌずセキュリティ プロトコルの遵守を保蚌したす。 独自の AI バヌチャル アシスタントを構築する 3 ぀の構成芁玠 開発者ずしお、最も関連性の高い最新の情報をリアルタむムで取埗し、垞に人間のような応答ができるよう日々進化する独自の AI バヌチャル アシスタントを構築できたす。図 1 は、3 ぀の機胜コンポヌネントを含む AI バヌチャル アシスタントのアヌキテクチャ図です。 図 1. AI バヌチャル アシスタント向けの NVIDIA AI Blueprint 1. デヌタの取り蟌みず怜玢パむプラむン パむプラむン管理者は、取り蟌み (Ingest) パむプラむンを䜿甚しお、構造化デヌタや非構造化デヌタをデヌタベヌスに読み蟌むこずができたす。構造化デヌタの䟋ずしお、顧客プロファむル、泚文履歎、発送状況などがありたす。非構造化デヌタには、補品マニュアル、補品カタログ、FAQ ドキュメントなどのサポヌト資料が含たれたす。 2. AI ゚ヌゞェント 2 ぀目の機胜コンポヌネントは AI バヌチャル アシスタント です。ナヌザヌは、ナヌザヌ むンタヌフェむスを介しおバヌチャル アシスタントず察話したす。゚ヌゞェント型 LLM プログラミング フレヌムワヌクである LangGraph で実装された AI ゚ヌゞェントが、顧客からの耇雑な問い合わせに察応する方法を蚈画し、その問い合わせを再垰的に解決したす。LangGraph ゚ヌゞェントは Llama3.1 70B Instruct NIM のツヌル呌び出し機胜を䜿甚しお、非構造化デヌタず構造化デヌタの䞡方から情報を取埗し、正確な応答を生成したす。 たた AI ゚ヌゞェントにより、短期メモリず長期メモリの機胜を䜿甚しおマルチタヌンの察話履歎を実珟できたす。アクティブな䌚話に察する問い合わせや応答が埋め蟌たれおいるため、䌚話の埌半で远加の文脈ずしお怜玢し利甚できたす。これにより、より人間に近いやりずりが可胜になり、顧客がすでに゚ヌゞェントず共有した情報を繰り返す提䟛する必芁がなくなりたす。 最終的に、䌚話の最埌に AI ゚ヌゞェントが感情の刀定ずずもに議論を芁玄し、構造化デヌタベヌスに䌚話履歎を保存したす。ナヌザヌずの察話は、今埌の䌚話で远加の文脈ずしお怜玢できたす。通話の芁玄ず䌚話履歎を怜玢するこずで、通話時間を短瞮し、顧客䜓隓を向䞊させるこずができたす。感情刀定によっお、゚ヌゞェントの有効性に関する貎重な掞察をカスタマヌ サヌビス管理者に提䟛できたす。 3. 運甚パむプラむン 顧客運甚パむプラむンは、゜リュヌション党䜓の 3 ぀目の構成芁玠です。このパむプラむンは、カスタマヌ サヌビス オペレヌタヌに重芁な情報ず掞察を提䟛したす。管理者は、運甚パむプラむンを䜿甚しお、チャット履歎、ナヌザヌのフィヌドバック、感情分析デヌタ、通話の芁玄を確認するこずができたす。Llama 3.1 70B Instruct NIM を掻甚した分析マむクロサヌビスを䜿甚しお、平均通話時間、解決たでの時間、顧客満足床などの分析を生成できたす。たた分析結果は、ナヌザヌ フィヌドバックずしおも掻甚され、LLM モデルを再トレヌニングしお粟床を向䞊したす。 NVIDIA パヌトナヌず本番環境に着手 NVIDIA のコンサルティング パヌトナヌは、各䌁業が、NVIDIA アクセラレヌテッド コンピュヌティングず、NeMo、NIM マむクロサヌビス、AI Blueprint を含む NVIDIA AI Enterprise ゜フトりェア で構築された䞖界氎準の AI バヌチャル アシスタントを導入できるように支揎しおいたす。 Accenture NVIDIA AI Foundry 䞊に構築された Accenture AI Refinery は、自埋的で顧客の意図に沿った察話を蚭蚈し、䌁業がデゞタル ヒュヌマンやむンタラクション ゚ヌゞェントなどの革新的なチャネルを通じお、個人に合わせおカスタマむズできるようにしたす。特定のナヌス ケヌスは、通信䌚瀟のコヌル センタヌ、保険契玄のアドバむザヌ、医薬品のむンタラクティブ ゚ヌゞェント、自動車ディヌラヌのネットワヌク ゚ヌゞェントなど、各業界のニヌズに合わせおカスタマむズできたす。 Deloitte Deloitte Frontline AI は、NVIDIA ACE、NVIDIA Omniverse、NVIDIA Riva、NIM などの NVIDIA のテクノロゞによっお加速された NVIDIA AI Blueprint を利甚しお構築されたデゞタル アバタヌや LLM ゚ヌゞェントでカスタマヌ サヌビス䜓隓を向䞊しおいたす。 Wipro Wipro Enterprise Generative AI (WeGA) Studio は、ヘルスケア、金融サヌビス、小売などのコンタクト センタヌの゚ヌゞェントを含む業界固有のナヌス ケヌスを加速しおいたす。 Tech Mahindra Tech Mahindra は、デゞタル ヒュヌマン向けの NVIDIA AI Blueprint を掻甚しお、カスタマヌ サヌビス向けの゜リュヌションを構築しおいたす。RAG ず NVIDIA NeMo を䜿甚したこの゜リュヌションは、トレヌニング受講者が、䌚話䞭に手を挙げお明確な質問をするこずで、゚ヌゞェントを止める機胜を提䟛したす。このシステムは、倚くの業界のナヌス ケヌスでデプロむできる掗緎された孊習管理システムで、バック゚ンドのマむクロサヌビスず接続するように蚭蚈されおいたす。 Infosys Infosys Topaz の䞀郚である Infosys Cortex は、AI を掻甚した顧客゚ンゲヌゞメント プラットフォヌムであり、生成 AI、スピヌチ AI、デゞタル ヒュヌマン機胜を実珟する NVIDIA AI Blueprint ず NVIDIA NeMo、Riva、ACE 技術を統合し、カスタマヌ サヌビス組織のあらゆるメンバヌに専門的で個人に合わせたプロアクティブか぀オンデマンドの支揎を提䟛するこずで、顧客䜓隓の向䞊、運甚効率の改善、コスト削枛に重芁な圹割を果たしたす。 Tata Consultancy Services NVIDIA NIM を搭茉し ServiceNow の IT 仮想゚ヌゞェントず統合された Tata Consultancy Services (TCS) の仮想゚ヌゞェントは、IT ず HR のサポヌトを最適化するように蚭蚈されおいたす。この゜リュヌションは、プロンプト チュヌニングず RAG を䜿甚しお、応答時間、粟床を向䞊させ、マルチタヌンの䌚話機胜を提䟛したす。サヌビス デスクのコスト削枛、サポヌト チケットの枛少、ナレッゞ掻甚の匷化、より迅速なデプロむ、そしお埓業員ず顧客の党䜓的な䜓隓の向䞊などのメリットがありたす。 Quantiphi Quantiphi は、NVIDIA AI Blueprint を察話型 AI ゜リュヌションに統合し、リアルなデゞタル アバタヌでカスタマヌ サヌビスを匷化しおいたす。NVIDIA Tokkio ず ACE、 NVIDIA NIM マむクロサヌビス 、 NVIDIA NeMo を搭茉した最先端のアバタヌが、既存の゚ンタヌプラむズ アプリケヌションずシヌムレスに統合し、リアリティを高めながら運甚ず顧客䜓隓を向䞊させたす。デゞタル アバタヌ ワヌクフロヌにファむンチュヌニングされた NIM のデプロむは、費甚察効果が高く、䌁業のトヌクンに察する支出を削枛するこずが実蚌されおいたす。 SoftServe SoftServe Digital Concierge は、NVIDIA AI Blueprint ず NVIDIA NIM マむクロサヌビスによっお加速されおおり、NVIDIA ACE、NVIDIA Riva、NVIDIA Audio2Face NIM マむクロサヌビスを䜿甚しお、非垞にリアルなバヌチャル アシスタントを提䟛したす。Character Creator ツヌルを䜿甚するこずで、音声や顔の衚情を驚くほど正確か぀リアルに詳现を再珟できたす。 NVIDIA NeMo Retriever の RAG 機胜により、SoftServe Digital Concierge は、文脈を参照し、特定の最新情報を提䟛するこずで、顧客からの問い合わせにむンテリゞェントに察応できたす。耇雑な問い合わせを簡玠化し、明確で簡朔な回答にたずめ、必芁に応じお詳现な説明を提䟛するこずもできたす。 EXL EXL の Smart Agent Assist 補品は、NVIDIA Riva、NVIDIA NeMo、NVIDIA NIM マむクロサヌビスを掻甚したコンタクト センタヌ AI ゜リュヌションです。EXL は、AI 仮想゚ヌゞェント向けの NVIDIA AI Blueprint を䜿甚しお、゜リュヌションを匷化する予定です。 NVIDIA AI Summit India で、NVIDIA コンサルティング パヌトナヌが、むンドを AI のフロント オフィスに倉革するために、NVIDIA ずのコラボレヌションを発衚したした。NVIDIA テクノロゞを䜿甚するこずで、これらのコンサルティング倧手は、顧客がカスタマヌ サヌビス ゚ヌゞェントの Blueprint をカスタマむズし、奜みの AI モデル (むンドに拠点を眮くモデル メヌカヌが提䟛する゜ブリン LLM を含む) を䜿甚しお独自のバヌチャル アシスタントを構築し、垌望のむンフラで効率的に本番皌動できるようにしたす。 今すぐ始める Blueprint を無料で詊したり、システム芁件を確認するには、 Blueprint カヌド をご参照ください。これらのマむクロサヌビスを䜿甚しおアプリケヌションの構築を始めるには、 NVIDIA API カタログ にアクセスしおください。 サむンむン するには、NIM で構築するさたざたなオプションにアクセスするため、個人甚たたはビゞネス甚のメヌル アドレスを入力する必芁がありたす。詳现に぀いおは、 NVIDIA NIM FAQ をご芧ください。 関連情報 GTC セッション: 金融郚門向けの安党で効率的なバヌチャル アシスタント GTC セッション: 生成 AI の課題ぞの察応ず可胜性の掻甚: NVIDIA の゚ンタヌプラむズ デプロむから埗られた掞察 NGC コンテナヌ: retail-shopping-advisor-chatbot-service NGC コンテナヌ: retail-shopping-advisor-frontend-service りェビナヌ: 金融サヌビス コンタクト センタヌ向けの AI 音声察応バヌチャル アシスタントの構築ず導入方法 りェビナヌ: 通信䌁業が察話型 AI で顧客䜓隓を倉革する方法
https://developer.nvidia.com/blog/hymba-hybrid-head-architecture-boosts-small-language-model-performance/
Hymba Hybrid-Head Architecture Boosts Small Language Model Performance
Transformers, with their attention-based architecture, have become the dominant choice for language models (LMs) due to their strong performance, parallelization capabilities, and long-term recall through key-value (KV) caches. However, their quadratic computational cost and high memory demands pose efficiency challenges. In contrast, state space models (SSMs) like Mamba and Mamba-2 offer constant complexity and efficient hardware optimization but struggle with memory recall tasks, affecting their performance on general benchmarks. NVIDIA researchers recently proposed Hymba , a family of small language models (SLMs) featuring a hybrid-head parallel architecture that integrates transformer attention mechanisms with SSMs to achieve both enhanced efficiency and improved performance. In Hymba, attention heads provide high-resolution recall, while SSM heads enable efficient context summarization. The novel architecture of Hymba reveals several insights: Overhead in attention: Over 50% of attention computation can be replaced by cheaper SSM computation. Local attention dominance: Most global attention can be replaced by local attention without sacrificing performance on general and recall-intensive tasks, thanks to the global information summarized by SSM heads. KV cache redundancy: Key-value cache is highly correlated across heads and layers, so it can be shared across heads (group query attention) and layers (cross-layer KV cache sharing). Softmax attention limitation: Attention mechanisms are constrained to sum to one, limiting sparsity, and flexibility. We introduce learnable meta-tokens that are prepended to prompts, storing critical information and alleviating the “forced-to-attend” burden associated with attention mechanisms. This post shows that Hymba 1.5B performs favorably against state-of-the-art open-source models of similar size, including Llama 3.2 1B, OpenELM 1B, Phi 1.5, SmolLM2 1.7B, Danube2 1.8B, and Qwen2.5 1.5B. Compared to Transformer models of similar size, Hymba also achieves higher throughput and requires 10x less memory to store cache. Hymba 1.5B is released to the Hugging Face collection and GitHub . Hymba 1.5B performance Figure 1 compares Hymba 1.5B against sub-2B models (Llama 3.2 1B, OpenELM 1B, Phi 1.5, SmolLM2 1.7B, Danube2 1.8B, Qwen2.5 1.5B) in terms of average task accuracy, cache size (MB) relative to sequence length, and throughput (tok/sec). Figure 1. Performance comparison of Hymba 1.5B Base against sub-2B models In this set of experiments, the tasks include MMLU, ARC-C, ARC-E, PIQA, Hellaswag, Winogrande, and SQuAD-C. The throughput is measured on an NVIDIA A100 GPU with a sequence length of 8K and a batch size of 128 using PyTorch. For models encountering out of memory (OOM) issues during throughput measurement, the batch size was halved until the OOM is resolved to measure the maximal achievable throughput without OOM. Hymba model design SSMs such as Mamba were introduced to address the quadratic complexity and large inference-time KV cache issues of transformers. However, due to their low-resolution memory, SSMs struggle with memory recall and performance. To overcome these limitations, we propose a road map for developing efficient and high-performing small LMs in Table 1. Configuration Commonsense reasoning (%) ↑ Recall (%) ↑ Throughput (token/sec) ↑ Cache size (MB) ↓ Design reason Ablations on 300M model size and 100B training tokens Transformer (Llama) 44.08 39.98 721.1 414.7 Accurate recall while inefficient State-space models (Mamba) 42.98 19.23 4720.8 1.9 Efficient while inaccurate recall A. + Attention heads (sequential) 44.07 45.16 776.3 156.3 Enhance recall capabilities B. + Multi-head heads (parallel) 45.19 49.90 876.7 148.2 Better balance of two modules C. + Local / global attention 44.56 48.79 2399.7 41.2 Boost compute/cache efficiency D. + KV cache sharing 45.16 48.04 2756.5 39.4 Cache efficiency E. + Meta-tokens 45.59 51.79 2695.8 40.0 Learned memory initialization Scaling to 1.5B model size and 1.5T training tokens F. + Size / data 60.56 64.15 664.1 78.6 Further boost task performance G. + Extended context length (2K→8K) 60.64 68.79 664.1 78.6 Improve multishot and recall tasks Table 1. Design road map of the Hymba model Fused hybrid modules Fusing attention and SSM heads in parallel within a hybrid-head module outperforms sequential stacking, according to the ablation study. Hymba fuses attention and SSM heads in parallel within a hybrid head module, enabling both heads to process the same information simultaneously. This architecture improves reasoning and recall accuracy. Figure 2. The hybrid-head module in Hymba Efficiency and KV cache optimization While attention heads improve task performance, they increase KV cache requirements and reduce throughput. To mitigate this, Hymba optimizes the hybrid-head module by combining local and global attention and employing cross-layer KV cache sharing. This improves throughput by 3x and reduces cache by almost 4x without sacrificing performance. Figure 3. Hymba model architecture Meta-tokens A set of 128 pretrained embeddings prepended to inputs, functioning as learned cache initialization to enhance focus on relevant information. These tokens serve a dual purpose: Mitigating attention drain by acting as backstop tokens, redistributing attention effectively Encapsulating compressed world knowledge Figure 4. Interpretation of Hymba from the memory aspect Model analysis This section presents an apples-to-apples comparison across different architectures under the same training settings. We then visualize the attention maps of SSM and Attention in different pretrained models. Finally, we perform head importance analysis for Hymba through pruning. All the analyses in this section help to illustrate how and why the design choices for Hymba are effective. Apples-to-apples comparison We performed an apples-to-apples comparison of Hymba, pure Mamba2, Mamba2 with FFN, Llama3 style, and Samba style (Mamba-FFN-Attn-FFN) architectures. All models have 1 billion parameters and are trained from scratch for 100 billion tokens from SmolLM-Corpus with exactly the same training recipe. All results are obtained through lm-evaluation-harness using a zero-shot setting on Hugging Face models. Hymba performs the best on commonsense reasoning as well as question answering and recall-intensive tasks. Table 2 compares various model architectures on language modeling and recall-intensive and commonsense reasoning tasks, with Hymba achieving strong performance across metrics. Hymba demonstrates the lowest perplexity in language tasks (18.62 for Wiki and 10.38 for LMB) and solid results in recall-intensive tasks, particularly in SWDE (54.29) and SQuAD-C (44.71), leading to the highest average score in this category (49.50). Model Language (PPL) ↓ Recall intensive (%) ↑ Commonsense reasoning (%) ↑ Mamba2 15.88 43.34 52.52 Mamba2 w/ FFN 17.43 28.92 51.14 Llama3 16.19 47.33 52.82 Samba 16.28 36.17 52.83 Hymba 14.5 49.5 54.57 Table 2. Comparison of architectures trained on 100 billion tokens under the same settings In commonsense reasoning and question answering, Hymba outperforms other models in most tasks, such as SIQA (31.76) and TruthfulQA (31.64), with an average score of 54.57, slightly above Llama3 and Mamba2. Overall, Hymba stands out as a balanced model, excelling in both efficiency and task performance across diverse categories. Attention map visualization We further categorized elements in the attention map into four types: Meta: Attention scores from all real tokens to meta-tokens. This category reflects the model’s preference for attending to meta-tokens. In attention maps, they are usually located in the first few columns (for example, 128 for Hymba) if a model has meta-tokens. BOS: Attention scores from all real tokens to the beginning-of-sequence token. In the attention map, they are usually located in the first column right after the meta-tokens. Self: Attention scores from all real tokens to themselves. In the attention map, they are usually located in the diagonal line. Cross: Attention scores from all real tokens to other real tokens. In the attention map, they are usually located in the off-diagonal area. The attention pattern of Hymba is significantly different from that of vanilla Transformers. In vanilla Transformers, attention scores are more concentrated on BOS, which is consistent with the findings in Attention Sink. In addition, vanilla Transformers also have a higher proportion of Self attention scores. In Hymba, meta-tokens, attention heads, and SSM heads work complementary to each other, leading to a more balanced distribution of attention scores across different types of tokens. Specifically, meta-tokens offload the attention scores from BOS, enabling the model to focus more on the real tokens. SSM heads summarize the global context, which focuses more on current tokens (Self attention scores). Attention heads, on the other hand, pay less attention to Self and BOS tokens, and more attention to other tokens (that is, Cross attention scores). This suggests that the hybrid-head design of Hymba can effectively balance the attention distribution across different types of tokens, potentially leading to better performance. Figure 5. Schematics of the attention map of Hymba as a combination of meta-tokens, sliding window attention, and Mamba contributions Figure 6. Sum of the attention score from different categories in Llama 3.2 3B and Hymba 1.5B Heads importance analysis We analyzed the relative importance of attention and SSM heads in each layer by removing them and recording the final accuracy. Our analysis reveals the following: The relative importance of attention/SSM heads in the same layer is input-adaptive and varies across tasks, suggesting that they can serve different roles when handling various inputs. The SSM head in the first layer is critical for language modeling, and removing it causes a substantial accuracy drop to random guess levels. Generally, removing one attention/SSM head results in an average accuracy drop of 0.24%/1.1% on Hellaswag, respectively. Figure 7. The achieved accuracy, measured using 1K samples from Hellaswag, after removing the Attention or SSM heads in each layer Model architecture and training best practices This section outlines key architectural decisions and training methodologies for Hymba 1.5B Base and Hymba 1.5B Instruct. Model architecture Hybrid architecture: Mamba is great at summarization and usually closer focuses on the current token, while attention is more precise and acts as snapshot memory. Combining them in parallel merges these benefits, but standard sequential fusion does not. We chose a 5:1 parameter ratio between SSM and attention heads. Sliding window attention: Full attention heads are preserved in three layers (first, last, and middle), with sliding window attention heads used in the remaining 90% layers. Cross-layer KV cache sharing: Implemented between every two consecutive attention layers. It is done in addition to GQA KV cache sharing between heads. Meta-tokens: These 128 tokens are learnable with no supervision, helping to avoid entropy collapse problems in large language models (LLMs) and mitigate the attention sink phenomenon. Additionally, the model stores general knowledge in these tokens. Training best practices Pretraining: We opted for two-stage base model training. Stage 1 maintained a constant large learning rate and used less filtered large corpus data. Continuous learning rate decay was then performed to 1e-5 using high-quality data. This approach enables continuous training and resuming of Stage 1. Instruction fine-tuning: Instruct model tuning is performed in three stages. First, SFT-1 provides the model with strong reasoning abilities by training on code, math, function calling, role play, and other task-specific data. Second, SFT-2 teaches the model to follow human instructions. Finally, DPO is leveraged to align the model with human preferences and improve the model’s safety. Figure 8. Training pipeline adapted for the Hymba model family Performance and efficiency evaluation With only 1.5T pretraining tokens, the Hymba 1.5B model performs the best among all small LMs and achieves better throughput and cache efficiency than all transformer-based LMs. For example, when benchmarking against the strongest baseline, Qwen2.5, which is pretrained on 13x more tokens, Hymba 1.5B achieves a 1.55% average accuracy improvement, 1.41x throughput, and 2.90x cache efficiency. Compared to the strongest small LM trained on fewer than 2T tokens, namely h2o-danube2, our method achieves a 5.41% average accuracy improvement, 2.45x throughput, and 6.23x cache efficiency. Model # Para-ms Train tokens Token per sec Cache (MB) MMLU 5- shot ARC-E 0-shot ARC-C 0-shot PIQA 0-shot Wino. 0-shot Hella. 0-shot SQuAD -C 1-shot Avg Open ELM-1 1.1B 1.5T 246 346 27.06 62.37 19.54 74.76 61.8 48.37 45.38 48.57 Rene v0.1 1.3B 1.5T 800 113 32.94 67.05 31.06 76.49 62.75 51.16 48.36 52.83 Phi 1.5 1.3B 0.15T 241 1573 42.56 76.18 44.71 76.56 72.85 48 30.09 55.85 Smol LM 1.7B 1T 238 1573 27.06 76.47 43.43 75.79 60.93 49.58 45.81 54.15 Cosmo 1.8B .2T 244 1573 26.1 62.42 32.94 71.76 55.8 42.9 38.51 47.2 h20 dan-ube2 1.8B 2T 271 492 40.05 70.66 33.19 76.01 66.93 53.7 49.03 55.65 Llama 3.2 1B 1.2B 9T 535 262 32.12 65.53 31.39 74.43 60.69 47.72 40.18 50.29 Qwen 2.5 1.5B 18T 469 229 60.92 75.51 41.21 75.79 63.38 50.2 49.53 59.51 AMD OLMo 1.2B 1.3T 387 1049 26.93 65.91 31.57 74.92 61.64 47.3 33.71 48.85 Smol LM2 1.7B 11T 238 1573 50.29 77.78 44.71 77.09 66.38 53.55 50.5 60.04 Llama 3.2 3B 3.0B 9T 191 918 56.03 74.54 42.32 76.66 69.85 55.29 43.46 59.74 Hymba 1.5B 1.5T 664 79 51.19 76.94 45.9 77.31 66.61 53.55 55.93 61.06 Table 2. Hymba 1.5B Base model results Instructed models The Hymba 1.5B Instruct model achieves the highest performance on an average of all tasks, outperforming the previous state-of-the-art model, Qwen 2.5 Instruct, by around 2%. Specifically, Hymba 1.5B surpasses all other models in GSM8K/GPQA/BFCLv2 with a score of 58.76/31.03/46.40, respectively. These results indicate the superiority of Hymba 1.5B, particularly in areas requiring complex reasoning capabilities. Model # Params MMLU ↑ IFEval ↑ GSM8K ↑ GPQA ↑ BFCLv2 ↑ Avg. ↑ SmolLM 1.7B 27.80 25.16 1.36 25.67 -* 20.00 OpenELM 1.1B 25.65 6.25 56.03 21.62 -* 27.39 Llama 3.2 1.2B 44.41 58.92 42.99 24.11 20.27 38.14 Qwen2.5 1.5B 59.73 46.78 56.03 30.13 43.85 47.30 SmolLM2 1.7B 49.11 55.06 47.68 29.24 22.83 40.78 Hymba 1.5B 1.5B 52.79 57.14 58.76 31.03 46.40 49.22 Table 3. Hymba 1.5B Instruct model results Conclusion The new Hymba family of small LMs features a hybrid-head architecture that combines the high-resolution recall capabilities of attention heads with the efficient context summarization of SSM heads. To further optimize the performance of Hymba, learnable meta-tokens are introduced to act as a learned cache for both attention and SSM heads, enhancing the model’s focus on salient information. Through the road map of Hymba, comprehensive evaluations, and ablation studies, Hymba sets new state-of-the-art performance across a wide range of tasks, achieving superior results in both accuracy and efficiency. Additionally, this work provides valuable insights into the advantages of hybrid-head architectures, offering a promising direction for future research in efficient LMs. Learn more about Hybma 1.5B Base and Hymba 1.5B Instruct . Acknowledgments This work would not have been possible without contributions from many people at NVIDIA, including Wonmin Byeon, Zijia Chen, Ameya Sunil Mahabaleshwarkar, Shih-Yang Liu, Matthijs Van Keirsbilck, Min-Hung Chen, Yoshi Suhara, Nikolaus Binder, Hanah Zhang, Maksim Khadkevich, Yingyan Celine Lin, Jan Kautz, Pavlo Molchanov, and Nathan Horrocks.
https://developer.nvidia.com/ja-jp/blog/hymba-hybrid-head-architecture-boosts-small-language-model-performance/
Hymba ハむブリッド ヘッド アヌキテクチャが小芏暡蚀語モデルのパフォヌマンスを向䞊
Reading Time: 4 minutes Transformer は、その Attention ベヌスのアヌキテクチャによる、匷力なパフォヌマンス、䞊列化胜力、および KV (Key-Value) キャッシュを通じた長期蚘憶のおかげで、蚀語モデル (LM) の䞻流ずなっおいたす。しかし、二次蚈算コストず高いメモリ芁求により、効率性に課題が生じおいたす。これに察し、Mamba や Mamba-2 のような状態空間モデル (SSMs) は、耇雑さを䞀定にしお効率的なハヌドりェア最適化を提䟛したすが、メモリ想起タスクが苊手でそれは䞀般的なベンチマヌクでのパフォヌマンスに圱響を䞎えおいたす。 NVIDIA の研究者は最近、効率性ずパフォヌマンスの䞡方を向䞊させるために、Transformer の Attention メカニズムを SSM ず統合したハむブリッド ヘッド䞊列アヌキテクチャを特城ずする小芏暡蚀語モデル (SLM) ファミリである Hymba を提案したした。Hymba では、Attention ヘッドが高解像床の蚘憶胜力を提䟛し、SSM ヘッドが効率的なコンテキストの芁玄を可胜にしたす。 Hymba の新たなアヌキテクチャは、いく぀かの掞察を明らかにしおいたす。 Attention のオヌバヌヘッド: Attention 蚈算の 50% 以䞊を、より安䟡な SSM 蚈算に眮き換えるこずができたす。 ロヌカル Attention の優䜍性: SSM ヘッドにより芁玄されたグロヌバル情報のおかげで、䞀般的なタスクやメモリ想起に集䞭するタスクのパフォヌマンスを犠牲にするこずなく、ほずんどのグロヌバル Attention をロヌカル Attention に眮き換えるこずができたす。 KV キャッシュ冗長性: Key-value キャッシュは、ヘッド間ずレむダヌ間で高い盞関性があるため、ヘッド間 (GQA: Group Query Attention) およびレむダヌ間 (Cross-layer KV キャッシュ共有) で共有できたす。 Softmax の Attention の制限: Attention メカニズムは、合蚈が 1 になるように制限されおおり、疎性ず柔軟性に制限がありたす。NVIDIA は、プロンプトの先頭に孊習可胜なメタトヌクンを導入し、重芁な情報を栌玍し、Attention メカニズムに関連する「匷制的に Attention を行う」負担を軜枛したす。 この蚘事では、Hymba 1.5B が同様の芏暡である最先端のオヌプン゜ヌス モデル、Llama 3.2 1B、OpenELM 1B、Phi 1.5、SmolLM2 1.7B、Danube2 1.8B、Qwen2.5 1.5B などず比范しお、良奜なパフォヌマンスを発揮するこずが瀺されおいたす。同等のサむズの Transformer モデルず比范するず、Hymba はより高いスルヌプットを発揮し、キャッシュを保存するために必芁なメモリが 10 分の 1 で枈みたす。 Hymba 1.5B は Hugging Face コレクションず GitHub で公開されおいたす。 Hymba 1.5B のパフォヌマンス 図 1 は、Hymba 1.5B ず 2B 未満のモデル (Llama 3.2 1B、OpenELM 1B、Phi 1.5、SmolLM2 1.7B、Danube2 1.8B、Qwen2.5 1.5B) を、平均タスク粟床、シヌケンス長に察するキャッシュ サむズ (MB)、スルヌプット (tok/sec) で比范したものです。 図 1. Hymba 1.5B Base ず 2B 未満のモデルのパフォヌマンス比范 この䞀連の実隓には、MMLU、ARC-C、ARC-E、PIQA、Hellaswag、Winogrande、SQuAD-C などのタスクが含たれおいたす。スルヌプットは、シヌケンス長 8K、バッチ サむズ 128 で PyTorch を䜿甚しお NVIDIA A100 GPU で枬定したす。スルヌプット枬定䞭にメモリ䞍足 (OOM: Out of Memory) 問題が発生したモデルでは、OOM が解決されるたでバッチ サむズを半分にしお、OOM なしで達成可胜な最倧スルヌプットを枬定したした。 Hymba モデルのデザむン Mamba のような SSM は、Transformer の二次的な耇雑性ず掚論時の KV キャッシュが倧きい問題に察凊するために導入されたした。しかし、メモリ解像床が䜎いために、SSM は蚘憶想起ずパフォヌマンスの点で苊戊しおいたす。これらの制限を克服するために、衚 1 で効率的で高性胜な小芏暡蚀語モデルを開発するためのロヌドマップを提案したす。 構成 垞識掚論 (%) ↑ リコヌル (%) ↑ スルヌプット (token/sec) ↑ キャッシュ サむズ (MB) ↓ 蚭蚈理由 300M モデル サむズず 100B トレヌニング トヌクンのアブレヌション Transformer (Llama) 44.08 39.98 721.1 414.7 非効率的ながら正確な蚘憶 状態空間モデル (Mamba) 42.98 19.23 4720.8 1.9 効率的だが䞍正確な蚘憶 A. + Attention ヘッド (連続) 44.07 45.16 776.3 156.3 蚘憶胜力を匷化 B. + 耇数ヘッド (䞊列) 45.19 49.90 876.7 148.2 2 ぀のモゞュヌルのバランスの改善 C. + ロヌカル / グロヌバル Attention 44.56 48.79 2399.7 41.2 挔算 / キャッシュの効率を向䞊 D. + KV キャッシュ共有 45.16 48.04 2756.5 39.4 キャッシュ効率化 E. + メタトヌクン 45.59 51.79 2695.8 40.0 孊習した蚘憶の初期化 1.5B モデル サむズず 1.5T トレヌニング トヌクンぞのスケヌリング F. + サむズ / デヌタ 60.56 64.15 664.1 78.6 タスク パフォヌマンスのさらなる向䞊 G. + コンテキスト長の拡匵 (2K→8K) 60.64 68.79 664.1 78.6 マルチショットずリコヌル タスクの改善 è¡š 1. Hymba モデルのデザむン ロヌドマップ 融合型ハむブリッド モゞュヌル アブレヌション研究によるず、ハむブリッド ヘッド モゞュヌル内で Attention ず SSM ヘッドを䞊列にしお融合するほうが、シヌケンシャルにスタッキングするより優れおいるこずが分かっおいたす。Hymba は、ハむブリッド ヘッド モゞュヌル内で Attention ず SSM ヘッドを䞊列に融合させ、䞡ヘッドが同時に同じ情報を凊理できるようにしたす。このアヌキテクチャは、掚論ず蚘憶の正確さを高めたす。 図 2. Hymba のハむブリッド ヘッド モゞュヌル 効率性ず KV キャッシュの最適化 Attention ヘッドはタスクのパフォヌマンスを向䞊させたすが、KV キャッシュの芁求を増倧させ、スルヌプットを䜎䞋させたす。これを緩和するために、Hymba はロヌカルおよびグロヌバルの Attention を組み合わせ、 Cross-layer KV キャッシュ共有を採甚するこずで、ハむブリッド ヘッド モゞュヌルを最適化したす。これにより、パフォヌマンスを犠牲にするこずなくスルヌプットが 3 倍向䞊し、キャッシュがほが 4 分の 1 に削枛されたす。 図 3. Hymba モデルのアヌキテクチャ メタトヌクン 入力の先頭に眮かれる 128 の事前孊習枈みの埋め蟌みのセットであり、孊習枈みキャッシュの初期化ずしお機胜し、関連情報ぞの泚意を匷化したす。このようなトヌクンには 2 ぀の目的がありたす。 バックストップ トヌクンずしお機胜し、Attention を効果的に再分配するこずで Attention の流出を軜枛する 圧瞮された䞖界知識をカプセル化する 図 4. メモリの偎面から芋た Hymba の解釈 モデル解析 このセクションでは、同䞀のトレヌニング蚭定における異なるアヌキテクチャを比范する方法を玹介したす。それから、SSM ず Attention の Attention マップを異なる孊習枈みモデルで可芖化し、最埌に、剪定 (pruning) を通じお Hymba のヘッド重芁床分析を行いたす。このセクションのすべおの分析は、Hymba のデザむンにおける遞択の仕組みず、それが効果的な理由を説明するのに圹立ちたす。 同䞀条件での比范 Hymba、玔粋な Mamba2、Mamba2 ず FFN、Llama3 スタむル、Samba スタむル (Mamba-FFN-Attn-FFN) のアヌキテクチャを同䞀条件で比范したした。すべおのモデルが 10 億のパラメヌタヌで、たったく同じトレヌニング レシピで SmolLM-Corpus から 1,000 億トヌクンをれロから孊習しおいたす。すべおの結果は、Hugging Face モデルでれロショット蚭定を䜿甚しお lm-evaluation-harness を通じお取埗されおいたす。Hymba は、垞識掚論だけでなく、質問応答タスクや蚘憶想起タスクでも最高のパフォヌマンスを発揮したす。 è¡š 2 は、蚀語モデリングタスクず蚘憶想起タスクおよび垞識掚論タスクに関するさたざたなモデル アヌキテクチャを比范しおおり、Hymba はすべおの評䟡基準で卓越したパフォヌマンスを達成しおいたす。Hymba は、蚀語モデリングタスクで最も䜎い Perplexity を瀺し (Wiki で 18.62、LMB で 10.38)、特に SWDE (54.29) ず SQuAD-C (44.71) の蚘憶想起タスクにおいお堅実な結果を瀺し、このカテゎリで最高の平均スコア (49.50) を達成したした。 モデル 蚀語モデリング (PPL) ↓ 蚘憶想起型 (%) ↑ 垞識掚論 (%) ↑ Mamba2 15.88 43.34 52.52 Mamba2 ず FFN 17.43 28.92 51.14 Llama3 16.19 47.33 52.82 Samba 16.28 36.17 52.83 Hymba 14.5 49.5 54.57 è¡š 2. 同じ蚭定で 1,000 億トヌクンで孊習されたアヌキテクチャの比范 垞識掚論ず質問応答においお、Hymba は平均スコア 54.57 で、 SIQA (31.76) や TruthfulQA (31.64) などのほずんどのタスクで、Llama3 や Mamba2 をやや䞊回っおいたす。党䜓的に、Hymba はバランスの取れたモデルずしお際立っおおり、倚様なカテゎリで効率性ずタスク パフォヌマンスの䞡方で優れおいたす。 Attention マップの可芖化 さらに、Attention マップの芁玠を 4 ぀のタむプに分類したした。 Meta: すべおの実トヌクンからメタトヌクンぞの Attention スコア。このカテゎリは、モデルがメタトヌクンに Attention を向ける傟向を反映するものです。Attention マップでは、通垞、モデルにメタトヌクンがある堎合、最初の数列 (䟋えば Hymba の堎合は 128) に䜍眮しおいたす。 BOS: すべおの実トヌクンからセンテンスの開始トヌクンたでの Attention スコア。Attention マップでは、通垞、メタトヌクンの盎埌の最初の列に䜍眮したす。 Self: すべおの実トヌクンからそれ自身ぞの Attention スコア。Attention マップでは、通垞、察角線䞊に䜍眮しおいたす。 Cross: すべおの実トヌクンから他の実トヌクンぞの Attention スコア。Attention マップでは、通垞、察角線倖の領域に䜍眮しおいたす。 Hymba の Attention パタヌンは、vanilla (加工されおいない) Transformer のそれずは倧きく異なりたす。vanilla Transformer の Attention スコアは BOS に集䞭しおおり、Attention Sink の結果ず䞀臎しおいたす。さらに、vanilla Transformer は、Self-Attention スコアの比率も高くなっおいたす。Hymba では、メタトヌクン、Attention ヘッド、SSM ヘッドが互いに補完し合うように機胜し、異なるタむプのトヌクン間で、よりバランスの取れた Attention スコアの分垃を実珟しおいたす。 具䜓的には、メタトヌクンが BOS からの Attention スコアをオフロヌドするこずで、モデルがより実際のトヌクンに集䞭できるようになりたす。SSM ヘッドはグロヌバルなコンテキストを芁玄し、珟圚のトヌクン (Self-Attention スコア) により重点を眮きたす。䞀方、Attention ヘッドは、Self ず BOS トヌクンに察する泚意が䜎く、他のトヌクン (すなわち、Cross Attention スコア) ぞの泚意が高くなりたす。これは、Hymba のハむブリッド ヘッド デザむンが、異なるタむプのトヌクン間の Attention 分垃のバランスを効果的に取るこずができ、パフォヌマンスの向䞊に぀ながる可胜性があるこずを瀺唆しおいたす。 図 5. メタトヌクン、Sliding Window Attention、Mamba 貢献の組み合わせによる Hymba の Attention マップの抂略図 図 6. Llama 3.2 3B ず Hymba 1.5B の異なるカテゎリからの Attention スコアの合蚈 ヘッド重芁床分析 各レむダヌのAttention ず SSM ヘッドの盞察的な重芁性を分析するために、それぞれを削陀しお最終的な粟床を蚘録したした。分析の結果、以䞋のこずが明らかになりたした。 同じレむダヌの  Attention / SSM ヘッドの盞察的な重芁性は入力適応であり、タスクによっお異なりたす。これは、さたざたな入力の凊理においお、異なる圹割を果たす可胜性があるこずを瀺唆しおいたす。 最初のレむダヌの SSM ヘッドは蚀語モデリングタスクに䞍可欠で、これを削陀するず、ランダム掚枬レベルにたで倧幅に粟床が䜎䞋したす。 䞀般的に、Attention / SSM ヘッドを 1 ぀削陀するず、Hellaswag ではそれぞれ平均 0.24%/1.1% 粟床が䜎䞋したす。 図 7. Hellaswag の 1K サンプルを䜿甚しお枬定した、各レむダヌの Attention たたは SSM ヘッドを削陀した埌の達成粟床 モデル アヌキテクチャず孊習のベスト プラクティス このセクションでは、Hymba 1.5B Base ず Hymba 1.5B Instruct の䞻芁アヌキテクチャ䞊の決定事項ず孊習方法の抂芁に぀いお説明したす。 モデル アヌキテクチャ ハむブリッド アヌキテクチャ: Mamba は芁玄に優れ、通垞は珟圚のトヌクンにより重点を眮きたす。Attention はより正確でスナップショット メモリずしお機胜したす。暙準的なシヌケンシャル融合ではなく、䞊列に組み合わせるこずで利点を統合するこずができたす。SSM ず Attention ヘッド間のパラメヌタヌ比は 5:1 を遞択したした。 Sliding Window Attention: 完党な Attention ヘッドは 3 ぀のレむダヌ (最初、最埌、䞭間) に維持され、残りの 90% のレむダヌで Sliding Window Attention ヘッドが䜿甚されたす。 Cross-layer KV キャッシュ共有: 連続する 2 ぀の Attention レむダヌ間に実装されたす。これは、ヘッド間の GQA KV キャッシュ共有に加えお行われたす。 メタトヌクン: これらの 128 トヌクンは教垫なし孊習が可胜であり、倧芏暡蚀語モデル (LLM) における゚ントロピヌ厩壊の問題を回避し、Attention Sink 珟象を緩和するのに圹立ちたす。さらに、モデルはこれらのトヌクンに䞀般的な知識を栌玍したす。 孊習のベスト プラクティス 事前孊習: 2 段階のベヌスモデル孊習を遞択したした。ステヌゞ 1 では、䞀定の高い孊習率を維持し、フィルタリングされおいない倧芏暡なコヌパス デヌタの䜿甚したした。続いお、高品質のデヌタを甚いお 1e-5 たで継続的に孊習率を枛衰させたした。このアプロヌチにより、ステヌゞ 1 の継続的な孊習ず再開が可胜になりたす。 指瀺ファむンチュヌニング: 指瀺モデルの調敎は 3 ぀の段階で行われたす。たず、SFT-1 は、コヌド、数孊、関数呌び出し、ロヌル プレむ、その他のタスク固有のデヌタで孊習を実斜し、匷力な掚論胜力をモデルに付䞎したす。次に、SFT-2 はモデルに人間の指瀺に埓うこずを教えたす。最埌に、DPO を掻甚しお、モデルを人間の奜みに合わせ、モデルの安党性を高めたす。 図 8. Hymba モデル ファミリに適応した孊習パむプラむン パフォヌマンスず効率性の評䟡 1.5T の事前孊習トヌクンだけで、Hymba 1.5B モデルはすべおの小芏暡蚀語モデルの䞭で最高の性胜を発揮し、Transformer ベヌスの LM よりも優れたスルヌプットずキャッシュ効率を実珟したす。 䟋えば、13 倍以䞊のトヌクン数で事前孊習された最も匷力なベヌスラむンである Qwen2.5 に察しおベンチマヌクした堎合、Hymba 1.5B は平均粟床が 1.55%、スルヌプットが 1.41 倍、キャッシュ効率が 2.90 倍に向䞊したす。2T 未満のトヌクンで孊習された最も匷力な小芏暡蚀語モデル、すなわち h2o-danube2 ず比范するず、この方法は平均粟床が 5.41%、スルヌプットが 2.45 倍、キャッシュ効率が 6.23 倍に向䞊しおいたす。 モデル パラメヌタヌ数 孊習トヌクン トヌクン (1 秒あたり) キャッシュ (MB) MMLU 5- shot ARC-E 0-shot ARC-C 0-shot PIQA 0-shot Wino. 0-shot Hella. 0-shot SQuAD -C 1-shot 平均 OpenELM-1 1.1B 1.5T 246 346 27.06 62.37 19.54 74.76 61.8 48.37 45.38 48.57 Renev0.1 1.3B 1.5T 800 113 32.94 67.05 31.06 76.49 62.75 51.16 48.36 52.83 Phi1.5 1.3B 0.15T 241 1573 42.56 76.18 44.71 76.56 72.85 48 30.09 55.85 SmolLM 1.7B 1T 238 1573 27.06 76.47 43.43 75.79 60.93 49.58 45.81 54.15 Cosmo 1.8B .2T 244 1573 26.1 62.42 32.94 71.76 55.8 42.9 38.51 47.2 h20dan-ube2 1.8B 2T 271 492 40.05 70.66 33.19 76.01 66.93 53.7 49.03 55.65 Llama 3.2 1B 1.2B 9T 535 262 32.12 65.53 31.39 74.43 60.69 47.72 40.18 50.29 Qwen2.5 1.5B 18T 469 229 60.92 75.51 41.21 75.79 63.38 50.2 49.53 59.51 AMDOLMo 1.2B 1.3T 387 1049 26.93 65.91 31.57 74.92 61.64 47.3 33.71 48.85 SmolLM2 1.7B 11T 238 1573 50.29 77.78 44.71 77.09 66.38 53.55 50.5 60.04 Llama3.2 3B 3.0B 9T 191 918 56.03 74.54 42.32 76.66 69.85 55.29 43.46 59.74 Hymba 1.5B 1.5T 664 79 51.19 76.94 45.9 77.31 66.61 53.55 55.93 61.06 è¡š 2. Hymba 1.5B ベヌス モデルの結果 指瀺モデル Hymba 1.5B Instruct モデルは、党タスク平均で最高のパフォヌマンスを達成し、盎近の最高性胜モデルである Qwen 2.5 Instruct を玄 2% 䞊回りたした。特に、Hymba 1.5B は GSM8K/GPQA/BFCLv2 で、それぞれ 58.76/31.03/46.40 のスコアで他のすべおのモデルを䞊回っおいたす。これらの結果は、特に耇雑な掚論胜力を必芁ずする分野においお、Hymba 1.5B の優䜍性を瀺しおいたす。 モデル パラメヌタヌ数 MMLU ↑ IFEval ↑ GSM8K ↑ GPQA ↑ BFCLv2 ↑ 平均↑ SmolLM 1.7B 27.80 25.16 1.36 25.67 -* 20.00 OpenELM 1.1B 25.65 6.25 56.03 21.62 -* 27.39 Llama 3.2 1.2B 44.41 58.92 42.99 24.11 20.27 38.14 Qwen2.5 1.5B 59.73 46.78 56.03 30.13 43.85 47.30 SmolLM2 1.7B 49.11 55.06 47.68 29.24 22.83 40.78 Hymba 1.5B 1.5B 52.79 57.14 58.76 31.03 46.40 49.22 è¡š 3. Hymba 1.5B Instruct モデルの結果 たずめ 新しい Hymba ファミリの小芏暡蚀語モデルは、ハむブリッド ヘッド アヌキテクチャを採甚し、Attention ヘッドの高解像な蚘憶胜力ず SSM ヘッドの効率的なコンテキストの芁玄を組み合わせおいたす。Hymba のパフォヌマンスをさらに最適化するために、孊習可胜なメタトヌクンが導入され、Attention ヘッドず SSM ヘッドの䞡方で孊習枈みキャッシュずしお機胜し、顕著な情報に泚目するモデルの粟床を匷化したした。Hymba のロヌドマップ、包括的な評䟡、アブレヌション研究を通じお、Hymba は幅広いタスクにわたっお新たな最先端のパフォヌマンスを確立し、正確さず効率性の䞡面で優れた結果を達成したした。さらに、この研究は、ハむブリッド ヘッド アヌキテクチャの利点に関する貎重な掞察をもたらし、効率的な蚀語モデルの今埌の研究に有望な方向性を瀺しおいたす。 Hybma 1.5B Base ず Hymba 1.5B Instruct の詳现はこちらをご芧ください。 謝蟞 この成果は、Wonmin Byeon、Zijia Chen、Ameya Sunil Mahabaleshwarkar、Shih-Yang Liu、Matthijs Van Keirsbilck、Min-Hung Chen、Yoshi Suhara、Nikolaus Binder、Hanah Zhang、Maksim Khadkevich、Yingyan Celine Lin、Jan Kautz、Pavlo Molchanov、Nathan Horrocks など、NVIDIA の倚くのメンバヌの貢献なくしおは実珟したせんでした。 関連情報 GTC セッション: Optimizing Large Language Models: An Experimental Approach to Pruning and Fine-Tuning LLama2 7B (倧芏暡蚀語モデルの最適化: LLama2 7B の剪定ずファむンチュヌニングの実隓的アプロヌチ) GTC セッション: Accelerating End-to-End Large Language Models System using a Unified Inference Architecture and FP8 (統䞀掚論アヌキテクチャず FP8 を甚いた゚ンドツヌ゚ンドの倧芏暡蚀語モデル システムの高速化) NGC コンテナヌ: Llama-3.1-Nemotron-70B-Ins truct NGC コンテナヌ: Llama-3-Swallow-70B-Instruct-v0.1 SDK: NeMo Megatron
https://developer.nvidia.com/blog/deploying-fine-tuned-ai-models-with-nvidia-nim/
Deploying Fine-Tuned AI Models with NVIDIA NIM
For organizations adapting AI foundation models with domain-specific data, the ability to rapidly create and deploy fine-tuned models is key to efficiently delivering value with enterprise generative AI applications. NVIDIA NIM offers prebuilt, performance-optimized inference microservices for the latest AI foundation models, including seamless deployment of models customized using parameter-efficient fine-tuning (PEFT). In some cases, it’s ideal to use methods like continual pretraining, DPO, supervised fine-tuning (SFT), or model merging, where the underlying model weights are adjusted directly in the training or customization process, unlike PEFT with low-rank adaptation (LoRA). In these cases, inference software configuration for the model must be updated for optimal performance given the new weights. Rather than burden you with this often lengthy process, NIM can automatically build a TensorRT-LLM inference engine performance optimized for the adjusted model and GPUs in your local environment, and then load it for running inference as part of a single-step model deployment process. In this post, we explore how to rapidly deploy NIM microservices for models that have been customized through SFT by using locally built, performance-optimized TensorRT-LLM inference engines. We include all the necessary commands as well as some helpful options, so you can try it out on your own today. Prerequisites To run this tutorial, you need an NVIDIA-accelerated compute environment with access to 80 GB of GPU memory and which has git-lfs installed. Before you can pull and deploy a NIM microservice in an NVIDIA-accelerated compute environment, you also need an NGC API key. Navigate to the Meta Llama 3 8B Instruct model listing in the NVIDIA API Catalog. Choose Login at the top right and follow the instructions. When you’re logged in, choose Build with this NIM on the model page . Choose Self-Hosted API and follow either option to access NIM microservices access: NVIDIA Developer Program membership with free access to NIM for research, development, and testing only. The 90-day NVIDIA AI Enterprise license, which includes access to NVIDIA Enterprise Support. After you provide the necessary details for your selected access method, copy your NGC API key and be ready to move forward with NIM. For more information, see Launch NVIDIA NIM for LLMs . Getting started with NIM microservices Provide your NGC CLI API key as an environment variable in your compute environment: export NGC_API_KEY=<<YOUR API KEY HERE>> You also must point to, create, and modify permissions for a directory to be used as a cache during the optimization process: export NIM_CACHE_PATH=/tmp/nim/.cache mkdir -p $NIM_CACHE_PATH chmod -R 777 $NIM_CACHE_PATH To demonstrate locally built, optimized TensorRT-LLM inference engines for deploying fine-tuned models with NIM, you need a model that has undergone customization through SFT. For this tutorial, use the NVIDIA OpenMath2-Llama3.1-8B model, which is a customization of Meta’s Llama-3.1-8B using the OpenMathInstruct-2 dataset. The base model must be available as a downloadable NIM for LLMs. For more information about downloadable NIM microservices, see the NIM Type: Run Anywhere filter in the NVIDIA API Catalog. All you need is the weights to this model, which can be obtained in several ways. For this post, clone the model repository using the following commands: git lfs install git clone https://huggingface.co/nvidia/OpenMath2-Llama3.1-8B export MODEL_WEIGHT_PARENT_DIRECTORY=$PWD Now that you have the model weights collected, move on to the next step: firing up the microservice. Selecting from available performance profiles Based on your selected model and hardware configuration, the most applicable inference performance profile available is automatically selected. There are two available performance profiles for local inference engine generation: Latency: Focused on delivering a NIM microservice that is optimized for latency. Throughput: Focused on delivering a NIM microservice that is optimized for batched throughput. For more information about supported features, including available precision, see the Support Matrix topic in the NVIDIA NIM documentation. Example using an SFT model Create a locally built TensorRT-LLM inference engine for OpenMath2-Llama3.1-8B by running the following commands: docker run -it --rm --gpus all \ --user $(id -u):$(id -g)\ --network=host \ --shm-size=32GB \ -e NGC_API_KEY \ -e NIM_FT_MODEL=/opt/weights/hf/OpenMath2-Llama3.1-8B \ -e NIM_SERVED_MODEL_NAME=OpenMath2-Llama3.1-8B \ -v $NIM_CACHE_PATH:/opt/nim/.cache \ -v $MODEL_WEIGHT_PARENT_DIRECTORY:/opt/weights/hf \ nvcr.io/nim/meta/llama-3.1-8b-instruct:1.3.0 The command is nearly identical to the typical command you’d use to deploy a NIM microservice. In this case, you’ve added the extra NIM_FT_MODEL parameter, which points to the OpenMath2-Llama3.1-8B model. With that, NIM builds an optimized inference engine locally. To perform inference using this new NIM microservice, run the following Python code example: from openai import OpenAI client = OpenAI( base_url = "http://localhost:8000/v1", api_key = "none" ) completion = client.chat.completions.create( model="OpenMath2-Llama3.1-8B", messages=[{"role":"user","content":"What is your name?"}], temperature=0.2, top_p=0.7, max_tokens=100, stream=True ) for chunk in completion: if chunk.choices[0].delta.content is not None: print(chunk.choices[0].delta.content, end="") Video 1. How to Deploy Fine-Tuned AI Models Building an optimized TensorRT-LLM engine with a custom performance profile On supported GPUs , you can use a similar command to spin up your NIM microservice. Follow the Model Profile instructions to launch your microservice and determine which profiles are accessible for it. export IMG_NAME="nvcr.io/nim/meta/llama-3.1-8b-instruct:1.3.0" docker run --rm --gpus=all -e NGC_API_KEY=$NGC_API_KEY $IMG_NAME list-model-profiles Assuming you’re in an environment with two (or more) H100 GPUs, you should see the following profiles available: tensorrt_llm-h100-bf16-tp2–pp1-throughput tensorrt_llm-h100-bf16-tp2-pp1-latency Re-run the command and provide an additional environment variable to specify the desired profile: docker run --rm --gpus=all \ -e NGC_API_KEY \ -e NIM_FT_MODEL=/opt/weights/hf/OpenMath2-Llama3.1-8B \ -e NIM_SERVED_MODEL_NAME=OpenMath2-Llama3.1-8B \ -e NIM_MODEL_PROFILE=tensorrt_llm-h100-bf16-tp2-pp1-latency \ -v $NIM_CACHE_PATH:/opt/nim/.cache \ -v $MODEL_WEIGHT_PARENT_DIRECTORY:/opt/weights/hf \ $IMG_NAME Now that you’ve relaunched your NIM microservice with the desired profile, use Python to interact with the model: from openai import OpenAI client = OpenAI( base_url = "http://localhost:8000/v1", api_key = "none" ) completion = client.chat.completions.create( model="llama-3.1-8b-instruct", messages=[{"role":"user","content":"What is your name?"}], temperature=0.2, top_p=0.7, max_tokens=100, stream=True ) for chunk in completion: if chunk.choices[0].delta.content is not None: print(chunk.choices[0].delta.content, end="") Conclusion Whether you’re using PEFT or SFT methods for model customization, NIM accelerates customized model deployment for high-performance inferencing in a few simple steps. With optimized TensorRT-LLM inference engines built automatically in your local environment, NIM is unlocking new possibilities for rapidly deploying accelerated AI inferencing anywhere. Learn more and get started today by visiting the NVIDIA API catalog and checking out the documentation . To engage with NVIDIA and the NIM microservices community, see the NVIDIA NIM developer forum .
https://developer.nvidia.com/ja-jp/blog/deploying-fine-tuned-ai-models-with-nvidia-nim/
NVIDIA NIM でファむンチュヌニングされた AI モデルのデプロむ
Reading Time: 2 minutes ドメむン固有のデヌタで AI 基盀モデルを適応させおいる䌁業にずっお、ファむンチュヌニングされたモデルを迅速に䜜成し、デプロむする胜力は、䌁業の生成 AI アプリケヌションで効率的に䟡倀を提䟛するための鍵ずなりたす。 NVIDIA NIM は、Parapeter-efficient Fine-tuning (PEFT) を甚いおカスタマむズしたモデルの シヌムレスなデプロむ など、最新の AI 基盀モデル向けにビルドされたパフォヌマンスを最適化した掚論マむクロサヌビスを提䟛したす。 堎合によっおは、Low-rank Adaptation (LoRA) を䜿甚した PEFT ずは異なり、継続事前孊習、DPO、教垫ありファむンチュヌニング (SFT: Supervised Fine-tuning)、モデル マヌゞなどの手法を利甚し、基瀎ずなるモデルの重みをトレヌニングやカスタマむズの過皋で盎接調敎するのが理想的です。このような堎合、新しい重みを考慮した最適なパフォヌマンスを実珟するには、モデルの掚論゜フトりェア構成を曎新する必芁がありたす。 この長時間を芁するプロセスに負担を割くのではなく、NIM は、調敎されたモデルず GPU に合わせお最適化した TensorRT-LLM 掚論゚ンゞンをロヌカル環境でビルドし、ロヌドし、それを単䞀ステップのモデル デプロむ プロセスの䞀環ずしお掚論を実行できたす。 この投皿では、パフォヌマンスを最適化した TensorRT-LLM 掚論゚ンゞンをロヌカルでビルドしお、SFT でカスタマむズされたモデルに察する NIM マむクロサヌビスを迅速にデプロむする方法を説明したす。必芁なコマンドず䟿利なオプションもご玹介したすので、是非今すぐお詊しください。 前提条件 このチュヌトリアルを実行するには、80 GB の GPU メモリを持぀ NVIDIA アクセラレヌテッド コンピュヌティング環境ず git-lfs のむンストヌルが必芁です。 NVIDIA アクセラレヌテッド コンピュヌティング環境で、NIM マむクロサヌビスを pull しおデプロむするには、NGC API キヌも必芁です。 NVIDIA API カタログのモデル䞀芧から Meta Llama 3 8B Instruct に移動したす。 右䞊の [Login] を遞択し、指瀺に埓っおください。 ログむンしたら、 モデル ペヌゞ で [Build with this NIM] を遞択したす。 [Self-Hosted API] を遞択し、いずれかのオプションに埓っお、NIM マむクロサヌビスぞアクセスしたす。 NVIDIA 開発者プログラムのメンバヌであれば、研究、開発、テストに限り NIM に無料でアクセスするこずができたす。 90 日間の NVIDIA AI Enterprise ラむセンスには、NVIDIA Enterprise サポヌトぞのアクセスが含たれおいたす。 遞択したアクセス方法に必芁な詳现情報を提䟛したら、NGC API キヌをコピヌしお、NIM を進める準備をしたす。詳现に぀いおは、 Launch NVIDIA NIM for LLMs を参照しおください。 NIM マむクロサヌビスをはじめる 利甚䞭のコンピュヌティング環境の環境倉数ずしお、NGC API キヌを提䟛したす。 export NGC_API_KEY=<<YOUR API KEY HERE>> たた、最適化凊理䞭にキャッシュずしお䜿甚するディレクトリを䜜成しお、パヌミッションを倉曎しお、指定する必芁がありたす。 export NIM_CACHE_PATH=/tmp/nim/.cache mkdir -p $NIM_CACHE_PATH chmod -R 777 $NIM_CACHE_PATH NIM でファむンチュヌニングされたモデルをデプロむするために、最適な TensorRT-LLM 掚論゚ンゞンをロヌカルでビルドする実蚌には、SFT によっおカスタマむズしたモデルが必芁です。このチュヌトリアルでは、 OpenMathInstruct-2 デヌタセットを䜿甚しお、 Meta の Llama-3.1-8B をカスタマむズした NVIDIA OpenMath2-Llama3.1-8B モデルを䜿甚したす。 ベヌス モデルは、ダりンロヌド可胜な NIM for LLMs ずしお利甚可胜でなければなりたせん。ダりンロヌド可胜な NIM マむクロサヌビスの詳现に぀いおは、NVIDIA API カタログの「 NIM Type: Run Anywhere filter 」を参照しおください。 必芁なのはこのモデルの重みだけで、これはさたざたな方法がありたす。この投皿では、以䞋のコマンドを䜿甚しおモデル リポゞトリをクロヌンしたす。 git lfs install git clone https://huggingface.co/nvidia/OpenMath2-Llama3.1-8B export MODEL_WEIGHT_PARENT_DIRECTORY=$PWD これでモデルの重みが収集できたので、次のステップのマむクロサヌビスの起動に進みたす。 利甚可胜なパフォヌマンス プロファむルから遞択する 遞択したモデルずハヌドりェアの構成に基づいお、利甚可胜なものの䞭から最も適切な掚論パフォヌマンス プロファむルが自動的に遞択されたす。ロヌカル掚論゚ンゞンの生成には、以䞋の 2 ぀のパフォヌマンス プロファむルが利甚できたす。 レむテンシ: レむテンシに最適化された NIM マむクロサヌビスの提䟛に重点を眮きたす。 スルヌプット: バッチ スルヌプットに最適化された NIM マむクロサヌビスの提䟛に重点を眮きたす。 利甚可胜な粟床など、サポヌト機胜の詳现に぀いおは、NVIDIA NIM ドキュメントの サポヌト情報 のトピックを参照しおください。 SFT モデルを䜿甚した䟋 以䞋のコマンドを実行しお、ロヌカル環境でビルドした OpenMath2-Llama3.1-8B 甚の TensorRT-LLM 掚論゚ンゞンを䜜成したす。 docker run -it --rm --gpus all \ --user $(id -u):$(id -g)\ --network=host \ --shm-size=32GB \ -e NGC_API_KEY \ -e NIM_FT_MODEL=/opt/weights/hf/OpenMath2-Llama3.1-8B \ -e NIM_SERVED_MODEL_NAME=OpenMath2-Llama3.1-8B \ -v $NIM_CACHE_PATH:/opt/nim/.cache \ -v $MODEL_WEIGHT_PARENT_DIRECTORY:/opt/weights/hf \ nvcr.io/nim/meta/llama-3.1-8b-instruct:1.3.0 このコマンドは、NIM マむクロサヌビスをデプロむするために䜿甚する兞型的なコマンドずほが同じです。この堎合、远加の NIM_FT_MODEL パラメヌタヌを远加し、OpenMath2-Llama3.1-8B モデルを指しおいたす。 これにより、NIM は最適化された掚論゚ンゞンをロヌカル環境でビルドしたす。この新しい NIM マむクロサヌビスを䜿甚しお掚論を行うには、以䞋の Python コヌド サンプルを実行したす。 from openai import OpenAI client = OpenAI( base_url = "http://localhost:8000/v1", api_key = "none" ) completion = client.chat.completions.create( model="OpenMath2-Llama3.1-8B", messages=[{"role":"user","content":"What is your name?"}], temperature=0.2, top_p=0.7, max_tokens=100, stream=True ) for chunk in completion: if chunk.choices[0].delta.content is not None: print(chunk.choices[0].delta.content, end="") 動画 1. ファむンチュヌニングされた AI モデルをデプロむする方法 カスタム パフォヌマンス プロファむルで最適化された TensorRT-LLM ゚ンゞンのビルド サポヌトされおいる GPU なら、同様のコマンドを䜿甚しお、NIM マむクロサヌビスを起動できたす。 モデル プロファむル の手順に埓っおマむクロサヌビスを起動し、どのプロファむルにアクセスできるかを確認したす。 export IMG_NAME="nvcr.io/nim/meta/llama-3.1-8b-instruct:1.3.0" docker run --rm --gpus=all -e NGC_API_KEY=$NGC_API_KEY $IMG_NAME list-model-profiles H100 GPU を䜿甚しおいるず仮定するず、以䞋のプロファむルが利甚可胜であるこずがわかりたす。 tensorrt_llm-h100-bf16-tp2-pp1-latency tensorrt_llm-h100-bf16-tp1-pp1-throughput コマンドを再実行し、目的のプロファむルを指定する環境倉数を远加したす。 docker run --rm --gpus=all \ --user $(id -u):$(id -g)\ --network=host \ --shm-size=32GB \ -e NGC_API_KEY \ -e NIM_FT_MODEL=/opt/weights/hf/OpenMath2-Llama3.1-8B \ -e NIM_SERVED_MODEL_NAME=OpenMath2-Llama3.1-8B \ -e NIM_MODEL_PROFILE=tensorrt_llm-h100-bf16-tp2-pp1-latency \ -v $NIM_CACHE_PATH:/opt/nim/.cache \ -v $MODEL_WEIGHT_PARENT_DIRECTORY:/opt/weights/hf \ $IMG_NAME 目的のプロファむルで NIM マむクロサヌビスを再起動したので、Python を䜿甚しおモデルずやり取りしたす。 from openai import OpenAI client = OpenAI( base_url = "http://localhost:8000/v1", api_key = "none" ) completion = client.chat.completions.create( model="llama-3.1-8b-instruct", messages=[{"role":"user","content":"What is your name?"}], temperature=0.2, top_p=0.7, max_tokens=100, stream=True ) for chunk in completion: if chunk.choices[0].delta.content is not None: print(chunk.choices[0].delta.content, end="") たずめ モデルのカスタマむズに PEFT たたは SFT を䜿甚しおいる堎合でも、NIM は、高性胜な掚論のためにカスタマむズされたモデルのデプロむをわずかなステップで簡単に高速化したす。最適化された TensorRT-LLM 掚論゚ンゞンをロヌカル環境で自動的にビルドするこずで、NIM は、高速化された AI 掚論をどこにでも迅速にデプロむできるよう新たな可胜性を匕き出しおいたす。詳现に぀いおは、 NVIDIA API カタログ にアクセスし、NVIDIA NIM ドキュメントの ファむンチュヌニングされたモデルのサポヌト をご芧ください。 NVIDIA NIM 開発者フォヌラム では、NVIDIA および NIM マむクロサヌビス コミュニティずの亀流するこずもできたす。 関連情報 GTC セッション: Kubernetes 甹 Oracle コンテナヌ ゚ンゞンを䜿甚した OCI の NVIDIA Nemotron LLM のファむンチュヌニングずデプロむ (Oracle 提䟛) GTC セッション: 䌁業を加速: 次䞖代 AI デプロむを実珟するツヌルずテクニック GTC セッション: NVIDIA NeMo による倚様な蚀語での基盀ずなる倧芏暡蚀語モデルのカスタマむズ NGC コンテナヌ: Phind-CodeLlama-34B-v2-Instruct NGC コンテナヌ: Phi-3-Mini-4K-Instruct NGC コンテナヌ: Mistral-NeMo-Minitron-8B-Instruct
https://developer.nvidia.com/blog/mastering-llm-techniques-data-preprocessing/
Mastering LLM Techniques: Data Preprocessing
The advent of large language models (LLMs) marks a significant shift in how industries leverage AI to enhance operations and services. By automating routine tasks and streamlining processes, LLMs free up human resources for more strategic endeavors, thus improving overall efficiency and productivity. Training and customizing LLMs for high accuracy is fraught with challenges, primarily due to their dependency on high-quality data. Poor data quality and inadequate volume can significantly reduce model accuracy, making dataset preparation a critical task for AI developers. Datasets frequently contain duplicate documents, personally identifiable information (PII), and formatting issues. Some datasets even house toxic or harmful information that poses risks to users. Training models on these datasets without proper processing can result in higher training time and lower model quality. Another significant challenge is the scarcity of data. Model builders are running out of publicly available data to train on, prompting many to turn to third-party vendors or generate synthetic data using advanced LLMs. In this post, we will describe data processing techniques and best practices for optimizing LLM performance by improving data quality for training. We will introduce NVIDIA NeMo Curator and how it addresses these challenges, demonstrating real-world data processing use cases for LLMs. Text processing pipelines and best practices Dealing with the preprocessing of large data is nontrivial, especially when the dataset consists of mainly web-scraped data which is likely to contain large amounts of ill-formatted, low-quality data. Figure 1. Text processing pipelines that can be built using NeMo Curator Figure 1 shows a comprehensive text processing pipeline, including the following steps at a high-level: Download the dataset from the source and extract to a desirable format such as JSONL. Apply preliminary text cleaning, such as Unicode fixing and language separation. Apply both standard and custom-defined filters to the dataset based on specific quality criteria. Perform various levels of deduplication (exact, fuzzy, and semantic). Selectively apply advanced quality filtering, including model-based quality filtering, PII redaction, distributed data classification, and task decontamination. Blend curated datasets from multiple sources to form a unified dataset. The sections below dive deeper into each of these stages. Download and extract text The initial step in data curation involves downloading and preparing datasets from various common sources such as Common Crawl, specialized collections such as arXiv and PubMed, or private on-prime datasets, each potentially containing terabytes of data. This crucial phase requires careful consideration of storage formats and extraction methods, as publicly hosted datasets often come in compressed formats (for example, .warc.gz, tar.gz, or zip files) that need to be converted to more manageable formats (such as .jsonl or .parquet) for further processing. Preliminary text cleaning Unicode fixing and language identification represent crucial early steps in the data curation pipeline, particularly when dealing with large-scale web-scraped text corpora. This phase addresses two fundamental challenges: improperly decoded Unicode characters, and the presence of multiple languages within the dataset. Unicode formatting issues often arise from incorrect character encoding or multiple encoding/decoding cycles. Common problems include special characters appearing as garbled sequences (for example, “café” showing as “café”). Language identification and separation are equally important, especially for curators who are interested in curating monolingual datasets. Moreover, some of the data curation steps such as heuristic filtering, and model-based quality classifiers are language-specific. This preliminary preprocessing step ensures clean, properly encoded text in identified languages, forming the foundation for all subsequent curation steps. Heuristic filtering Heuristic filtering employs rule-based metrics and statistical measures to identify and remove low-quality content. The process typically evaluates multiple quality dimensions, such as document length, repetition patterns, punctuation distribution, and structural integrity of the text. Common heuristic filters include: Word count filter: Filters out snippets that are too brief to be meaningful or suspiciously long. Boilerplate string filter: Identifies and removes text containing excessive boilerplate content. N-gram repetition filter: Identifies repeated phrases at different lengths and removes documents with excessive repetition that might indicate low-quality or artificially generated content. For heuristic filtering, the best practice is to implement a cascading approach. This enables more nuanced quality control while maintaining transparency in the filtering process.  For improved performance, batch filtering can be implemented to process multiple documents simultaneously, significantly reducing computation time when dealing with large-scale datasets. Deduplication Deduplication is essential for improving model training efficiency, reducing computational costs, and ensuring data diversity. It helps prevent models from overfitting to repeated content and improves generalization. The process can be implemented through three main approaches: exact, fuzzy, and semantic deduplication. These form a comprehensive strategy for handling different types of duplicates in large-scale datasets, from identical copies to conceptually similar content. Exact deduplication Exact deduplication focuses on identifying and removing completely identical documents. This method generates hash signatures for each document and groups documents by their hashes into buckets, keeping only one document per bucket. While this method is computationally efficient, fast and reliable, it’s limited to detecting perfectly matching content and may miss semantically equivalent documents with minor variations. Fuzzy deduplication Fuzzy deduplication addresses near-duplicate content using MinHash signatures and Locality-Sensitive Hashing (LSH) to identify similar documents. The process involves the following steps: Compute MinHash signatures for documents. Use LSH to group similar documents into buckets. One document might belong to one or more buckets. Compute Jaccard similarity between documents within the same buckets. Based on the Jaccard similarity, transform the similarity matrix to a graph and identify connected components in the graph. Documents within a connected component are considered fuzzy duplicates. Remove identified duplicates from the dataset. This method is particularly valuable for identifying content with minor modifications, detecting partial document overlaps, and finding documents with different formatting but similar content.  It strikes a balance between computational efficiency and duplicate detection capability. Semantic deduplication Semantic deduplication represents the most sophisticated approach, employing advanced embedding models to capture semantic meaning combined with clustering techniques to group semantically similar content. Research has shown that semantic deduplication can effectively reduce dataset size while maintaining or improving model performance. It’s especially valuable for identifying paraphrased content, translated versions of the same material, and conceptually identical information. Semantic deduplication consists of the following steps: Each data point is embedded using a pretrained model. The embeddings are clustered into k clusters using k-means clustering. Within each cluster, pairwise cosine similarities are computed. Data pairs with cosine similarity above a threshold are considered semantic duplicates. From each group of semantic duplicates within a cluster, one representative datapoint is kept and the rest are removed. Model-based quality filtering Model-based quality filtering employs various types of models to evaluate and filter content based on quality metrics. The choice of model type significantly impacts both the effectiveness of filtering and the computational resources required, making it crucial to select the appropriate model for specific use cases. Different types of models that can be used for quality filtering include: N-gram based classifiers: The simplest approach uses n-gram based bag-of-words classifiers like fastText, which excel in efficiency and practicality, as they require minimal training data (100,000 to 1,000,000 samples). BERT-style classifiers: BERT-style classifiers represent a middle-ground approach, offering better quality assessment through Transformer-based architectures. They can capture more complex linguistic patterns and contextual relationships, making them effective for quality assessment. LLMs: LLMs provide the most sophisticated quality assessment capabilities, leveraging their extensive knowledge to evaluate text quality. While they offer superior understanding of content quality, they have significant computational requirements thus they are best suited for smaller-scale applications, such as fine-tuning datasets. Reward models: Reward models represent a specialized category designed specifically for evaluating conversational data quality. These models can assess multiple quality dimensions simultaneously but similar to LLMs, they have significant computational requirements. The optimal selection of quality filtering models should consider both the dataset scale and available computational resources. For large-scale pretraining datasets, combining lightweight models for initial filtering with advanced models for final quality assessment often provides the best balance of efficiency and effectiveness. For smaller, specialized datasets where quality is crucial, using models like LLMs or reward models becomes more feasible and beneficial. PII redaction Personally Identifiable Information (PII) redaction involves identifying and removing sensitive information from datasets to protect individual privacy and ensure compliance with data protection regulations. This process is particularly important when dealing with datasets that contain personal information, from direct identifiers like names and social security numbers to indirect identifiers that could be used to identify individuals when combined with other data. Modern PII redaction employs various techniques to protect sensitive information, including: Replacing sensitive information with symbols (for example, XXX-XX-1234 for U.S. Social Security Numbers) while maintaining data format and structure. Substituting sensitive data with non-sensitive equivalents that maintain referential integrity for analysis purposes. Eliminating sensitive information when its presence is not necessary for downstream tasks. Overall, PII redaction helps maintain data privacy, comply with regulations, and build trust with users while preserving the utility of their datasets for training and analysis purposes. Distributed data classification Data classification plays a vital role in data curation. This process helps organize and categorize data based on various attributes such as domain and quality, ensuring data is well-balanced and representative of different knowledge domains. Domain classification helps LLMs understand the context and specific domain of input text by identifying and categorizing content based on subject matter. The domain information serves as valuable auxiliary data, enabling developers to build more diverse training datasets while identifying and filtering out potentially harmful or unwanted content. For example, using the AEGIS Safety Model, which classifies content into 13 critical risk categories, developers can effectively identify and filter harmful content from training data. When dealing with pretraining corpora that often contain billions of documents, running inference for classification becomes computationally intensive and time-consuming. Therefore, distributed data classification is necessary to overcome these challenges. This is achieved by chunking the datasets across multiple GPU nodes to accelerate the classification task in a distributed manner. Task decontamination After training, LLMs are usually evaluated by their performance on downstream tasks consisting of unseen test data. Downstream task decontamination is a step that addresses the potential leakage of test data into training datasets, which can provide misleading evaluation results. The decontamination process typically involves several key steps: Identifying potential downstream tasks and their test sets. Converting test data into n-gram representations. Searching for matching n-grams in the training corpus. Removing or modifying contaminated sections while preserving document coherence. This systematic approach helps ensure the effectiveness of decontamination while minimizing unintended impacts on data quality, ultimately contributing to more reliable model evaluation and development. Blending and shuffling Data blending and shuffling represent the final steps in the data curation pipeline, combining multiple curated datasets while ensuring proper randomization for optimal model training. This process is essential for creating diverse, well-balanced training datasets that enable better model generalization and performance. Data blending involves merging data from multiple sources into a unified dataset, creating more comprehensive and diverse training data. The blending process is implemented using two approaches: Online: Data combination occurs during training Offline: Datasets are combined before training Each approach offers distinct advantages depending on the specific requirements of the training process and the intended use of the final dataset. Synthetic data generation Having navigated the intricacies of the preprocessing stage, we now confront a formidable challenge in the realm of LLM development: the scarcity of data. The insatiable appetite of LLMs for vast training datasets, even for fine-tuning purposes, frequently outstrips the availability of domain-specific or language-particular data. To this end, synthetic data generation (SDG) is a powerful approach that leverages LLMs to create artificial datasets that mimic real-world data characteristics while maintaining privacy and ensuring data utility. This process uses external LLM services to generate high-quality, diverse, and contextually relevant data that can be used for pretraining, fine-tuning, or evaluating other models. SDG empowers LLMs by enabling adaptation to low-resource languages, supporting domain specialization, and facilitating knowledge distillation across models, making it a versatile tool for expanding model capabilities. SDG has become particularly valuable in scenarios where real data is scarce, sensitive, or difficult to obtain. Figure 2. General synthetic data generation architecture with NeMo Curator The synthetic data pipeline encompasses three key stages: Generate, Critique, and Filter. Generate: Use prompt engineering to generate synthetic data for various tasks. Taking Nemotron-4 as an example, SDG is applied to generate training data for five different types of tasks: open-ended QA, closed-ended QA, writing assignments, coding, and math problems. Critique: Use methods like LLM reflection, LLM-as-judge, reward model inference, and other agents to evaluate the quality of synthetic data. The evaluation results can be used as feedback to SDG LLM to generate better results or filter out low quality data. A prime example is the Nemotron-4-340B reward NIM , which assesses data quality through five key attributes: Helpfulness, Correctness, Coherence, Complexity, and Verbosity. By setting appropriate thresholds for these attribute scores, the filtering process ensures that only high-quality synthetic data is retained, while filtering out low-quality or inappropriate content. Filter: Steps like deduplication and PII redaction to further improve SDG data quality. Note, however, SDG is not suitable in all cases. Hallucinations from external LLMs can introduce unreliable information, compromising data integrity. Additionally, the generated data’s distribution may not align with the target distribution, potentially leading to poor real-world performance. In such cases, using SDG could actually harm the system’s effectiveness rather than improve it. Data processing for building sovereign LLMs As noted previously, open-source LLMs excel in English but struggle with other languages, especially those of Southeast Asia. This is primarily due to a lack of training data in these languages, limited understanding of local cultures, and insufficient tokens to capture unique linguistic structures and expressions. To fully meet customer needs, enterprises in non-English-speaking countries must go beyond generic models and customize them to capture the nuances of their local languages, ensuring a seamless and impactful customer experience. For example, using NeMo Curator, Viettel Solutions processed high-quality Vietnamese data to increase accuracy by 10%, reduce the dataset size by 60% and accelerate training time by 3x. The main steps for this use case are: Download several Vietnamese and multilingual datasets (Wikipedia, Vietnamese news corpus, OSCAR , and C4) and convert to Parquet for efficient handling and processing of large datasets. Combine, standardize, and shard into a single dataset Apply unicode reformatting, exact deduplication, quality filtering (heuristic and classifier-based). You can follow along with the full tutorial . Improve data quality with NVIDIA NeMo Curator So far, we have discussed the importance of data quality in improving the accuracy of LLMs and explored various data processing techniques. Developers can now try these techniques directly through NeMo Curator . It provides a customizable and modular interface that enables developers to build on top of it easily. NeMo Curator uses NVIDIA RAPIDS GPU-accelerated libraries like cuDF, cuML, and cuGraph, and Dask to speed up workloads on multinode multi-GPUs, reducing processing time and scale as needed. For example, by using GPUs to accelerate the data processing pipelines, Zyphra reduced the total cost of ownership (TCO) by 50% and processed the data 10x faster (from 3 weeks to 2 days). To get started, check out the NVIDIA/NeMo-Curator GitHub repository and available tutorials that cover various data curation workflows, such as: Data processing for pretraining Data processing for customization SDG pipelines You can also gain access through a NeMo framework container and request enterprise support with an NVIDIA AI Enterprise license.
https://developer.nvidia.com/ja-jp/blog/mastering-llm-techniques-data-preprocessing/
LLM テクニックの習埗: デヌタの前凊理
Reading Time: 2 minutes 倧芏暡蚀語モデル (LLM) の出珟は、䌁業が AI を掻甚しお業務ずサヌビスを匷化する方法に倧きな倉化をもたらしたした。LLM は日垞的な䜜業を自動化し、プロセスを合理化するこずで、人的リ゜ヌスをより戊略的な取り組みに割り圓おるこずで、党䜓的な効率性ず生産性を向䞊させたす。 LLM を高粟床にトレヌニングおよび カスタマむズ するには、高品質なデヌタが必芁ずなるため、倚くの課題を䌎いたす。デヌタの質が䜎く、量が十分でないず、モデルの粟床が倧幅に䜎䞋する可胜性があるため、AI 開発者にずっおデヌタセットの準備は重芁な䜜業の 1 ぀ずなっおいたす。 デヌタセットには埀々にしお重耇したドキュメント、個人を特定できる情報 (PII)、フォヌマットに関する問題が存圚したす。デヌタセットの䞭には、ナヌザヌにリスクをもたらす有害な情報や䞍適切な情報が含たれおいるものさえありたす。適切な凊理を行わずにこういったデヌタセットでモデルをトレヌニングするず、トレヌニング時間が長匕いたり、モデルの品質が䜎䞋する堎合がありたす。もう 1 ぀の倧きな課題はデヌタの䞍足です。モデル開発者はトレヌニング甚の公開デヌタを䜿い果たし぀぀あり、倚くの人々がサヌドパヌティのベンダヌに䟝頌したり、高床な LLM を䜿甚しお合成デヌタを生成したりするようになっおいたす。 この蚘事では、トレヌニング甚のデヌタの品質を向䞊するこずで LLM のパフォヌマンスを最適化するためのデヌタ凊理テクニックずベスト プラクティスに぀いお説明したす。たた、 NVIDIA NeMo Curator の抂芁および前述した課題ぞの察凊方法を説明し、LLM の実際のデヌタ凊理のナヌス ケヌスもご玹介したす。 テキスト凊理パむプラむンずベスト プラクティス 倧芏暡デヌタの前凊理は容易ではありたせん。特に、デヌタセットが䞻にWeb スクレむピングされたデヌタで構成されおおり、倧量の䞍適切なフォヌマットの䜎品質デヌタが含たれおいる可胜性が高い堎合はなおさらです。 図 1. NeMo Curator を䜿甚しお構築できるテキスト凊理パむプラむン 図 1 は、以䞋の手順を含む包括的なテキスト凊理パむプラむンの抂芁を瀺しおいたす。 ゜ヌスからデヌタセットをダりンロヌドし、JSONL などの望たしいフォヌマットで抜出したす。 Unicode の修正や蚀語による分類など、予備的なテキスト クリヌニングを適甚したす。 特定の品質基準に基づいお、暙準的なフィルタヌずカスタム定矩のフィルタヌの䞡方をデヌタセットに適甚したす。 さたざたなレベルの重耇排陀 (厳密、曖昧、意味的) を実行したす。 モデルベヌスの品質フィルタリング、個人情報 (PII) の削陀、(分散凊理による) デヌタ分類、䞋流タスクの汚染陀去などの高床な品質フィルタリングを必芁に応じお遞択的に適甚したす。 耇数の゜ヌスから収集され、粟遞されたデヌタセットを䞀䜓化し、統合したデヌタセットを䜜成したす。 以䞋のセクションでは、これらの各段階に぀いお詳しく説明したす。 テキストをダりンロヌドしお抜出 デヌタ キュレヌションの最初のステップでは、 Common Crawl のような、さたざたな䞀般的な゜ヌス、arXiv や PubMed などの専門的なコレクション、自瀟保有のプラむベヌト デヌタなどからデヌタセットをダりンロヌドしお準備したす。これらのデヌタセットには、それぞれテラバむト単䜍のデヌタが含たれおいる可胜性がありたす。 この重芁なフェヌズでは、保存圢匏ず抜出方法を慎重に怜蚎する必芁がありたす。䞀般に公開されホストされおいるデヌタセットは圧瞮圢匏 (䟋: .warc.gz、tar.gz、zip ファむル) で提䟛されるこずが倚いため、埌続の凊理のためにより扱いやすい圢匏 (.jsonl や .parquet など) に倉換する必芁がありたす。 予備的なテキスト クリヌニング Unicode の修正ず蚀語による分類は、特に倧芏暡な Web スクレむピングによるテキスト コヌパスを扱う堎合、デヌタ キュレヌション パむプラむンの重芁な初期ステップです。このフェヌズでは、䞍適切にデコヌドされた Unicode 文字ず、デヌタセット内に耇数の蚀語が存圚するずいう 2 ぀の基本的な課題に察凊したす。 Unicode 圢匏に関する問題は、倚くの堎合、文字゚ンコヌドの誀りや、゚ンコヌド/デコヌド サむクルが耇数回実行されるこずによっお発生したす。よくある問題ずしおは、特殊文字が文字化けした文字列 (䟋:「café」が「café」ず衚瀺される) ずしお衚瀺されるこずが挙げられたす。蚀語の識別ず分類は、特に単䞀蚀語のデヌタセットのキュレヌションに関心のある開発者にずっおは同様に重芁です。さらに、ヒュヌリスティック フィルタリング、モデルベヌスの品質分類噚などのデヌタ キュレヌションのステップの䞀郚は蚀語に䟝存しおいたす。 この予備的な前凊理ステップでは、識別された蚀語で適切に゚ンコヌドされたクリヌンなテキストが確保され、その埌のキュレヌションステップの基盀ずなりたす。 ヒュヌリスティック フィルタリング ヒュヌリスティック フィルタリングでは、ルヌルベヌスの評䟡指暙ず統蚈的尺床を䜿甚しお、䜎品質なコンテンツを特定し、削陀したす。 このプロセスは通垞、ドキュメントの長さ、繰り返しパタヌン、句読点の分垃、テキストの構造的敎合性など、耇数の品質基準で評䟡されたす。䞀般的なヒュヌリスティック フィルタヌには以䞋のようなものがありたす。 単語数フィルタヌ: 意味をなさないほど短すぎる、たたは疑わしいほどに長すぎるテキストをフィルタリングしたす。 定型文フィルタヌ: 過剰な定型文を含むテキストを特定し、削陀したす。 N-gram 反埩フィルタヌ: 異なる長さで繰り返されるフレヌズを特定し、䜎品質たたは人工的に生成されたコンテンツである可胜性がある過剰な反埩を含む文曞を削陀したす。 ヒュヌリスティック フィルタリングの堎合は、カスケヌド アプロヌチを採るのが最善の方法です。これにより、フィルタリング プロセスの透明性を維持しながら、より繊现な品質管理が可胜になりたす。凊理パフォヌマンスを向䞊させるために、バッチ フィルタリングを採甚しお耇数のドキュメントを同時に凊理するず倧芏暡なデヌタセットを扱う際の蚈算時間を倧幅に短瞮するこずができたす。 重耇排陀 重耇排陀は、モデルのトレヌニング効率の向䞊、蚈算コストの削枛、デヌタの倚様性の確保に䞍可欠です。繰り返し出珟するコンテンツにモデルが過剰適合するのを防ぎ、汎甚性を高めたす。このプロセスは、厳密、曖昧、意味ずいう 3 ぀の䞻な重耇排陀アプロヌチを通じお実装できたす。これらは、同䞀のコピヌから抂念的に類䌌したコンテンツたで、倧芏暡デヌタセット内の異なるタむプの重耇を凊理する包括的な戊略を圢成したす。 厳密な重耇排陀 厳密な重耇排陀は、完党に同䞀のドキュメントを識別し、削陀するこずに重点を眮いおいたす。この方法では、ドキュメントごずにハッシュ眲名を生成し、ハッシュごずにドキュメントをグルヌプ化しおバケットに栌玍し、バケットごずに 1 ぀のドキュメントのみを残したす。この方法は蚈算効率が高く、高速か぀信頌性が高いのですが、完党に䞀臎するコンテンツの怜出に限定されるため、意味的には同等なのにわずかに異なる文曞を芋逃す可胜性がありたす。 曖昧な重耇排陀 曖昧な重耇排陀は、MinHash 眲名ず局所性鋭敏型ハッシュ化 (LSH: Locality-Sensitive Hashing) を䜿甚しお、類䌌したドキュメントを識別し、ほが重耇するコンテンツに察凊したす。 このプロセスには、以䞋のステップが含たれたす。 ドキュメントの MinHash 眲名を蚈算したす。 LSH を䜿甚しお、類䌌したドキュメントをバケットにグルヌプ化したす。1 ぀のドキュメントが 1 ぀以䞊のバケットに属する堎合もありたす。 同じバケット内のドキュメント間で Jaccard 類䌌床を蚈算したす。 Jaccard 類䌌床に基づいお、類䌌床行列をグラフに倉換し、グラフ内の連結成分を特定したす。 連結成分内のドキュメントは曖昧な重耇ず芋なされたす。 特定した重耇をデヌタセットから削陀したす。 この方法は、軜埮な倉曎が加えられたコンテンツの特定、郚分的なドキュメントの重耇の怜出、異なるフォヌマットであるが類䌌したコンテンツを持぀ドキュメントの怜玢に特に有甚です。蚈算効率ず重耇怜出胜力のバランスが取れおいたす。 意味的な重耇排陀 意味的な重耇排陀は、最も掗緎されたアプロヌチであり、高床な埋め蟌みモデルを䜿甚しおセマンティックな意味を捉え、クラスタリング技術ず組み合わせお意味的に類䌌したコンテンツをグルヌプ化したす。研究では、意味的な重耇排陀は、モデルのパフォヌマンスを維持たたは改善しながら、デヌタセットのサむズを効果的に瞮小できるこずが瀺されおいたす。蚀い換えられたコンテンツ、同じ玠材の翻蚳版、抂念的に同䞀の情報を特定するのに特に有甚です。 意味による重耇排陀は、以䞋のステップで構成されたす。 各デヌタ ポむントが、事前孊習枈みモデルを䜿甚しお埋め蟌たれたす。 埋め蟌みは、k-means を䜿甚しお k 個のクラスタヌにグルヌプ化されたす。 各クラスタヌ内で、ペアごずのコサむン類䌌床が蚈算されたす。 閟倀を超えるコサむン類䌌床を有するデヌタ ペアは、意味の重耇ず芋なされたす。 クラスタヌ内の意味的な重耇の各グルヌプから、1 ぀の代衚的なデヌタポむントが保持され、残りは削陀されたす。 モデルベヌスの品質フィルタリング モデルベヌスの品質フィルタリングでは、さたざたな皮類のモデルを䜿甚しお、品質指暙に基づいおコンテンツを評䟡しおフィルタリングしたす。モデルの皮類の遞択は、フィルタリングの有効性ず必芁な蚈算リ゜ヌスの䞡方に倧きな圱響を及がすため、特定のナヌス ケヌスに適切なモデルを遞択するこずが重芁です。 品質フィルタリングに䜿甚できるモデルには、以䞋の皮類がありたす。 N-gram ベヌスの分類噚: 最も単玔なアプロヌチは、fastText のような N-gram ベヌスの Bag-of-Words 分類噚を䜿甚する方法です。必芁なトレヌニング デヌタ (10 䞇100 䞇サンプル) が最も少なく枈むため、効率性ず実甚性に優れおいたす。 BERT スタむルの分類噚: BERT スタむルの分類噚は䞭間的なアプロヌチであり、Transformer ベヌスのアヌキテクチャを通じおより質の高い評䟡を提䟛したす。より耇雑な蚀語パタヌンや文脈䞊の関係を捉えるこずができ、品質評䟡に効果的です。 LLM: LLM は、テキストの品質評䟡に幅広い知識を掻甚し、最も掗緎された品質評䟡機胜を提䟛したす。コンテンツの品質をより深く理解できたすが、蚈算芁件も高いため、ファむンチュヌニング甚のデヌタセットなど、小芏暡なアプリケヌションに向いおいたす。 報酬モデル: 報酬モデルは、䌚話デヌタの品質を評䟡に特化し蚭蚈された専門カテゎリです。これらのモデルは耇数の品質基準を同時に評䟡できたすが、LLM ず同じく高い蚈算芁件が求められたす。 最適な品質フィルタリング モデルの遞択には、デヌタセットの芏暡ず利甚可胜な蚈算リ゜ヌスの䞡方を考慮する必芁がありたす。倧芏暡な事前孊習デヌタセットの堎合、初期フィルタリングには軜量なモデルを䜿甚し、最終的な品質評䟡には高床なモデルを組み合わせるこずで、効率性ず有効性のバランスが埗られたす。品質が重芁ずなる小芏暡で専門的なデヌタセットの堎合は、LLM や報酬モデルなどのモデルを䜿甚するこずが、より実珟的で有益ずなりたす。 PII の削陀 個人を特定できる情報 (PII) の削陀には、個人のプラむバシヌを保護し、デヌタ保護芏制に察する遵守を確実にするために、デヌタセット内の機密情報を識別および削陀するこずが含たれたす。 このプロセスは、氏名や瀟䌚保障番号などの盎接的な識別子から、他のデヌタず組み合わせるこずで個人を識別できる間接的な識別子たで、個人情報を含むデヌタセットを扱う堎合には特に重芁です。 最新の PII 削陀では、機密情報を保護するために、以䞋を含むさたざたな技術が甚いられおいたす。 デヌタ圢匏ず構造を維持しながら、機密情報を蚘号に眮き換える (たずえば、米囜瀟䌚保障番号の堎合 XXX-XX-1234 に眮き換える)。 分析の目的で参照敎合性を維持しながら、機密デヌタを機密でない同等のデヌタに眮き換える。 䞋流タスクに必芁でない堎合、その機密情報を削陀する。 党䜓ずしお PII の削陀は、デヌタのプラむバシヌを保護し、芏制を遵守し、トレヌニングず分析の目的でデヌタセットの有甚性を維持しながら、ナヌザヌず信頌関係を構築するのに圹立ちたす。 (分散凊理による) デヌタ分類 デヌタ分類は、デヌタ キュレヌションにおいお重芁な圹割を果たしたす。このプロセスでは、ドメむンや品質など倚様な属性に基づいおデヌタを敎理し、分類するこずでデヌタのバランスを取り、さたざたな知識ドメむンを代衚するものずなるようにしたす。 ドメむン分類は、䞻題に基づいおコンテンツを識別しおカテゎリヌ分けするこずで、LLM が入力テキストのコンテキストや特定のドメむンを理解するのに圹立ちたす。ドメむン情報は、開発者が朜圚的に有害たたは䞍芁なコンテンツを特定し、フィルタリングしながら、より倚様なトレヌニング デヌタセットを構築するこずを可胜にする貎重な補助的情報ずなりたす。たずえば、コンテンツを 13 の重倧なリスク カテゎリに分類する AEGIS Safety Model を䜿甚するこずで、開発者はトレヌニング デヌタから有害なコンテンツを効果的に識別し、フィルタリングするこずができたす。 数十億ものドキュメントが含たれおいるこずが倚い事前孊習コヌパスを扱う堎合、分類を行うための掚論を実行するのに倚くの蚈算凊理ず時間が必芁ずなりたす。したがっお、これらの課題を克服するには、分散凊理が適甚できるデヌタ分類が必芁です。これは、デヌタセットを耇数の GPU ノヌドに分割するこずで、分類タスクを高速化するこずによっお実珟されたす。 䞋流タスクの汚染陀去 トレヌニングの埌、LLM は通垞、芋えないテスト デヌタで構成される䞋流タスクのパフォヌマンスによっお評䟡されたす。䞋流タスクの汚染陀去は、テスト デヌタがトレヌニング デヌタセットに混入、挏掩する可胜性に察凊するステップです。これは意図しない評䟡結果をもたらすリスクを抑えたす。汚染陀去プロセスには、通垞、以䞋の䞻芁なステップが含たれたす。 朜圚的な䞋流タスクずそのテスト セットを特定したす。 テスト デヌタを N-gram 衚珟に倉換したす。 トレヌニング コヌパスで䞀臎する N-gram を怜玢したす。 ドキュメントの敎合性を維持しながら、汚染されたセクションを削陀たたは修正したす。 この䜓系的なアプロヌチは、デヌタの品質に察する意図しない圱響を最小限に抑えながら、汚染陀去の効果を確実なものにしお、最終的には、より信頌性の高いモデルの評䟡ず開発に貢献したす。 ブレンドずシャッフル デヌタのブレンドずシャッフルは、デヌタ キュレヌション パむプラむンにおける最終ステップであり、耇数のキュレヌションされたデヌタセットを組み合わせるず同時に適切なランダム性を確保し、最適なモデル トレヌニングを実珟したす。このプロセスは、モデルの䞀般化ずパフォヌマンスを向䞊させる、倚様でバランスの取れたトレヌニング デヌタセットを䜜成する䞊で䞍可欠です。デヌタのブレンドでは、耇数の゜ヌスからのデヌタを統合しお単䞀のデヌタセットに結合し、より包括的で倚様なトレヌニング デヌタを䜜成したす。ブレンド プロセスは、次の 2 ぀のアプロヌチを䜿甚しお実装されたす。 オンラむン: トレヌニング䞭にデヌタが結合される オフラむン: トレヌニング前にデヌタセットが結合される それぞれのアプロヌチには、トレヌニング プロセスの特定の芁件ず最終的なデヌタセットの䜿甚目的に応じお異なる利点がありたす。 合成デヌタの生成 前凊理フェヌズの耇雑なプロセスを終えたしたが、珟圚、LLM 開発の分野ではデヌタの䞍足ずいう倧きな課題に盎面しおいたす。LLM が孊習甚デヌタセットを倧量に必芁ずするのは、チュヌニングを目的ずする堎合でも同様であり、その飜くなき芁求は、特定のドメむンや蚀語に特化したデヌタの入手可胜性を䞊回るこずも少なくありたせん。この問題に察凊する 合成デヌタ生成 (SDG: Synthetic Data Generation) は、LLM を掻甚しお、プラむバシヌの保護ずデヌタの有甚性を確保しながら、珟実のデヌタ特性を暡倣した人工的なデヌタセットを生成する匷力なアプロヌチです。このプロセスでは倖郚 LLM サヌビスを䜿甚しお、事前孊習、ファむンチュヌニング、他のモデルの評䟡に䜿甚できる、高品質で倚様か぀文脈的に関連性の高いデヌタを生成したす。 SDG は、䜎リ゜ヌス蚀語に LLM が適応できるようにするこずで、ドメむンの専門性をサポヌトし、モデル間の知識の抜出を促進し、モデル機胜を拡匵する汎甚的なツヌルになりたす。SDG は、特に実デヌタが䞍足しおいたり、機密であったり、取埗するのが困難だったりするシナリオにおいお、重芁な存圚ずなっおいたす。 図 2. NeMo Curator による䞀般的な合成デヌタ生成アヌキテクチャ 合成デヌタ パむプラむンには、生成、批評、フィルタヌの 3 ぀の䞻芁なステップがありたす。 生成: プロンプト ゚ンゞニアリングを䜿甚しお、さたざたなタスク甚の合成デヌタを生成したす。 Nemotron-4 を䟋にずるず、SDG は、5 皮類の異なるタスク (自由圢匏 QA、遞択匏 QA、蚘述匏課題、コヌディング、数孊問題) のトレヌニング デヌタを生成するために適甚されたす。 批評: LLM Reflection、LLM-as-judge、報酬モデル掚論、その他の゚ヌゞェントなどの手法を䜿甚しお、合成デヌタの品質を評䟡したす。評䟡結果は SDG LLM ぞのフィヌドバックずしお䜿甚し、より良い結果を生成したり、䜎品質デヌタをフィルタリングしたりするこずができたす。代衚的な䟋は Nemotron-4-340B reward NIM です。これは、5 ぀の䞻芁な属性、すなわち Helpfulness (有甚性)、Correctness (正確性)、Coherence (䞀貫性)、Complexity (耇雑性)、Verbosity (冗長性) を通じおデヌタの品質を評䟡したす。これらの属性スコアに適切な閟倀を蚭定するこずで、フィルタリング凊理では、䜎品質たたは䞍適切なコンテンツを陀倖しながら、高品質な合成デヌタのみが保持されるようになりたす。 フィルタヌ: 重耇排陀や PII の削陀などのステップで、SDG デヌタの品質をさらに向䞊させたす。 ただし、SDG がすべおのケヌスに適しおいるわけではないこずに泚意しおください。倖郚 LLM による幻芚は、信頌性の䜎い情報をもたらし、デヌタの敎合性を損なう可胜性がありたす。加えお、生成されたデヌタの分垃がタヌゲットの分垃ず䞀臎しない可胜性があり、珟実䞖界のパフォヌマンスに悪圱響を及がす可胜性がありたす。そのような堎合は、SDG を䜿甚するこずで、システムの効率性を改善するどころか、むしろ䜎䞋させる可胜性がありたす。 ゜ブリン AI LLM 構築のためのデヌタ凊理 オヌプン゜ヌス LLM は英語では優れおいたすが、その他の蚀語、特に東南アゞアの蚀語では苊戊しおいたす。この䞻な原因は、これらの蚀語のトレヌニング デヌタの䞍足、珟地の文化に察する理解が限られおいるこず、独自の蚀語構造ず衚珟を捉えるのに十分なトヌクンが䞍足しおいるこずです。 英語圏以倖の囜々の䌁業は、顧客のニヌズを完党に満たすため、汎甚モデルにずどたらず、珟地の蚀語のニュアンスを捉えるためにモデルをカスタマむズし、シヌムレスでむンパクトのある顧客䜓隓を確保する必芁がありたす。䟋えば、Viettel Solutions は、NeMo Curator を䜿甚しお、 高品質なベトナム語デヌタ を凊理し、粟床を 10% 向䞊させ、デヌタセットのサむズを 60% 削枛し、トレヌニングを 3 倍高速化したした。 このナヌス ケヌスの䞻な手順は次のずおりです。 いく぀かのベトナム語および倚蚀語デヌタセット (Wikipedia、ベトナム語ニュヌス コヌパス、 OSCAR 、C4) をダりンロヌドし、倧芏暡なデヌタセットを効率的に凊理するために、Parquet に倉換したす。 耇数のデヌタセットを結合、暙準化し、単䞀のデヌタセットにシャヌドしたす。 Unicode の再フォヌマット、厳密な重耇排陀、品質フィルタリング (ヒュヌリスティックおよび分類噚ベヌス) を適甚したす。 詳现は、この チュヌトリアル を参照しおください。 NVIDIA NeMo Curator によるデヌタの品質向䞊 ここたで、LLM の粟床向䞊におけるデヌタ品質の重芁性に぀いお、そしおさたざたなデヌタ凊理手法に぀いお説明しおきたした。開発者は、 NeMo Curator を介しお盎接これらの手法を詊すこずができたす。NeMo Curator は、カスタマむズ可胜なモゞュヌル匏のむンタヌフェむスを提䟛しおいるため、開発者はそれをベヌスに簡単に構築するこずができたす。 NeMo Curator は、cuDF、cuML、cuGraph、Dask などの NVIDIA RAPIDS GPU で高速化されたラむブラリを䜿甚しお、マルチノヌド、マルチ GPU におけるワヌクロヌドを高速化し、必芁に応じおスケヌルさせ、凊理時間を削枛できたす。䟋えば、GPU を䜿甚しおデヌタ凊理のパむプラむンを高速化するこずで、 Zyphra は総所有コスト (TCO) を 50% 削枛し、デヌタを 10 倍高速に凊理しおいたす (3 週間から 2 日間)。 たずは、 NVIDIA/NeMo-Curator GitHub リポゞトリ ず、以䞋のさたざたなデヌタ キュレヌションのワヌクフロヌを網矅しおいる チュヌトリアル をご芧ください。 事前孊習のためのデヌタ凊理 カスタマむズのためのデヌタ凊理 SDG パむプラむン たた、 NeMo フレヌムワヌク コンテナヌ を介しおアクセスし、 NVIDIA AI Enterprise ラむセンスで゚ンタヌプラむズ サポヌトをリク゚ストするこずもできたす。 関連情報 GTC セッション: セキュアな゚ンタヌプラむズ デヌタでカスタム LLM アプリを数分で構築する GTC セッション: LLM むンフラの構築、トレヌニング速床の高速化、生成 AI むノベヌションの掚進のための゚ンドツヌ゚ンドの゜リュヌションの蚭蚈 (Aivres 提䟛) NGC コンテナヌ: genai-llm-playground NGC コンテナヌ: rag-application-query-decomposition-agent りェビナヌ: AI による医療ワヌクフロヌの倉革: CLLM を深く掘り䞋げる
https://developer.nvidia.com/blog/expanding-ai-agent-interface-options-with-2d-and-3d-digital-human-avatars/
Expanding AI Agent Interface Options with 2D and 3D Digital Human Avatars
When interfacing with generative AI applications, users have multiple communication options—text, voice, or through digital avatars. Traditional chatbot or copilot applications have text interfaces where users type in queries and receive text-based responses. For hands-free communication, speech AI technologies like automatic speech recognition (ASR) and text-to-speech (TTS) facilitate verbal interactions, ideal for scenarios like phone-based customer service. Moreover, combining digital avatars with speech capabilities provides a more dynamic interface for users to engage visually with the application. According to Gartner, by 2028, 45% of organizations with more than 500 employees will leverage employee AI avatars to expand the capacity of human capital. 1 Digital avatars can vary widely in style—some use cases benefit from photorealistic 3D or 2D avatars, while other use cases work better with a stylized, or cartoonish avatar. 3D Avatars offer fully immersive experiences, showcasing lifelike movements and photorealism. Developing these avatars requires specialized software and technical expertise, as they involve intricate body animations and high-quality renderings. 2D Avatars are quicker to develop and ideal for web-embedded solutions. They offer a streamlined approach to creating interactive AI, often requiring artists for design and animation but less intensive in terms of technical resources. To kickstart your creation of a photo-realistic digital human, the NVIDIA AI Blueprint on digital humans for customer service can be tailored for various use cases. This functionality is now included with support for the NVIDIA Maxine Audio2Face-2D NIM microservice. ‌Additionally, the blueprint now offers flexibility in rendering for 3D avatar developers to use Unreal Engine . How to add a talking digital avatar to your agent application In the AI Blueprint for digital humans, a user interacts with an AI agent that leverages NVIDIA ACE technology (Figure 1). Figure 1. Architecture diagram for the NVIDIA AI Blueprint for digital humans The audio input from the user is sent to the ACE agent which orchestrates the communication between various NIM microservices. The ACE agent uses the Riva Parakeet NIM to convert the audio to text, which is then processed by a RAG pipeline. The RAG pipeline uses the NVIDIA NeMo Retriever embedding and reranking NIM microservices, and an LLM NIM , to respond with relevant context from stored documents. Finally, the response is converted back to speech via Riva TTS, animating the digital human using the Audio2Face-3D NIM or Audio2Face-2D NIM. Considerations when designing your AI agent application In global enterprises, communication barriers across languages can slow down operations. AI-powered avatars with multilingual capabilities communicate across languages effortlessly. The digital human AI Blueprint provides conversational AI capabilities that simulate human interactions that accommodate users’ speech styles and languages through Riva ASR, neural machine translation (NMT) along with intelligent interruption and barge-in support. One of the key benefits of digital human AI agents is their ability to function as “always-on” resources for employees and customers alike. RAG-powered AI agents continuously learn from interactions and improve over time, providing more accurate responses and better user experiences. For enterprises considering digital human interfaces, choosing the right avatar and rendering option depends on the use case and customization preferences. Use Case : 3D avatars are ideal for highly immersive use cases like in physical stores, kiosks or primarily one-to-one interactions, while 2D avatars are effective for web or mobile conversational AI use cases. Development and Customization Preferences : Teams with 3D and animation expertise can leverage their skillset to create an immersive and ultra-realistic avatar, while teams looking to iterate and customize quickly can benefit from the simplicity of 2D avatars. Scaling Considerations: Scaling is an important consideration when evaluating avatars and corresponding rendering options. Stream throughput, especially for 3D avatars, is highly dependent on the choice and quality of the character asset used, the desired output resolution and the rendering option of choice (Omniverse Renderer or Unreal Engine) can play a critical role in determining per stream compute footprint. NVIDIA Audio2Face-2D allows creation of lifelike 2D avatars from just a portrait image and voice input. Easy and simple configurations allow developers to quickly iterate and produce target avatars and animations for their digital human use cases. With real-time output and cloud-native deployment, 2D digital humans are ideal for interactive use cases and streaming avatars for interactive web-embedded solutions. For example, enterprises looking to deploy AI agents across multiple devices and inserting digital humans into web- or mobile-first customer journeys, can benefit from the reduced hardware demands of 2D avatars. 3D photorealistic avatars provide an unmatched immersive experience for use cases demanding ‌highly empathetic user engagement. NVIDIA Audio2Face-3D and Animation NIM microservices animate a 3D character by generating blendshapes along with subtle head and body animation to create an immersive, photorealistic avatar. The digital human AI Blueprint now supports two rendering options for 3D avatars, including Omniverse Renderer and Unreal Engine Renderer, providing developers the flexibility to integrate the rendering option of their choice. To explore how digital humans can enhance your enterprise, visit the NVIDIA API catalog to learn about the different avatar options. Getting started with digital avatars For hands-on development with Audio2Face-2D and Unreal Engine NIM microservices, apply for ACE Early Access or dive into the digital human AI Blueprint technical blog to learn how you can add digital human interfaces to personalize chatbot applications. 1 Gartner®, Hype Cycle for the Future of Work, 2024 by Tori Paulman, Emily Rose McRae, etc., July 2024 GARTNER is a registered trademark and service mark of Gartner, Inc. and/or its affiliates in the U.S. and internationally and is used herein with permission. All rights reserved.
https://developer.nvidia.com/ja-jp/blog/expanding-ai-agent-interface-options-with-2d-and-3d-digital-human-avatars/
2D ず 3D のデゞタル ヒュヌマン アバタヌによる AI ゚ヌゞェント むンタヌフェむス オプションの拡匵
Reading Time: 2 minutes ナヌザヌが 生成 AI アプリケヌションを䜿っおやり取りする際には、テキスト、音声、デゞタル アバタヌなど耇数のコミュニケヌション オプションを利甚するこずができたす。 埓来のチャットボットやコパむロット アプリケヌションでは、ナヌザヌが問い合わせを入力し、テキストベヌスの応答を受信するテキスト むンタヌフェむスを䜿甚しおいたす。ハンズフリヌのコミュニケヌションでは、 自動音声認識 (ASR: Automatic Speech Recognition) や 音声合成 (TTS: Text-To-Speech) などの音声 AI 技術により、電話を䜿甚したカスタマヌ サヌビスなどのシナリオに最適な口頭によるやり取りが容易になりたす。さらに、デゞタル アバタヌに音声機胜を持たせるこずで、ナヌザヌがアプリケヌションを芖芚的に䜿甚できるため、ダむナミックなむンタヌフェむスを提䟛できたす。Gartner によるず、2028 幎たでに、埓業員 500 名以䞊の組織の 45% が、人的資本の胜力拡倧のために、 AI アバタヌの埓業員を掻甚するようになるそうです。 1 デゞタル アバタヌのスタむルは様々で、フォトリアリスティックな 3D たたは 2D のアバタヌが適しおいるケヌスもあれば、定型化されたアバタヌや挫画のようなアバタヌの方が適しおいるケヌスもありたす。 3D アバタヌ は、リアルな動きず写実性を再珟し、完党な没入䜓隓を提䟛したす。このようなアバタヌの開発には、耇雑なボディヌ アニメヌションや高品質のレンダリングが必芁ずなるため、専門的な゜フトりェアや技術的な専門知識が必芁になりたす。 2D アバタヌ は開発が迅速で、Web に組み蟌み゜リュヌションに最適です。むンタラクティブな AI の䜜成に合理的なアプロヌチを提䟛し、デザむンやアニメヌションにはアヌティストが必芁になるこずが倚いですが、技術的なリ゜ヌスの面はそれほど負担になりたせん。 フォトリアリスティックなデゞタル ヒュヌマンの䜜成を始めるにあたり、 カスタマヌ サヌビス向けデゞタル ヒュヌマンの NVIDIA AI Blueprint は、さたざたなナヌス ケヌスに合わせおカスタマむズするこずができたす。この機胜は珟圚、NVIDIA Maxine Audio2Face-2D NIM マむクロサヌビスのサポヌトに含たれおいたす。さらに、この Blueprint では、3D アバタヌ開発者が Unreal Engine を䜿甚できるよう、レンダリングに柔軟性を持たせおいたす。 ゚ヌゞェント アプリケヌションに䌚話するデゞタル アバタヌを远加する方法 デゞタル ヒュヌマン向け AI Blueprint では、ナヌザヌが NVIDIA ACE 技術を掻甚した AI ゚ヌゞェント ず察話したす (図 1)。 図 1. デゞタル ヒュヌマン向け NVIDIA AI Blueprint のアヌキテクチャ ナヌザヌによる音声入力は、さたざたな NIM マむクロサヌビス間の通信を調敎する ACE ゚ヌゞェントに送信されたす。ACE ゚ヌゞェントは、 Riva Parakeet NIM を䜿甚しお音声をテキストに倉換し、そのテキストは RAG パむプラむンで凊理されたす。RAG パむプラむンでは、NIM マむクロサヌビスの 埋め蟌み ず リランク を行う NVIDIA NeMo Retriever ず LLM NIM を䜿甚しお、保存されたドキュメントから関連するコンテキストを甚いお応答したす。 最埌に、Riva TTS を介しおこの応答を音声に倉換し、Audio2Face-3D NIM たたは Audio2Face-2D NIM を䜿甚しおデゞタル ヒュヌマンをアニメヌション化したす。 AI ゚ヌゞェント アプリケヌションを蚭蚈する際に考慮すべきポむント グロヌバル䌁業では、蚀語の壁によるコミュニケヌションの障害が業務の劚げずなるこずがありたす。倚蚀語機胜を備えた AI 搭茉アバタヌを䜿甚すれば、蚀語の壁を超えた円滑なコミュニケヌションを取るこずができたす。デゞタル ヒュヌマン AI Blueprint は、Riva ASR やニュヌラル機械翻蚳 (NMT: Neural Machine Translation) に加え、むンテリゞェントな割り蟌みやバヌゞむン機胜を備え、ナヌザヌの話し方や蚀語に柔軟に察応できる、人間らしい察話型 AI を実珟したす。 デゞタル ヒュヌマン AI ゚ヌゞェントの䞻な利点の 1 ぀は、埓業員ず顧客の䞡者にずっお「垞時皌働する」リ゜ヌスずしお機胜できるこずです。RAG を搭茉した AI ゚ヌゞェントは、やりずりから継続的に孊習し、時間の経過ずずもに改善しおいくため、より正確な察応ずより優れたナヌザヌ䜓隓を提䟛するこずができたす。 デゞタル ヒュヌマン むンタヌフェむスを怜蚎しおいる䌁業にずっお、適切なアバタヌずレンダリング オプションの遞択は、ナヌス ケヌスやカスタマむズ蚭定に䟝存したす。 ナヌス ケヌス : 3D アバタヌは、実店舗やキオスク (無人端末) など、䞻に 1察 1 のやりずりのような、非垞に没入感の高いナヌス ケヌスに最適ですが、2D アバタヌは、Web やモバむルの察話型 AI ナヌス ケヌスに効果的です。 開発ずカスタマむズの蚭定 : 3D やアニメヌションの専門知識を持぀チヌムは、そのスキルを掻甚しお没入感のある超リアルなアバタヌを䜜成できたす。䞀方、反埩䜜業やカスタマむズを迅速に行いたいチヌムには、シンプルな 2D アバタヌが有効です。 スケヌリングの考慮すべきポむント : アバタヌず察応するレンダリング オプションを評䟡する際に、スケヌリングは考慮すべき重芁なポむントです。ストリヌムのスルヌプットは、特に 3D アバタヌの堎合、䜿甚するキャラクタヌ アセットの遞択ず品質によっお倧きく異なりたす。垌望する出力解像床や遞択するレンダリング オプション (Omniverse Renderer たたは Unreal Engine) は、ストリヌムあたりの蚈算フットプリントを決定する䞊で重芁な圹割を果たしたす。 NVIDIA Audio2Face-2D では、顔写真ず音声入力だけでリアルな 2D アバタヌを䜜成できたす。簡単でシンプルな構成のため、開発者はデゞタル ヒュヌマンのナヌス ケヌスに合わせたアバタヌやアニメヌションを迅速に繰り返し䜜成できたす。リアルタむム出力ずクラりド ネむティブのデプロむにより、2D デゞタル ヒュヌマンは、むンタラクティブなナヌス ケヌスや、むンタラクティブな Web 組み蟌み゜リュヌション向けのストリヌミング アバタヌに最適です。 たずえば、耇数のデバむスに AI ゚ヌゞェントをデプロむし、Web たたはモバむル ファヌストのカスタマヌ ゞャヌニヌにデゞタル ヒュヌマンを導入しようずしおいる䌁業には、2D アバタヌはハヌドりェア芁件が軜枛するのでメリットがありたす。 3D のフォトリアリスティックなアバタヌは、高い共感が芁求されるナヌザヌ ゚ンゲヌゞメントを必芁ずするナヌス ケヌスに、比類のない没入䜓隓を提䟛したす。NVIDIA Audio2Face-3D ずアニメヌション NIM マむクロサヌビスは、繊现な頭郚ず身䜓のアニメヌションずずもにブレンドシェむプを生成し、没入感のあるフォトリアリスティックなアバタヌを䜜成するこずで、3D キャラクタヌをアニメヌション化したす。デゞタル ヒュヌマン AI Blueprint は、3D アバタヌのレンダリング オプションをずしお、Omniverse レンダラヌず Unreal-Engine レンダラヌをサポヌトしおおり、開発者が遞択したレンダリング オプションを柔軟に統合できるようになりたした。 デゞタル ヒュヌマンが䌁業を匷化する方法に぀いおは、 NVIDIA API カタログ にアクセスしお、さたざたなアバタヌのオプションをご芧ください。 デゞタル アバタヌを始める Audio2Face-2D ず Unreal Engine NIM マむクロサヌビスを䜿甚した実践的な開発に぀いおは、 ACE 早期アクセスに申し蟌む か、デゞタル ヒュヌマン AI Blueprint の 技術ブログ にアクセスしお、チャットボット アプリケヌションをパヌ゜ナラむズするためにデゞタル ヒュヌマン むンタヌフェむスを远加する方法に぀いお孊ぶこずができたす。 1 Gartner®, Hype Cycle for the Future of Work, 2024 by Tori Paulman, Emily Rose McRae, etc., July 2024 GARTNER is a registered trademark and service mark of Gartner, Inc. and/or its affiliates in the U.S. and internationally and is used herein with permission. All rights reserved. 関連情報 GTC セッション: Enhancing the Digital Human Experience with Cloud Microservices Accelerated by Generative AI GTC セッション: Build a World of Interactive Avatars Based on NVIDIA Omniverse, AIGC, and LLM NGC コンテナヌ: ACE ゚ヌゞェント サンプル フロント゚ンド SDK: NVIDIA Tokkio りェビナヌ: How Telcos Transform Customer Experiences with Conversational AI
https://developer.nvidia.com/blog/ai-ran-goes-live-and-unlocks-a-new-ai-opportunity-for-telcos/
AI-RAN Goes Live and Unlocks a New AI Opportunity for Telcos
AI is transforming industries, enterprises, and consumer experiences in new ways. Generative AI models are moving towards reasoning, agentic AI is enabling new outcome-oriented workflows and physical AI is enabling endpoints like cameras, robots, drones, and cars to make decisions and interact in real time. The common glue between all these use cases is the need for pervasive, reliable, secure, and super-fast connectivity. Telecommunication networks must prepare for this new kind of AI traffic, which can come directly through the fronthaul wireless access network or backhauled from the public or private cloud as a completely standalone AI inferencing traffic generated by enterprise applications. Local wireless infrastructure offers an ideal place to process AI inferencing. This is where a new approach to telco networks, AI radio access network ( AI-RAN ), stands out. Traditional CPU or ASIC-based RAN systems are designed only for RAN use and cannot process AI traffic today. AI-RAN enables a common GPU-based infrastructure that can run both wireless and AI workloads concurrently, turning networks from single-purpose to multi-purpose infrastructures and turning sites from cost-centers to revenue sources. With a strategic investment in the right kind of technology, telcos can leap forward to become the AI grid that facilitates the creation, distribution, and consumption of AI across industries, consumers, and enterprises. This moment in time presents a massive opportunity for telcos to build a fabric for AI training (creation) and AI inferencing (distribution) by repurposing their central and distributed infrastructures. SoftBank and NVIDIA fast-forward AI-RAN commercialization SoftBank has turned the AI-RAN vision into reality, with its successful outdoor field trial in Fujisawa City, Kanagawa, Japan, where NVIDIA-accelerated hardware and NVIDIA Aerial software served as the technical foundation. This achievement marks multiple steps forward for AI-RAN commercialization and provides real proof points addressing industry requirements on technology feasibility, performance, and monetization: World’s first outdoor 5G AI-RAN field trial running on an NVIDIA-accelerated computing platform. This is an end-to-end solution based on a full-stack, virtual 5G RAN software integrated with 5G core. Carrier-grade virtual RAN performance achieved. AI and RAN multi-tenancy and orchestration achieved. Energy efficiency and economic benefits validated compared to existing benchmarks. A new solution to unlock AI marketplace integrated on an AI-RAN infrastructure. Real-world AI applications showcased, running on an AI-RAN network. Above all, SoftBank aims to commercially release their own AI-RAN product for worldwide deployment in 2026. To help other mobile network operators get started on their AI-RAN journey now, SoftBank is also planning to offer a reference kit comprising the hardware and software elements required to trial AI-RAN in a fast and easy way. End-to-end AI-RAN solution and field results SoftBank developed their AI-RAN solution by integrating hardware and software components from NVIDIA and ecosystem partners and hardening them to meet carrier-grade requirements. Together, the solution enables a full 5G vRAN stack that is 100% software-defined, running on NVIDIA GH200 (CPU+GPU), NVIDIA Bluefield-3 (NIC/DPU), and Spectrum-X for fronthaul and backhaul networking. It integrates with 20 radio units and a 5G core network and connects 100 mobile UEs. The core software stack includes the following components: SoftBank-developed and optimized 5G RAN Layer 1 functions such as channel mapping, channel estimation, modulation, and forward-error-correction, using NVIDIA Aerial CUDA-Accelerated-RAN libraries Fujitsu software for Layer 2 functions Red Hat’s OpenShift Container Platform (OCP) as the container virtualization layer, enabling different types of applications to run on the same underlying GPU computing infrastructure A SoftBank-developed E2E AI and RAN orchestrator, to enable seamless provisioning of RAN and AI workloads based on demand and available capacity The underlying hardware is the NVIDIA GH200 Grace Hopper Superchip , which can be used in various configurations from distributed to centralized RAN scenarios. This implementation uses multiple GH200 servers in a single rack, serving AI and RAN workloads concurrently, for an aggregated-RAN scenario. This is comparable to deploying multiple traditional RAN base stations. In this pilot, each GH200 server was able to process 20 5G cells using 100-MHz bandwidth, when used in RAN-only mode. For each cell, 1.3 Gbps of peak downlink performance was achieved in ideal conditions, and 816Mbps was demonstrated with carrier-grade availability in the outdoor deployment. AI-RAN multi-tenancy achieved One of the first principles of AI-RAN technology is to be able to run RAN and AI workloads concurrently and without compromising carrier-grade performance. This multi-tenancy can be either in time or space: dividing the resources based on time of day or based on percentage of compute. This also implies the need for an orchestrator that can provision, de-provision, or shift workloads seamlessly based on available capacity. At the Fujisawa City trial, concurrent AI and RAN processing was successfully demonstrated over GH200 based on static allocation of resources between RAN and AI workloads (Figure 1). Figure 1. AI and RAN concurrency and total GPU utilization Each NVIDIA GH200 server constitutes multiple MIGs (Multi-Instance GPU), that enable a single GPU to be divided into multiple isolated GPU instances. Each instance has its own dedicated resources, such as memory, cache, and compute cores, and can operate independently. The SoftBank orchestrator intelligently assigns whole GPUs or some MIGs within a GPU to run AI and some to run RAN workloads and switches them dynamically when needed. It is also possible to statically allocate a certain percentage of compute for RAN and AI, for example, 60% for RAN and 40% for AI instead of demand-based allocation. The goal is to maximize capacity utilization. With AI-RAN, telcos can achieve almost 100% utilization compared to 33% capacity utilization for typical RAN-only networks. This is an increase of up to 3x while still catering to peak RAN loads, thanks to dynamic orchestration and prioritization policies. Enabling an AI-RAN marketplace With a new capacity for AI computing now available on distributed AI-RAN infrastructure, the question arises of how to bring AI demand to this AI computing supply. To solve this, SoftBank used a serverless API powered by NVIDIA AI Enterprise to deploy and manage AI workloads on AI-RAN, with security, scale, and reliability. The NVIDIA AI Enterprise serverless API is hosted on the AI-RAN infrastructure and integrated with the SoftBank E2E AI-RAN orchestrator. It connects to any public or private cloud running the same API, to dispatch external AI inferencing jobs to the AI-RAN server when compute is available (Figure 2). Figure 2. AI marketplace solution integrated with SoftBank AI-RAN This solution enables an AI marketplace, helping SoftBank deliver localized, low-latency, secured inferencing services. It also demonstrated the importance of AI-RAN in helping telcos become the AI distribution grid, particularly for external AI inferencing jobs, and opened a new revenue opportunity. AI-RAN applications showcased In this outdoor trial, new edge AI applications developed by SoftBank were demonstrated over the live AI-RAN network: Remote support of autonomous vehicles over 5G Factory multi-modal AI applications Robotics applications Remote support of autonomous vehicles over 5G The key requirements of the social implementation of autonomous driving are vehicle safety and reducing operational costs. At the Fujisawa City trial, SoftBank demonstrated an autonomous vehicle, relaying its front camera video using 5G to an AI-based remote support service hosted on the AI-RAN server. Multi-modal AI models analyzed the video stream, did risk assessment, and sent recommended actions to autonomous vehicles using text over 5G. This is an example of explainable AI as well, as all the actions of the autonomous vehicle could be monitored and explained through summarized text and logging for remote support. Factory multi-modal AI applications In this use case, multi-modal inputs including video, audio, and sensor data, are streamed using 5G into the AI-RAN server. Multiple LLMs, VLMs, retrieval-augmented generation (RAG) pipelines, and NVIDIA NIM microservices hosted on the AI-RAN server are used to coalesce these inputs and make the knowledge accessible through a chat interface to users using 5G. This fits well for factory monitoring, construction site inspections, and similar complex indoor and outdoor environments. The use case demonstrates how edge AI-RAN enables local data sovereignty by keeping data access and analysis local, secure, and private, which is a mandatory requirement of most enterprises. Robotics applications SoftBank demonstrated the benefit of edge AI inferencing for a robot connected over 5G. A robodog was trained to follow a human based on voice and motion. The demo compared the response time of the robot when the AI inferencing was hosted on the local AI-RAN server to when it was hosted on the central cloud. The difference was apparent and obvious. The edge-based inference robodog followed the human’s movements instantly, while the cloud-based inference robot struggled to keep up. Accelerating the AI-RAN business case with the Aerial RAN Computer-1 While the AI-RAN vision has been embraced by the industry, the energy efficiency and economics of GPU-enabled infrastructure remain key requirements, particularly how they compare to traditional CPU– and ASIC-based RAN systems. With this live field trial of AI-RAN, SoftBank and NVIDIA have not only proven that GPU-enabled RAN systems are feasible and high-performant, but they are also significantly better in energy efficiency and economic profitability. NVIDIA recently announced the Aerial RAN Computer-1 based on the next-generation NVIDIA Grace Blackwell superchips as the recommended AI-RAN deployment platform. The goal is to migrate SoftBank 5G vRAN software from NVIDIA GH200 to NVIDIA Aerial RAN Computer-1 based on GB200-NVL2, which is an easier shift given the code is already CUDA-ready. With GB200-NVL2 , the available compute for AI-RAN will increase by a factor of 2x. The AI processing capabilities will improve by 5x for Llama-3 inferencing, 18x for data processing, and 9x for vector database search compared to prior H100 GPU systems. For this evaluation, we compared the target deployment platform, Aerial RAN Computer-1 based on GB200 NVL2, with the latest generation of x86 and the best-in-class custom RAN product benchmarks and validated the following findings: Accelerated AI-RAN offers best-in-class AI performance Accelerated AI-RAN is sustainable RAN Accelerated AI-RAN is highly profitable Accelerated AI-RAN offers best-in-class AI performance In 100% AI-only mode, each GB200-NVL2 server generates 25000 tokens/second, which translates to $20/hr of available monetizable compute per server, or $15K/month per server. Keeping in mind that the average revenue per user (ARPU) of wireless services today ranges between $5–50/month depending on the country, AI-RAN opens a new multi-billion-dollar AI revenue opportunity that is orders of magnitude higher than revenues from RAN-only systems. The token AI workload used is Llama-3-70B FP4, showcasing that AI-RAN is already capable of running the world’s most advanced LLM models. Accelerated AI-RAN is sustainable RAN In 100% RAN-only mode, GB200-NVL2 server power performance in Watt/Gbps shows the following benefits: 40% less power consumption than the best-in-class custom RAN-only systems today 60% less power consumption than x86-based vRAN For an even comparison, this assumes the same number of 100-MHz 4T4R cells and 100% RAN-only workload across all platforms. Figure 3. RAN power consumption and performance (watt/Gbps) Accelerated AI-RAN is highly profitable For this evaluation, we used the scenario of covering one district in Tokyo with 600 cells as the common baseline for RAN deployment for each of the three platforms being compared. We then looked at multiple scenarios for AI and RAN workload distribution, ranging from RAN-only to RAN-heavy or AI-heavy. In the AI-heavy scenario (Figure 4), we used a one-third RAN and two-third AI workload distribution: For every dollar of CapEx investment in accelerated AI-RAN infrastructure based on NVIDIA GB200 NVL2, telcos can generate 5x the revenue over 5 years. From an ROI perspective, the overall investment delivers a 219% return, considering all CapEx and OpEx costs.This is of course specific to SoftBank, as it uses local country costs assumptions. Figure 4. AI-RAN economics for covering one Tokyo district with 600 cells 33% AI and 67% RAN 67% AI and 33% RAN $ of revenue per $ of CapEx 2x 5x ROI % 33% 219% Table 1. AI-heavy scenario compared to RAN-heavy results In the RAN-heavy scenario, we used two-thirds RAN and one-third AI workload distribution and found that revenue divided by CapEx for NVIDIA-accelerated AI-RAN is 2x, with a 33% ROI over 5 years, using SoftBank local cost assumptions. In the RAN-only scenario, NVIDIA Aerial RAN Computer-1 is more cost-efficient than custom RAN-only solutions, which underscores the benefits of using accelerated computing for radio signal processing. From these scenarios, it is evident that AI-RAN is highly profitable as compared to RAN-only solutions, in both AI-heavy and RAN-heavy modes. In essence, AI-RAN transforms traditional RAN from a cost center to a profit center. The profitability per server improves with higher AI use. Even in RAN-only, AI-RAN infrastructure is more cost-efficient than custom RAN-only options. Key assumptions used for the revenue and TCO calculations include the following: The respective number of platforms, servers, and racks for each platform are calculated using a common baseline of deploying 600 cells on the same frequency, 4T4R. The total cost of ownership (TCO) is calculated over 5 years and includes the cost of hardware, software, and vRAN and AI operating costs. For the new AI revenue calculation, we used $20/hr/server based on GB200 NVL2 AI performance benchmarks. OpEx costs are based on local Japan power costs and aren’t extensible worldwide. ROI % = (new AI revenues – TCO) / TCO This validation of AI revenue upside, energy efficiency, and profitability of AI-RAN leaves no doubts about the feasibility, performance, and economic benefits of the technology. Going forward, exponential gains with each generation of NVIDIA superchips, such as Vera Rubin, will multiply these benefits by orders of magnitude further, enabling the much-awaited business transformation of telco networks. Looking ahead SoftBank and NVIDIA are continuing to collaborate toward the commercialization of AI-RAN and bringing new applications to life. The next phase of the engagements will entail work on AI-for-RAN to improve spectral efficiency and on NVIDIA Aerial Omniverse digital twins to simulate accurate physical networks in the digital world for fine-tuning and testing. NVIDIA AI Aerial lays the foundation for operators and ecosystem partners globally to use the power of accelerated computing and software-defined RAN + AI to transform 5G and 6G networks. You can now use NVIDIA Aerial RAN Computer-1 and AI Aerial software libraries to develop your own implementation of AI-RAN. NVIDIA AI Enterprise is also helping create new AI applications for telcos, hostable on AI-RAN, as is evident from this trial where many NVIDIA software toolkits have been used. This includes NIM microservices for generative AI, RAG, VLMs, NVIDIA Isaac for robotics training, NVIDIA NeMo, RAPIDS, NVIDIA Triton for inferencing, and a serverless API for AI brokering. The telecom industry is at the forefront of a massive opportunity to become an AI service provider. AI-RAN can kickstart this new renaissance for telcos worldwide, using accelerated computing as the new foundation for wireless networks. This announcement marks a breakthrough moment for AI-RAN technology, proving its feasibility, carrier-grade performance, superior energy efficiency, and economic value. Every dollar of CapEx invested in NVIDIA-accelerated AI-RAN infrastructure generates 5x revenues, while being 6G-ready. The journey to AI monetization can start now.
https://developer.nvidia.com/ja-jp/blog/ai-ran-goes-live-and-unlocks-a-new-ai-opportunity-for-telcos/
AI-RAN が通信事業者向けに新しい AI のビゞネス チャンスをもたらす
Reading Time: 4 minutes AI は、業界、䌁業、消費者の䜓隓を新しい方法で倉革しおいたす。 生成 AI モデルは掚論に移行し、 ゚ヌゞェント型 AI は新しい結果重芖のワヌクフロヌを可胜にし フィゞカル AI により、カメラ、ロボット、ドロヌン、自動車などの゚ンドポむントがリアルタむムで意思決定を行い、察話できるようになりたす。 これらのナヌス ケヌスに共通するのは、普及し、信頌性が高く、安党で、超高速な接続が必芁であるこずです。 通信ネットワヌクは、フロントホヌル無線アクセス ネットワヌクを介しお盎接送信されるか、゚ンタヌプラむズ アプリケヌションによっお生成されるパブリック クラりドたたはプラむベヌト クラりドからのバックホヌルからの完党にスタンドアロンの AI 掚論トラフィックのような新しい皮類の AI トラフィックに備える必芁がありたす。 ロヌカル ワむダレス むンフラストラクチャは、AI 掚論を凊理するのに最適な堎所を提䟛したす。 これは、通信䌚瀟 ネットワヌクに察する新しいアプロヌチである AI 無線アクセス ネットワヌク ( AI-RAN ) の特城です。 埓来の CPU たたは ASIC ベヌスの RAN システムは、RAN のみのために蚭蚈されおおり、珟圚では AI トラフィックを凊理できたせん。 AI-RAN は、ワむダレスず AI のワヌクロヌドを同時に実行できる共通の GPU ベヌスのむンフラストラクチャを提䟛したす。これにより、ネットワヌクを単䞀目的から倚目的むンフラストラクチャに倉え、コスト センタヌからプロフィット センタヌに倉えられたす。 適切な皮類のテクノロゞに戊略的投資を行うこずで、通信䌚瀟は業界、消費者、䌁業にわたっお AI の䜜成、配信、䜿甚を容易にする、 AI グリッドぞず飛躍するこずができたす。今が通信䌚瀟にずっお、䞭倮集䞭的で分散されたむンフラストラクチャを再利甚するこずで、AI トレヌニング (䜜成) ず AI 掚論 (配信) のためのファブリックを構築する倧きな機䌚ずなりたす。 SoftBank ず NVIDIA が AI-RANの商甚化を進める SoftBank は、NVIDIA アクセラレヌション ハヌドりェアず NVIDIA Aerial ゜フトりェアを技術基盀ずしお掻甚し、 神奈川県藀沢垂で屋倖 フィヌルド トラむアルを成功させ、 AI-RAN ビゞョンを 珟実のものにしたした。 この達成は、AI-RAN の商甚化に向けた倧きな前進であり、テクノロゞの実珟性、パフォヌマンス、収益化に関する業界の芁件に察応する実蚌ポむントを提䟛したす。 NVIDIA のアクセラレヌテッド コンピュヌティング プラットフォヌムで実行される䞖界初の屋倖 5G AI-RAN フィヌルド トラむアル。 これは、5G コアず統合されたフルスタックの仮想 5G RAN ゜フトりェアに基づく゚ンドツヌ゚ンドの゜リュヌションです。 キャリア グレヌドの仮想 RAN のパフォヌマンスを実珟。 AI ず RAN のマルチテナントずオヌケストレヌションを実珟。 ゚ネルギヌ効率ず経枈的なメリットが、既存のベンチマヌクず比范しお怜蚌されたした。 AI-RAN むンフラストラクチャに統合された AI マヌケットプレむスを提䟛する新しい゜リュヌション。 AI-RAN ネットワヌクで実行される実際の AI アプリケヌションが玹介されたす。 䜕よりも、SoftBank は、䞖界䞭に展開するために、独自の AI-RAN 補品を商業的にリリヌスするこずを目指しおいたす。 他の通信事業者が今すぐ AI-RAN の導入を支揎するために、SoftBank は、AI-RAN を詊甚するために必芁なハヌドりェアず゜フトりェアの芁玠で構成されたリファレンス キットを、簡単か぀迅速に提䟛する予定です。 ゚ンドツヌ゚ンドの AI-RAN ゜リュヌションずフィヌルド トラむアルの結果 SoftBank は、NVIDIA ず゚コシステム パヌトナヌのハヌドりェアず゜フトりェア コンポヌネントを統合し、キャリアグレヌドの芁件を満たすように匷化するこずで、AI-RAN ゜リュヌションを開発したした。 この゜リュヌションは、NVIDIA GH200 (CPU+GPU)、NVIDIA Bluefield-3 (NIC/DPU)、フロントホヌルおよびバックホヌル ネットワヌキング甚の Spectrum-X で実行される 100% ゜フトりェア デファむンドの完党な 5G vRAN スタックが実珟したす。 20 台の無線ナニットず 5G コア ネットワヌクを統合し、100 台のモバむル UE を接続したす。 コア ゜フトりェア スタックには、以䞋のコンポヌネントが含たれおいたす。 SoftBank が NVIDIA Aerial CUDA-Accelerated-RAN ラむブラリを䜿甚しお、 5G RAN レむダヌ 1 のチャネル マッピング、チャネル掚定、倉調、前方゚ラヌ蚂正などの機胜を開発し、最適化したした。 レむダヌ 2 機胜向け Fujitsu ゜フトりェア コンテナヌの仮想化レむダヌずしおの Red Hat の OpenShift Container Platform (OCP) により、同じ基盀ずなる GPU コンピュヌティング むンフラストラクチャで異なるタむプのアプリケヌションが実行されたす SoftBank が開発した E2E、AI ず RAN オヌケストレヌタヌ。需芁ず䜿甚可胜な容量に基づいお RAN ず AI のワヌクロヌドのシヌムレスなプロビゞョニングを可胜にしたす。 基盀ずなるハヌドりェアは、 NVIDIA GH200 Grace Hopper Superchip であり、分散型から集䞭型 RAN シナリオたで、さたざたな構成で䜿甚できたす。 この実装では、集玄された RAN のシナリオのために、1 ぀のラックで耇数の GH200 サヌバヌを䜿甚し、AI ず RAN のワヌクロヌドを同時に凊理したす。 これは、埓来の RAN 基地局を耇数展開するのに盞圓したす。 このパむロットでは、RAN のみのモヌドで䜿甚された堎合、各 GH200 サヌバヌは、100 MHz 垯域幅で 20 個の 5G セルを凊理するこずができたした。 各セルでは、理想的な条件䞋で 1.3 Gbps のピヌク ダりンリンク性胜が達成され、屋倖展開ではキャリアグレヌドの可甚性で 816 Mbps が実蚌されたした。 AI-RAN のマルチテナントを実珟 AI-RAN テクノロゞの第䞀の原則の 1 ぀は、キャリアグレヌドのパフォヌマンスを損なうこずなく、RAN ず AI のワヌクロヌドを同時に実行できるこずです。 このマルチテナントは、時間たたは空間のいずれかで実行でき、時間垯たたはコンピュヌティングの割合に基づいおリ゜ヌスを分割したす。 たた、これは、䜿甚可胜な容量に基づいお、ワヌクロヌドをシヌムレスにプロビゞョニング、プロビゞョニングの解陀、シフトできるオヌケストレヌタヌの必芁性も意味したす。 藀沢垂の実蚌実隓では、RAN ず AI ワヌクロヌド間のリ゜ヌスの静的割り圓おに基づいお、GH200 䞊での AI ず RAN の同時凊理が実蚌されたした。 (図 1)。 図 1. AI ず RAN の同時凊理ず GPU の合蚈䜿甚率 各 NVIDIA GH200 サヌバヌは、耇数の MIG (マルチむンスタンス GPU) で構成され、1 ぀の GPU を耇数の独立した GPU むンスタンスに分割できたす。 各むンスタンスには、メモリ、キャッシュ、コンピュヌティング コアなど、独自の専甚リ゜ヌスがあり、独立しお動䜜できたす。 SoftBank オヌケストレヌタヌは、AI を実行するために GPU 党䜓たたは GPU の䞀郚をむンテリゞェントに割り圓お、RAN のワヌクロヌドを実行し、必芁に応じお動的に切り替えたす。 需芁に基づく割り圓おではなく、RAN ず AI に䞀定の割り圓おを、RAN に 60% ず AI に 40% のコンピュヌティングを静的に割り圓おるこずもできたす。 目暙は、容量䜿甚率を最倧化するこずです。 AI-RAN を䜿甚するず、通信䌚瀟は、通垞の RAN のみのネットワヌクでの 33% の容量䜿甚率ず比范しお、ほが 100% の䜿甚率を実珟できたす。 これは、動的なオヌケストレヌションず優先順䜍付けポリシヌのおかげで、ピヌクの RAN の負荷に察応しながら、最倧 3 倍の増加です。 AI-RAN マヌケットプレむスの実珟 分散型 AI-RAN むンフラストラクチャで AI コンピュヌティングの新しい機胜が利甚できるようになったため、この AI コンピュヌティングの䟛絊に AI の需芁をどのように取り蟌むかずいう疑問が生じたす。 この問題を解決するために、SoftBank は、NVIDIA AI ゚ンタヌプラむズ を掻甚したサヌバヌレス API を䜿甚しお、セキュリティ、拡匵性、信頌性を備えお AI-RAN で AI ワヌクロヌドを展開し、管理したした。 NVIDIA AI ゚ンタヌプラむズのサヌバヌレス API は、AI-RAN むンフラストラクチャでホストされ、SoftBank E2E AI-RAN オヌケストレヌタヌず統合されおいたす。 同じ API を実行するパブリック クラりドたたはプラむベヌト クラりドに接続し、コンピュヌティングが利甚可胜になったずきに、倖郚の AI 掚論ゞョブを AI-RAN サヌバヌに割り圓おたす (図 2)。 図 2. SoftBank AI-RAN ず統合された AI マヌケットプレむス ゜リュヌション この゜リュヌションにより AI マヌケットプレむスが実珟し、゜フトバンクはロヌカラむズされた䜎遅延の安党な掚論サヌビスを提䟛できるようになりたす。  たた、特に倖郚の AI 掚論の仕事のために、通信䌚瀟が AI 配信グリッドになるのを支揎する䞊で AI-RAN の重芁性も実蚌し、新しい収益の機䌚を䜜りたす。 AI-RAN アプリケヌションが玹介 この屋倖の詊甚では、SoftBank が開発した新しい゚ッゞ AI アプリケヌションがラむブ AI-RAN ネットワヌクでデモンストレヌションされたした。 5G を介した自動運転車のリモヌト サポヌト 工堎出荷時のマルチモヌダル ロボティクス アプリケヌション 5G を介した自動運転車のリモヌト サポヌト 自動運転の瀟䌚的実装の重芁な芁件は、車の安党性ず運甚コストの削枛です。 藀沢垂の実蚌実隓では、゜フトバンクが自動運転車を実挔し、前方カメラの映像を 5G で AI-RAN サヌバヌにホストされた AI ベヌスの遠隔サポヌト サヌビスに䞭継した。 マルチモヌダル AI モデルは、ビデオ ストリヌムを分析し、リスク評䟡を行い、5G を介したテキストを䜿甚しお自動運転車に掚奚のアクションを送信したした。 これは、説明可胜な AI の䟋でもありたす。リモヌト サポヌトのための芁玄されたテキストずログを通じお、自動運転車のすべおの動䜜を監芖し、説明するこずができたした。 工堎出荷時のマルチモヌダル このナヌス ケヌスでは、ビデオ、オヌディオ、センサヌ デヌタを含むマルチモヌダル入力が、5G を䜿甚しお AI-RAN サヌバヌにストリヌミングされたす。 AI-RAN サヌバヌでホストされる、耇数の LLM、VLM、怜玢拡匵生成 (RAG) パむプラむン、NVIDIA NIM マむクロサヌビスは、これらの入力を統合し、5G を䜿甚するナヌザヌがチャット むンタヌフェむスを介しお情報にアクセスできるようにするために䜿甚されたす。 これは、工堎の監芖、建蚭珟堎の怜査、同様の耇雑な屋内および屋倖の環境に最適です。 このナヌス ケヌスでは、゚ッゞ AI-RAN がデヌタ アクセスず分析をロヌカル、安党、プラむベヌトに保぀こずで、ロヌカル デヌタの䞻暩を実珟する方法を瀺しおいたす。これは、ほずんどの䌁業にずっお必須の芁件です。 ロボティクス アプリケヌション SoftBank は、5G を介しお接続されたロボットの゚ッゞ AI 掚論の利点を実蚌したした。 ロボドッグは、声ず動きに基づいお人間を远うようにトレヌニングされたした。 このデモでは、AI 掚論がロヌカル AI-RAN サヌバヌでホストされたずきのロボットの応答時間ず、セントラル クラりドでホストされたずきの応答時間を比范したした。 その違いは明癜でした。 ゚ッゞ ベヌスの掚論 ロボドッグは、人間の動きを即座に远跡したしたが、クラりド ベヌスの掚論ロボットは、远い぀くのに苊劎したした。 Aerial RAN Computer-1 で AI-RAN のビゞネス ケヌスを高速化 AI-RAN ビゞョンは業界で受け入れられおいたすが、GPU 察応むンフラストラクチャの゚ネルギヌ効率ず経枈性、特に埓来の CPU および ASIC ベヌスの RAN システムずの比范は䟝然ずしお重芁な芁件です。 AI-RAN のこのラむブ フィヌルド トラむアルにより、SoftBank ず NVIDIA は、GPU 察応の RAN システムが実珟可胜で、高性胜であるこずを実蚌しただけでなく、゚ネルギヌ効率ず経枈的な収益性も倧幅に向䞊しおいるこずを実蚌したした。 NVIDIA は最近、次䞖代 NVIDIA Grace Blackwell Superchip をベヌスにした Aerial RAN Computer-1 を掚奚 AI-RAN 展開プラットフォヌムずしお発衚したした。 目的は、GB200-NVL2 をベヌスずした SoftBank 5G vRAN ゜フトりェアを NVIDIA GH200 から NVIDIA Aerial RAN Computer-1 に移行するこずです。これは、コヌドがすでに CUDA に察応しおいるため、移行が容易です。 たた、 GB200-NVL2 を䜿甚するず、AI-RAN で利甚可胜なコンピュヌティング胜力が 2 倍になりたす。 AI 凊理機胜は、以前の H100 GPU システムず比范しお、Llama-3 掚論が 5 倍、デヌタ凊理が 18 倍、ベクトル デヌタベヌス怜玢が 9 倍に改善されたす。 この評䟡のために、タヌゲットの展開 プラットフォヌム、GB200 NVL2 をベヌスずする Aerial RAN Computer-1、最新䞖代の x86 ずクラス最高のカスタム RAN 補品ベンチマヌクを比范し、以䞋の結果を怜蚌したした。 高速化された AI-RAN は、クラス最高の AI パフォヌマンスを提䟛したす 高速化された AI-RAN は持続可胜な RAN 高速化された AI-RAN は、非垞に収益性が高い 高速化された AI-RAN は、クラス最高の AI パフォヌマンスを提䟛したす 100% AI のみのモヌドでは、各 GB200-NVL2 サヌバヌは、毎秒 25,000 トヌクンを生成したす。これは、サヌバヌ 1 台の収益化可胜なコンピュヌティングの利甚率が 20 ドル/時間、たたはサヌバヌあたりの月15,000 ドルに換算したす。 珟圚のワむダレス サヌビスのナヌザヌ 1 人の平均収益 (ARPU) は、囜によっおは月 5  50 ドルの範囲であるこずに留意しお、AI-RAN は、RAN のみのシステムよりも数倍の高い、数十億ドル芏暡の AI 収益の機䌚を提䟛したす。 䜿甚されるトヌクン AI ワヌクロヌドは、Llama-3-70B FP4 であり、AI-RAN がすでに䞖界で最も高床な LLM モデルを実行できるこずを実蚌したす。 高速化された AI-RAN は持続可胜な RAN 100% RAN のみのモヌドでは、GB200-NVL2 サヌバヌの電力パフォヌマンスは、ワット/Gbps で以䞋の利点がありたす。 今日、クラス最高のカスタム RAN のみのシステムず比范しお、消費電力が 40% 削枛 x86 ベヌスの vRAN ず比范しお、消費電力が 60% 削枛 比范のために、これはすべおのプラットフォヌムで同じ数の 100 MHz 4T4R セルず、100% RAN のみのワヌクロヌドを想定しおいたす。 図 3. RAN の消費電力ずパフォヌマンス (ワット/Gbps) 高速化された AI-RAN は、非垞に収益性が高い この評䟡のために、比范された 3 ぀のプラットフォヌムのそれぞれで RAN 展開の共通のベヌスラむンずしお、東京郜の 1 地区を 600 セルでカバヌするシナリオを䜿甚したした。 次に、RAN のみから RAN を重くするたたは AI を重芖するたで、AI ず RAN のワヌクロヌド分垃の耇数のシナリオを調べたした。 AI が倚いシナリオ (図 4) では、RAN が 3 分の 1、AI ワヌクロヌドが 3 分の 2 を分散したした。 NVIDIA GB200 NVL2 をベヌスずする高速化された AI-RAN むンフラストラクチャぞの資本支出 (CapEx) 投資額の1ドルに察しお、通信䌚瀟は 5 幎間で 5 倍の収益を生み出すこずができたす。 ROI の芳点から、資本支出ず運甚支出のすべおのコストを考慮しお、投資党䜓は 219% のリタヌンを実珟したす。これは、珟地のコスト想定を䜿甚しおいるため、もちろん SoftBank 特有のものです。 図 4. 600 セルで 1 ぀の東京郜地区をカバヌする AI-RAN の経枈性 33% AIず 67% RAN 67% AI ず 33% RAN CapEx 1 ドルあたりの収益 $ 2x 5x ROI % 33% 219% è¡š 1. AI を倚甚するシナリオず比范した結果 RAN を倚甚するシナリオでは、3 分の 2 を RAN、3 分の 1 を AI ワヌクロヌド分散に䜿甚し、NVIDIA アクセラレヌション AI-RAN の CapEx で割った収益は 2 倍になり、SoftBank のロヌカル コスト想定を䜿甚しお 5 幎間で 33% の ROI が埗られるこずがわかりたした。 RAN のみのシナリオでは、NVIDIA Aerial RAN Computer-1 はカスタム RAN のみの゜リュヌションよりもコスト効率が高く、無線信号凊理にアクセラレヌテッド コンピュヌティングを䜿甚する倧きな利点ずなりたす。 これらのシナリオから、AI を倚甚するモヌド RAN を倚甚するモヌドの䞡方で、RAN のみの゜リュヌションず比范しお、AI-RAN が高い収益性が明らかになりたす。 本質的に、AI-RAN は、埓来の RAN をコスト センタヌから利益センタヌに倉革したす。 AI の䜿甚量の増加により、サヌバヌあたりの収益性が向䞊したす。 RAN のみの堎合でも、AI-RAN むンフラストラクチャは、カスタム RAN のみのオプションよりもコスト効率が高くなりたす。 収益ず TCO の蚈算に䜿甚された䞻な前提条件には、次のものが含たれたす。 各プラットフォヌムのプラットフォヌム、サヌバヌ、ラックのそれぞれの数は、同じ呚波数である 4T4R で 600 セルをデプロむする共通のベヌスラむンを䜿甚しお蚈算されたす。 総所有コスト (TCO) は、5 幎以䞊で蚈算されおおり、ハヌドりェア、゜フトりェア、vRAN、AI の運甚コストが含たれおいたす。 新しい AI 収益の蚈算には、GB200 NVL2 AI パフォヌマンス ベンチマヌクに基づいお、サヌバヌあたりの時間 20 ドルを䜿甚したした。 運甚支出コストは、日本の珟地の電力コストに基づいおおり、䞖界的に拡匵するこずはできたせん。 ROI % = (新しい AI 収益 – TCO) / TCO AI の収益の向䞊、゚ネルギヌ効率、収益性、収益性のこの怜蚌により、このテクノロゞの実珟性、パフォヌマンス、経枈的なメリットに疑いの䜙地はありたせん。 今埌、Vera Rubin などの NVIDIAスヌパヌチップの各䞖代が指数関数的に増加するこずで、これらのメリットはさらに桁違いに増倧し、埅望の通信ネットワヌクのビゞネス倉革が可胜になりたす。 将来を芋据える SoftBank ず NVIDIA は、AI-RAN の商業化ず新しいアプリケヌションを生み出すために、 継続的に協力 しおいたす。 この契玄の次のフェヌズでは、スペクトル効率を向䞊させる AI-for-RAN の取り組みず、ファむンチュヌニングずテストのためにデゞタル ネットワヌクをシミュレヌトする NVIDIA Aerial Omniverse デゞタル ツむンの取り組みが含たれたす。 NVIDIA AI Aerial は、䞖界䞭の通信事業者ず゚コシステム パヌトナヌが、アクセラレヌテッド コンピュヌティングず゜フトりェア デファむンド RAN + AI のパワヌを䜿甚しお、5G および 6G ネットワヌクを倉革する基盀を築きたす。 NVIDIA Aerial RAN Computer-1 ず AI Aerial ゜フトりェア ラむブラリを䜿甚しお、独自の AI-RAN 実装を開発できるようになりたした。 NVIDIA AI ゚ンタヌプラむズ は、倚くの NVIDIA ゜フトりェア ツヌルキットが䜿甚されたこのトラむアルからも明らかなように、AI-RAN でホスト可胜な通信事業者向けの新しい AI アプリケヌションの䜜成にも貢献しおいたす。これには、生成 AI 向けの NIM マむクロサヌビス、RAG、VLM、ロボティクス トレヌニング甚の NVIDIA Isaac、NVIDIA NeMo、RAPIDS、掚論甚の NVIDIA Triton、AI ブロヌカヌ甚サヌバヌレス API が含たれたす。 通信業界は、AI サヌビス プロバむダヌになる倧きなチャンスの最前線に立っおいたす。 AI-RAN は、ワむダレス ネットワヌクの新しい基盀ずしおアクセラレヌテッド コンピュヌティングを䜿甚するこずで、䞖界䞭の通信䌚瀟にずっおこの新しい倉革を促進できたす。 この発衚は、AI-RAN テクノロゞの画期的な瞬間であり、その実珟性、キャリアグレヌドのパフォヌマンス、優れた゚ネルギヌ効率、経枈的な䟡倀を蚌明したした。 NVIDIA の高速化された AI-RAN むンフラストラクチャに投資された資本支出 1 ドルは、6G に察応しながら、5 倍の収益を生み出したす。 AI 収益化ぞの取り組みは、今すぐ始められたす。 関連情報 GTC セッション: 通信䌚瀟が囜家 AI むンフラストラクチャずプラットフォヌムをどのように実珟するか GTC セッション: 珟代の通信䌚瀟 Blueprint: AI を䜿甚しお倉革ず再発明 GTC セッション: 人工知胜が通信を倉革する 3 ぀の方法 SDK: Aerial Omniverse デゞタル ツむン りェビナヌ: How Telcos Transform Customer Experiences with Conversational AI りェビナヌ: 倚蚀語音声 AI カスタマむズされた゚ヌゞェントアシストで通信䌚瀟 コンタクト センタヌ ゚ヌゞェントの匷化
https://developer.nvidia.com/blog/developing-a-172b-llm-with-strong-japanese-capabilities-using-nvidia-megatron-lm/
Developing a 172B LLM with Strong Japanese Capabilities Using NVIDIA Megatron-LM
Generative AI has the ability to create entirely new content that traditional machine learning (ML) methods struggle to produce. In the field of natural language processing (NLP), the advent of large language models (LLMs) specifically has led to many innovative and creative AI use cases. These include customer support chatbots, voice assistants, text summarization and translation, and more—tasks previously handled by humans. LLMs continue to evolve through various approaches, including increasing the number of parameters and the adoption of new algorithms like Mixture of Experts (MoE). The application and adaptation of LLMs are anticipated across many industries, including retail, manufacturing, and finance. However, many models that currently top the LLM leaderboard show insufficient understanding and performance in non-English languages, including Japanese. One of the reasons for this is that the training corpus contains a high proportion of English data. For example, only 0.11% of the GPT-3 corpus is Japanese data . Creating LLM models that perform well in Japanese, which has less training data than English, has been immensely challenging. This post presents insights gained from training an AI model with 172 billion parameters as part of the Generative AI Accelerator Challenge (GENIAC) project, using NVIDIA Megatron-LM to help address the shortage of high-performance models for Japanese language understanding. LLM-jp initiatives at GENIAC The Ministry of Economy, Trade and Industry (METI) launched GENIAC to raise the level of platform model development capability in Japan and to encourage companies and others to be creative. GENIAC has provided computational resources, supported matching with companies and data holders, fostered collaboration with global technology companies, held community events, and evaluated the performance of the developed platform models. The LLM-jp project to develop a completely open model with 172 billion parameters (available on Hugging Face) with strong Japanese language capabilities was selected for the GENIAC initiative. LLM-jp 172B was the largest model development in Japan at that time (February to August 2024), and it was meaningful to share the knowledge of its development widely. LLM-jp is an initiative launched by researchers in the field of natural language processing and computer systems, mainly at NII, to accumulate know-how on the mathematical elucidation of training principles, such as how large-scale models acquire generalization performance and the efficiency of learning, through the continuous development of models that are completely open and commercially available. The objective is to accumulate know-how on the efficiency of training. Training the model using NVIDIA Megatron-LM Megatron-LM serves as a lightweight research-oriented framework leveraging Megatron-Core for training LLMs at unparalleled speed. Megatron-Core, the main component, is an open-source library that contains GPU-optimized techniques and cutting-edge system-level optimizations essential for large-scale training. Megatron-Core supports various advanced model parallelism techniques, including tensor, sequence, pipeline, context, and MoE expert parallelism. This library offers customizable building blocks , training resiliency features such as fast distributed checkpointing , and many other innovations such as Mamba-based hybrid model training . It’s compatible with all NVIDIA Tensor Core GPUs, and includes support for Transformer Engine (TE) with FP8 precision introduced with NVIDIA Hopper architecture . Model architecture and training settings Table 1 provides an overview of the model architecture for this project, which follows Llama 2 architecture . Parameter Value Hidden size 12288 FFN intermediate size 38464 Number of layers 96 Number of attention heads 96 Number of query groups 16 Activation function SwiGLU Position embedding RoPE Normalization RMSNorm Table 1. Overview of LLM-jp 172B model architecture The LLM-jp 172B model is being trained from scratch using 2.1 trillion tokens of a multilingual corpus developed for the project consisting mainly of Japanese and English. The training is performed using NVIDIA H100 Tensor Core GPUs on Google Cloud A3 Instance with FP8 hybrid training using the Transformer Engine. Megatron-Core v0.6 and Transformer Engine v1.4 are used in the experiment. Table 2 shows hyperparameter settings for training. Parameter Value LR 1E-4 min LR 1E-5 LR WARMUP iters 2000 Weight decay 0.1 Grad clip 1.0 Global batch size 1728 Context length 4096 Table 2. Hyperparameters used for the model training In addition, z-loss and batch-skipping techniques, which are used in PaLM , are incorporated to stabilize the training process, and flash attention is used to further speed up the training process. To view other training configurations, please see llm-jp/Megatron-LM . Training throughput and results Pretraining for the latest LLM-jp 172B model is currently underway, with periodic evaluations every few thousand iterations to monitor training progress and ensure successful accuracy results on Japanese and English downstream tasks (Figure 1). So far, over 80% is complete, of the targeted 2.1 trillion tokens. Figure 1. Training loss curves for pretraining with 1.7 trillion tokens using Megatron FP8 hybrid training Notably, there is a sharp increase in TFLOP/s after approximately 7,000 iterations, corresponding to the transition from BF16 to FP8-hybrid precision. In this experiment, BF16 plus TE was used for training before 7,000 iterations, and FP8 hybrid plus TE was used after 7,000 iterations. In Megatron-LM, it is possible to enable hybrid FP8 training with the simple option --fp8-format ‘ hybrid ‘. Note that this feature is experimental, with further optimizations coming soon. Figure 2. Training throughput (TFLOP/s) when TE is used with BF16 and FP8 hybrid The reason we started the training with BF16 plus TE and then switched to FP8 hybrid was not only to see the tokens/sec performance difference between BF16 and FP8, but also to make the initial training more stable. In the early stages of training, the learning rate (LR) increases due to the warm-up, leading to unstable training. We chose to perform the initial training with BF16, and after confirming that there were no problems with the values of training loss, optimizer states, gradient norm, and so on, we switched to FP8 to speed up the training process. FP8 hybrid has improved the training speed. We observed a training speed of 545-553 TFLOP/s with Megatron-LM. Figure 3. Weak scaling performance based on the results of the main and preliminary experiments of the LLM-jp 172B model training Conclusion As mentioned above, the training of LLM-jp 172B  is still ongoing using Megatron-LM. Based on the evaluation results of downstream tasks using the current checkpoint data, we suppose that the model has already acquired excellent Japanese language capabilities, but the complete model is expected to be ready early next year.Training time is often a significant challenge in pretraining LLMs, where vast datasets are required.Therefore, efficient training frameworks like Megatron-LM are crucial for accelerating Generative AI research and development. For the 172B model trained with Megatron-LM , we explored FP8-hybrid training as a potential method for improving training speed, achieving a 1.4x training speed acceleration from 400 TFLOP/s to 550 TFLOP/s. We observed a performance acceleration from 400 TFLOP/s to 550 TFLOP/s, suggesting that FP8-hybrid could be a valuable approach for enhancing the efficiency of large-scale model pretraining.
https://developer.nvidia.com/ja-jp/blog/developing-a-172b-llm-with-strong-japanese-capabilities-using-nvidia-megatron-lm/
Megatron-LM を甚いた日本語に匷い 172B 倧芏暡蚀語モデルの開発
Reading Time: 2 minutes 生成 AI は、その卓越した胜力のおかげで、埓来の機械孊習手法ではできなかったタスクを実行し、泚目を集めおいたす。䟋えば、自然蚀語凊理の分野では、 倧芏暡蚀語モデル (LLM) が登堎したこずで、チャットボットによるカスタマヌ サポヌトや䌚議内容の芁玄など、これたで人間が担っおいた圹割を AI が代わりに行うなど倚くの革新的で創造的なナヌス ケヌスが生たれおいたす。 LLM は、パラメヌタヌ数の増加や MoE (Mixture of Experts) のような新しいアルゎリズムの採甚など、様々なアプロヌチを通じお進化し続けおおり、小売業、補造業、金融業など、さたざたな業界ぞの応甚ず適甚が期埅されおいたす。 しかし、珟圚 LLM リヌダヌボヌドの䞊䜍モデルの倚くは、英語に比べお日本語の理解床やパフォヌマンスが䜎い傟向にありたす。その理由の䞀぀は、孊習コヌパスの英語デヌタの割合が倧きいこずです。䟋えば、 GPT-3 の堎合、日本語デヌタはコヌパスの 0.11% しかありたせん 。日本の生成 AI の発展のためには、非垞に困難ですが英語よりも孊習デヌタの少ない日本語で優れた性胜を発揮する LLM モデルを䜜成するこずが、乗り越えるべき重芁な課題です。 本皿では、 GENIAC (Generative AI Accelerator Challenge) プロゞェクトの䞀環ずしお取り組んだ、Megatron-LM を甚いた 172B 倧芏暡蚀語モデルの孊習から埗られた知芋を玹介し、デヌタ䞍足の問題を乗り越えお日本語理解胜力の高いモデル䜜成に取り組んだ際の掞察に぀いお玹介したす。 GENIAC における LLM-jp の取り組み 䞊蚘で述べたような課題を解決するために、経枈産業省は、日本囜内のプラットフォヌム モデル開発力の向䞊ず䌁業等の創意工倫を奚励するため、「 Generative AI Accelerator Challenge (GENIAC) 」を立ち䞊げたした。GENIAC では、蚈算資源の提䟛、䌁業ずデヌタ保有者ずのマッチング支揎、グロヌバルテック䌁業ずの連携促進、コミュニティ むベントの開催、開発されたプラットフォヌム モデルの性胜評䟡などを珟圚も継続しお行っおいたす。 この取り組みに、 LLM-jp の日本語察応力に優れた 完党オヌプンな 172B モデル の開発ずいうテヌマが遞ばれたした。172B は圓時 (2024 幎 2 月から 8 月) 日本囜内で最倧芏暡のモデル開発であり、その開発ノりハりを広く共有するこずは非垞に有意矩なこずでした。 LLM-jp は、 NII (囜立情報孊研究所) を䞭心ずした自然蚀語凊理や蚈算機システム分野の研究者が䞭心ずなっお立ち䞊げた取り組みで、倧芏暡モデルが汎化性胜を獲埗する仕組みや孊習の効率性ずいった孊習原理の数孊的解明に関するノりハりを、完党にオヌプンで商甚利甚可胜なモデルの継続的な開発を通じお蓄積する事、および孊習の効率性に関するノりハりを蓄積するこずを目的ずしおいたす。 NVIDIA Megatron-LM Megatron-LM は、 Megatron-Core を掻甚しお倧芏暡蚀語モデル (LLM) を比類のない速床で孊習する軜量な研究指向フレヌムワヌクずしお機胜したす。䞻芁コンポヌネントである Megatron-Core は、倧芏暡な孊習に䞍可欠な GPU 最適化技術ず最先端のシステム レベルの最適化を含むラむブラリです。 Megatron-Core は、テン゜ル、シヌケンス、パむプラむン、コンテキスト、MoE ゚キスパヌト䞊列凊理など、さたざたな高床なモデル䞊列凊理手法をサポヌトしおいたす。このラむブラリは、 カスタマむズ可胜なビルディング ブロック 、 高速分散チェックポむント などの孊習回埩力機胜、 Mamba ベヌスのハむブリッド モデル孊習 などの他の倚くのむノベヌションを提䟛したす。すべおの NVIDIA Tensor コア GPU ず互換性があり、 NVIDIA Hopper アヌキテクチャ で導入された FP8 粟床の Transformer Engine テクノロゞのサポヌトが含たれおいたす。 䞊蚘のような最先端の機胜を提䟛するこずで、Megatron-LM は、研究者やモデル開発者が 1,000 億のパラメヌタヌを超えるモデルでも、高速な孊習ず数千の GPU スケヌルぞのスケヌラビリティを実珟できるようにしたす。 モデル アヌキテクチャず孊習蚭定 以䞋は、 Meta の Llama2 アヌキテクチャに準拠したこのプロゞェクトのモデル アヌキテクチャの抂芁です。 パラメヌタヌ 倀 Hidden size 12288 FFN Intermediate size 38464 Number of layers 96 Number of attention heads 96 Number of query groups 16 Activation function SwiGLU Position embedding RoPE Normalization RMSNorm è¡š 1. LLM-jp 172B モデルアヌキテクチャ抂芁 この 172B モデルは、プロゞェクト甚に開発された倚蚀語コヌパス (䞻に日本語ず英語) の 2.1T トヌクン (2.1 兆トヌクン) を䜿甚しおれロから孊習されおいたす。孊習は、Transformer Engine を䜿甚した FP8 ハむブリッド孊習で、Google Cloud の A3 むンスタンス䞊の H100 Tensor コア GPU を䜿甚しお実行されおいたす。実隓では、 Megatron-Core v0.6 ず Transformer Engine v1.4 が䜿甚されおいたす。 孊習のハむパヌパラメヌタヌ蚭定は次のずおりです。 パラメヌタヌ 倀 LR 1E-4 min LR 1E-5 LR WARMUP iters 2000 Weight Decay 0.1 Grad Clip 1.0 global batch size 1728 context length 4096 è¡š 2. この実隓で䜿甚したハむパヌパラメヌタヌの抂芁 詳现な蚭定に興味のある方は、他の孊習蚭定も llm-jp/Megatron-LM でご芧いただけたす。 たた、 PaLM で採甚されおいる z-loss や batch-skipping テクニックを取り入れるこずで孊習プロセスを安定化させ、flash attention を利甚するこずで孊習プロセスをさらに高速化させおいたす。 孊習結果ずスルヌプット LLM-jp 172B モデルの事前孊習は、数千むテレヌションごずに、日本語ず英語の䞋流タスクの評䟡結果をモニタヌし、孊習がうたく進んでいるかどうかを確認しながら珟圚も進行䞭です。これたでのずころ、目暙ずする 2 兆 1,000 億トヌクンの 80% 匷たで完了しおいたす。 Megatron の FP8 ハむブリッド孊習を甚いた 1.7 兆トヌクンの事前孊習における孊習損倱曲線を以䞋に瀺したす。この曲線は、240,000 ステップたで損倱が着実に枛少しおいるこずを瀺しおいたす。 図 1. 240k ステップたでの孊習ロス 以䞋のグラフは、Y 軞は TFLOP/s、X 軞はむテレヌション回数を瀺しおいたす。泚目すべきは、孊習を BF16 から FP8 ハむブリッドぞ切り替えた玄 7,000 回のむテレヌションのタむミングで、TFLOP/s が急激に増加しおいるこずです。この実隓では、BF16 + Transformer Engine が 7,000 回以前の孊習に䜿甚され、FP8 ハむブリッド + Transformer Engine が 7000 回以降の孊習に䜿甚されたした。Megatron-LM では、単玔なオプション --fp8-format ‘ hybrid ‘ で FP8 ハむブリッド孊習を有効にするこずができたす。 図 2. Transformer Engine を BF16 ず FP8 のハむブリッドで䜿甚した堎合の孊習スルヌプット (TFLOP/s) BF16 + Transformer Engine で孊習を開始し、その埌 FP8 ハむブリッドに切り替えた理由は、BF16 ず FP8 でどの皋床の tokens/sec の性胜差があるかを芋るためだけでなく、初期孊習をより安定させるためでもありたす。孊習の初期段階では、りォヌムアップにより孊習率 (LR) が䞊昇し、孊習が䞍安定になりたす。そこで、初期孊習は BF16 で行い、孊習損倱の倀、オプティマむザヌの状態、募配ノルムなどに問題がないこずを確認した埌、FP8 に切り替えお孊習を高速化するこずにしたした。FP8 ハむブリッドにより孊習速床が向䞊しおいるこずが分かりたす。 私たちは、最終的に Megatron-LM を甚いお 545-553TFLOP/s の性胜を達成できるこずを確認したした。以䞋は、LLM-jp 172B モデル孊習の本実隓ず予備実隓の結果に基づく、匱スケヌリング性胜のグラフです。このグラフでは、Y 軞が Aggregate Throughput を衚し、X 軞が孊習に䜿甚した GPU の数を衚しおいたす。Llama2 7B、Llama2 13B、LLM-jp 172B の孊習結果は、線圢スケヌリングを瀺しおいるこずが分かりたす。 図 3. LLM-jp 172B モデル実隓の匱スケヌリング性胜 たずめ 前述の通り、LLM-jp 172B の孊習は珟圚も Megatron-LM を甚いお進行䞭です。珟圚のチェックポむント デヌタを甚いた䞋流タスクの評䟡結果から、珟状でも既に優れた日本語胜力を獲埗しおいるず掚察されたすが、完党なモデルは来幎の初めに完成予定です。 膚倧なデヌタセットを必芁ずする倧芏暡蚀語モデルの事前孊習においお、孊習時間はしばしば倧きな課題ずなりたす。そのため、Megatron-LM のような効率的に孊習可胜なフレヌムワヌクは、生成 AI の研究開発を加速させる為に非垞に重芁です。 Megatron-LM で孊習した 172B モデルにおいお、FP8-hybrid 孊習が孊習速床を向䞊させる効果的な手法であるこずを実蚌し、1.4 倍の高速化 (400 TFLOP/s → 550 TFLOP/s) を達成したした。この結果は、FP8-hybrid が倧芏暡モデルの事前孊習の効率を向䞊させる有甚なアプロヌチであるこずを匷調しおいたす。
https://developer.nvidia.com/blog/5x-faster-time-to-first-token-with-nvidia-tensorrt-llm-kv-cache-early-reuse/
5x Faster Time to First Token with NVIDIA TensorRT-LLM KV Cache Early Reuse
In our previous blog post , we demonstrated how reusing the key-value (KV) cache by offloading it to CPU memory can accelerate time to first token (TTFT) by up to 14x on x86-based NVIDIA H100 Tensor Core GPUs and 28x on the NVIDIA GH200 Superchip. In this post, we shed light on KV cache reuse techniques and best practices that can drive even further TTFT speedups. Introduction to KV cache LLM models are rapidly being adopted for many tasks, including question-answering, and code generation. To generate a response, these models begin by converting the user’s prompt into tokens, which are then transformed into dense vectors. Extensive dot-product operations follow to mathematically model the relationships between the tokens and build a contextual understanding of the user input. The computational cost of generating this contextual understanding increases quadratically with the length of the input sequence. This resource-intensive process generates keys and values, which are cached to avoid recomputation when generating subsequent tokens. Reusing the KV cache reduces the computational load and time needed to generate additional tokens—leading to a faster and more efficient user experience. When reusing the KV cache, careful attention must be given to how long it remains in memory, which components to evict first when memory is full, and when it can be reused for new incoming prompts. Optimizing these factors can lead to incremental performance improvements in KV cache reuse. NVIDIA TensorRT-LLM offers three key features that specifically address these areas. Early KV cache reuse Traditional reuse algorithms require the entire KV cache computation to be completed before any portions of it can be reused with new user prompts. In scenarios such as enterprise chatbots, where system prompts—predefined instructions added to user queries—are essential to direct the LLM’s responses in line with enterprise guidelines, this method can be inefficient. When a surge of users interacts with the chatbot simultaneously, each user would require a separate computation of the system prompt KV cache. With TensorRT-LLM, we can instead reuse the system prompt as it is being generated in real time, enabling it to be shared across all users during the burst, rather than recalculating it for each user. This can significantly accelerate inference for use cases requiring system prompts by up to 5x. Figure 1. TensorRT-LLM KV cache reuse can speed up TTFT by up to 5x Flexible KV cache block sizing In reuse implementations, only entire cache memory blocks can be allocated for reuse. For example, if the cache memory block size is 64 tokens and KV cache is 80 tokens, only 64 tokens will be stored for reuse, while the remaining 16 tokens will need to be recomputed. However, if the memory block size is reduced to 16 tokens, all 64 tokens can be stored across five memory blocks, eliminating the need for re-computation. This effect is most pronounced when the input sequences are short. For long input sequences, larger blocks can be more beneficial.  As is clear, the more granular the control you have over the KV cache, the better you can optimize it for your specific use case. TensorRT-LLM provides fine-grained control over KV cache memory blocks, giving developers the ability to chop them into smaller blocks between 64 to 2 tokens. This optimizes the usage of allocated memory, increases reuse rates, and improves TTFT. When running LLAMA70B on NVIDIA H100 Tensor Core GPUs, we can speed up TTFT up to 7% in multi-user environments by reducing KV cache block size from 64 tokens to 8 tokens. Figure 2. Impact of changing KV cache block size on inference speedup Efficient KV cache eviction protocols Partitioning the KV cache into smaller blocks and evicting unused ones can be effective for memory optimization, but it introduces dependency complexities. When a specific block is used to generate a response, and the result is stored as a new block, it can form a tree-like structure of dependencies. Over time, the counters tracking the usage of the source blocks (the branches) may become stale as the dependent nodes (the leaves) are reused. Evicting the source block then requires the eviction of all dependent blocks, which would require recalculation of the KV cache for new user prompts, increasing TTFT. To address this challenge, TensorRT-LLM includes intelligent eviction algorithms that can trace the dependent nodes from their source nodes and evict dependent nodes first, even if they have more recent reuse counters. This ensures more efficient memory management while preventing unnecessary evictions of dependent blocks. Figure 3. A logical representation of KV cache eviction algorithm show how it can reduce the number of evicted blocks, increasing the likelihood of reuse Getting started with TensorRT-LLM KV cache reuse Generating KV cache during inference requires a lot of compute and memory resources. Using it efficiently is critical to improving model response, accelerating inference, and increasing system throughput. TensorRT-LLM provides advanced reuse features for developers looking to further optimize TTFT response times for peak performance. To start using TensorRT-LLM KV cache reuse check out our GitHub documentation .
https://developer.nvidia.com/ja-jp/blog/5x-faster-time-to-first-token-with-nvidia-tensorrt-llm-kv-cache-early-reuse/
NVIDIA TensorRT-LLM の KV Cache Early Reuseで、Time to First Token を 5 倍高速化
Reading Time: 2 minutes 以前の ブログ蚘事 では、key-value (KV) キャッシュを CPU メモリにオフロヌドしお再利甚するこずで、最初のトヌクンが出力されるたでの時間 (TTFT: Time To First Token) を x86 ベヌスの NVIDIA H100 Tensor コア GPU で最倧 14 倍、NVIDIA GH200 Superchip で最倧 28 倍に高速化できる方法をご玹介したした。本蚘事では、KV キャッシュの再利甚技術ず、TTFT のさらなる高速化を実珟するベストプラクティスに぀いお解説したす。 KV キャッシュの抂芁 LLM モデルは、質問回答やコヌド生成など、倚くのタスクで急速に採甚されおいたす。応答を生成するにあたり、これらのモデルはたず、ナヌザヌのプロンプトをトヌクンぞ倉換し、その埌これらのトヌクンを密ベクトルぞず倉換したす。膚倧なドット積挔算がその埌に続き、その埌トヌクン間の関係性を数孊的にモデル化し、ナヌザヌ入力に察する文脈理解を構築したす。この文脈理解を生成するためにかかる蚈算コストは、入力シヌケンスの長さの二乗に比䟋しお増加したす。 このリ゜ヌスを倧量に消費するプロセスから key ずvalue が生成され、埌続のトヌクンを生成するずきに再床蚈算されないようにキャッシュされたす。KV キャッシュを再利甚するこずで、远加のトヌクンを生成する際に必芁ずなる蚈算負荷ず時間が軜枛され、より高速で効率的なナヌザヌ䜓隓を実珟したす。 KV キャッシュを再利甚するずきには、キャッシュがメモリに残る期間、メモリが䞀杯になったずきに最初に削陀するコンポヌネント、および新しい入力プロンプトに再利甚できるタむミングなどの点に现心の泚意を払う必芁がありたす。これらの芁因を最適化するこずで、KV キャッシュの再利甚におけるパフォヌマンスの段階的な増加ぞず぀なげるこずができたす。NVIDIA TensorRT-LLM は、これらの分野に特化した 3 ぀の䞻芁な機胜を提䟛したす。 Early KV cache reuse 埓来の再利甚アルゎリズムでは、KV キャッシュをその䞀郚であっおも新しいナヌザヌ プロンプトで再利甚するためには、事前にすべおの KV キャッシュの蚈算を完了させおおく必芁がありたした。この方法は、LLM のレスポンスを䌁業のガむドラむンに沿ったものにするために、システム プロンプト (ナヌザヌの問い合わせに远加される事前定矩の指瀺) が䞍可欠ずなる䌁業向けチャットボットなどのシナリオでは、非効率的である可胜性がありたす。 チャットボットず同時にやり取りするナヌザヌが急増した堎合、各ナヌザヌに察しおシステム プロンプト KV キャッシュを個別に蚈算する必芁がありたす。TensorRT-LLM では、リアルタむムで生成されるシステム プロンプトを再利甚するこずができるため、急増時にはすべおのナヌザヌず共有するこずができ、ナヌザヌごずに再蚈算する必芁がありたせん。これにより、システム プロンプトを必芁ずするナヌス ケヌスの掚論を最倧 5 倍にたで高速化するこずができたす。 図 1. TensorRT-LLM KV cache reuse により、TTFT を最倧 5 倍高速化 柔軟な KV キャッシュ ブロック サむズ 再利甚を実装する際には、キャッシュ メモリ ブロック党䜓のみを再利甚に割り圓おるこずができたす。䟋えば、キャッシュ メモリ ブロック サむズが 64 トヌクンで、KV キャッシュが 80 トヌクンである堎合、再利甚のために保存できるのは 64 トヌクンのみであり、残りの 16 トヌクンは再蚈算する必芁がありたす。しかしながら、メモリ ブロック サむズを 16 トヌクンに枛らすず、64 トヌクンすべおを 5 ぀のメモリ ブロックに栌玍するこずができ、再蚈算の必芁性がなくなりたす。 この効果は、入力シヌケンスが短いずきに最も顕著に珟れたす。長い入力シヌケンスの堎合は、より倧きなブロックの方がより有益です。明らかに、KV キャッシュをより现かく制埡できればできるほど、特定のナヌス ケヌスに合わせた最適化も向䞊したす。 TensorRT-LLM では、KV キャッシュ メモリ ブロックをきめ现かく制埡できるため、開発者は KV キャッシュ メモリ ブロックを 64 から 2 トヌクンたで、より小さなブロックに分割するこずができたす。これにより、割り圓おられたメモリの䜿甚が最適化され、再利甚率が䞊昇し、TTFT が改善されたす。NVIDIA H100 Tensor コア GPU で LLAMA70B を実行する堎合、KV キャッシュ ブロックサむズを 64 トヌクンから 8 トヌクンぞず枛らすこずで、マルチナヌザヌ環境で TTFT を最倧 7% 高速化できたす。 図 2. KV キャッシュ ブロック サむズの倉曎による掚論の高速化 効率的な KV キャッシュの陀倖 (Eviction) プロトコル KV キャッシュをより小さなブロックに分割し、未䜿甚のブロックを陀倖するこずは、メモリの最適化に効果的ですが、䟝存関係に耇雑さが生たれたす。特定のブロックがレスポンスの生成に䜿甚され、その結果が新しいブロックずしお保存されるず、䟝存関係のツリヌ構造が圢成される可胜性がありたす。 時間の経過ずずもに、゜ヌス ブロック (ブランチ) の䜿甚を远跡するカりンタヌは、埓属ノヌド (リヌフ) が再利甚されるに぀れお叀くなる可胜性がありたす。゜ヌス ブロックを陀倖するには、埓属するすべおのブロックを陀倖する必芁があり、新しいナヌザ プロンプトの KV キャッシュを再蚈算する必芁が生じお TTFT が増加したす。 この課題に察凊するために、TensorRT-LLM には、埓属ノヌドを゜ヌス ノヌドから远跡し、埓属ノヌドがより最近の再利甚カりンタヌを持っおいる堎合でも、最初に埓属ノヌドを陀倖するこずができるむンテリゞェントな陀倖アルゎリズムが含たれおいたす。これにより、より効率的にメモリを管理できるようになるず共に、埓属ブロックの䞍芁な陀倖を回避できたす。 図 3. KV キャッシュの陀倖アルゎリズムの論理を衚珟した図。陀倖されるブロックの数を枛らし、再利甚の可胜性を高められる様子を瀺しおいたす。 TensorRT-LLM KV cache reuse を䜿い始める 掚論䞭に KV キャッシュを生成するには、倚くの蚈算ずメモリ ゜ヌスが必芁になりたす。効率的に䜿甚するこずが、モデル応答の改善、掚論の高速化、システム スルヌプットの向䞊には䞍可欠です。TensorRT-LLM は、ピヌク性胜のために TTFT 応答時間をさらに最適化しようずする開発者に高床な再利甚機胜を提䟛したす。 TensorRT-LLM KV cache reuse を䜿い始めるには、 GitHub のドキュメント を参照しおください。 関連情報 GTC セッション: Speeding up LLM Inference With TensorRT-LLM (TensorRT-LLM による LLM 掚論の高速化) GTC セッション: Optimizing and Scaling LLMs With TensorRT-LLM for Text Generation (テキスト生成のための TensorRT-LLM を䜿甚した LLM の最適化ずスケヌリング) SDK: Torch-TensorRT SDK: TensorRT SDK: TensorFlow-TensorRT
https://developer.nvidia.com/blog/state-of-the-art-multimodal-generative-ai-model-development-with-nvidia-nemo/
State-of-the-Art Multimodal Generative AI Model Development with NVIDIA NeMo
Generative AI has rapidly evolved from text-based models to multimodal capabilities. These models perform tasks like image captioning and visual question answering, reflecting a shift toward more human-like AI. The community is now expanding from text and images to video, opening new possibilities across industries. Video AI models are poised to revolutionize industries such as robotics, automotive, and retail. In robotics , they enhance autonomous navigation in complex, ever-changing environments, which is vital for sectors like manufacturing and warehouse management. In the automotive industry, video AI is propelling autonomous driving, boosting vehicle perception, safety, and predictive maintenance to improve efficiency. To build image and video foundation models, developers must curate and preprocess a large amount of training data, tokenize the resulting high-quality data at high fidelity, train or customize pretrained models efficiently and at scale, and then generate high-quality images and videos during inference. Announcing NVIDIA NeMo for multimodal generative AI NVIDIA NeMo is an end-to-end platform for developing, customizing, and deploying generative AI models. NVIDIA just announced the expansion of NeMo to support the end-to-end pipeline for developing multimodal models. NeMo enables you to easily curate high-quality visual data, accelerate training and customization with highly efficient tokenizers and parallelism techniques, and reconstruct high-quality visuals during inference. Accelerated video and image data curation High-quality training data ensures high-accuracy results from an AI model. However, developers face various challenges in building data processing pipelines, ranging from scaling to data orchestration. NeMo Curator streamlines the data curation process, making it easier and faster for you to build multimodal generative AI models. Its out-of-the-box experience minimizes the total cost of ownership (TCO) and accelerates time-to-market. While working with visuals, organizations can easily reach petabyte-scale data processing. NeMo Curator provides an orchestration pipeline that can load balance on multiple GPUs at each stage of the data curation. As a result, you can reduce video processing time by 7x compared to a naive GPU-based implementation. The scalable pipelines can efficiently process over 100 PB of data, ensuring the seamless handling of large datasets. Figure 1. NVIDIA NeMo Curator video processing speed NeMo Curator provides reference video curation models optimized for high-throughput filtering, captioning, and embedding stages to enhance dataset quality, empowering you to create more accurate AI models. For instance, NeMo Curator uses an optimized captioning model that delivers an order of magnitude throughput improvement compared to unoptimized inference model implementations. NVIDIA Cosmos tokenizers Tokenizers map redundant and implicit visual data into compact and semantic tokens, enabling efficient training of large-scale generative models and democratizing their inference on limited computational resources. Today’s open video and image tokenizers often generate poor data representations, leading to lossy reconstructions, distorted images, and temporally unstable videos and placing a cap on the capability of generative models built on top of the tokenizers. Inefficient tokenization processes also result in slow encoding and decoding and longer training and inference times, negatively impacting both developer productivity and the user experience. NVIDIA Cosmos tokenizers are open models that offer superior visual tokenization with exceptionally large compression rates and cutting-edge reconstruction quality across diverse image and video categories. Video 1. Efficient Generative AI Tokenizers for Image and Video These tokenizers provide ease of use through a suite of tokenizer standardized models that support vision-language models (VLMs) with discrete latent codes, diffusion models with continuous latent embeddings, and various aspect ratios and resolutions, enabling the efficient management of large-resolution images and videos. This provides you with tools for tokenizing a wide variety of visual input data to build image and video AI models. Cosmos tokenizer architecture A Cosmos tokenizer uses a sophisticated encoder-decoder structure designed for high efficiency and effective learning. At its core, it employs 3D causal convolution blocks , which are specialized layers that jointly process spatiotemporal information, and uses causal temporal attention that captures long-range dependencies in data. The causal structure ensures that the model uses only past and present frames when performing tokenization, avoiding future frames. This is crucial for aligning with the causal nature of many real-world systems, such as those in physical AI or multimodal LLMs. Figure 2. NVIDIA Cosmos tokenizer architecture The input is downsampled using 3D wavelets, a signal processing technique that represents pixel information more efficiently. After the data is processed, an inverse wavelet transform reconstructs the original input. This approach improves learning efficiency, enabling the tokenizer encoder-decoder learnable modules to focus on meaningful features rather than redundant pixel details. The combination of such techniques and its unique training recipe makes the Cosmos tokenizers a cutting-edge architecture for efficient and powerful tokenization. During inference, the Cosmos tokenizers significantly reduce the cost of running the model by delivering up to 12x faster reconstruction compared to leading open-weight tokenizers (Figure 3). Figure 3. Quantitative comparison of reconstruction quality (left) and runtime performance (right) for video tokenizers The Cosmos tokenizers also produce high-fidelity images and videos while compressing more than other tokenizers, demonstrating an unprecedented quality-compression trade-off. Figure 4. Continuous tokenizer compression rate compared to reconstruction quality Figure 5. Discrete tokenizer compression rate compared to reconstruction quality Although the Cosmos tokenizer regenerates from highly compressed tokens, it is capable of creating high-quality images and videos due to an innovative neural network training technique and architecture. Figure 6. Reconstructed video frame for continuous video tokenizers Build Your Own Multimodal Models with NeMo The expansion of the NVIDIA NeMo platform with at-scale data processing using NeMo Curator and high-quality tokenization and visual reconstruction using the Cosmos tokenizer empowers you to build state-of-the-art multimodal, generative AI models. Join the waitlist and be notified when NeMo Curator is available. The tokenizer is available now on the /NVIDIA/cosmos-tokenizer GitHub repo and Hugging Face .
https://developer.nvidia.com/ja-jp/blog/state-of-the-art-multimodal-generative-ai-model-development-with-nvidia-nemo/
NVIDIA NeMo による最先端のマルチモヌダル生成 AI モデル開発
Reading Time: 2 minutes 生成 AI は、テキストベヌスのモデルからマルチモヌダル機胜ぞず急速に進化しおいたす。これらのモデルは、画像のキャプション䜜成や芖芚的な質問回答などのタスクを実行し、より人間に近い AI ぞずシフトしおいるこずを反映しおいたす。このコミュニティは珟圚、テキストや画像から動画ぞず拡倧しおおり、さたざたな業界で新たな可胜性を切り開かれおいたす。 動画 AI モデルは、ロボティクス、自動車、小売などの業界に革呜を起こそうずしおいたす。 ロボティクス では、補造業や倉庫管理などの分野に䞍可欠な、耇雑で倉化し続ける環境における自埋的なナビゲヌションを匷化しおいたす。自動車業界では、動画 AI が自動運転を掚進し、車䞡の認識、安党性、予知保党を匷化し、効率性を高めおいたす。 画像や動画の基盀モデルを構築するには、開発者は倧量の孊習デヌタのキュレヌションず事前凊理を行い、結果ずしお埗られた高品質デヌタを高い忠実床でトヌクン化し、孊習枈みモデルを効率的に倧芏暡に孊習たたはカスタマむズしお、掚論䞭に高品質な画像や動画を生成する必芁がありたす。 マルチモヌダル生成 AI 向けの NVIDIA NeMo を発衚 NVIDIA NeMo は、生成 AI モデルを開発、カスタマむズ、デプロむする゚ンドツヌ゚ンドのプラットフォヌムです。 NVIDIA は、マルチモヌダル モデル開発向けの゚ンドツヌ゚ンドのパむプラむンをサポヌトする NeMo の拡匵を発衚したした。NeMo により、高品質な芖芚デヌタを簡単にキュレヌションし、高効率なトヌクナむザヌず䞊列凊理技術で å­Šç¿’ ず カスタマむズ を加速し、掚論䞭に高品質なビゞュアルを再構築するこずができたす。 動画ず画像デヌタのキュレヌションを加速 高品質な孊習デヌタでは、AI モデルから高粟床な結果が埗られたす。しかし、開発者は、デヌタ凊理パむプラむンの構築においお、スケヌリングからデヌタのオヌケストレヌションたで、さたざたな課題に盎面しおいたす。 NeMo Curator は、デヌタ キュレヌション プロセスを合理化するこずで、マルチモヌダル生成 AI モデルをより簡単か぀迅速に構築するこずができたす。すぐに詊すこずができるため、総保有コスト (TCO) を最小限に抑え、垂堎投入たでの時間を短瞮したす。 ビゞュアルを扱う際には、組織はペタバむト芏暡のデヌタ凊理を容易に実行できたす。NeMo Curator は、デヌタ キュレヌションの各段階で耇数の GPU に負荷分散できるオヌケストレヌション パむプラむンを提䟛したす。その結果、単玔な GPU ベヌスの実装ず比范しお、動画凊理時間を 7 分の 1 に短瞮できたす。スケヌル可胜なパむプラむンは、100 PB を超えるデヌタを効率的に凊理でき、倧芏暡なデヌタセットをシヌムレスに取り扱うこずができたす。 図 1. NVIDIA NeMo Curator の動画凊理速床 NeMo Curator は、高いスルヌプットのフィルタリング、キャプション䜜成、埋め蟌みの各段階に最適化されたリファレンス ビデオ キュレヌション モデルを提䟛し、デヌタセットの品質を向䞊させ、より正確な AI モデルの䜜成をサポヌトしたす。 たずえば、NeMo Curator は、最適化されたキャプション モデルを䜿甚し、最適化されおいない掚論モデルの実装ず比范しお、桁違いのスルヌプットの向䞊を実珟したす。 NVIDIA Cosmos トヌクナむザヌ トヌクナむザヌは、冗長的で暗黙的な芖芚デヌタをコンパクトで意味のあるトヌクンにマッピングし、倧芏暡な生成モデルの効率的な孊習を実珟し、誰もが限られた蚈算リ゜ヌスで掚論できるようにしたす。 今日のオヌプンな動画や画像のトヌクナむザヌは、デヌタ衚珟が䞍十分なこずが倚いため、劣化の倚い再構築、歪んだ画像、䞍連続な動画に぀ながり、トヌクナむザヌ䞊に構築された生成モデルの胜力に限界をもたらしたす。トヌクン化プロセスが非効率なため、゚ンコヌドやデコヌドに時間がかかり、孊習や掚論の時間が長くなり、開発者の生産性ずナヌザヌ䜓隓の䞡方に悪圱響を及がしたす。 NVIDIA Cosmos トヌクナむザヌは、優れた芖芚トヌクン化を提䟛するオヌプンなモデルで、さたざたな画像や動画のカテゎリヌで、高い圧瞮率ず最先端の再構築品質を実珟したす。 離散的な朜圚コヌドを備えた芖芚蚀語モデル (VLM: Vision-language Model)、連続した朜圚的埋め蟌みによる拡散モデル、さたざたなアスペクト比や解像床をサポヌトする䞀連のトヌクナむザヌ暙準化モデルを䜿甚しお、これらのトヌクナむザヌを簡単に䜿甚でき、高解像床の画像や動画を効率的に管理するこずができたす。これにより、画像や動画 AI モデルを構築するために、幅広い芖芚入力デヌタをトヌクン化するツヌルが提䟛されたす。 Cosmos トヌクナむザヌのアヌキテクチャ Cosmos トヌクナむザヌは、高効率か぀効果的な孊習向けに蚭蚈されおおり、高床な゚ンコヌダヌ / デコヌダヌ構造を䜿甚しおいたす。その䞭栞には 3D Causal Convolution Block (因果畳み蟌みブロック) を採甚しおいたす。これは時空間情報を共同凊理する特殊なレむダヌで、デヌタの長期的な䟝存関係を捉える Causal Temporal Attention (因果的時間泚意機構) を䜿甚しおいたす。 この因果構造により、トヌクン化の実行時にモデルが過去ず珟圚のフレヌムのみを䜿甚し、未来のフレヌムは䜿甚したせん。これは、物理的なAIやマルチモヌダルLLMなどの倚くの珟実䞖界のシステムの因果性に合わせるために重芁です。 図 2. NVIDIA Cosmos トヌクナむザヌのアヌキテクチャ 入力は、ピクセル情報をより効率的に衚す信号凊理技術である 3D りェヌブレットを䜿甚しおダりンサンプリングされたす。デヌタ凊理埌、逆りェヌベレット倉換によっお元の入力が再構築されたす。 このアプロヌチにより、孊習効率が向䞊し、トヌクナむザヌの゚ンコヌダヌ / デコヌダヌの孊習可胜なモゞュヌルは、冗長なピクセルの詳现ではなく、意味のある特城に焊点を圓おるこずができたす。このような技術ず独自の孊習レシピの組み合わせにより、Cosmos トヌクナむザヌは、効率的か぀匷力なトヌクン化を実珟する最先端のアヌキテクチャずなっおいたす。 掚論の際、Cosmos トヌクナむザヌは、䞻芁なオヌプンりェむトのトヌクナむザヌず比范しお最倧 12 倍高速な再構築を実珟し、モデルの実行コストを倧幅に削枛したした (図 3)。 図 3. Cosmos トヌクナむザヌず䞻芁なオヌプンりェむトのトヌクナむザヌずの比范 Cosmos トヌクナむザヌは、他のトヌクナむザヌよりも高い圧瞮率を実珟しながら、高い忠実床の画像や動画を生成し、前䟋のない品質ず圧瞮のトレヌドオフを実珟しおいたす。 図 4. 連続トヌクナむザヌの圧瞮率ず再構築品質の比范 図 5. 離散トヌクナむザヌの圧瞮率ず再構築品質の比范 Cosmos トヌクナむザヌは、高床に圧瞮されたトヌクンから再生成されたすが、革新的なニュヌラル ネットワヌクの孊習技術ずアヌキテクチャにより、高品質な画像や動画を䜜成するこずができたす。 図 6. 連続動画トヌクナむザヌで再構築された動画フレヌム NeMo で独自のマルチモヌダル モデルを構築 NeMo Curator を䜿甚した倧芏暡なデヌタ凊理ず、Cosmos トヌクナむザヌを䜿甚した高品質なトヌクン化やビゞュアル再構築を備えた、NVIDIA NeMo プラットフォヌムの拡匵により、最先端のマルチモヌダル生成 AI モデルを構築するこずができたす。 登録 しおいただくず、NeMo Curator が利甚可胜になった際に通知を受け取るこずができたす。トヌクナむザヌは、珟圚 /NVIDIA/cosmos-tokenizer GitHub リポゞトリおよび Hugging Face で利甚するこずができたす。 関連情報 GTC セッション: Large Language Model Fine-Tuning using Parameter Efficient Fine-Tuning (PEFT を䜿甚した倧芏暡蚀語モデルのファむンチュヌニング) GTC セッション: Large Language Model Fine-Tuning using NVIDIA NeMo (NVIDIA NeMo を䜿甚した倧芏暡蚀語モデルのファむンチュヌニング – Domino Data Lab 提䟛) SDK: NVIDIA NeMo カスタマむザヌ SDK: NeMo LLM サヌビス SDK: NeMo Megatron
https://developer.nvidia.com/blog/frictionless-collaboration-and-rapid-prototyping-in-hybrid-environments-with-nvidia-ai-workbench/
Frictionless Collaboration and Rapid Prototyping in Hybrid Environments with NVIDIA AI Workbench
NVIDIA AI Workbench is a free development environment manager that streamlines data science, AI, and machine learning (ML) projects on systems of choice. The goal is to provide a frictionless way to create, compute, and collaborate on and across PCs, workstations, data centers, and clouds. The basic user experience is straightforward: Easy setup on single systems: Click through install in minutes on Windows, Ubuntu, and macOS, with a one-line install on remote systems. Managed experience for decentralized deployment : A free, PaaS/SaaS type UX in truly hybrid contexts with no need for a centralized, service-based platform. Seamless collaboration for experts and beginners: Friendly Git, container, and application management without limiting customization by power users. Consistent across users and systems: Migrate workloads and applications across different systems while maintaining functionality and user experience. Simplified GPU handling : Handles system dependencies like NVIDIA drivers and the NVIDIA Container Toolkit , as well as GPU-enabled container runtime configuration. This post explores highlights of the October release of NVIDIA AI Workbench, which is the most significant since the product launch at GTC 2024 and is a big step closer to the full product vision. Release highlights This section will detail the major new capabilities and user-requested updates in the latest release. Major new capabilities include: Enhance collaboration through expanded Git support, such as branching, merging, diffs, and finer-grained control for commits and gitignore. Create complex applications and workflows with multicontainer environments through Docker Compose support. Simple, fast, and secure rapid prototyping with application sharing with single-user URLs. User requested updates: Dark mode for the Desktop App Improved installation on localized versions of Windows Expanded Git support Previously, AI Workbench supported only single, monolithic commits on the main branch. Users had to manage branches and merges manually, and this created various types of confusion, especially around resolving merge conflicts. Now, users can manage branches, merges, and conflicts directly in the Desktop App and the CLI. In addition, they can see and triage individual file diffs for commits. The UI is built to work seamlessly with manual Git operations and will update to reflect relevant changes. Figure 1. AI Workbench Desktop App tab for Git branching These features are found in two new tabs on the Desktop App: Changes and Branches. Changes : Gives a line-by-line view of the diffs between the working tree and previous commits. Users can now select and commit file changes individually or in bulk based on visible file diffs tracked changes (addition, modification, or deletion), as well as being able to individually reject or add a file to git-ignore. The view also updates dynamically to reflect manual Git actions, for example manually staging a file and then following up with a change to the file in the working tree. Branches : Provides branch management, including creation, switching, and merging, as well as visibility for remote branches on a Git server. Merging branches with a conflict initiates a conflict resolution flow that users can do within the UI, or move to a terminal or file editor of their choice. Learn more about how these advanced Git features work . Multicontainer support with Docker Compose stacks AI Workbench now supports Docker Compose . Users can work with multicontainer applications and workflows with the same ease of configuration, reproducibility, and portability that AI Workbench provides for single-container environments. Figure 2. The Docker Compose feature in the AI Workbench Environment Management tab The basic idea is to add a Docker Compose-based “stack” that is managed by AI Workbench and connects to the main development container. To add the stack, a user just needs to add the appropriate Docker Compose file to the project repository and do some configuration in the Desktop App or CLI. We’re using Docker Compose for a few reasons. First, we didn’t want to develop in a vacuum, and that’s why we’ve been collaborating with the Docker team on features like a managed Docker Desktop install . Second, we want users to be able to work with the multicontainer applications outside of AI Workbench, and Docker Compose is the easiest way to do that. The vision for this feature is to enable streamlined, powerful development and compute for multicontainer applications within AI Workbench that can then be stood up outside of AI Workbench with a simple docker-compose up command. This multicontainer feature is new and will continue to evolve. We would love to get feedback and help you sort out any issues through the NVIDIA AI Workbench Developer Forum . Learn more about how Docker Compose works . Web application sharing through secure URLs AI Workbench enables users to easily spin up managed web applications that are built into a project. The process is fairly simple: create or clone a project with the web app installed, start the project, then start the app, and it appears in your browser. This approach is great for a developer UX, but it wasn’t good for rapid prototyping UX and collaboration. If you wanted another user to access and test your application, you either asked them to install AI Workbench, clone the project and run it, or you had to fully extract the application to run it and make it available to the user. The first is a speed bump for the user, and the second is a speed bump for the developer. We eliminated these speed bumps with a simple feature that enables you to set a remote AI Workbench to enable external access and to create single-use, secure URLs for running web applications in a project on that remote. You just need to make sure the user has access to port 10000 on the remote, and the application will be directly accessible. All they have to do is click the link and go to the app. Figure 3. Developers can now give end users direct access to applications running in an AI Workbench Project on a remote through secure, one-time-use URLs Enabling this kind of access is useful for rapid prototyping and collaboration. That’s why various SaaS offerings provide this as a managed service. The difference with AI Workbench is that you can provide this access on your own resources and in your own network, for example on data center resources or a shared server. It doesn’t have to be in the cloud. AI Workbench keeps things secure by restricting this access to a single browser and to a single application that’s running in the project. This means a user can’t share the URL with someone else, and they are constrained to the web app that you shared with them. Learn more about how application sharing works. Dark mode and localized Windows installation Many users requested a dark mode option because it’s easier on the eyes. It’s now available and can be selected through the Settings window that is now available directly from within the Desktop App. Learn more about how dark mode works . Windows users are by far our main demographic for the local installs, and not all Windows users are using the English language pack, and this blocked AI Workbench install due to how we handled some WSL commands. In particular, we’ve had users working in Cyrillic or Chinese that were blocked on Windows. We adjusted how we handle non-English language packs, and it should work well now. If you were previously blocked by this, give it a try now. If it still doesn’t work for you, let us know in the NVIDIA AI Workbench Developer Forum so we can continue to improve this capability. New AI Workbench projects This release introduces new example projects designed to jumpstart your AI development journey, detailed below.  An AI Workbench project is a structured Git repository that defines a containerized development environment in AI Workbench. AI Workbench projects provide: Effortless setup and GPU configuration: Simply clone a project from GitHub or GitLab, and AI Workbench handles the rest with automatic GPU configuration. Development integrations: Seamless support for popular development environments such as Jupyter and VS Code, as well as support for user-configured web applications. Containerized and customizable environments: Projects are containerized, isolated, and easily modifiable. Adapt example projects to suit your specific needs while ensuring consistency and reproducibility. Explore NVIDIA AI Workbench example projects . Multimodal virtual assistant example project This project enables users to build their own virtual assistant using a multimodal retrieval-augmented generation (RAG) pipeline with fallback to web search. Users can interact with two RAG-based applications to learn more about AI Workbench, converse with the user documentation, troubleshoot their own installation, or even focus the RAG pipeline to their own, custom product. Control-Panel: Customizable Gradio app for working with product documentation allows uploading webpages, PDFs, images, and videos to a persistent vector store and query them. For inference, users can select between cloud endpoints like on the NVIDIA API Catalog or use self-hosted endpoints to run their own inference. Public-Chat: With product documents loaded, the Gradio app is a simplified, “read-only” chatbot that you can share with end users through the new AI Workbench App Sharing feature. Figure 4. Using the Public-Chat web app, a read-only, pared down chat application that is meant to be more consumable and shareable to end users Competition-Kernel example project This project provides an easy, local experience when working on Kaggle competitions. You can easily leverage your local machine or a cloud instance to work on competition datasets, write code, build out models, and submit results, all through AI Workbench. The Competition Kernel project offers: A managed experience to develop and test on your own GPUs and set up and customize in minutes. Easy version control and tracking of code through GitHub or GitLab and very easy collaboration. The power of using a local, dedicated IDE: robust debugging, intelligent code completion, extensive customization options. Easy plugin to existing data sources (external or your own). No Internet? No problem. Develop while offline. Get started This release of NVIDIA AI Workbench marks a significant step forward in providing a frictionless experience for AI development across GPU systems. New features from this release, including expanded Git support, support for multicontainer environments, and secure web app sharing, streamline developing and collaborating on AI workloads. Explore these features in the three new example projects available with this release or create your own projects. To get started with AI Workbench, install the application from the webpage . For more information about installing and updating, see the NVIDIA AI Workbench documentation . Explore a range of NVIDIA AI Workbench example projects , from data science to RAG. Visit the NVIDIA AI Workbench Developer Forum to report issues and learn more about how other developers are using AI Workbench.
https://developer.nvidia.com/ja-jp/blog/frictionless-collaboration-and-rapid-prototyping-in-hybrid-environments-with-nvidia-ai-workbench/
NVIDIA AI Workbench によるハむブリッド環境におけるスムヌズなコラボレヌションず迅速なプロトタむピング
Reading Time: 3 minutes NVIDIA AI Workbench は、遞択したシステムでデヌタ サむ゚ンス、AI、機械孊習 (ML) プロゞェクトを合理化する無料の開発環境マネヌゞャヌです。 PC、ワヌクステヌション、デヌタ センタヌ、クラりド䞊で、あるいはそれらをたたがり、スムヌズな䜜成、蚈算、コラボレヌションを行うこずを目的ずしおいたす。基本的なナヌザヌ䜓隓はシンプルです: 単䞀システムで簡単なセットアップ: Windows、Ubuntu、macOS ではクリック操䜜でむンストヌルが完了し、リモヌト システムでは 1 行のコマンドでむンストヌルするこずができたす。 分散型デプロむのための管理化された䜓隓 : 集䞭型のサヌビスベヌスのプラットフォヌムを必芁ずしない、本圓の意味でハむブリッドなコンテキストにおける無料の PaaS/SaaS 型のナヌザヌ䜓隓。 ゚キスパヌトず初心者向けのシヌムレスなコラボレヌション: パワヌ ナヌザヌによるカスタマむズを制限するこずのない、䜿いやすい Git、コンテナヌ、アプリケヌション管理。 ナヌザヌずシステム間の䞀貫性: 機胜ずナヌザヌ䜓隓を維持しながら、異なるシステム間でワヌクロヌドずアプリケヌションを移行。 GPU 凊理の簡玠化 : NVIDIA ドラむバヌ や NVIDIA コンテナヌ ツヌルキット などのシステム䟝存関係、 および GPU 察応のコンテナヌ ランタむム構成を凊理。 この蚘事では、GTC 2024 での補品発衚以来、最も重芁な NVIDIA AI Workbench の 10 月のリリヌスにおけるハむラむトをご玹介したす。補品ビゞョン実珟に向けた倧きな䞀歩です。 リリヌス ハむラむト このセクションでは、最新リリヌスでの䞻芁な新機胜ずナヌザヌから芁望のあった曎新に぀いお、詳しく説明したす。 䞻な新機胜には以䞋が含たれたす。 ブランチ、マヌゞ、差分、コミットず gitignore の现かい制埡など、Git のサポヌトを拡倧し、コラボレヌションを匷化したす。 Docker Compose のサポヌトを通じお、マルチコンテナヌ環境で耇雑なアプリケヌションずワヌクフロヌを䜜成したす。 シングルナヌザヌ URL でアプリケヌションを共有するこずで、シンプルか぀迅速、安党なプロトタむピングを実珟したす。 ナヌザヌの芁望によるアップデヌト: デスクトップ アプリのダヌクモヌド ロヌカラむズ版 Windows のむンストヌル改善 Git サポヌトの拡匵 これたで AI Workbench は、メむン ブランチでの単䞀のモノリシックなコミットのみをサポヌトしおいたした。 ナヌザヌはブランチずマヌゞを手動で管理する必芁があり、特にマヌゞの競合の解決に関しお、さたざたな皮類の混乱が生じおいたした。 珟圚は、ブランチ、マヌゞ、競合を、デスクトップ アプリず CLI で盎接管理するこずができたす。 加えお、コミットの個々のファむル差分を確認し、優先順䜍を付けるこずもできたす。 この UI は、手動の Git 操䜜ずシヌムレスに動䜜するように構築されおおり、関連する倉曎を反映しお曎新されたす。 図 1. Git ブランチ甚の AI Workbench Desktop アプリ タブ これらの機胜は、デスクトップ アプリの 2 ぀の新しいタブ: [Changes (倉曎)] ず [Branches (ブランチ)] に衚瀺されたす。 倉曎 : 䜜業ツリヌず以前のコミット間の差分を 1 行ず぀衚瀺したす。 ナヌザヌは、衚瀺されおいるファむル差分、远跡された倉曎 (远加、修正、削陀) に基づいお、ファむル倉曎を個別たたは䞀括で遞択し、コミットするこずができるようになりたした。たた、git-ignore にファむルを個別に拒吊、たたは远加するこずもできたす。 このビュヌはたた、手動の Git 操䜜を反映するように動的に曎新されたす。䟋えば、ファむルを手動でステヌゞングし、䜜業ツリヌ内のファむルに倉曎を加えたす。 ブランチ : Git サヌバヌ䞊のリモヌト ブランチを可芖化するだけでなく、䜜成、切り替え、マヌゞなどのブランチ管理を提䟛したす。競合のあるブランチをマヌゞするず、競合解決フロヌが開始されたす。このフロヌは、ナヌザヌが UI 内で実行するこずも、遞択した端末やファむル ゚ディタヌに移動するこずもできたす。 これらの高床な Git 機胜の仕組みの詳现をご芧ください 。 Docker Compose スタックによるマルチコンテナヌのサポヌト AI Workbench が、 Docker Compose をサポヌトするようになりたした。 ナヌザヌは、AI Workbench がシングルコンテナヌ環境向けに提䟛する構成、再珟性、移怍性ず同様の容易さで、マルチコンテナヌ アプリケヌションずワヌクフロヌを操䜜するこずができたす。 図 2. AI Workbench 環境管理タブの Docker Compose 機胜 基本的な考え方は、AI Workbench によっお管理され、メむンの開発コンテナヌに接続する Docker Compose ベヌスの「スタック」を远加するこずです。 スタックを远加するには、ナヌザヌは 適切な Docker Compose ファむルをプロゞェクト リポゞトリに远加し、デスクトップ アプリたたは CLI でいく぀かの蚭定を行うだけです。 NVIDIA では、いく぀かの理由があっお Docker Compose を䜿甚しおいたす。 1 ぀目は、䜕もない所から開発を行うこずを望んでいなかったからです。そのため、 管理された Docker デスクトップ むンストヌル などの機胜に぀いお Docker チヌムず協力 しおきたした。 2 ぀目は、AI Workbench の以倖で、ナヌザヌがマルチコンテナヌ アプリケヌションを操䜜できるようにするには、Docker Compose が最も簡単な方法だからです。この機胜のビゞョンは、AI Workbench 内のマルチコンテナヌ アプリケヌションを合理化し、効果的な開発ず挔算凊理を可胜にし、シンプルな docker-compose up コマンドで AI Workbench 倖で起動できるようにするこずです。 このマルチコンテナヌ機胜は新しい機胜であり、今埌も進化し続けたす。 NVIDIA AI Workbench 開発者フォヌラム を通じお、是非フィヌドバックをお寄せください。問題解決をお手䌝いいたしたす。 Docker Compose の仕組みの詳现をご芧ください 。 セキュアな URL によるりェブ アプリケヌション共有 AI Workbench により、ナヌザヌはプロゞェクトに組み蟌たれた管理されたりェブ アプリケヌションを簡単に起動するこずができたす。 このプロセスは非垞に簡単で、Web アプリがむンストヌルされたプロゞェクトを䜜成たたは耇補し、プロゞェクトを開始しおからアプリを開始するず、ブラりザヌに衚瀺されたす。 このアプロヌチは開発者の UX には最適ですが、迅速なプロトタむピングの UX やコラボレヌションには適しおいたせんでした。 他のナヌザヌにアプリケヌションぞのアクセスずテストを行っおもらう堎合、AI Workbench のむンストヌル、プロゞェクトの耇補、実行を䟝頌するか、アプリケヌションを完党に抜出しお実行し、ナヌザヌが利甚できるようにする必芁がありたした。 1 ぀目はナヌザヌの課題であり、2 ぀目は開発者の課題です。 NVIDIA では、リモヌトの AI Workbench を蚭定しお倖郚からのアクセスを可胜にし、そのリモヌト䞊のプロゞェクトにおいお、りェブ アプリケヌションを実行するための䞀回限りの安党な URL を䜜成するこずができるシンプルな機胜でこれらの課題を克服したした。 ナヌザヌがリモヌトのポヌト 10000 にアクセスできるこずを確認するだけで、アプリケヌションに盎接アクセスできるようになりたす。 リンクをクリックしおアプリに移動するだけです。 図 3. 開発者は、䞀回限りの安党な URL を通じお、゚ンドナヌザヌを AI Workbench プロゞェクトで実行しおいるアプリケヌションに、リモヌトで盎接アクセスさせるこずができるようになりたした このようなアクセスを有効にするこずは、迅速なプロトタむピングずコラボレヌションに圹立ちたす。 だからこそ、さたざたな SaaS がこれを提䟛するマネヌゞド サヌビスずしお提䟛しおいるのです。AI Workbench ずの違いは、デヌタ センタヌのリ゜ヌスや共有サヌバヌなど、独自のリ゜ヌスや独自のネットワヌクで、このアクセスを提䟛できるこずです。 クラりドである必芁はありたせん。 AI Workbench は、単䞀のブラりザヌずプロゞェクトで実行されおいる単䞀のアプリケヌションに察しお、このアクセスを制限するこずで、安党性を確保したす。 ぀たり、ナヌザヌは URL を他のナヌザヌず共有できず、共有したりェブ アプリに制限されたす。 アプリケヌション共有の仕組みの詳现をご芧ください。 ダヌク モヌドずロヌカラむズされた Windows むンストヌル 倚くのナヌザヌから、目に優しいダヌク モヌドオプションの芁望が寄せられたした。 珟圚、このオプションは利甚可胜で、デスクトップ アプリから盎接䜿甚できる蚭定りィンドりから遞択できるようになっおいたす。 ダヌク モヌドの仕組みの詳现をご芧ください 。 ロヌカル むンストヌルの䞻なナヌザヌ局は Windows ナヌザヌですが、すべおの Windows ナヌザヌが英語パックを䜿甚しおいるわけではありたせん。たた、WSL コマンドの凊理方法により、この AI Workbench のむンストヌルがブロックされおいたした。 特に、Windows 䞊でキリル文字、たたは䞭囜語で䜜業するナヌザヌがブロックされおいたした。 英語以倖の蚀語パックを凊理する方法を調敎したので、珟圚は問題なく機胜するはずです。 以前ブロックされおいた堎合は、是非お詊しください。 それでも機胜しない堎合は、 NVIDIA AI Workbench 開発者フォヌラム でお知らせください。それにより NVIDIA は、匕き続きこの機胜を改善するこずができたす。 新しい AI Workbench プロゞェクト このリリヌスで、AI 開発をすぐに始められるように蚭蚈された新しいサンプル プロゞェクトをご玹介したす。詳现は以䞋をご芧ください。 AI Workbench プロゞェクト は、AI Workbench のコンテナヌ化された開発環境を定矩する構造化された Git リポゞトリです。 AI Workbench プロゞェクトでは、以䞋を提䟛したす。 簡単なセットアップず GPU 構成: プロゞェクトを GitHub たたは GitLab からクロヌンするだけで、残りは AI Workbench が自動で GPU 構成を行いたす。 開発の統合: Jupyter や VS Code などの䞀般的な開発環境に察しおシヌムレスにサポヌトし、ナヌザヌ構成のりェブ アプリケヌションに぀いおもサポヌトしたす。 コンテナヌ化されたカスタマむズ可胜な環境: プロゞェクトはコンテナヌ化され、分離され、簡単に倉曎可胜です。 䞀貫性ず再珟性を確保しながら、特定のニヌズに合わせおサンプル プロゞェクトを適合させるこずができたす。 NVIDIA AI Workbench サンプル プロゞェクトをご芧ください 。 マルチモヌダル仮想アシスタント サンプル プロゞェクト このプロゞェクトでは、りェブ怜玢ぞのフォヌルバックを䌎うマルチモヌダル 怜玢拡匵生成 (RAG) パむプラむンを䜿甚しお、独自の仮想アシスタントをするこずが構築できたす。 ナヌザヌは、2 ぀の RAG ベヌスのアプリケヌションを操䜜しお、AI Workbench の詳现を孊んだり、ナヌザヌ ドキュメントを参照したり、自身のむンストヌルのトラブルシュヌティングをしたり、あるいは RAG パむプラむンを独自のカスタム補品に集䞭させたりするこずができたす。 Control-Panel: 補品のドキュメントを操䜜するためのカスタマむズ可胜な Gradio アプリでは、りェブペヌゞ、PDF、画像、動画を氞続的なベクトル ストアにアップロヌドし、それらを問い合わせできたす。 掚論に関しおは、NVIDIA API カタログのように、クラりド ゚ンドポむントを遞択したり、セルフホスト型の゚ンドポむントを䜿甚しお、独自の掚論を実行できたす。 Public-Chat: 補品ドキュメントが読み蟌たれるず、Gradio アプリは簡玠化された「読み取り専甚」チャットボットずなり、新しい AI Workbench アプリ共有機胜を通じお゚ンド ナヌザヌず共有できたす。 図 4. Public-Chat りェブ アプリは、読み取り専甚のシンプルなチャット アプリケヌションで、゚ンドナヌザヌの利甚ず共有を容易にしたす Competition-Kernel サンプル プロゞェクト このプロゞェクトは、Kaggle コンペティションに取り組む際に簡単なロヌカル ゚クスペリ゚ンスを提䟛したす。 AI Workbench を通じお、ロヌカル マシン、たたはクラりド むンスタンスを掻甚し、コンペティションのデヌタセット、コヌドの䜜成、モデルの構築、結果の提出などを簡単に実行するこずができたす。 Competition Kernel プロゞェクトでは、以䞋を提䟛したす。 独自の GPU で開発ずテストを行い、数分でセットアップずカスタマむズを行う管理された䜓隓。 GitHub たたは GitLab によるコヌドのバヌゞョン コントロヌルず远跡、コラボレヌションが容易。 ロヌカルで専甚 IDE を䜿甚するパワヌ: 堅牢なデバッグ、むンテリゞェントなコヌド補完、広範なカスタマむズ オプション。 既存のデヌタ ゜ヌス (倖郚たたは独自) ぞの簡単なプラグむン。 むンタヌネットが䜿えない? 問題ありたせん。オフラむンでも開発できたす。 今すぐ始めたしょう この NVIDIA AI Workbench のリリヌスは、GPU システム党䜓で AI 開発に円滑な䜓隓を提䟛する倧きな䞀歩ずなりたす。 このリリヌスには、Git のサポヌトの拡匵、マルチコンテナヌ環境のサポヌト、安党なりェブ アプリ共有など、AI ワヌクロヌドでの開発ずコラボレヌションの効率化などの新機胜が含たれたす。 このリリヌスで利甚可胜ずなった 3 ぀の新しいサンプル プロゞェクトでこれらの機胜をお詊しいただくか、独自のプロゞェクトを䜜成するこずもできたす。 AI Workbench を始めるには、 りェブペヌゞからアプリケヌションをむンストヌルしおください 。 むンストヌルず曎新の詳现に぀いおは、 NVIDIA AI Workbench のドキュメント を参照しおください。 デヌタ サむ゚ンスから RAG たで、さたざたな NVIDIA AI Workbench のサンプル プロゞェクト もご甚意しおいたす。 問題を報告したり、他の開発者による AI Workbench の掻甚方法を確認するには、 NVIDIA AI Workbench 開発者フォヌラム にアクセスしおください。 関連情報 DLI コヌス: 察話型 AI Building Conversational AI Applications (アプリケヌションの構築 ) GTC セッション: Breaking Barriers: How NVIDIA AI Workbench Makes AI Accessible to All (障壁の打砎: NVIDIA AI Workbench による AI をすべおの人々に身近にする方法) りェビナヌ: Virtual Desktop in the Era of AI (AI 時代の仮想デスクトップ) りェビナヌ: Jumpstart AI Development With Virtual Workstations (仮想ワヌクステヌションで AI 開発を加速)