How to Access the Jurassic-2 Large Language Model via an AWS Lambda Endpoint
AWS Partners
Build and grow your business with products, services, and solutions from AWS Partners and AWS Marketplace sellers.
By Sheldon Sides , Manager of Solutions Architecture – Amazon Web Services (AWS)
By Yuval Belfer , Developer Advocate – AI21 Labs
The ever-evolving landscape of artificial intelligence (AI) has given rise to transformative solutions. At the forefront of this revolution is generative AI and large language models (LLMs). The proliferation of these technologies presents an unparalleled opportunity for businesses seeking to leverage their vast capabilities.
Generative AI and LLMs such as AI21 Labs’ Jurassic models are reshaping how we engage with information. They help solve for information overload and time constraints with capabilities to comprehend and produce human-like text. As a result, they play an increasingly significant role in enhancing customer experience and boosting operational efficiency.
领英推荐
This post walks through using the Jurassic-2 (J2) large language model and how to consume the model via an AWS Lambda API endpoint. We’ll also discuss how to make calls to the J2 model via the publicly available Jurassic-2 Python SDK. Additionally, we’ll make calls to the SDK from within a Lambda endpoint and pass back the results of the LLM as a JSON result.
As part of this post, code will be included to deploy the solution in your own Amazon Web Services (AWS) account as a proof of concept (PoC) that you can expand further on. Before jumping into reviewing the code, we’ll first review the high-level architecture of the solution.
AI21 Labs is an AWS Partner and AWS Marketplace Seller that’s a leader in generative AI and LLMs, revolutionizing the way people read and write. Founded in 2017, it was among the first companies to bring generative AI to the masses and, to date, offers enterprise solutions and consumer applications.
AI21 Studio is AI21 Labs’ developer platform that provides API access to state-of-the-art LLMs, powering natural language comprehension and generation features in thousands of live applications and services. Businesses use AI21 Studio’s suite of solutions to build generative AI-driven solutions and drive innovation, unlock new capabilities, and scale existing initiatives.