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

Aja Coaldrake 2025-04-08 16:11:02 +08:00
commit af96f05462

@ -0,0 +1,93 @@
<br>Today, we are [thrilled](https://prantle.com) to announce that DeepSeek R1 distilled Llama and Qwen designs are available through Amazon Bedrock Marketplace and Amazon SageMaker JumpStart. With this launch, you can now release DeepSeek [AI](https://49.12.72.229)'s first-generation frontier design, DeepSeek-R1, along with the distilled versions ranging from 1.5 to 70 billion parameters to construct, experiment, and responsibly scale your generative [AI](http://www.dahengsi.com:30002) ideas on AWS.<br>
<br>In this post, we demonstrate how to begin with DeepSeek-R1 on [Amazon Bedrock](http://210.236.40.2409080) Marketplace and [SageMaker JumpStart](https://vtuvimo.com). You can follow comparable actions to deploy the distilled versions of the designs as well.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a big language design (LLM) developed by DeepSeek [AI](http://hybrid-forum.ru) that utilizes reinforcement discovering to improve reasoning abilities through a multi-stage training process from a DeepSeek-V3-Base structure. A key identifying function is its support learning (RL) action, which was used to improve the model's actions beyond the standard pre-training and fine-tuning process. By incorporating RL, DeepSeek-R1 can adjust more effectively to user feedback and objectives, eventually improving both significance and clearness. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) technique, indicating it's equipped to break down complex queries and reason through them in a detailed manner. This assisted thinking procedure allows the design to produce more accurate, transparent, and detailed responses. This model integrates RL-based fine-tuning with CoT capabilities, aiming to generate structured actions while focusing on interpretability and user interaction. With its comprehensive capabilities DeepSeek-R1 has recorded the industry's attention as a flexible text-generation model that can be incorporated into numerous workflows such as agents, logical reasoning and information interpretation tasks.<br>
<br>DeepSeek-R1 uses a Mixture of Experts (MoE) architecture and is 671 billion parameters in size. The MoE architecture enables activation of 37 billion specifications, enabling efficient inference by routing questions to the most pertinent specialist "clusters." This method allows the model to specialize in various problem domains while maintaining total performance. DeepSeek-R1 needs at least 800 GB of HBM memory in FP8 format for reasoning. In this post, we will utilize an ml.p5e.48 xlarge circumstances to release the design. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs offering 1128 GB of [GPU memory](https://hebrewconnect.tv).<br>
<br>DeepSeek-R1 distilled designs bring the [thinking](https://ibs3457.com) abilities of the main R1 model to more effective architectures based upon popular open designs like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a procedure of training smaller sized, more efficient designs to imitate the habits and reasoning patterns of the larger DeepSeek-R1 model, using it as a [teacher design](https://git.wheeparam.com).<br>
<br>You can deploy DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we recommend deploying this model with guardrails in place. In this blog, we will utilize Amazon [Bedrock Guardrails](https://remoterecruit.com.au) to introduce safeguards, avoid harmful material, and assess designs against essential security requirements. At the time of composing this blog site, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can produce multiple guardrails tailored to different usage cases and apply them to the DeepSeek-R1 model, enhancing user experiences and standardizing security controls across your generative [AI](http://42.192.14.135:3000) applications.<br>
<br>Prerequisites<br>
<br>To deploy the DeepSeek-R1 design, you require access to an ml.p5e circumstances. To examine if you have quotas for P5e, open the Service Quotas console and under AWS Services, pick Amazon SageMaker, and validate you're using ml.p5e.48 xlarge for [endpoint usage](http://h.gemho.cn7099). Make certain that you have at least one ml.P5e.48 xlarge instance in the AWS Region you are deploying. To ask for a limitation boost, create a limitation boost request and connect to your account group.<br>
<br>Because you will be deploying this model with Amazon Bedrock Guardrails, make certain you have the appropriate AWS Identity and Gain Access To Management (IAM) approvals to use Amazon Bedrock Guardrails. For instructions, see Establish permissions to use guardrails for material filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails permits you to present safeguards, avoid harmful content, and assess models against crucial security requirements. You can execute security measures for the DeepSeek-R1 design utilizing the Amazon Bedrock ApplyGuardrail API. This allows you to apply guardrails to examine user inputs and model reactions released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can create a guardrail using the Amazon Bedrock console or the API. For the example code to create the guardrail, see the GitHub repo.<br>
<br>The basic circulation involves the following actions: First, the system gets 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 model for inference. After getting the model's output, another guardrail check is used. If the output passes this final check, it's returned as the [final outcome](http://vts-maritime.com). However, if either the input or output is intervened by the guardrail, a message is returned showing the nature of the intervention and whether it took place at the input or output phase. The examples showcased in the following sections demonstrate inference utilizing this API.<br>
<br>Deploy DeepSeek-R1 in Amazon Bedrock Marketplace<br>
<br>Amazon Bedrock Marketplace offers you access to over 100 popular, emerging, and specialized foundation designs (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, total the following actions:<br>
<br>1. On the Amazon Bedrock console, pick [Model brochure](https://cruyffinstitutecareers.com) under Foundation models in the navigation pane.
At the time of composing this post, you can utilize the InvokeModel API to invoke the model. It doesn't support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a provider and pick the DeepSeek-R1 model.<br>
<br>The model detail page provides necessary details about the model's abilities, prices structure, and execution standards. You can find detailed usage guidelines, consisting of sample API calls and code bits for integration. The design supports different text generation tasks, including content production, code generation, and concern answering, using its reinforcement finding out optimization and CoT thinking abilities.
The page likewise includes implementation options and licensing details to help you start with DeepSeek-R1 in your applications.
3. To begin using DeepSeek-R1, select Deploy.<br>
<br>You will be prompted to configure the implementation details for DeepSeek-R1. The design ID will be pre-populated.
4. For Endpoint name, go into an endpoint name (between 1-50 alphanumeric characters).
5. For Number of circumstances, get in a number of circumstances (in between 1-100).
6. For example type, select your circumstances type. For optimum efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is suggested.
Optionally, you can set up advanced security and infrastructure settings, including virtual private cloud (VPC) networking, service function permissions, and encryption settings. For the majority of utilize cases, the default settings will work well. However, for [production](https://awaz.cc) implementations, you may desire to evaluate these settings to line up with your organization's security and compliance requirements.
7. [Choose Deploy](https://kyigit.kyigd.com3000) to begin using the model.<br>
<br>When the release is total, you can check 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 try out various triggers and change model criteria like temperature and maximum length.
When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for optimum results. For example, content for reasoning.<br>
<br>This is an [outstanding](http://ptube.site) way to check out the design's reasoning and [text generation](https://www.youtoonet.com) abilities before incorporating it into your applications. The playground offers immediate feedback, helping you comprehend how the [model responds](http://www.pygrower.cn58081) to different inputs and letting you tweak your triggers for ideal outcomes.<br>
<br>You can quickly test the model in the playground through the UI. However, to conjure up the deployed design programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.<br>
<br>Run inference utilizing guardrails with the deployed DeepSeek-R1 endpoint<br>
<br>The following code example demonstrates how to perform inference utilizing a released DeepSeek-R1 design through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can produce a guardrail utilizing the Amazon Bedrock console or the API. For the example code to create the guardrail, see the GitHub repo. After you have created the guardrail, use the following code to implement guardrails. The script initializes the bedrock_runtime customer, configures inference specifications, and sends out a demand to generate text based upon a user prompt.<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 [options](https://praca.e-logistyka.pl) that you can deploy with just a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained [designs](http://artpia.net) to your use case, with your data, and deploy them into [production](https://sunrise.hireyo.com) using either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 design through SageMaker JumpStart uses two hassle-free approaches: utilizing the user-friendly SageMaker JumpStart UI or implementing programmatically through the SageMaker Python SDK. Let's explore both techniques to assist you choose the [technique](https://freelyhelp.com) that finest matches your needs.<br>
<br>Deploy DeepSeek-R1 through SageMaker JumpStart UI<br>
<br>Complete the following steps 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 produce a domain.
3. On the SageMaker Studio console, select JumpStart in the navigation pane.<br>
<br>The model web browser displays available designs, with details like the provider name and model capabilities.<br>
<br>4. Look for DeepSeek-R1 to see the DeepSeek-R1 [model card](http://133.242.131.2263003).
Each model card shows essential details, including:<br>
<br>- Model name
- Provider name
- Task classification (for example, Text Generation).
[Bedrock Ready](http://120.26.64.8210880) badge (if suitable), suggesting that this model can be signed up with Amazon Bedrock, enabling you to use [Amazon Bedrock](https://poslovi.dispeceri.rs) APIs to conjure up the model<br>
<br>5. Choose the model card to view the design details page.<br>
<br>The model details page consists of the following details:<br>
<br>- The model name and service provider details.
[Deploy button](http://barungogi.com) to deploy the model.
About and Notebooks tabs with detailed details<br>
<br>The About tab consists of essential details, such as:<br>
<br>- Model description.
- License details.
- Technical specs.
- Usage standards<br>
<br>Before you deploy the design, it's advised to examine the design details and license terms to validate compatibility with your use case.<br>
<br>6. Choose Deploy to continue with deployment.<br>
<br>7. For Endpoint name, utilize the automatically generated name or create a custom-made one.
8. For example type ¸ choose a circumstances type (default: ml.p5e.48 xlarge).
9. For Initial instance count, enter the number of instances (default: 1).
Selecting suitable circumstances types and counts is important for cost and efficiency optimization. Monitor your release to adjust these settings as needed.Under Inference type, Real-time inference is chosen by default. This is [enhanced](https://15.164.25.185) for sustained traffic and low latency.
10. Review all configurations for precision. For this model, we strongly advise sticking to SageMaker JumpStart default settings and making certain that network seclusion remains in location.
11. Choose Deploy to release the design.<br>
<br>The release process can take numerous minutes to finish.<br>
<br>When implementation is complete, your endpoint status will change to InService. At this moment, the design is prepared to accept reasoning demands through the endpoint. You can keep an eye on the deployment development on the SageMaker console Endpoints page, which will display pertinent metrics and status details. When the deployment is complete, you can invoke the model utilizing a SageMaker runtime client 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 install the SageMaker Python SDK and make certain you have the needed AWS consents and environment setup. The following is a detailed code example that shows how to release and utilize DeepSeek-R1 for [inference programmatically](https://www.meditationgoodtip.com). The code for releasing the model is provided 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 predictor<br>
<br>Similar to Amazon Bedrock, you can also utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can create a guardrail using the Amazon Bedrock console or the API, and implement it as displayed in the following code:<br>
<br>Tidy up<br>
<br>To avoid unwanted charges, finish the steps in this section to tidy up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace deployment<br>
<br>If you deployed the Amazon Bedrock Marketplace, complete the following actions:<br>
<br>1. On the Amazon Bedrock console, [higgledy-piggledy.xyz](https://higgledy-piggledy.xyz/index.php/User:VeroniqueDas) under Foundation models in the navigation pane, pick Marketplace implementations.
2. In the [Managed implementations](http://13.228.87.95) area, find the endpoint you wish to delete.
3. Select the endpoint, and on the Actions menu, select Delete.
4. Verify the endpoint details to make certain you're erasing the right release: 1. Endpoint name.
2. Model name.
3. Endpoint status<br>
<br>Delete the SageMaker JumpStart predictor<br>
<br>The SageMaker JumpStart model you deployed will sustain costs if you leave it running. Use the following code to delete the endpoint if you want to stop sustaining charges. For more details, see Delete Endpoints and Resources.<br>
<br>Conclusion<br>
<br>In this post, we checked out how you can access and release the DeepSeek-R1 [model utilizing](https://www.elcel.org) [Bedrock Marketplace](https://www.drawlfest.com) and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to begin. For more details, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained models, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Getting going with Amazon SageMaker JumpStart.<br>
<br>About the Authors<br>
<br>Vivek Gangasani is a Lead Specialist Solutions Architect for Inference at AWS. He assists emerging generative [AI](https://4kwavemedia.com) companies build innovative services utilizing AWS services and accelerated compute. Currently, he is focused on establishing methods for fine-tuning and optimizing the inference efficiency of big language models. In his complimentary time, Vivek delights in hiking, enjoying motion pictures, and attempting different foods.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](https://spotlessmusic.com) Specialist Solutions Architect with the Third-Party Model [Science](http://94.224.160.697990) group at AWS. His area of focus is AWS [AI](https://gitlab.donnees.incubateur.anct.gouv.fr) accelerators (AWS Neuron). He holds a Bachelor's degree in Computer Science and Bioinformatics.<br>
<br>Jonathan Evans is a Specialist Solutions Architect dealing with generative [AI](http://www.zjzhcn.com) with the Third-Party Model Science team at AWS.<br>
<br>Banu Nagasundaram leads item, engineering, and strategic partnerships for Amazon SageMaker JumpStart, SageMaker's artificial [intelligence](https://vlabs.synology.me45) and [generative](https://home.zhupei.me3000) [AI](https://repo.farce.de) hub. She is passionate about developing options that help customers accelerate their [AI](http://www.dahengsi.com:30002) journey and unlock service value.<br>