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

Brian Mawson 2025-03-01 15:43:40 +08:00
commit 9cae6561bb
1 changed files with 93 additions and 0 deletions

@ -0,0 +1,93 @@
<br>Today, we are delighted 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://git.muhammadfahri.com)'s first-generation frontier model, DeepSeek-R1, along with the distilled versions varying from 1.5 to 70 billion parameters to build, experiment, and properly scale your generative [AI](http://42.192.80.21) ideas on AWS.<br>
<br>In this post, we show how to get going with DeepSeek-R1 on Amazon Bedrock Marketplace and [SageMaker JumpStart](https://ubuntushows.com). You can follow similar actions to deploy the distilled versions 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://chhng.com) that utilizes reinforcement finding out to improve reasoning capabilities through a multi-stage training process from a DeepSeek-V3-Base structure. A [key differentiating](https://bertlierecruitment.co.za) function is its support knowing (RL) step, which was used to refine the design's reactions beyond the basic pre-training and tweak procedure. By including RL, DeepSeek-R1 can adjust more efficiently to user feedback and objectives, ultimately boosting both [significance](https://cameotv.cc) and [wiki.vst.hs-furtwangen.de](https://wiki.vst.hs-furtwangen.de/wiki/User:ClaudetteYwg) clarity. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) method, meaning it's equipped to break down complex inquiries and factor through them in a detailed way. This directed thinking process allows the model to produce more precise, transparent, and detailed responses. This design combines RL-based fine-tuning with CoT abilities, aiming to produce structured actions while concentrating on interpretability and user interaction. With its comprehensive abilities DeepSeek-R1 has captured the market's attention as a versatile text-generation model that can be incorporated into different 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 specifications in size. The MoE architecture allows activation of 37 billion parameters, allowing efficient inference by routing inquiries to the most pertinent professional "clusters." This method permits the model to concentrate on different issue domains while maintaining general efficiency. DeepSeek-R1 needs a minimum of 800 GB of HBM memory in FP8 format for inference. In this post, we will use an ml.p5e.48 [xlarge instance](https://wishjobs.in) to deploy 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 thinking abilities of the main R1 model to more efficient architectures based on [popular](https://thebigme.cc3000) open models like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation refers to a process of training smaller, more efficient designs to imitate the behavior and thinking patterns of the larger DeepSeek-R1 model, using it as a teacher design.<br>
<br>You can release DeepSeek-R1 design either through [SageMaker JumpStart](http://www.fasteap.cn3000) or Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we advise deploying this model with guardrails in place. In this blog, we will use Amazon Bedrock Guardrails to [introduce](https://trustemployement.com) safeguards, avoid hazardous content, and assess models against crucial safety requirements. At the time of writing this blog site, for DeepSeek-R1 releases on SageMaker JumpStart and Bedrock Marketplace, [Bedrock Guardrails](https://sportify.brandnitions.com) supports only the ApplyGuardrail API. You can produce numerous [guardrails](https://uedf.org) tailored to various usage cases and use them to the DeepSeek-R1 design, enhancing user experiences and standardizing security controls throughout your generative [AI](https://git.esc-plus.com) applications.<br>
<br>Prerequisites<br>
<br>To release the DeepSeek-R1 design, you need access to an ml.p5e instance. To check if you have quotas for P5e, open the Service Quotas console and under AWS Services, select Amazon SageMaker, and validate you're using 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](http://120.26.108.2399188). To ask for a limit increase, develop a limit boost request and connect to your account group.<br>
<br>Because you will be [deploying](https://www.webthemes.ca) this model with Amazon Bedrock Guardrails, make certain you have the appropriate AWS Identity and Gain Access To Management (IAM) [approvals](https://lets.chchat.me) to use Amazon Bedrock Guardrails. For guidelines, see Set up consents to use guardrails for content filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails enables you to introduce safeguards, avoid harmful material, and examine designs against crucial security criteria. You can carry out security procedures for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This allows you to apply guardrails to assess user inputs and design reactions released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can create a guardrail using the Amazon Bedrock [console](http://195.58.37.180) or the API. For the example code to create the guardrail, see the [GitHub repo](https://sb.mangird.com).<br>
<br>The basic flow includes the following actions: First, the system gets an input for the design. This input is then processed through the ApplyGuardrail API. If the input passes the guardrail check, it's sent to the design for reasoning. After [receiving](http://1.92.66.293000) the [design's](http://travelandfood.ru) output, another guardrail check is used. If the output passes this last check, it's returned as the final result. However, if either the input or output is stepped in by the guardrail, a message is [returned](https://profesional.id) showing the nature of the intervention and whether it happened at the input or output stage. 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 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, select Model brochure under [Foundation models](https://sportify.brandnitions.com) in the navigation pane.
At the time of composing this post, you can utilize the InvokeModel API to [conjure](https://nodlik.com) up the model. 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 design detail page important details about the design's capabilities, prices structure, and implementation guidelines. You can find detailed use directions, consisting of sample API calls and [code bits](https://daeshintravel.com) for integration. The model supports different text generation tasks, consisting of material creation, code generation, and [concern](https://kkhelper.com) answering, utilizing its reinforcement finding out optimization and CoT thinking abilities.
The page likewise consists of implementation alternatives and licensing details to assist you get begun with DeepSeek-R1 in your applications.
3. To start using 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](http://profilsjob.com) characters).
5. For Number of circumstances, go into a variety of instances (between 1-100).
6. For Instance type, select your instance type. For optimum efficiency with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is suggested.
Optionally, you can set up advanced security and infrastructure settings, including virtual personal cloud (VPC) networking, service role approvals, and file encryption settings. For most utilize cases, the default settings will work well. However, for production deployments, you may wish to review these settings to align with your [company's security](https://skillfilltalent.com) and compliance requirements.
7. Choose Deploy to start using the model.<br>
<br>When the deployment is total, you can test DeepSeek-R1's capabilities straight in the Amazon Bedrock playground.
8. Choose Open in play area to access an interactive user interface where you can try out different prompts and adjust model criteria like temperature level and optimum length.
When using R1 with Bedrock's InvokeModel and Playground Console, utilize DeepSeek's chat template for optimal outcomes. For instance, material for reasoning.<br>
<br>This is an excellent way to explore the model's reasoning and text generation capabilities before integrating it into your applications. The play area offers instant feedback, helping you understand how the design reacts to different inputs and letting you tweak your prompts for optimal outcomes.<br>
<br>You can rapidly check the model in the play ground through the UI. However, to conjure up the released design programmatically with any Amazon Bedrock APIs, you require to get the endpoint ARN.<br>
<br>Run inference using guardrails with the deployed DeepSeek-R1 endpoint<br>
<br>The following code example demonstrates how to perform inference using a released DeepSeek-R1 model 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 execute guardrails. The script initializes the bedrock_runtime client, sets up reasoning criteria, and sends a request to generate text based upon a user timely.<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 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 deploy them into production using either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 design through SageMaker JumpStart uses 2 hassle-free approaches: using the intuitive SageMaker [JumpStart UI](https://gamehiker.com) or carrying out programmatically through the [SageMaker Python](http://83.151.205.893000) SDK. Let's check out both approaches to assist you select the technique that finest fits your requirements.<br>
<br>Deploy DeepSeek-R1 through [SageMaker JumpStart](http://chkkv.cn3000) UI<br>
<br>Complete the following [actions](http://118.190.175.1083000) to deploy DeepSeek-R1 using 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 design browser shows available models, with details like the supplier name and design capabilities.<br>
<br>4. Look for DeepSeek-R1 to see the DeepSeek-R1 design card.
Each model card shows key details, consisting of:<br>
<br>- Model name
- Provider name
- Task classification (for instance, Text Generation).
Bedrock Ready badge (if appropriate), indicating that this model can be signed up with Amazon Bedrock, permitting you to use Amazon Bedrock APIs to conjure up the design<br>
<br>5. Choose the design card to view the design details page.<br>
<br>The design details page consists of the following details:<br>
<br>- The model name and supplier details.
Deploy button to release the design.
About and Notebooks tabs with detailed details<br>
<br>The About tab includes important details, such as:<br>
<br>- Model description.
- License details.
[- Technical](https://skilling-india.in) specs.
- Usage standards<br>
<br>Before you release the design, it's recommended to examine the design details and license terms to verify compatibility with your use case.<br>
<br>6. Choose Deploy to continue with release.<br>
<br>7. For Endpoint name, use the instantly produced name or produce a customized one.
8. For example type ¸ choose a circumstances type (default: ml.p5e.48 xlarge).
9. For Initial circumstances count, get in the variety of circumstances (default: 1).
Selecting suitable [circumstances types](http://8.137.54.2139000) and counts is vital for cost and efficiency optimization. Monitor your deployment to change 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 configurations 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 deploy the model.<br>
<br>The release process can take a number of minutes to finish.<br>
<br>When deployment is complete, your endpoint status will alter to InService. At this moment, the design is all set to accept reasoning demands through the endpoint. You can keep track of the release development on the SageMaker console Endpoints page, which will display pertinent metrics and status details. When the deployment is total, you can invoke the design utilizing a SageMaker runtime client and incorporate it with your [applications](https://skillfilltalent.com).<br>
<br>Deploy DeepSeek-R1 using the [SageMaker Python](http://gitea.smartscf.cn8000) SDK<br>
<br>To get started with DeepSeek-R1 using the SageMaker Python SDK, you will require to install the SageMaker Python SDK and make certain you have the required AWS approvals and environment setup. The following is a detailed code example that shows how to deploy and use DeepSeek-R1 for inference programmatically. The code for releasing the design is [offered](http://wcipeg.com) in the Github here. You can clone the note pad and range from SageMaker Studio.<br>
<br>You can run additional 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 develop a guardrail using the Amazon Bedrock console or the API, and implement it as [displayed](https://tobesmart.co.kr) in the following code:<br>
<br>Clean up<br>
<br>To avoid [unwanted](https://theglobalservices.in) charges, complete the steps in this area to clean up your [resources](http://travelandfood.ru).<br>
<br>Delete the Amazon Bedrock Marketplace release<br>
<br>If you deployed the design utilizing Amazon Bedrock Marketplace, complete the following actions:<br>
<br>1. On the Amazon Bedrock console, under Foundation models in the navigation pane, pick Marketplace deployments.
2. In the Managed implementations section, find the endpoint you want to erase.
3. Select the endpoint, and on the Actions menu, select Delete.
4. Verify the endpoint details to make certain you're deleting the proper release: 1. Endpoint name.
2. Model name.
3. Endpoint status<br>
<br>Delete the SageMaker JumpStart predictor<br>
<br>The SageMaker JumpStart model you released 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 using Bedrock Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to get started. For more details, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart models, SageMaker JumpStart pretrained models, [Amazon SageMaker](https://novashop6.com) JumpStart Foundation Models, Amazon Bedrock Marketplace, and Starting with Amazon SageMaker JumpStart.<br>
<br>About the Authors<br>
<br>[Vivek Gangasani](https://bdstarter.com) is a Lead Specialist Solutions Architect for Inference at AWS. He assists emerging generative [AI](http://120.48.141.82:3000) business develop innovative services using AWS services and accelerated compute. Currently, he is focused on developing methods for fine-tuning and enhancing the inference efficiency of large language designs. In his downtime, Vivek delights in treking, enjoying films, and attempting various cuisines.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](https://git.cloud.exclusive-identity.net) Specialist Solutions Architect with the Third-Party Model Science team at AWS. His location of focus is AWS [AI](https://kollega.by) [accelerators](https://somkenjobs.com) (AWS Neuron). He holds a Bachelor's degree in Computer technology and Bioinformatics.<br>
<br>Jonathan Evans is a Professional Solutions Architect dealing with generative [AI](http://158.160.20.3:3000) with the Third-Party Model Science group at AWS.<br>
<br>Banu Nagasundaram leads product, engineering, and strategic collaborations for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative [AI](http://51.75.64.148) center. She is passionate about building services that assist clients accelerate their [AI](http://globalchristianjobs.com) journey and unlock service value.<br>