2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
Large model applications are developing rapidly, and the demand for deploying a set of AI applications is increasing. Deploying from scratch takes too long. However, Amazon Technology's fully managed generative AI service Amazon Bedrock simplifies the complex process from basic models to generative AI application construction, paving a direct and efficient path for customers. Users only need to follow a few intuitive and easy-to-follow steps to quickly create and deploy fully managed agents, which can flexibly call APIs and efficiently execute diverse and complex business logic.
This innovative service model not only greatly accelerates the popularization and application of generative AI technology, but also provides unprecedented convenience and possibilities for the exploration and practice of artificial intelligence in various industries. This article mainly explains how to use Amazon Bedrock to deploy a fully managed generative AI service.
Amazon Web Services offers free trial packages for new users (free for 12 months, free forever, etc.), including Amazon Bedrock Users canAmazon Web Services overseas free trial page Learn more details and start a free trial. This not only lowers the entry threshold for users, but also allows users to explore and learn Amazon Web Services without burden.
First you needAmazon Web ServicesAccount Registration. OpenAmazon Bedrock, and then click the Get Started button.
Then we can see the backend interface of Amazon Bedrock. We can see that Amazon Bedrock supports multiple models, including Amazon Titan, Claude, Jurassic, Command, Stable Diffusion and Llama2.
Select "Model Access" in the left menu to authorize the model, then select Manage model access on the right. For some models, you may first need to submit use case details before you can request access.
Next, select the models you need. It is recommended to select all of them. For the GPT-dialogue function, you need to select any model with the Text tag, and for the Stable Diffusion-text-to-image function, you need to select the model with the Image tag. Finally, click the button below to complete the authorization: Request model access.
Then confirm whether the model is authorized successfully.
Select the Playgrounds column in the left navigation bar to see three modes of the model:
Then we select Select model and choose the model we want to use. These models are the models we just selected to authorize above.
Then we can enter the following prompt to let Amazon Bedrock generate images for us and click Run.
Prompt word case 1
1girl, masterpiece, best quality, high resolution, 8K , HDR, cinematic lighting, bloom, sun light, looking at viewer, outdoor, detailed shadows, intricate tree shadows, raytracing`
Prompt word case 2
1cute girl walking in street, half body, 64K, Professional,Makoto Shinkai, Katsuhiro Otomo, Masashi Kishimoto, Kentaro Miura
An introduction to the properties involved.
Attributes | describe |
---|---|
Prompt word | Mainly describes the image, including content style and other information. The original webui will have a word limit for this place, and you can install some plug-ins to break the word limit.简单来说就是你想要生成一副什么样的图片,包含主体、风格、色彩、质量要求等等 。 |
Reverse prompt word | 告诉模型我们不需要的风格 , indicating what you don't want, such as not wanting something to appear in the image, not wanting the image to be of poor quality, not wanting the person to be blurred or have extra hands and feet, etc. |
Cue word relevance (CFG scale) | The classifier is guided freely. The lower the value of the consistency between the image and the prompt, the more creative the result will be. The larger the value, the closer the image will be to the description text. It is usually set to 7. |
Sampling method | 扩散算法的去噪声采样模式会影响其效果 , the results of different sampling modes will vary greatly |
Sampling steps | When using the diffusion model to generate images迭代步骤 With each iteration, the AI has more opportunities to compare the prompt with the current result and make corresponding adjustments. It should be noted that a higher number of iterations will consume more computing time and cost, but it does not necessarily mean better results. However, if the number of iterations is too small, generally not less than 50, the image quality will definitely deteriorate. |
Random Seed | The random seed used to generate each image. This seed is used作为确定扩散初始状态的基础 -1 means that the drawing is not based on the image seed, but is completely based on your prompt. If you fill in the seed value of an image, it will refer to the image seed you filled in and perform a second drawing based on this image. |
Among them, prompt words are very important and are the most basic requirement for generating images. Prompt words are composed of multiple affixes. Prompt words are divided into positive prompt words and negative prompt words, which are used to tell AI what is needed and what is not. Negative prompt words sound intriguing, but in fact, they are descriptions of what we don’t want to appear. Prompt words and negative prompt words actually depend on your imagination. They must be converted into English description terms to be more effective. I personally think that there is no fixed formula that will limit people’s imagination. In short, fill in whatever you want and give full play to your imagination.
I was very surprised by Amazon Bedrock, a fully managed generative AI service. It seemed like I had found my home, as someone who hates troubles. Building models by myself was complicated, but Amazon Bedrock completely solved my problem. During the experience, I have some opinions on HAI application building:
1. Quick build and deployment. I think this is an advantage that many users can see. It is really convenient.
2. Amazon Bedrock uses advanced architecture and algorithms to handle a large number of concurrent requests and provide high-throughput and low-latency services, which gives users a better experience when using the application.
3. You can build a set of services and use multiple applications together, which not only saves money but also saves time.