Add DeepSeek-R1 Model now Available in Amazon Bedrock Marketplace And Amazon SageMaker JumpStart

Chanda Macknight 2025-02-08 22:05:42 +08:00
parent a84cc82c38
commit 3b3212baf3
1 changed files with 93 additions and 0 deletions

@ -0,0 +1,93 @@
<br>Today, we are delighted to reveal that DeepSeek R1 distilled Llama and Qwen models are available through Amazon Bedrock Marketplace and Amazon SageMaker JumpStart. With this launch, you can now deploy DeepSeek [AI](https://git.sitenevis.com)'s first-generation frontier model, DeepSeek-R1, [wavedream.wiki](https://wavedream.wiki/index.php/User:ClaireSparling1) together with the distilled variations varying from 1.5 to 70 billion parameters to build, experiment, and responsibly scale your generative [AI](https://www.thempower.co.in) ideas on AWS.<br>
<br>In this post, we demonstrate how to get begun with DeepSeek-R1 on Amazon Bedrock [Marketplace](https://167.172.148.934433) and SageMaker JumpStart. You can follow comparable actions to deploy the distilled versions of the designs also.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a large language design (LLM) developed by DeepSeek [AI](https://git.the.mk) that uses support discovering to enhance thinking abilities through a multi-stage training process from a DeepSeek-V3-Base foundation. A crucial differentiating function is its support learning (RL) action, which was utilized to refine the model's reactions beyond the standard pre-training and fine-tuning procedure. By including RL, DeepSeek-R1 can adjust better to user feedback and goals, ultimately enhancing both relevance and clearness. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) method, meaning it's equipped to break down intricate questions and factor through them in a detailed manner. This assisted thinking procedure enables the design to produce more precise, transparent, and detailed responses. This model integrates RL-based fine-tuning with CoT capabilities, aiming to create structured actions while focusing on interpretability and user interaction. With its extensive abilities DeepSeek-R1 has actually recorded the industry's attention as a versatile text-generation design that can be incorporated into different workflows such as representatives, rational thinking and information analysis tasks.<br>
<br>DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and [setiathome.berkeley.edu](https://setiathome.berkeley.edu/view_profile.php?userid=11860868) is 671 billion parameters in size. The MoE architecture permits activation of 37 billion parameters, allowing efficient reasoning by routing queries to the most pertinent professional "clusters." This technique permits the model to concentrate on different issue domains while maintaining overall effectiveness. DeepSeek-R1 requires at least 800 GB of HBM memory in FP8 format for inference. In this post, we will use an ml.p5e.48 xlarge circumstances to release the model. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs offering 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled models bring the thinking abilities of the main R1 design to more effective architectures based upon popular open designs like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation refers to a procedure of training smaller sized, more effective designs to simulate the habits and reasoning patterns of the larger DeepSeek-R1 model, using it as a teacher model.<br>
<br>You can release DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we suggest releasing this model with guardrails in place. In this blog, we will use Amazon Bedrock Guardrails to present safeguards, avoid harmful content, and examine designs against key security requirements. At the time of [composing](https://git.alexhill.org) this blog site, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can develop numerous guardrails tailored to different use cases and use them to the DeepSeek-R1 design, improving user experiences and standardizing security controls across your generative [AI](https://www.locumsanesthesia.com) applications.<br>
<br>Prerequisites<br>
<br>To release the DeepSeek-R1 design, you require access to an ml.p5e circumstances. To inspect if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and verify you're utilizing ml.p5e.48 xlarge for endpoint usage. Make certain that you have at least one ml.P5e.48 xlarge circumstances in the AWS Region you are deploying. To ask for a limit boost, create a limitation boost request and connect to your account group.<br>
<br>Because you will be releasing this design with Amazon Bedrock Guardrails, make certain you have the appropriate [AWS Identity](https://gitea.freshbrewed.science) and Gain Access To Management (IAM) consents to utilize Amazon Bedrock Guardrails. For directions, see Set up authorizations to use [guardrails](https://www.ggram.run) for content filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock [Guardrails](https://wiki.sublab.net) allows you to present safeguards, avoid harmful material, and examine models against crucial safety criteria. You can carry out precaution for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This enables you to apply guardrails to examine user inputs and design actions released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can develop a guardrail utilizing the Amazon Bedrock console or the API. For the example code to produce the guardrail, see the [GitHub repo](https://git.owlhosting.cloud).<br>
<br>The basic flow involves the following steps: First, the system [receives](https://eukariyer.net) an input for the model. This input is then processed through the ApplyGuardrail API. If the input passes the guardrail check, it's sent out to the design for inference. After getting the design's output, another guardrail check is used. If the output passes this last check, it's returned as the result. However, if either the input or output is intervened by the guardrail, a message is returned indicating the nature of the intervention and whether it happened at the input or output phase. The examples showcased in the following areas demonstrate inference utilizing this API.<br>
<br>Deploy DeepSeek-R1 in Amazon Bedrock Marketplace<br>
<br>Amazon Bedrock Marketplace provides you access to over 100 popular, emerging, and specialized structure models (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, complete the following steps:<br>
<br>1. On the Amazon Bedrock console, pick Model brochure under [Foundation designs](https://tmsafri.com) in the navigation pane.
At the time of composing this post, [wiki.dulovic.tech](https://wiki.dulovic.tech/index.php/User:GLXKatrice) you can use the InvokeModel API to invoke the design. It doesn't support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a service provider and pick the DeepSeek-R1 design.<br>
<br>The design detail page provides necessary details about the model's capabilities, pricing structure, and application guidelines. You can discover detailed usage instructions, including [sample API](https://learn.ivlc.com) calls and code snippets for integration. The design supports various text generation jobs, consisting of material creation, code generation, and question answering, utilizing its reinforcement discovering optimization and CoT thinking abilities.
The page also includes [implementation alternatives](http://teamcous.com) and licensing details to help you get going with DeepSeek-R1 in your applications.
3. To begin utilizing DeepSeek-R1, pick Deploy.<br>
<br>You will be prompted to configure the release details for DeepSeek-R1. The model ID will be pre-populated.
4. For Endpoint name, enter an endpoint name (between 1-50 alphanumeric characters).
5. For Variety of circumstances, go into a number of [circumstances](http://106.227.68.1873000) (in between 1-100).
6. For Instance type, pick your circumstances type. For ideal efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised.
Optionally, you can configure advanced security and facilities settings, consisting of virtual personal cloud (VPC) networking, service function approvals, and file encryption settings. For a lot of use cases, the default settings will work well. However, for production implementations, you may desire to these settings to align with your company's security and compliance requirements.
7. Choose Deploy to start using the design.<br>
<br>When the implementation is complete, you can test DeepSeek-R1's capabilities straight in the Amazon Bedrock playground.
8. Choose Open in play ground to access an interactive user interface where you can explore different prompts and change design specifications like temperature and maximum length.
When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat design template for optimal outcomes. For example, content for reasoning.<br>
<br>This is an outstanding method to explore the design's reasoning and text generation capabilities before incorporating it into your applications. The playground supplies immediate feedback, helping you comprehend how the model reacts to different inputs and letting you tweak your triggers for optimum outcomes.<br>
<br>You can quickly check the model in the playground through the UI. However, to conjure up the released model programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.<br>
<br>Run inference using guardrails with the deployed DeepSeek-R1 endpoint<br>
<br>The following code example demonstrates how to perform inference utilizing a [deployed](http://appleacademy.kr) DeepSeek-R1 model through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. You can produce a guardrail utilizing the Amazon Bedrock console or the API. For the example code to develop the guardrail, see the GitHub repo. After you have produced the guardrail, [wiki.whenparked.com](https://wiki.whenparked.com/User:JZKMireya164733) use the following code to implement guardrails. The script initializes the bedrock_runtime customer, sets up inference specifications, and sends a demand to create [text based](https://idemnaposao.rs) on a user timely.<br>
<br>Deploy DeepSeek-R1 with SageMaker JumpStart<br>
<br>SageMaker JumpStart is an artificial intelligence (ML) center with FMs, built-in algorithms, and prebuilt ML services that you can release with just a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models to your usage case, with your data, and release them into production using either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 design through SageMaker JumpStart uses two practical techniques: utilizing the [user-friendly SageMaker](https://ec2-13-237-50-115.ap-southeast-2.compute.amazonaws.com) JumpStart UI or [carrying](https://karis.id) out programmatically through the SageMaker Python SDK. Let's explore both approaches to assist you pick the approach that best suits your needs.<br>
<br>Deploy DeepSeek-R1 through SageMaker JumpStart UI<br>
<br>Complete the following actions to release DeepSeek-R1 using SageMaker JumpStart:<br>
<br>1. On the SageMaker console, pick Studio in the navigation pane.
2. First-time users will be triggered to create a domain.
3. On the SageMaker Studio console, select JumpStart in the navigation pane.<br>
<br>The model internet browser displays available models, with details like the company name and design capabilities.<br>
<br>4. Look for [gratisafhalen.be](https://gratisafhalen.be/author/richelleteb/) DeepSeek-R1 to see the DeepSeek-R1 model card.
Each model card shows crucial details, including:<br>
<br>- Model name
- Provider name
- Task classification (for instance, Text Generation).
Bedrock Ready badge (if appropriate), suggesting that this model can be registered with Amazon Bedrock, permitting you to utilize Amazon Bedrock APIs to invoke the design<br>
<br>5. Choose the design card to see the design details page.<br>
<br>The design details page includes the following details:<br>
<br>- The model name and company details.
Deploy button to release the design.
About and Notebooks tabs with detailed details<br>
<br>The About tab consists of important details, such as:<br>
<br>- Model description.
- License details.
- Technical requirements.
- Usage standards<br>
<br>Before you deploy the design, [higgledy-piggledy.xyz](https://higgledy-piggledy.xyz/index.php/User:XXBCorine49) it's recommended to evaluate the [design details](http://qiriwe.com) and license terms to [validate compatibility](http://dev.icrosswalk.ru46300) with your usage case.<br>
<br>6. Choose Deploy to continue with release.<br>
<br>7. For [Endpoint](http://47.112.158.863000) name, use the immediately produced name or develop a custom-made one.
8. For Instance type ¸ select a circumstances type (default: ml.p5e.48 xlarge).
9. For Initial circumstances count, get in the number of circumstances (default: [gratisafhalen.be](https://gratisafhalen.be/author/redajosephs/) 1).
Selecting proper instance types and counts is essential for expense and performance optimization. Monitor your implementation to adjust these settings as needed.Under Inference type, [Real-time inference](http://104.248.138.208) is chosen by default. This is optimized for sustained traffic and low latency.
10. Review all configurations for precision. For this design, we highly suggest sticking to SageMaker JumpStart default settings and making certain that network isolation remains in place.
11. Choose Deploy to [release](https://jobz0.com) the design.<br>
<br>The release process can take a number of minutes to complete.<br>
<br>When implementation is total, your endpoint status will alter to InService. At this moment, the design is all set to accept reasoning [requests](http://120.79.157.137) through the endpoint. You can keep an eye on the release progress on the [SageMaker console](https://git.brainycompanion.com) Endpoints page, which will display pertinent metrics and status details. When the release is complete, you can invoke the [design utilizing](https://social.stssconstruction.com) a SageMaker runtime customer and integrate it with your applications.<br>
<br>Deploy DeepSeek-R1 using the SageMaker Python SDK<br>
<br>To start with DeepSeek-R1 utilizing the SageMaker Python SDK, you will need to set up the SageMaker Python SDK and make certain you have the needed AWS permissions and environment setup. The following is a detailed code example that shows how to release and use DeepSeek-R1 for inference programmatically. The code for deploying the design is supplied in the Github here. You can clone the notebook and range from SageMaker Studio.<br>
<br>You can run additional demands against the predictor:<br>
<br>Implement guardrails and run inference with your [SageMaker JumpStart](https://src.strelnikov.xyz) predictor<br>
<br>Similar to Amazon Bedrock, you can likewise use the ApplyGuardrail API with your SageMaker JumpStart predictor. You can produce a guardrail using the Amazon Bedrock console or the API, and execute it as displayed in the following code:<br>
<br>Clean up<br>
<br>To avoid undesirable charges, complete the actions in this area to clean up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace deployment<br>
<br>If you released the design using Amazon Bedrock Marketplace, total the following steps:<br>
<br>1. On the Amazon Bedrock console, under Foundation models in the navigation pane, choose Marketplace deployments.
2. In the Managed releases area, locate the endpoint you wish to delete.
3. Select the endpoint, and on the Actions menu, pick Delete.
4. Verify the endpoint details to make certain you're erasing the proper implementation: 1. Endpoint name.
2. Model name.
3. Endpoint status<br>
<br>Delete the SageMaker JumpStart predictor<br>
<br>The SageMaker JumpStart model you released will sustain expenses if you leave it running. Use the following code to delete the endpoint if you wish to stop sustaining charges. For more details, see Delete Endpoints and Resources.<br>
<br>Conclusion<br>
<br>In this post, we [checked](https://www.basketballshoecircle.com) out how you can access and release the DeepSeek-R1 model utilizing Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to begin. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart models, SageMaker JumpStart pretrained designs, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Starting with Amazon SageMaker JumpStart.<br>
<br>About the Authors<br>
<br>Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He helps emerging generative [AI](https://forum.tinycircuits.com) business construct [ingenious](http://vivefive.sakura.ne.jp) options utilizing AWS services and sped up [calculate](http://39.100.139.16). Currently, he is focused on establishing strategies for fine-tuning and optimizing the reasoning efficiency of large language models. In his spare time, Vivek enjoys treking, watching movies, and trying various cuisines.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](https://svn.youshengyun.com:3000) Specialist Solutions Architect with the Third-Party Model Science team at AWS. His location of focus is AWS [AI](https://beautyteria.net) accelerators (AWS Neuron). He holds a Bachelor's degree in Computer Science and Bioinformatics.<br>
<br>Jonathan Evans is a Specialist Solutions Architect working on generative [AI](https://www.eruptz.com) with the Third-Party Model Science group at AWS.<br>
<br>[Banu Nagasundaram](https://letustalk.co.in) leads product, engineering, and strategic partnerships for Amazon SageMaker JumpStart, SageMaker's artificial [intelligence](https://tuxpa.in) and generative [AI](https://vidhiveapp.com) hub. She is enthusiastic about constructing solutions that [assist customers](http://223.68.171.1508004) accelerate their [AI](https://gitlab.ucc.asn.au) journey and unlock organization worth.<br>