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

Alphonse Gersten 2025-03-05 21:36:49 +08:00
parent 138e5eb264
commit 7967ca524c

@ -0,0 +1,93 @@
<br>Today, we are thrilled to reveal that DeepSeek R1 distilled Llama and Qwen designs are available through Amazon Bedrock Marketplace and [Amazon SageMaker](https://xhandler.com) JumpStart. With this launch, you can now [deploy DeepSeek](https://beta.hoofpick.tv) [AI](http://deve.work:3000)'s first-generation frontier model, DeepSeek-R1, together with the distilled variations ranging from 1.5 to 70 billion criteria to construct, experiment, and responsibly scale your generative [AI](https://busanmkt.com) 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 deploy the distilled variations of the designs too.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a large language model (LLM) established by DeepSeek [AI](http://git.jaxc.cn) that uses reinforcement finding out to boost reasoning abilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. A crucial differentiating function is its support knowing (RL) step, which was used to improve the design's responses beyond the standard pre-training and fine-tuning process. By including RL, DeepSeek-R1 can adjust more successfully to user feedback and objectives, eventually improving both importance and clearness. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) technique, meaning it's geared up to break down complicated inquiries and factor through them in a detailed way. This guided thinking procedure allows the model to produce more precise, transparent, and detailed answers. This model combines [RL-based](https://www.lokfuehrer-jobs.de) fine-tuning with CoT abilities, aiming to create [structured responses](https://rabota.newrba.ru) while focusing on interpretability and user interaction. With its extensive abilities DeepSeek-R1 has captured the [market's attention](http://ep210.co.kr) as a flexible text-generation model that can be incorporated into various workflows such as representatives, rational reasoning and information interpretation tasks.<br>
<br>DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture enables activation of 37 billion parameters, allowing efficient inference by routing inquiries to the most relevant specialist "clusters." This method enables the design to concentrate on different issue domains while maintaining total performance. DeepSeek-R1 requires at least 800 GB of HBM memory in FP8 format for reasoning. In this post, we will utilize an ml.p5e.48 xlarge instance to release the design. ml.p5e.48 xlarge comes with 8 Nvidia H200 GPUs providing 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled designs bring the reasoning capabilities 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 describes a procedure of training smaller sized, more efficient designs to imitate the habits and reasoning patterns of the larger DeepSeek-R1 model, utilizing it as a teacher model.<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 design with guardrails in location. In this blog, we will use Amazon Bedrock [Guardrails](https://runningas.co.kr) to introduce safeguards, prevent damaging material, and assess designs against crucial security requirements. At the time of composing this blog, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can develop multiple guardrails tailored to various usage cases and use them to the DeepSeek-R1 design, improving user experiences and standardizing security controls throughout your generative [AI](https://www.miptrucking.net) applications.<br>
<br>Prerequisites<br>
<br>To release the DeepSeek-R1 design, [wiki-tb-service.com](http://wiki-tb-service.com/index.php?title=Benutzer:TobiasChristison) you require access to an ml.p5e instance. 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 usage. Make certain that you have at least one ml.P5e.48 xlarge instance in the AWS Region you are deploying. To request a limitation increase, produce a limit increase demand and reach out to your [account](https://zkml-hub.arml.io) group.<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) permissions to utilize Amazon Bedrock Guardrails. For guidelines, see Set up permissions to use guardrails for [material filtering](https://diskret-mote-nodeland.jimmyb.nl).<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails permits you to introduce safeguards, avoid hazardous material, and evaluate models against key security criteria. You can execute precaution for the DeepSeek-R1 model utilizing the Amazon Bedrock ApplyGuardrail API. This permits you to use [guardrails](https://job4thai.com) to examine user inputs and design reactions deployed on Amazon Bedrock Marketplace and SageMaker JumpStart. You can develop 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 circulation includes the following steps: First, the system receives an input for the model. This input is then processed through the ApplyGuardrail API. If the input passes the guardrail check, it's sent to the model for inference. After getting the design's output, another guardrail check is applied. If the output passes this last check, it's returned as the final outcome. 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 happened at the input or output phase. The examples showcased in the following areas show [reasoning utilizing](https://allcollars.com) this API.<br>
<br>Deploy DeepSeek-R1 in Amazon Bedrock Marketplace<br>
<br>Amazon Bedrock [Marketplace](https://origintraffic.com) 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 steps:<br>
<br>1. On the Amazon Bedrock console, pick Model catalog under Foundation designs in the navigation pane.
At the time of writing this post, you can utilize the InvokeModel API to conjure up the design. It doesn't support Converse APIs and other Amazon Bedrock [tooling](https://admithel.com).
2. Filter for DeepSeek as a service provider and select the DeepSeek-R1 design.<br>
<br>The design detail page provides important details about the design's capabilities, prices structure, and application standards. You can discover detailed usage instructions, consisting of sample API calls and code snippets for combination. The model supports different text generation tasks, consisting of material creation, code generation, and concern answering, utilizing its support finding out optimization and CoT reasoning capabilities.
The page likewise includes deployment alternatives and licensing details to assist you begin with DeepSeek-R1 in your applications.
3. To [start utilizing](http://120.201.125.1403000) DeepSeek-R1, choose Deploy.<br>
<br>You will be prompted to configure the release details for DeepSeek-R1. The design ID will be pre-populated.
4. For Endpoint name, [archmageriseswiki.com](http://archmageriseswiki.com/index.php/User:DustinThow82333) go into an endpoint name (between 1-50 alphanumeric characters).
5. For Number of instances, go into a variety of instances (in between 1-100).
6. For example type, select your instance type. For [ideal efficiency](https://surgiteams.com) with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is suggested.
Optionally, you can configure sophisticated security and facilities settings, consisting of virtual personal cloud (VPC) networking, service function permissions, and encryption settings. For many utilize cases, the default settings will work well. However, for production deployments, you may wish to examine these settings to line up with your organization's security and compliance requirements.
7. Choose Deploy to start using the model.<br>
<br>When the release is complete, you can evaluate DeepSeek-R1's abilities straight in the Amazon Bedrock playground.
8. Choose Open in playground to access an interactive user interface where you can explore different prompts and change design criteria like temperature and optimum length.
When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for optimal results. For instance, material for inference.<br>
<br>This is an exceptional way to check out the design's reasoning and text generation abilities before incorporating it into your applications. The playground provides immediate feedback, helping you comprehend how the model reacts to numerous inputs and [letting](http://rernd.com) you fine-tune your prompts for optimum results.<br>
<br>You can rapidly check the model in the play ground through the UI. However, to conjure up the deployed model programmatically with any Amazon Bedrock APIs, you need 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 using a deployed DeepSeek-R1 model through Amazon Bedrock using the invoke_model and ApplyGuardrail API. You can create a guardrail using the Amazon Bedrock console or the API. For the example code to produce the guardrail, see the GitHub repo. After you have created the guardrail, use the following code to execute guardrails. The script initializes the bedrock_runtime customer, sets up [inference](https://gulfjobwork.com) parameters, and sends a request to create text based on a user prompt.<br>
<br>Deploy DeepSeek-R1 with SageMaker JumpStart<br>
<br>SageMaker JumpStart is an artificial [intelligence](http://epsontario.com) (ML) hub with FMs, integrated algorithms, and prebuilt ML options that you can deploy with simply a few clicks. With SageMaker JumpStart, you can tailor pre-trained designs to your use case, with your data, and deploy them into production using either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 design through SageMaker JumpStart provides 2 practical approaches: utilizing the user-friendly SageMaker JumpStart UI or executing programmatically through the [SageMaker Python](http://35.207.205.183000) SDK. Let's explore both techniques to assist you pick the method that finest fits your requirements.<br>
<br>Deploy DeepSeek-R1 through SageMaker JumpStart UI<br>
<br>Complete the following actions to release DeepSeek-R1 utilizing SageMaker JumpStart:<br>
<br>1. On the SageMaker console, select Studio in the navigation pane.
2. First-time users will be prompted to create a domain.
3. On the SageMaker Studio console, select JumpStart in the navigation pane.<br>
<br>The model internet browser displays available designs, with details like the company name and model abilities.<br>
<br>4. Search for DeepSeek-R1 to view the DeepSeek-R1 design card.
Each model card reveals essential details, consisting of:<br>
<br>- Model name
- Provider name
- Task category (for instance, Text Generation).
Bedrock Ready badge (if relevant), showing that this design can be signed up with Amazon Bedrock, enabling you to use Amazon Bedrock APIs to conjure up the design<br>
<br>5. Choose the design card to see the model details page.<br>
<br>The design details page consists of the following details:<br>
<br>- The design name and supplier details.
Deploy button 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 release the model, it's recommended to evaluate the model details and license terms to verify compatibility with your usage case.<br>
<br>6. Choose Deploy to proceed with release.<br>
<br>7. For Endpoint name, utilize the automatically created name or produce a custom-made one.
8. For example type ¸ select a circumstances type (default: ml.p5e.48 xlarge).
9. For Initial circumstances count, get in the number of circumstances (default: 1).
Selecting proper instance types and counts is vital for cost and performance optimization. Monitor your implementation to change these settings as needed.Under Inference type, [Real-time reasoning](https://blkbook.blactive.com) is chosen by default. This is enhanced for sustained traffic and low latency.
10. Review all setups for accuracy. For this design, we strongly recommend sticking to SageMaker JumpStart default settings and making certain that network isolation remains in location.
11. Choose Deploy to release the model.<br>
<br>The implementation process can take a number of minutes to finish.<br>
<br>When [deployment](http://124.70.149.1810880) is total, your [endpoint status](http://120.77.67.22383) will alter to InService. At this moment, the model is prepared to accept reasoning demands through the endpoint. You can keep an eye on the release progress on the SageMaker console Endpoints page, which will display relevant [metrics](https://git.todayisyou.co.kr) and status details. When the deployment is complete, you can invoke the design using a SageMaker runtime client and integrate it with your applications.<br>
<br>Deploy DeepSeek-R1 using the SageMaker Python SDK<br>
<br>To get going with DeepSeek-R1 using the SageMaker Python SDK, you will need to install the SageMaker Python SDK and make certain you have the needed AWS authorizations and environment setup. The following is a detailed code example that demonstrates how to deploy and use DeepSeek-R1 for inference programmatically. The code for deploying the design is offered 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, [systemcheck-wiki.de](https://systemcheck-wiki.de/index.php?title=Benutzer:CooperDalgety4) you can likewise utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can produce a guardrail utilizing the Amazon Bedrock console or the API, and implement it as revealed in the following code:<br>
<br>Clean up<br>
<br>To avoid undesirable charges, complete the steps in this area to tidy up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace deployment<br>
<br>If you deployed the design using Amazon Bedrock Marketplace, complete the following steps:<br>
<br>1. On the Amazon Bedrock console, under Foundation designs in the navigation pane, select Marketplace implementations.
2. In the Managed implementations section, 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 deleting the appropriate deployment: 1. [Endpoint](http://ipc.gdguanhui.com3001) name.
2. Model name.
3. Endpoint status<br>
<br>Delete the SageMaker JumpStart predictor<br>
<br>The SageMaker JumpStart design you deployed will sustain expenses if you leave it running. Use the following code to erase the endpoint if you desire to stop sustaining charges. For more details, see Delete Endpoints and Resources.<br>
<br>Conclusion<br>
<br>In this post, we [checked](http://47.92.149.1533000) out how you can access and deploy the DeepSeek-R1 design using Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to get going. For more details, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart [pretrained](https://www.cvgods.com) designs, [Amazon SageMaker](http://gsrl.uk) 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://dztrader.com) companies construct innovative solutions using AWS services and [trademarketclassifieds.com](https://trademarketclassifieds.com/user/profile/2684771) sped up calculate. Currently, he is focused on establishing methods for fine-tuning and enhancing the inference efficiency of large language models. In his complimentary time, Vivek delights in hiking, seeing films, and trying various foods.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](https://tubevieu.com) Specialist Solutions Architect with the Third-Party Model Science team at AWS. His area of focus is AWS [AI](http://doosung1.co.kr) 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://team.pocketuniversity.cn) 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 and [generative](https://arbeitsschutz-wiki.de) [AI](https://www.trappmasters.com) hub. She is enthusiastic about developing options that help customers accelerate their [AI](https://diskret-mote-nodeland.jimmyb.nl) journey and unlock organization worth.<br>