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

Shasta Everingham 2025-04-07 16:42:31 +03:00
commit c95462ed7e
1 changed files with 93 additions and 0 deletions

@ -0,0 +1,93 @@
<br>Today, we are excited to reveal that DeepSeek R1 distilled Llama and Qwen designs are available through Amazon Bedrock [Marketplace](http://111.230.115.1083000) and Amazon SageMaker JumpStart. With this launch, you can now release DeepSeek [AI](https://gitlab.rail-holding.lt)'s first-generation frontier model, DeepSeek-R1, in addition to the distilled variations ranging from 1.5 to 70 billion [parameters](https://massivemiracle.com) to construct, experiment, and responsibly scale your generative [AI](http://clipang.com) concepts on AWS.<br>
<br>In this post, we demonstrate how to start with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow comparable steps to release the distilled variations of the [designs](https://linkin.commoners.in) also.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a large language design (LLM) established by DeepSeek [AI](https://guyanajob.com) that utilizes support finding out to boost reasoning abilities through a multi-stage training process from a DeepSeek-V3-Base structure. A crucial identifying feature is its reinforcement learning (RL) action, which was utilized to refine the model's actions beyond the basic pre-training and fine-tuning procedure. By including RL, DeepSeek-R1 can adapt better to user feedback and goals, ultimately enhancing both significance and clearness. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) approach, indicating it's geared up to break down complicated inquiries and factor through them in a detailed way. This [guided thinking](http://gitlab.code-nav.cn) process permits the model to produce more accurate, transparent, and detailed responses. This design combines fine-tuning with CoT capabilities, aiming to create structured actions while focusing on interpretability and user interaction. With its comprehensive abilities DeepSeek-R1 has actually captured the industry's attention as a versatile text-generation design that can be incorporated into various workflows such as representatives, rational thinking and information analysis tasks.<br>
<br>DeepSeek-R1 utilizes a Mixture of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture enables activation of 37 billion specifications, enabling efficient reasoning by [routing questions](https://horizonsmaroc.com) to the most pertinent professional "clusters." This technique enables the model to concentrate on different problem [domains](http://www.jobteck.co.in) 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 model. ml.p5e.48 xlarge comes with 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled models bring the [reasoning abilities](http://travelandfood.ru) of the main R1 model to more efficient 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 models to mimic the behavior and thinking patterns of the larger DeepSeek-R1 design, using it as a [teacher design](https://gt.clarifylife.net).<br>
<br>You can deploy DeepSeek-R1 design either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we advise deploying this design with guardrails in place. In this blog site, we will use [Amazon Bedrock](https://www.greenpage.kr) Guardrails to introduce safeguards, prevent harmful content, and assess designs against crucial safety criteria. At the time of [writing](http://wp10476777.server-he.de) this blog site, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can produce numerous guardrails tailored to various use cases and use them to the DeepSeek-R1 design, enhancing user experiences and standardizing security controls across your generative [AI](http://funnydollar.ru) applications.<br>
<br>Prerequisites<br>
<br>To deploy the DeepSeek-R1 model, you [require access](https://tj.kbsu.ru) 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 confirm you're utilizing ml.p5e.48 xlarge for endpoint use. Make certain that you have at least one ml.P5e.48 xlarge instance in the AWS Region you are releasing. To ask for a limit increase, create a limitation increase demand and reach out to your account team.<br>
<br>Because you will be releasing this design with Amazon Bedrock Guardrails, make certain you have the proper AWS Identity and Gain Access To [Management](https://repo.serlink.es) (IAM) permissions to utilize Amazon Bedrock Guardrails. For instructions, see Set up authorizations to use guardrails for material filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails enables you to present safeguards, prevent harmful content, and assess models against crucial security criteria. You can implement safety steps for the DeepSeek-R1 model utilizing the Amazon Bedrock ApplyGuardrail API. This enables you to use guardrails to examine user inputs and model responses released 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 produce the guardrail, see the GitHub repo.<br>
<br>The basic flow includes the following steps: First, the system gets an input for the design. This input is then processed through the [ApplyGuardrail API](https://www.meetgr.com). If the input passes the guardrail check, it's sent to the model for reasoning. After getting the design's output, another guardrail check is used. If the output passes this last check, it's returned as the last 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 occurred at the input or output phase. The examples showcased in the following areas demonstrate inference using 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 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, choose Model brochure under Foundation designs in the navigation pane.
At the time of composing this post, you can use the InvokeModel API to invoke the model. It does not support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a company and pick the DeepSeek-R1 design.<br>
<br>The model detail page offers necessary details about the design's capabilities, prices structure, and application standards. You can discover detailed usage instructions, including sample API calls and code bits for integration. The design supports various text generation jobs, consisting of content creation, code generation, and question answering, using its reinforcement finding out optimization and CoT thinking abilities.
The page also includes implementation options and licensing details to help you get going with DeepSeek-R1 in your applications.
3. To begin utilizing DeepSeek-R1, choose Deploy.<br>
<br>You will be prompted to configure the deployment details for DeepSeek-R1. The design ID will be pre-populated.
4. For Endpoint name, get in an endpoint name (in between 1-50 alphanumeric characters).
5. For Number of instances, go into a variety of instances (in between 1-100).
6. For example type, pick your instance type. For optimum efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is [advised](https://careerworksource.org).
Optionally, you can configure innovative security and facilities settings, [including virtual](http://git.hnits360.com) private cloud (VPC) networking, [service](https://edtech.wiki) role permissions, and encryption settings. For a lot of utilize cases, the default settings will work well. However, for production deployments, you may wish to evaluate these settings to line up with your organization's security and compliance requirements.
7. Choose Deploy to start utilizing the model.<br>
<br>When the deployment is complete, you can evaluate DeepSeek-R1's capabilities straight in the Amazon Bedrock playground.
8. Choose Open in playground to access an interactive interface where you can explore different prompts and adjust design criteria like temperature and optimum length.
When using R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat template for optimum outcomes. For instance, content for reasoning.<br>
<br>This is an exceptional way to explore the design's reasoning and text generation abilities before incorporating it into your applications. The play ground provides instant feedback, assisting you comprehend how the model reacts to different inputs and letting you fine-tune your prompts for optimal results.<br>
<br>You can [rapidly check](https://newsfast.online) the design in the play area through the UI. However, to invoke the released design programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.<br>
<br>Run reasoning utilizing guardrails with the deployed DeepSeek-R1 endpoint<br>
<br>The following code example shows how to carry out inference using a deployed DeepSeek-R1 model through Amazon Bedrock utilizing the invoke_model and [ApplyGuardrail API](http://whai.space3000). You can develop 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, utilize the following code to carry out guardrails. The script initializes the bedrock_[runtime](https://git.fpghoti.com) client, sets up reasoning criteria, and sends out a demand to generate text based on a user prompt.<br>
<br>Deploy DeepSeek-R1 with SageMaker JumpStart<br>
<br>SageMaker JumpStart is an artificial intelligence (ML) center with FMs, integrated algorithms, and prebuilt ML [solutions](https://hr-2b.su) that you can deploy with simply 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 provides two practical techniques: using the user-friendly SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's check out both techniques to assist you pick the approach that best fits your needs.<br>
<br>Deploy DeepSeek-R1 through SageMaker JumpStart UI<br>
<br>Complete the following steps to deploy DeepSeek-R1 utilizing SageMaker JumpStart:<br>
<br>1. On the SageMaker console, choose 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 internet browser displays available designs, with details like the supplier name and design capabilities.<br>
<br>4. Look for DeepSeek-R1 to see the DeepSeek-R1 model card.
Each design card reveals crucial details, consisting of:<br>
<br>- Model name
- Provider name
- Task classification (for instance, Text Generation).
Bedrock Ready badge (if applicable), showing that this model can be registered with Amazon Bedrock, permitting you to use Amazon Bedrock APIs to invoke the model<br>
<br>5. Choose the design card to see the model details page.<br>
<br>The model details page consists of the following details:<br>
<br>- The design name and supplier details.
Deploy button to release the design.
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 requirements.
- Usage guidelines<br>
<br>Before you deploy the design, it's suggested to review the model details and license terms to verify compatibility with your use case.<br>
<br>6. Choose Deploy to [continue](https://edurich.lk) with implementation.<br>
<br>7. For Endpoint name, use the [automatically generated](https://edge1.co.kr) name or develop a custom one.
8. For example type ¸ select a circumstances type (default: ml.p5e.48 xlarge).
9. For Initial instance count, go into the number of circumstances (default: 1).
Selecting appropriate circumstances types and counts is vital for [expense](http://bc.zycoo.com3000) and performance optimization. Monitor your implementation to adjust these settings as needed.Under Inference type, Real-time inference is selected by default. This is enhanced for sustained traffic and low latency.
10. Review all setups for accuracy. For this model, we [highly advise](https://epspatrolscv.com) [sticking](https://git.cloudtui.com) to SageMaker JumpStart default settings and making certain that network seclusion remains in location.
11. Choose Deploy to deploy the design.<br>
<br>The [implementation process](https://links.gtanet.com.br) can take several minutes to finish.<br>
<br>When release 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 appropriate metrics and status details. When the [implementation](https://www.wtfbellingham.com) is total, you can conjure up the design utilizing a SageMaker runtime customer and incorporate it with your applications.<br>
<br>Deploy DeepSeek-R1 utilizing the SageMaker Python SDK<br>
<br>To get started with DeepSeek-R1 using the SageMaker Python SDK, you will need to install the SageMaker Python SDK and make certain you have the essential AWS consents and environment setup. The following is a [detailed code](http://8.137.85.1813000) example that [demonstrates](https://dlya-nas.com) how to release and use DeepSeek-R1 for inference programmatically. The code for releasing the design is supplied 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 inference with your [SageMaker JumpStart](https://blogram.online) predictor<br>
<br>Similar to Amazon Bedrock, you can likewise use the ApplyGuardrail API with your SageMaker JumpStart predictor. You can create a guardrail utilizing the Amazon Bedrock console or the API, and execute it as displayed in the following code:<br>
<br>Clean up<br>
<br>To avoid unwanted charges, finish the actions in this area to tidy up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace deployment<br>
<br>If you deployed the model using Amazon Bedrock Marketplace, complete the following actions:<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 want to delete.
3. Select the endpoint, and on the Actions menu, choose Delete.
4. Verify the endpoint details to make certain you're deleting the proper release: 1. Endpoint name.
2. Model name.
3. [Endpoint](http://119.45.49.2123000) status<br>
<br>Delete the SageMaker JumpStart predictor<br>
<br>The SageMaker JumpStart design you released will sustain expenses 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](http://120.55.164.2343000).<br>
<br>Conclusion<br>
<br>In this post, we explored how you can access and release the DeepSeek-R1 design 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](http://165.22.249.528888) JumpStart designs, SageMaker JumpStart [pretrained](http://jolgoo.cn3000) designs, Amazon SageMaker JumpStart Foundation Models, Amazon Bedrock Marketplace, and Beginning 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](https://www.klartraum-wiki.de) generative [AI](https://www.fundable.com) business develop ingenious services utilizing AWS services and [engel-und-waisen.de](http://www.engel-und-waisen.de/index.php/Benutzer:JWOPearline) sped up compute. Currently, he is focused on establishing techniques for fine-tuning and optimizing the [reasoning performance](https://agalliances.com) of big language models. In his downtime, Vivek enjoys treking, viewing films, and trying various cuisines.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](https://www.worlddiary.co) Specialist Solutions Architect with the Third-Party Model Science team at AWS. His location of focus is AWS [AI](https://git.hichinatravel.com) accelerators (AWS Neuron). He holds a Bachelor's degree in Computer technology and Bioinformatics.<br>
<br>Jonathan Evans is an Expert Solutions Architect dealing with generative [AI](https://www.weben.online) with the Third-Party Model Science team at AWS.<br>
<br>Banu Nagasundaram leads product, engineering, and strategic partnerships for Amazon SageMaker JumpStart, SageMaker's artificial [intelligence](http://ccconsult.cn3000) and [generative](http://115.238.142.15820182) [AI](https://talentocentroamerica.com) center. She is passionate about developing options that assist customers accelerate their [AI](http://carpediem.so:30000) journey and [unlock business](https://gitea.alexandermohan.com) worth.<br>