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

Alecia Genovese 2025-02-16 14:13:20 +08:00
parent 59180487c2
commit 2cd837c5ad

@ -0,0 +1,93 @@
<br>Today, we are delighted to reveal that DeepSeek R1 distilled Llama and Qwen models are available through Amazon Bedrock Marketplace and Amazon SageMaker JumpStart. With this launch, you can now deploy DeepSeek [AI](https://jobs.cntertech.com)'s first-generation frontier model, DeepSeek-R1, in addition to the distilled variations varying from 1.5 to 70 billion criteria to build, experiment, and responsibly scale your generative [AI](http://190.117.85.58:8095) ideas on AWS.<br>
<br>In this post, we demonstrate how to get going with DeepSeek-R1 on Amazon Bedrock Marketplace and SageMaker JumpStart. You can follow similar actions to deploy the distilled variations of the models as well.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a big language model (LLM) developed by DeepSeek [AI](http://gitea.digiclib.cn:801) that utilizes support finding out to improve thinking abilities through a [multi-stage training](http://47.107.126.1073000) procedure from a DeepSeek-V3-Base foundation. A crucial differentiating feature is its support learning (RL) action, which was utilized to fine-tune the model's reactions beyond the basic pre-training and tweak process. By incorporating RL, DeepSeek-R1 can adapt better to user feedback and goals, eventually improving both relevance and [clearness](https://tubechretien.com). In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) approach, implying it's equipped to break down complex inquiries and reason through them in a detailed manner. This guided thinking procedure enables the model to produce more precise, transparent, and detailed answers. This [design combines](https://git.itk.academy) RL-based fine-tuning with CoT capabilities, aiming to generate structured responses while focusing on interpretability and user interaction. With its [comprehensive abilities](http://shenjj.xyz3000) DeepSeek-R1 has actually caught the market's attention as a versatile text-generation model that can be integrated into numerous workflows such as representatives, sensible thinking and information analysis tasks.<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 criteria, allowing efficient reasoning by routing inquiries to the most [relevant](https://it-storm.ru3000) expert "clusters." This approach allows the model to concentrate on various issue domains while maintaining total effectiveness. 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 instance to release the design. ml.p5e.48 xlarge features 8 Nvidia H200 GPUs providing 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 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 designs to [imitate](https://wiki.communitydata.science) the habits and reasoning patterns of the larger DeepSeek-R1 design, using it as an instructor design.<br>
<br>You can deploy DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we suggest deploying this design with guardrails in place. In this blog, we will use Amazon Bedrock Guardrails to introduce safeguards, prevent damaging content, and evaluate designs against key security requirements. At the time of composing this blog, for DeepSeek-R1 deployments on SageMaker JumpStart and Bedrock Marketplace, Bedrock Guardrails supports just the ApplyGuardrail API. You can create numerous guardrails tailored to various use cases and use them to the DeepSeek-R1 design, improving user experiences and standardizing security controls throughout your generative [AI](https://www.ayc.com.au) applications.<br>
<br>Prerequisites<br>
<br>To release the DeepSeek-R1 model, 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, [wiki.vst.hs-furtwangen.de](https://wiki.vst.hs-furtwangen.de/wiki/User:PoppyForand) pick 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 instance in the AWS Region you are deploying. To ask for a limitation boost, produce a limitation increase request and connect to your account team.<br>
<br>Because you will be releasing this model with Amazon Bedrock Guardrails, make certain you have the right AWS Identity and Gain Access To Management (IAM) authorizations to use Amazon Bedrock Guardrails. For instructions, see Establish consents to use guardrails for [surgiteams.com](https://surgiteams.com/index.php/User:EdenCota769) content filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails permits you to introduce safeguards, [setiathome.berkeley.edu](https://setiathome.berkeley.edu/view_profile.php?userid=11925076) prevent harmful content, and evaluate models against key safety requirements. You can carry out safety measures for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This permits you to use guardrails to evaluate user inputs and model reactions released on Amazon Bedrock Marketplace and SageMaker JumpStart. You can create a guardrail using the Amazon Bedrock console or the API. For the example code to create the guardrail, see the GitHub repo.<br>
<br>The basic circulation involves 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 design for reasoning. After getting the design's output, another guardrail check is used. If the output passes this final check, it's returned as the outcome. However, if either the input or output is intervened by the guardrail, a message is returned suggesting the nature of the intervention and whether it occurred 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](https://gitea.chofer.ddns.net) Marketplace<br>
<br>Amazon Bedrock Marketplace gives you access to over 100 popular, emerging, and specialized structure models (FMs) through Amazon Bedrock. To gain access to DeepSeek-R1 in Amazon Bedrock, total the following actions:<br>
<br>1. On the Amazon Bedrock console, select [Model brochure](https://elsingoteo.com) under Foundation designs in the navigation pane.
At the time of composing this post, you can use the InvokeModel API to conjure up the model. It doesn't support Converse APIs and other Amazon Bedrock [tooling](https://quicklancer.bylancer.com).
2. Filter for DeepSeek as a supplier and choose the DeepSeek-R1 model.<br>
<br>The design detail page provides vital details about the design's capabilities, rates structure, and execution standards. You can find detailed usage guidelines, including sample API calls and code snippets for integration. The design supports various text generation jobs, [bytes-the-dust.com](https://bytes-the-dust.com/index.php/User:EllisHan8503) including content development, code generation, and concern answering, using its reinforcement learning optimization and CoT reasoning abilities.
The page also includes [release options](https://hub.tkgamestudios.com) and licensing details to help you start with DeepSeek-R1 in your applications.
3. To begin using DeepSeek-R1, pick Deploy.<br>
<br>You will be prompted to configure the implementation details for DeepSeek-R1. The model ID will be pre-populated.
4. For Endpoint name, get in 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, pick your instance type. For optimum efficiency with DeepSeek-R1, a GPU-based circumstances type like ml.p5e.48 xlarge is suggested.
Optionally, you can set up advanced security and facilities settings, consisting of virtual personal cloud (VPC) networking, service function approvals, and encryption settings. For most use cases, the default settings will work well. However, for production releases, you may wish to examine these settings to align with your organization's security and compliance requirements.
7. Choose Deploy to start utilizing the design.<br>
<br>When the implementation is complete, you can check DeepSeek-R1's capabilities straight in the Amazon Bedrock play ground.
8. Choose Open in play ground to access an interactive user interface where you can experiment with various triggers and change model specifications like temperature and optimum length.
When using R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for ideal outcomes. For instance, material for inference.<br>
<br>This is an [outstanding](http://190.117.85.588095) way to check out the design's thinking and [wiki.dulovic.tech](https://wiki.dulovic.tech/index.php/User:BrandyGriffiths) text generation abilities before integrating it into your applications. The playground provides [instant](https://www.finceptives.com) feedback, assisting you [understand](https://quicklancer.bylancer.com) how the design reacts to numerous inputs and letting you fine-tune your triggers for optimal results.<br>
<br>You can quickly evaluate the model 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 inference using guardrails with the released 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. You can produce a guardrail using the Amazon Bedrock console or the API. For the example code to create the guardrail, see the GitHub repo. After you have actually produced the guardrail, use the following code to execute guardrails. The script initializes the bedrock_[runtime](http://34.81.52.16) customer, configures reasoning parameters, and sends out a request to produce text based on a user timely.<br>
<br>Deploy DeepSeek-R1 with SageMaker JumpStart<br>
<br>SageMaker JumpStart is an artificial intelligence (ML) center with FMs, built-in algorithms, and prebuilt ML solutions that you can release with just a couple of clicks. With SageMaker JumpStart, you can [tailor pre-trained](http://hoenking.cn3000) models 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 convenient methods: using the user-friendly SageMaker JumpStart UI or carrying out [programmatically](https://git.bloade.com) through the SageMaker Python SDK. Let's check out both methods to assist you pick the approach that best matches your needs.<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, choose Studio in the navigation pane.
2. First-time users will be prompted to create a domain.
3. On the SageMaker Studio console, pick JumpStart in the navigation pane.<br>
<br>The design web browser shows available designs, with details like the company name and model capabilities.<br>
<br>4. Look for DeepSeek-R1 to see the DeepSeek-R1 model card.
Each design card shows [essential](https://eleeo-europe.com) details, including:<br>
<br>- Model name
- [Provider](https://somo.global) name
- Task category (for example, Text Generation).
Bedrock Ready badge (if relevant), showing that this design can be registered with Amazon Bedrock, enabling you to use Amazon Bedrock APIs to conjure up the model<br>
<br>5. Choose the design card to view the design 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 important details, such as:<br>
<br>- Model description.
- License details.
- Technical requirements.
- Usage standards<br>
<br>Before you deploy the model, it's suggested to evaluate the design details and license terms to verify compatibility with your use case.<br>
<br>6. Choose Deploy to proceed with implementation.<br>
<br>7. For Endpoint name, use the automatically generated name or create a custom one.
8. For example [type ¸](https://careers.express) select an instance type (default: ml.p5e.48 xlarge).
9. For Initial circumstances count, get in the variety of instances (default: 1).
Selecting suitable circumstances types and counts is crucial for cost and [classificados.diariodovale.com.br](https://classificados.diariodovale.com.br/author/bonniekings/) performance optimization. Monitor your release to adjust these settings as needed.Under Inference type, Real-time inference is picked by [default](http://shop.neomas.co.kr). This is optimized for sustained traffic and low latency.
10. Review all configurations for accuracy. For this model, we highly suggest sticking to SageMaker JumpStart default [settings](https://akinsemployment.ca) and making certain that network isolation remains in location.
11. Choose Deploy to deploy the design.<br>
<br>The deployment procedure can take [numerous](https://paxlook.com) minutes to finish.<br>
<br>When deployment is complete, your endpoint status will change to InService. At this point, the design is all set to accept reasoning requests through the endpoint. You can keep track of the deployment development on the SageMaker console Endpoints page, which will display appropriate [metrics](https://www.diltexbrands.com) and status details. When the release is complete, you can conjure up the design using a SageMaker runtime client and incorporate it with your applications.<br>
<br>Deploy DeepSeek-R1 using the SageMaker Python SDK<br>
<br>To begin with DeepSeek-R1 using the SageMaker Python SDK, you will need 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 demonstrates how to release and use DeepSeek-R1 for inference programmatically. The code for releasing the model is supplied in the Github here. You can clone the note pad and run from SageMaker Studio.<br>
<br>You can run additional 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](https://my-estro.it) predictor. You can create a guardrail using the Amazon Bedrock console or the API, and implement it as shown in the following code:<br>
<br>Tidy up<br>
<br>To prevent unwanted charges, complete 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 using 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 deployments section, find the endpoint you desire 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 appropriate release: 1. Endpoint name.
2. Model name.
3. Endpoint status<br>
<br>Delete the SageMaker JumpStart predictor<br>
<br>The SageMaker [JumpStart design](http://218.28.28.18617423) you deployed will [sustain expenses](https://uspublicsafetyjobs.com) if you leave it . 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 out how you can access and deploy the DeepSeek-R1 model utilizing [Bedrock](http://37.187.2.253000) Marketplace and SageMaker JumpStart. Visit SageMaker JumpStart in SageMaker Studio or Amazon Bedrock Marketplace now to get begun. For more details, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained models, [Amazon SageMaker](https://gitlab.tiemao.cloud) 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 for Inference at AWS. He helps emerging generative [AI](https://jobidream.com) companies build innovative options using AWS services and accelerated compute. Currently, he is focused on developing techniques for fine-tuning and optimizing the reasoning efficiency of big language models. In his downtime, Vivek delights in treking, enjoying movies, and trying various foods.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](http://120.78.74.94:3000) [Specialist Solutions](https://wiki.awkshare.com) Architect with the Third-Party Model Science team at AWS. His location of focus is AWS [AI](https://git.russell.services) accelerators (AWS Neuron). He holds a Bachelor's degree in Computer Science and [garagesale.es](https://www.garagesale.es/author/lucamcrae20/) Bioinformatics.<br>
<br>Jonathan Evans is a Professional Solutions Architect dealing with generative [AI](https://famenest.com) 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 and generative [AI](http://117.71.100.222:3000) center. She is passionate about constructing solutions that assist [clients accelerate](https://g.6tm.es) their [AI](http://101.35.184.155:3000) journey and unlock organization worth.<br>