AWS - Meet the Titans
Introduction
It's been nearly a year and a half since ChatGPT ignited the world's fascination with generative AI. These large language models (LLMs), capable of producing human-quality content, have revolutionized how programmers code, businesses communicate, and students study. While only a select few companies possess the resources to train these colossal models, countless others can harness their power through integration.AWS Bedrock offers a pathway to leverage large language models without compromising security, data privacy, or breaking the bank. Choosing the right model is crucial, and with a plethora of options available, the process can be daunting. This blog introduces Amazon's Titan family of LLMs, accessible through AWS Bedrock. By the end, you'll understand Bedrock's capabilities, the diverse applications of Titan models, and how to embark on your own generative AI journey.
Amazon Bedrock
The cloud's magic lies in its ability to democratize cutting-edge technology. EC2 gave us the power of near endless on-demand computing power at the click of a button. S3 provides us with cheap limitless storage. In early 2023, AWS Bedrock extended this democratization to large language models (LLMs), offering developers a platform to experiment with various models from top providers and seamlessly integrate them into existing AWS solutions. As of August 2024 the following companies offer their model through Amazon Bedrock:- Amazon - The Amazon Titan Text models
- Anthropic - Models like Claude and others
- Cohere - Their large language models
- Meta - The Llama 2 models (13B and 70B)
- Mistral AI - Models like Mistral 7B and Mixtral 8x7B
- Stability AI - Their text and image models
- AI21 Labs - Their Jurassic models
Meet the Titans
Amazon Titan Foundational Models (FMs) are a family of foundational models trained by AWS. A Foundational Model is a trained large language model that can serve as a reusable foundation that can be used as is or fine-tuned to more specific uses. The Titan family can be under divided in 4 different categories of models.- Amazon Titan Text
- Amazon Titan Text Embeddings
- Amazon Titan Multimodal Embeddings
- Amazon Titan Image generator
Amazon Titan Text
As the name suggests, Amazon Titan Text models specialize in text generation. Whether you need to write an essay, query the capital of Vietnam, or generate code, these models have you covered. The Titan Text family comprises three models differentiated by token capacity (the smallest unit of text data) and supported languages.Amazon Titan Text G1 - Premier is the most powerful model, handling up to 32K tokens, ideal for demanding tasks. However, it currently supports only English.
Amazon Titan Text G1 - Express offers a balance between capability and cost. With a context window of 8K tokens and support for over 100 languages, it's a versatile choice.
Amazon Titan Text G1 - Lite is the most budget-friendly option, handling up to 4K tokens and supporting English. To optimize costs, select the smallest model sufficient for your needs.
The following chart outlines pricing differences for each model in the US-East (N. Virginia) region as of August 2024.
Amazon Titan models | Price per 1,000 input tokens | Price per 1,000 output tokens |
---|---|---|
Amazon Titan Text Premier | $0.0005 | $0.0015 |
Amazon Titan Text Lite | $0.00015 | $0.0002 |
Amazon Titan Text Express | $0.0002 | $0.0006 |
Amazon Titan Text Embeddings
A text embedding is a numerical representation, or vector, of a piece of text. This vector enables efficient searches for similar text within specialized vector databases using techniques familiar from high school math. Consequently, you can search for text using natural language. Retrieval Augmented Generation (RAG) combines this vector database with a large language model, granting the model access to your company's internal data without sharing it externally.To illustrate, consider the phrase "I love Amazon Bedrock." An embedding model transforms this into a vector like [1, 2, 3, 4], where each number is a dimension. More dimensions generally improve accuracy but also increase processing time and storage requirements. Finding the optimal balance between accuracy and efficiency is key.
Amazon Titan Text Embeddings can process up to 8192 tokens and generate 1024-dimensional vectors, supporting over 100 languages.
The following chart compares pricing in the US-East (N. Virginia) region as of August 2024.
Amazon Titan models | Price per 1,000 input tokens | Price per 1,000 output tokens |
---|---|---|
Amazon Titan Text Embeddings | $0.0001 | n/a |
Amazon Titan Text Embeddings V2 | $0.00002 | n/a |
Amazon Titan Multimodal Embeddings
We have seen that a text embeddings model can take text and transform it into a numerical representation. A multimodal embeddings model takes this concept a step further and allows for images to be represented as a numerical vector as well.Amazon Titan Multimodal Embeddings allows you to generate embeddings for your text as well as images so you can store them in a vector database. The model can output a 1024 dimensional vector.
The costs for embedding using Amazon Titan Multimodal Embeddings are:
Amazon Titan models | Price per 1,000 input tokens | Price per 1,000 output tokens |
---|---|---|
Amazon Titan Multimodal Embeddings | $0.0008 | $0.00006 |
Amazon Titan Image Generator
Imagine transforming words into art in seconds. That's the power of Amazon's Titan Image Generators. These groundbreaking models let you create and modify images with nothing but text. Amazon Titan Image Generator v1 and Amazon Titan Image Generator v2 can take a description of up to 512 characters and output and image. It can even take a reference image as base image to improve upon. Amazon Titan Image Generator v2 takes this even further by allowing users to leverage reference images to guide image generation, where the output image aligns with the layout and composition of the reference image while still following the textual prompt. It also includes an automatic background removal feature, which can remove backgrounds from images containing multiple objects without any user input. The model provides precise control over the color palette of generated images, allowing users to preserve a brand's visual identity without the requirement for additional fine-tuning.The following chart compares pricing in the US-East (N. Virginia) region as of August 2024.
Amazon Titan models | Image resolution | Price per image (Standard quality) | Price per image (Premium quality) |
---|---|---|---|
Amazon Titan Image Generator v1 | Smaller than 512 x 512 | $0.008 | $0.01 |
Amazon Titan Image Generator v1 | Larger than 512 x 512 | $0.01 | $0.012 |
Amazon Titan Image Generator v2 | Smaller than 512 x 512 | $0.008 | $0.01 |
Amazon Titan Image Generator v2 | Larger than 1024 x 1024 | $0.01 | $0.012 |
Conclusion
These are Amazon’s Titans, a family of foundational models accessible through Amazon Bedrock. Each model brings unique strengths to the table, empowering you to tackle a vast array of challenges. Best of all, getting started is incredibly easy. Bedrock seamlessly integrates with your existing AWS infrastructure, allowing you to focus on innovation, not infrastructure management.Start building something amazing today!
What's next?
Ready to harness the power of AWS Titans on AWS Bedrock? Explore these tutorials to get started.-
Tutorials
- Getting started with Amazon Bedrock
- Amazon Bedrock Samplesgithub repository with code examples and tutorials
- AWS Cloud Questget start building generative AI skills and earn a Linkedin badge at the same time
- Amazon Bedrock Pricing
- Amazon Bedrock Developer Documentation
- Amazon Titan
- Amazon Titan Models
- Amazon Titan Text Models
- Amazon Titan Text Embedding
- Amazon Titan Multimodal Embedding
- Amazon Titan Image Generation
Further Reads