Palmyra X5 and Palmyra X4 are available on Amazon Bedrock.
Amazon Bedrock is a fully managed service from AWS that enables developers to build and scale generative AI applications using foundation models from leading AI companies. This integration allows you to use Palmyra X5 and X4 in Amazon’s serverless environment.
This guide covers how to:
boto3
Python SDK to invoke Palmyra models on BedrockBefore interacting with Palmyra models on Bedrock, you need an AWS account with access to Bedrock.
Alternatively, you can configure the CLI with environment variables or a credentials file. See the AWS CLI documentation for more details.
You should see output similar to the following:
To invoke Palmyra models on Bedrock using Python, you can use the AWS boto3
SDK.
Install the boto3
SDK using the following command:
Writer Palmyra X5 and X4 models are available in Amazon Bedrock in the US West (Oregon) AWS Region with cross-Region inference. For the most up-to-date information on model support by Region, refer to the Amazon Bedrock documentation.
To subscribe to the Palmyra X5 and Palmyra X4 models on Bedrock, go to the Bedrock console and request access to the Writer models you want to use.
You can also list the available models from Writer using the following command:
Palmyra X5 and Palmyra X4 are only available in the US West (Oregon) region but can be accessed through cross-Region inference. Cross-Region inference allows you to distribute traffic across multiple AWS Regions. To learn more about cross-Region inference for Bedrock, see Increase throughput with cross-Region inference and Supported Regions and models for inference profiles.
The following example uses the boto3
Python SDK to create a chat completion with the Palmyra X5 model on Bedrock. The modelId
is us.writer.palmyra-x5-v1:0
, which is the ID for the cross-region inference profile for Palmyra X5.
Learn more about the converse
method in the boto3 Python SDK documentation.
The following example uses Palmyra X5 to summarize a meeting transcript and provide a list of action items from the transcript.
It takes a meeting transcript text file, passes it to Palmyra X5 with instructions to provide a summary of the meeting and a list of action items, and prints the response.
See more information and examples below: