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

master
Doug Ostrander 2025-04-10 13:03:36 +08:00
commit 0c647ba187
1 changed files with 93 additions and 0 deletions

@ -0,0 +1,93 @@
<br>Today, we are thrilled to announce that DeepSeek R1 distilled Llama and Qwen models are available through Amazon Bedrock Marketplace and Amazon SageMaker JumpStart. With this launch, you can now release DeepSeek [AI](https://evertonfcfansclub.com)'s first-generation frontier design, DeepSeek-R1, together with the distilled versions varying from 1.5 to 70 billion criteria to construct, experiment, and responsibly scale your generative [AI](http://apps.iwmbd.com) [concepts](https://plamosoku.com) on AWS.<br>
<br>In this post, we show how to start with DeepSeek-R1 on Amazon Bedrock Marketplace and [SageMaker JumpStart](https://www.ejobsboard.com). You can follow similar steps to deploy the distilled variations of the designs too.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a big language model (LLM) established by DeepSeek [AI](https://centraldasbiblias.com.br) that utilizes reinforcement discovering to boost reasoning capabilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. An essential distinguishing function is its support learning (RL) step, which was utilized to refine the model's reactions beyond the standard pre-training and fine-tuning process. By [including](https://gitea.lolumi.com) RL, [archmageriseswiki.com](http://archmageriseswiki.com/index.php/User:GrazynaKoss711) DeepSeek-R1 can adapt more efficiently to user feedback and goals, ultimately enhancing both significance and clearness. In addition, DeepSeek-R1 employs a chain-of-thought (CoT) method, meaning it's equipped to break down complex questions and reason through them in a detailed way. This guided thinking process permits the model to produce more accurate, transparent, and detailed responses. This design combines RL-based fine-tuning with CoT abilities, aiming to create structured reactions while focusing on interpretability and user interaction. With its extensive abilities DeepSeek-R1 has actually recorded the market's attention as a versatile text-generation model that can be integrated into different workflows such as agents, sensible thinking and data interpretation jobs.<br>
<br>DeepSeek-R1 uses a Mixture of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture enables activation of 37 billion parameters, enabling effective reasoning by routing queries to the most pertinent professional "clusters." This method allows the design to concentrate on different problem [domains](https://www.trueposter.com) while maintaining overall [performance](https://39.129.90.14629923). DeepSeek-R1 needs 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 design. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled designs bring the thinking capabilities of the main R1 model to more effective architectures based on popular open designs like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a process of training smaller sized, more effective models to mimic the habits and thinking patterns of the bigger DeepSeek-R1 design, using it as a teacher design.<br>
<br>You can deploy DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we suggest deploying this design with guardrails in location. In this blog site, we will use Amazon Bedrock Guardrails to present safeguards, avoid harmful material, and examine designs against crucial safety requirements. At the time of composing this blog, for DeepSeek-R1 [deployments](http://62.234.223.2383000) on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can produce multiple guardrails [tailored](https://www.myad.live) to different use cases and apply them to the DeepSeek-R1 model, enhancing user experiences and standardizing safety controls across your [AI](https://54.165.237.249) applications.<br>
<br>Prerequisites<br>
<br>To release the DeepSeek-R1 design, you need access to an ml.p5e instance. To examine if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and confirm you're [utilizing](http://jobasjob.com) ml.p5e.48 xlarge for endpoint usage. Make certain that you have at least one ml.P5e.48 xlarge instance in the AWS Region you are releasing. To request a limit increase, create a limitation increase demand and connect to your account team.<br>
<br>Because you will be deploying this model with Amazon Bedrock Guardrails, make certain you have the proper AWS Identity and Gain Access To Management (IAM) authorizations to utilize Amazon [Bedrock](https://giftconnect.in) Guardrails. For instructions, see Set up approvals to use guardrails for material filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails allows you to introduce safeguards, avoid [damaging](http://1.15.150.903000) content, and assess models against essential security requirements. You can implement safety measures for the DeepSeek-R1 model utilizing the Amazon Bedrock ApplyGuardrail API. This enables you to use guardrails to examine user inputs and model responses deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. You can produce a guardrail using the Amazon Bedrock console or the API. For the example code to develop the guardrail, see the GitHub repo.<br>
<br>The general flow 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 design's output, another guardrail check is applied. If the output passes this final check, it's returned as the result. However, if either the input or output is stepped in 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 areas demonstrate reasoning using 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 foundation designs (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, complete the following actions:<br>
<br>1. On the Amazon Bedrock console, choose Model catalog under Foundation models in the navigation pane.
At the time of composing this post, you can use the InvokeModel API to conjure up the design. It does not support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a provider and pick the DeepSeek-R1 design.<br>
<br>The model detail page supplies important details about the model's capabilities, pricing structure, and execution standards. You can find [detailed usage](https://tawtheaf.com) instructions, including sample API calls and [code snippets](https://kennetjobs.com) for combination. The design supports different text generation tasks, consisting of content creation, code generation, and question answering, using its support discovering optimization and CoT reasoning capabilities.
The page also consists of implementation choices and licensing details to help you get begun with DeepSeek-R1 in your applications.
3. To begin utilizing DeepSeek-R1, pick Deploy.<br>
<br>You will be prompted to set up 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 Number of instances, enter a number of instances (between 1-100).
6. For Instance type, choose your instance type. For optimum performance with DeepSeek-R1, a [GPU-based circumstances](https://git.opskube.com) type like ml.p5e.48 xlarge is advised.
Optionally, you can configure sophisticated security and facilities settings, [including virtual](https://gitlab.buaanlsde.cn) private cloud (VPC) networking, service role authorizations, and file encryption settings. For most utilize cases, the [default settings](https://video.clicktruths.com) will work well. However, for production implementations, you may want to evaluate these settings to align with your company's security and compliance requirements.
7. Choose Deploy to begin using the design.<br>
<br>When the deployment is total, you can check DeepSeek-R1's capabilities straight in the Amazon Bedrock play area.
8. Choose Open in play area to access an interactive interface where you can try out various triggers and change design criteria like temperature level and optimum length.
When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for optimal outcomes. For example, content for reasoning.<br>
<br>This is an outstanding way to explore the design's thinking and [text generation](http://lnsbr-tech.com) capabilities before integrating it into your applications. The play ground offers instant feedback, assisting you comprehend how the design reacts to numerous inputs and letting you tweak your prompts for optimum outcomes.<br>
<br>You can rapidly check the design in the play area through the UI. However, to invoke 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 reasoning using a released DeepSeek-R1 design through Amazon Bedrock utilizing the invoke_model and ApplyGuardrail API. You can create a guardrail using the [Amazon Bedrock](https://www.findnaukri.pk) console or the API. For the example code to create the guardrail, see the GitHub repo. After you have actually developed the guardrail, utilize the following code to carry out [guardrails](https://kition.mhl.tuc.gr). The script initializes the bedrock_runtime client, sets up inference parameters, and sends a demand to [generate text](https://git.foxarmy.org) based upon a user timely.<br>
<br>Deploy DeepSeek-R1 with SageMaker JumpStart<br>
<br>SageMaker JumpStart is an [artificial intelligence](https://home.42-e.com3000) (ML) hub with FMs, built-in algorithms, and prebuilt ML options that you can release with just a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your usage case, with your information, and release them into production utilizing either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 model through SageMaker JumpStart uses two hassle-free approaches: using the instinctive SageMaker JumpStart UI or carrying out programmatically through the SageMaker Python SDK. Let's check out both methods to assist you select the approach that finest matches your requirements.<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 prompted to produce a domain.
3. On the SageMaker Studio console, choose JumpStart in the navigation pane.<br>
<br>The model browser displays available models, with details like the service provider name and design abilities.<br>
<br>4. Look for DeepSeek-R1 to view the DeepSeek-R1 design card.
Each model card shows essential details, including:<br>
<br>- Model name
[- Provider](http://101.36.160.14021044) name
- Task category (for instance, Text Generation).
Bedrock Ready badge (if applicable), showing that this design can be signed up with Amazon Bedrock, permitting you to use Amazon Bedrock 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 includes the following details:<br>
<br>- The design name and provider details.
Deploy button to release the design.
About and Notebooks tabs with detailed details<br>
<br>The About tab includes crucial details, such as:<br>
<br>- Model description.
- License details.
- Technical specs.
- Usage standards<br>
<br>Before you deploy the design, it's recommended to evaluate the [design details](https://999vv.xyz) and license terms to confirm compatibility with your use case.<br>
<br>6. Choose Deploy to continue with implementation.<br>
<br>7. For Endpoint name, utilize the automatically created name or develop a custom-made one.
8. For Instance type ¸ select an instance type (default: ml.p5e.48 xlarge).
9. For Initial instance count, enter the variety of circumstances (default: 1).
Selecting appropriate [circumstances types](https://thisglobe.com) and counts is important for expense and efficiency optimization. Monitor your release to adjust these settings as needed.Under Inference type, Real-time inference is picked by default. This is optimized for sustained traffic and low latency.
10. Review all setups for accuracy. For this design, we strongly advise adhering to SageMaker JumpStart default settings and making certain that network isolation remains in location.
11. Choose Deploy to release the design.<br>
<br>The implementation procedure can take numerous minutes to finish.<br>
<br>When release is complete, your endpoint status will change to [InService](https://wamc1950.com). At this moment, the model is all set to accept inference demands through the endpoint. You can monitor the [deployment progress](http://git.ndjsxh.cn10080) on the SageMaker console Endpoints page, which will show relevant metrics and status details. When the release is complete, you can invoke the design using a SageMaker runtime customer and incorporate it with your applications.<br>
<br>Deploy DeepSeek-R1 using the SageMaker Python SDK<br>
<br>To get going with DeepSeek-R1 utilizing the SageMaker Python SDK, you will require to set up the SageMaker Python SDK and make certain you have the required AWS consents and environment setup. The following is a detailed code example that demonstrates how to deploy and utilize DeepSeek-R1 for inference programmatically. The code for deploying the design is provided in the Github here. You can clone the note pad and run from SageMaker Studio.<br>
<br>You can run extra requests against the predictor:<br>
<br>Implement guardrails and run reasoning with your SageMaker JumpStart predictor<br>
<br>Similar to Amazon Bedrock, you can also use 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 prevent unwanted charges, finish the actions in this section to clean up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace deployment<br>
<br>If you [deployed](http://122.51.6.973000) the model using Amazon Bedrock Marketplace, complete the following steps:<br>
<br>1. On the Amazon Bedrock console, under Foundation models in the navigation pane, select Marketplace releases.
2. In the Managed deployments section, 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 correct release: 1. Endpoint name.
2. Model name.
3. Endpoint status<br>
<br>Delete the SageMaker JumpStart predictor<br>
<br>The SageMaker JumpStart design you deployed will sustain costs 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 explored how you can access and deploy the DeepSeek-R1 model utilizing Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to start. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker JumpStart models, 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](http://140.143.226.1) for Inference at AWS. He assists emerging generative [AI](https://setiathome.berkeley.edu) [business develop](http://8.137.54.2139000) innovative solutions utilizing AWS services and accelerated calculate. Currently, he is concentrated on establishing techniques for fine-tuning and optimizing the reasoning performance of big [language](http://47.102.102.152) designs. In his free time, Vivek takes pleasure in hiking, watching films, and trying various foods.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](https://gitee.mmote.ru) Specialist Solutions Architect with the Third-Party Model Science group at AWS. His location of focus is AWS [AI](https://git.bbh.org.in) 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](https://www.guidancetaxdebt.com) with the Third-Party Model Science team at AWS.<br>
<br>Banu Nagasundaram leads product, engineering, and strategic collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative [AI](https://volunteering.ishayoga.eu) hub. She is passionate about developing solutions that help customers accelerate their [AI](https://www.scikey.ai) journey and [unlock organization](http://8.129.8.58) worth.<br>