Skip to content

This repository guides you through the process of using transfer learning to fine-tune a large language model (LLM) with your own dataset using SageMaker Studio. The model being fine-tuned is the HuggingFace GPTJ-6B model.

License

aws-samples/lambda-gen-ai-endpoint-blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

A Step-by-Step Guide - Calling the Jurassic-2 (J2) Ultra Large Language Model through an AWS Lambda Endpoint

Purpose of this guide

This guide was created as a companion for the blog How to access the Jurassic-2 (J2) large language model via an AWS Lambda endpoint.

The deployment guide will walk you through all the needed steps to deploy the solution referred to in the blog post.

Prerequisites

This section will cover any prereqs. needed to run the solution.

AI21 Labs account

In order to use the Jurassic-2 model you will need an API key from AI21 Labs.

  1. Sign up for a free account
  2. Access your API key here

You will need your AI21 Labs API key in Step 2 when deploying your CloudFormation template.

Note: Click the link for each step to go through the deployment guide

This section we will walk you through all the steps needed to deploy the lambda layer needed for the lambda function to include the AI21 Lab's Python SDK library. This library is needed for the lambda function to communicate with the Jurassic-2 model.

This section will walk you through how to deploy the CloudFormation template for the solution. The CloudFormation template will spin up all the needed resources for you to run this solution in a demo environment.

This section will walk you through how to add the lambda layer you created in step 1 to the lambda function that was created when you deployed the CloudFormation template in step 2.

This section will walk you through how to test the lambda endpoint that will return results from the Jurassic-2 LLM.

This section cover how to remove all AWS resources that were created when we deployed the CloudFormation template.

About

This repository guides you through the process of using transfer learning to fine-tune a large language model (LLM) with your own dataset using SageMaker Studio. The model being fine-tuned is the HuggingFace GPTJ-6B model.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published