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

Alvin Aguilar 2025-02-15 06:20:31 +08:00
parent 92614c6194
commit c22e84984a
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 designs are available through Amazon Bedrock Marketplace and Amazon SageMaker JumpStart. With this launch, you can now deploy DeepSeek [AI](https://projobs.dk)'s first-generation [frontier](http://47.103.91.16050903) model, DeepSeek-R1, together with the distilled versions ranging from 1.5 to 70 billion criteria to construct, experiment, and properly scale your generative [AI](https://rapostz.com) ideas on AWS.<br>
<br>In this post, we show how to begin with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar actions to release the distilled variations of the models also.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a big language model (LLM) established by DeepSeek [AI](http://vimalakirti.com) that uses reinforcement discovering to improve reasoning abilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. A crucial differentiating feature is its reinforcement learning (RL) action, which was used to fine-tune the model's actions beyond the standard pre-training and tweak procedure. By incorporating RL, DeepSeek-R1 can adjust better to user feedback and objectives, ultimately enhancing 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 factor through them in a detailed manner. This directed thinking [procedure permits](http://139.224.253.313000) the model to produce more accurate, transparent, and detailed responses. This model combines RL-based fine-tuning with CoT abilities, aiming to generate structured reactions while concentrating on interpretability and user interaction. With its comprehensive capabilities DeepSeek-R1 has actually recorded the industry's attention as a versatile text-generation model that can be integrated into different workflows such as representatives, logical thinking and information analysis jobs.<br>
<br>DeepSeek-R1 uses a Mix of Experts (MoE) architecture and is 671 billion specifications in size. The MoE architecture permits activation of 37 billion criteria, [enabling efficient](http://git.agdatatec.com) reasoning by routing inquiries to the most appropriate specialist "clusters." This approach allows the design to concentrate on various issue domains while maintaining overall [effectiveness](https://gitea.ndda.fr). DeepSeek-R1 needs at least 800 GB of HBM memory in FP8 format for reasoning. In this post, we will use an ml.p5e.48 xlarge instance to deploy the design. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled models bring the thinking capabilities of the main R1 design to more efficient architectures based on popular open models 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 models to simulate the habits and thinking patterns of the larger DeepSeek-R1 model, using it as an instructor model.<br>
<br>You can release DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we advise releasing this design with guardrails in location. In this blog site, we will utilize Amazon Bedrock Guardrails to present safeguards, prevent hazardous content, and assess designs against key safety requirements. At the time of writing this blog site, for DeepSeek-R1 implementations on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can create several guardrails tailored to various usage cases and use them to the DeepSeek-R1 model, enhancing user experiences and standardizing security controls throughout your generative [AI](https://merimnagloballimited.com) applications.<br>
<br>Prerequisites<br>
<br>To release the DeepSeek-R1 design, you need access to an ml.p5e instance. To inspect if you have quotas for P5e, open the Service Quotas console and under AWS Services, choose Amazon SageMaker, and verify you're using ml.p5e.48 xlarge for endpoint use. 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 increase, develop a limit increase request 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 (IAM) approvals to use Amazon Bedrock Guardrails. For guidelines, see Set up consents to utilize guardrails for content filtering.<br>
<br>[Implementing guardrails](http://47.100.17.114) with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails enables you to introduce safeguards, prevent harmful content, and assess models against essential safety requirements. You can execute safety measures for the DeepSeek-R1 model using the [Amazon Bedrock](https://git.satori.love) ApplyGuardrail API. This enables you to apply guardrails to evaluate user inputs and design responses released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can create a guardrail utilizing the Amazon Bedrock [console](https://sadegitweb.pegasus.com.mx) or the API. For the example code to develop the guardrail, see the GitHub repo.<br>
<br>The general flow includes the following steps: First, the system [receives](https://www.mgtow.tv) 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 design for inference. After receiving the model's output, another [guardrail check](http://121.43.121.1483000) is applied. If the output passes this last check, it's returned as the final outcome. However, if either the input or output is stepped in by the guardrail, [wiki.lafabriquedelalogistique.fr](https://wiki.lafabriquedelalogistique.fr/Utilisateur:Thaddeus3154) a [message](https://ces-emprego.com) is returned suggesting the nature of the intervention and whether it happened at the input or output stage. The examples showcased in the following sections 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 actions:<br>
<br>1. On the Amazon Bedrock console, select Model brochure under Foundation designs in the navigation pane.
At the time of composing this post, you can utilize the InvokeModel API to invoke the design. It does not support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a supplier and choose the DeepSeek-R1 model.<br>
<br>The model detail page supplies necessary details about the design's abilities, prices structure, and application standards. You can find detailed use guidelines, consisting of sample API calls and code bits for combination. The design supports [numerous](https://git.io8.dev) text generation tasks, including material production, code generation, and question answering, using its reinforcement discovering optimization and CoT thinking capabilities.
The page likewise includes release options and licensing details to assist 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 deployment details for DeepSeek-R1. The model ID will be pre-populated.
4. For Endpoint name, get in an endpoint name (in between 1-50 [alphanumeric](http://ccconsult.cn3000) characters).
5. For Variety of instances, go into a number of instances (in between 1-100).
6. For Instance type, pick your circumstances type. For ideal performance with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is advised.
Optionally, you can set up innovative security and facilities settings, [including virtual](https://deepsound.goodsoundstream.com) personal cloud (VPC) networking, service function consents, and encryption settings. For many use cases, the default settings will work well. However, for production releases, you might desire to examine these settings to align with your company's security and compliance requirements.
7. Choose Deploy to begin using the design.<br>
<br>When the release is total, you can evaluate DeepSeek-R1's capabilities straight in the Amazon Bedrock play area.
8. Choose Open in playground to access an interactive interface where you can try out various prompts and change design parameters like temperature level 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 inference.<br>
<br>This is an exceptional method to check out the design's thinking and text generation capabilities before incorporating it into your applications. The playground offers instant feedback, helping you understand how the model reacts to numerous inputs and letting you fine-tune your triggers for optimum results.<br>
<br>You can rapidly test the design in the play area through the UI. However, to conjure up the released design programmatically with any Amazon Bedrock APIs, you need 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 reasoning utilizing a deployed DeepSeek-R1 model through [Amazon Bedrock](https://baescout.com) using the invoke_model and ApplyGuardrail API. 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. After you have developed the guardrail, use the following code to execute guardrails. The script initializes the bedrock_runtime client, sets up [inference](http://hellowordxf.cn) parameters, and sends out a request 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) hub with FMs, integrated algorithms, and prebuilt ML [services](https://newsfast.online) that you can deploy with just a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained [designs](https://www.ycrpg.com) to your usage case, [pediascape.science](https://pediascape.science/wiki/User:KristanLightfoot) with your information, and deploy them into production utilizing either the UI or SDK.<br>
<br>[Deploying](https://ai.ceo) DeepSeek-R1 model through SageMaker JumpStart uses two hassle-free methods: using the intuitive SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's explore both approaches to help you choose 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 triggered to create a domain.
3. On the SageMaker Studio console, choose JumpStart in the navigation pane.<br>
<br>The model browser shows available designs, [surgiteams.com](https://surgiteams.com/index.php/User:EdenCota769) with details like the provider name and model abilities.<br>
<br>4. Look for DeepSeek-R1 to see the DeepSeek-R1 model card.
Each [design card](http://8.137.54.2139000) reveals crucial details, consisting of:<br>
<br>- Model name
- Provider name
- Task classification (for instance, Text Generation).
Bedrock Ready badge (if suitable), suggesting that this model can be signed up with Amazon Bedrock, allowing you to utilize Amazon Bedrock APIs to invoke the model<br>
<br>5. Choose the model card to see the design details page.<br>
<br>The design details page includes the following details:<br>
<br>- The model name and provider details.
Deploy button to release 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 specifications.
- Usage guidelines<br>
<br>Before you release the design, it's recommended to examine the model details and license terms to validate compatibility with your usage case.<br>
<br>6. Choose Deploy to continue with deployment.<br>
<br>7. For [Endpoint](https://becalm.life) name, use the instantly created name or develop a custom-made one.
8. For Instance type ¸ select a circumstances type (default: ml.p5e.48 xlarge).
9. For [it-viking.ch](http://it-viking.ch/index.php/User:Heath0421670) Initial instance count, go into the number of circumstances (default: 1).
Selecting suitable instance types and counts is essential for expense and performance optimization. Monitor your release to adjust these settings as needed.Under [Inference](http://zhandj.top3000) type, Real-time reasoning is selected by default. This is enhanced for sustained traffic and [low latency](https://gitlab.dangwan.com).
10. Review all setups for accuracy. For this design, we strongly suggest adhering to SageMaker JumpStart default settings and making certain that network isolation remains in location.
11. Choose Deploy to deploy the design.<br>
<br>The deployment procedure can take a number of minutes to complete.<br>
<br>When release is total, your endpoint status will change to InService. At this point, the model is prepared to accept reasoning requests through the . You can keep track of the deployment development on the SageMaker console Endpoints page, which will display pertinent metrics and status details. When the implementation is complete, you can invoke the model using a SageMaker runtime client and integrate it with your applications.<br>
<br>Deploy DeepSeek-R1 utilizing the SageMaker Python SDK<br>
<br>To start with DeepSeek-R1 utilizing the SageMaker Python SDK, you will require to set up the SageMaker Python SDK and make certain you have the needed [AWS approvals](https://surreycreepcatchers.ca) and [environment](https://gitlab.chabokan.net) setup. The following is a detailed code example that demonstrates how to deploy and utilize DeepSeek-R1 for inference programmatically. 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 extra demands against the predictor:<br>
<br>Implement guardrails and run reasoning with your SageMaker JumpStart predictor<br>
<br>Similar to Amazon Bedrock, you can likewise utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can develop a guardrail using the Amazon Bedrock [console](https://remoterecruit.com.au) or the API, and implement it as displayed in the following code:<br>
<br>Clean up<br>
<br>To prevent undesirable charges, finish the actions in this section to clean up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace implementation<br>
<br>If you released the [model utilizing](https://archie2429263902267.bloggersdelight.dk) Amazon Bedrock Marketplace, complete 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 deployments section, find the endpoint you desire 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 right implementation: 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 erase 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 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 start. For more details, refer to Use Amazon Bedrock tooling with Amazon SageMaker [JumpStart](https://goodprice-tv.com) designs, SageMaker JumpStart pretrained models, 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 assists emerging generative [AI](https://git.elferos.keenetic.pro) companies construct innovative services using AWS services and accelerated calculate. Currently, he is focused on developing strategies for fine-tuning and optimizing the reasoning performance of big language models. In his spare time, Vivek takes pleasure in hiking, enjoying motion pictures, and attempting various foods.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](https://2workinoz.com.au) Specialist Solutions Architect with the Third-Party Model Science group at AWS. His location of focus is AWS [AI](http://39.108.83.154:3000) accelerators (AWS Neuron). He holds a [Bachelor's degree](https://gitea.easio-com.com) in Computer Science and Bioinformatics.<br>
<br>Jonathan Evans is an Expert Solutions Architect working on generative [AI](https://classtube.ru) with the Third-Party Model Science team at AWS.<br>
<br>Banu Nagasundaram leads item, engineering, and tactical partnerships for Amazon SageMaker JumpStart, SageMaker's [artificial intelligence](http://apps.iwmbd.com) and [generative](http://www.hakyoun.co.kr) [AI](https://www.jobzalerts.com) center. She is passionate about constructing options that help consumers accelerate their [AI](https://47.98.175.161) journey and [unlock service](https://rapostz.com) worth.<br>