AWS and Generative AI

 Generative Artificial Intelligence, or Generative AI, GenAI, is one of the hottest topics in the recent months. You would ‘have to be living under a rock to not notice this massive topic’. 

‘Generative AI is a branch of AI that focuses on creating new data. It is a subset of machine learning. The goal of generative AI is to create new data that is similar to the data that was used to train the model.’ – texts generated by an AI tool. 

Recently I experimented a couple of random text-to-image GenAI tools to observe how generative AI can create contents and how the data generated by different GenAI tools trained by different models is different.

My experiment was straightforward: text-to-image GenAI tools ask you to provide some texts as a prompt, and then use this input to generate an image. So that was what I did.

The prompt I supplied was: ‘female student graduation photo in front of a white building with flowers in hand in Paris’.

Both GenAI tools I tested could output an image within seconds. These images were original – they are not copies or modifications of existing images. You repeat the identical texts in prompt, the same GenAI tool will generate a different image for you every time.

This was the first one:



The below was another one using another GenAI tool:



Both tools seem to have done a pretty good job. One photo is obviously a lot more natural looking than the other, definitely more real world photo-like. The other one is more ‘art-ish’. The girl’s outfits are different as well: one adopted for a formal graduation style while another was more casual, but both approaches are common in modern day graduation photos. 

The prompt did state ‘with flowers in hand’. It is interesting that one of the images did not follow this instruction to the dot, and generated an image with plenty flowers in the background but not in hand. Nevertheless to say the image looks great and the girl’s pose is perfect, natural and lively young. It is possible that that GenAI tool did not pick up the flowers in hand description, but one can equally think that it did, but took some freedom in its content generating. 

At this point, it was logical for me to repeat the same texts as prompt, in both tools, to generate another two images:





These two photos were different to the previous two respectively, but carried similar settings when we compare the two that were generated from the same tool. Then when we compare the images generated by the two different tools, we can see, for example, all the backgrounds were generated as out-of-focus, to bring the attention more to the in-focus subject, the student. However the levels of out-of-focus-ness, or the so called depth-of-field, were slightly different. The depiction of the student was different too. It is quite interesting.   
 
My simple experiment indeed demonstrated that different GenAI tools create new data in ways that are relevant to the data that was used to train the models, which influenced the characteristics of the images generated. 


AWS has launched a cluster of GenAI related tools and services. Using them, GenAI models can be developed for various use cases, being it text to image creators or software development helpers with code generation suggestions. Below are some introductions to several of AWS GenAI services.

Amazon Bedrock

Amazon Bedrock is a managed cloud service that offers Foundation Models through a single API. Foundation models are a form of generative AI. They generate output from one or more inputs (prompts) in the form of human language instructions.

The choices of high-performing foundation models in Bedrock are not only from Amazon but also from the like of AI21 Labs, Anthropic, Cohere, Meta and a number of others, all are innovative AI companies. Bedrock integrates a broad set of capabilities in security, data privacy and ethical AI when being used to build generative AI applications. 

Bedrock enables convenient experiment on evaluating top foundation models for the use case, and the private customisation using data through techniques such as fine-tuning and Retrieval Augmented Generation (RAG), and the development of agents that execute tasks using the enterprise systems and data sources. Bedrock is serverless. 
         
 PartyRock

PartyRock is powered by Amazon Bedrock. It is an engaging and user-friendly generative AI app-building playground. With PartyRock, one can share apps and content they have created with a single click, publish their app for others to find with shareable links as well as discover, play, and remix apps to make them your own. You can even create a snapshot link of the content your app generates to quickly share your results with your community. Through quick and enjoyable experience, one can craft their unique apps, share them, and delve into the world of generative AI.


Amazon SageMaker JumpStart ML Hub

SageMaker JumpStart is a machine learning (ML) hub that can help users accelerate their ML journey. SageMaker JumpStart has hundreds of built-in algorithms and pre-trained models to accelerate ML model building and deployment within SageMaker, while ensuring data security. With SageMaker JumpStart, users can evaluate, compare, and select foundation models quickly based on pre-defined quality and responsibility metrics to perform tasks like article summarization and image generation. Pre-trained models are fully customisable for a specific use case with user’s data. On the other hand, none of user’s data is used to train the underlying models. All user’s data is encrypted and does not leave the VPC (Virtual Private Cloud). Data privacy and confidentiality are ensured.



Amazon Q

Amazon Q, also powered by Bedrock, is a workplace AI-powered assistant to answer questions. It can be connected to a variety of business software tools. It is designed to be tailored to a given business environment. 

Amazon Q can help users get fast, relevant answers to pressing questions, can solve problems, generate content, and take actions using the data and expertise found in the company's information repositories, code, and enterprise systems. When users chat with Amazon Q, it provides immediate, relevant information and advice to help streamline tasks, speed decision-making, and help spark creativity and innovation at work. 

Since the data used to train the model is specific to a company, each Amazon Q’s behaviour is unique. 
 
AWS uses Amazon Q – as a so-called eating your own dog food manner. Amazon Q is available in the AMC (AWS Management Console), in popular IDEs, and more, and easily fits within the existing workflows to help accelerate user’s innovation. An example AWS has given on the questions you can ask Amazon Q is: 

"What are the ways to build a web application on AWS?" 

Amazon Q will provide a list of potential services like AWS Amplify, AWS Lambda, and Amazon EC2, with the advantages of each and links to getting started resources. 

Amazon Q in AWS is an expert on patterns in the AWS Well-Architected Framework, best practices, documentation, and solution implementations, making it easier and faster for users to explore new services and capabilities, learn unfamiliar technologies, and architect solutions.


Naturally, other AWS related GenAI tools also exist, such as the Amazon CodeWhisper, which, being trained on AWS data and APIs, analyses existing code in the IDE (written by users or generated by CodeWhisper) and identifies problematic code with high accuracy, then provides intelligent suggestions on how to remediate it. Many new GenAI tools and services will surely come out. 

                                                        -- Simon Wang

Comments

Popular posts from this blog

AWS Storage Gateway File Gateway with S3 and FSx For Lustre with S3

Fairness Evaluation and Model Explainability In AI