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

Tanja Angel 2025-02-21 16:05:07 +08:00
commit 54a5aa072c
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 models are available through Amazon Bedrock Marketplace and Amazon SageMaker JumpStart. With this launch, you can now deploy DeepSeek [AI](https://video-sharing.senhosts.com)'s first-generation frontier design, DeepSeek-R1, together with the distilled variations varying from 1.5 to 70 billion parameters to construct, experiment, and [properly scale](https://ruraltv.in) your generative [AI](https://edurich.lk) [concepts](https://www.codple.com) 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 versions of the designs too.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a big language design (LLM) established by DeepSeek [AI](https://remnanthouse.tv) that utilizes reinforcement learning to boost reasoning capabilities through a multi-stage training process from a DeepSeek-V3-Base foundation. An essential differentiating feature is its reinforcement knowing (RL) action, which was utilized to refine the [design's responses](https://www.almanacar.com) beyond the basic pre-training and fine-tuning procedure. By integrating RL, DeepSeek-R1 can adapt better to user feedback and goals, eventually enhancing both relevance and clarity. In addition, DeepSeek-R1 utilizes a chain-of-thought (CoT) method, indicating it's geared up to break down intricate inquiries and reason through them in a [detailed manner](https://ruraltv.co.za). This guided thinking process allows the design to produce more accurate, transparent, and detailed responses. This model combines RL-based fine-tuning with CoT capabilities, aiming to produce structured responses while concentrating on interpretability and user interaction. With its comprehensive abilities DeepSeek-R1 has recorded the industry's attention as a versatile text-generation design that can be integrated into different workflows such as representatives, logical thinking and data analysis jobs.<br>
<br>DeepSeek-R1 utilizes a Mix of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture permits activation of 37 billion criteria, making it possible for effective reasoning by routing questions to the most relevant professional "clusters." This method permits the design to focus on various problem domains while maintaining total effectiveness. DeepSeek-R1 needs a minimum of 800 GB of HBM memory in FP8 format for reasoning. In this post, we will use an ml.p5e.48 xlarge circumstances to deploy the design. ml.p5e.48 xlarge comes with 8 Nvidia H200 GPUs supplying 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled designs bring the thinking abilities of the main R1 design to more effective architectures based upon popular open models like Qwen (1.5 B, 7B, 14B, and 32B) and Llama (8B and 70B). Distillation describes a process of training smaller, more efficient designs to imitate the habits and thinking patterns of the bigger DeepSeek-R1 model, utilizing it as an instructor model.<br>
<br>You can release DeepSeek-R1 design either through SageMaker JumpStart or [wiki.vst.hs-furtwangen.de](https://wiki.vst.hs-furtwangen.de/wiki/User:Alisia1875) Bedrock Marketplace. Because DeepSeek-R1 is an emerging model, we recommend deploying this design with [guardrails](http://www.maxellprojector.co.kr) in place. In this blog site, we will use Amazon Bedrock Guardrails to present safeguards, prevent hazardous material, and examine designs against essential safety criteria. At the time of composing this blog site, for DeepSeek-R1 releases on [SageMaker JumpStart](https://www.pinnaclefiber.com.pk) and Bedrock Marketplace, Bedrock Guardrails supports only the ApplyGuardrail API. You can produce several guardrails tailored to various use cases and use them to the DeepSeek-R1 model, enhancing user experiences and [standardizing security](https://bewerbermaschine.de) controls throughout your generative [AI](https://git.perbanas.id) applications.<br>
<br>Prerequisites<br>
<br>To deploy the DeepSeek-R1 model, you require access to an ml.p5e circumstances. To inspect if you have quotas for P5e, open the Service Quotas console and under AWS Services, [choose Amazon](https://www.jobplanner.eu) SageMaker, and confirm 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. To ask for a limitation increase, create a limitation boost demand and reach out to your account team.<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) approvals to use Amazon Bedrock Guardrails. For instructions, see Establish approvals to use guardrails for material filtering.<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails enables you to introduce safeguards, avoid harmful content, and assess designs against crucial security criteria. You can execute security procedures for the DeepSeek-R1 model using the Amazon Bedrock ApplyGuardrail API. This enables you to use guardrails to assess user inputs and model responses deployed 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 create the guardrail, see the GitHub repo.<br>
<br>The general flow involves the following steps: First, the system gets an input for the model. This input is then processed through the ApplyGuardrail API. If the input passes the guardrail check, it's sent out to the model for inference. After getting the model'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 stepped in by the guardrail, a message is returned showing the nature of the intervention and whether it took place at the input or output phase. The examples showcased in the following sections show reasoning 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 steps:<br>
<br>1. On the Amazon Bedrock console, choose Model brochure under Foundation designs in the navigation pane.
At the time of writing this post, you can use the InvokeModel API to invoke the design. It does not support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a company and select the DeepSeek-R1 model.<br>
<br>The model detail page offers important details about the design's abilities, pricing structure, and [implementation guidelines](https://www.thehappyservicecompany.com). You can discover detailed use instructions, including sample API calls and code snippets for combination. The design supports various text generation jobs, consisting of content development, code generation, and question answering, utilizing its support finding out optimization and CoT reasoning abilities.
The page also consists of implementation choices and licensing details to help you get going with DeepSeek-R1 in your applications.
3. To begin using DeepSeek-R1, choose Deploy.<br>
<br>You will be prompted to set up the implementation details for DeepSeek-R1. The design ID will be pre-populated.
4. For Endpoint name, go into an endpoint name (in between 1-50 alphanumeric characters).
5. For Number of instances, go into a number of instances (in between 1-100).
6. For example type, choose your instance type. For optimum performance with DeepSeek-R1, a GPU-based instance type like ml.p5e.48 xlarge is advised.
Optionally, you can set up innovative security and [facilities](https://botcam.robocoders.ir) settings, consisting of virtual private cloud (VPC) networking, service function consents, and encryption settings. For many utilize cases, the default settings will work well. However, for production deployments, you might wish to evaluate these settings to line up with your company's security and compliance requirements.
7. Choose Deploy to start using the design.<br>
<br>When the implementation is total, you can test DeepSeek-R1's capabilities straight in the Amazon Bedrock playground.
8. Choose Open in play ground to access an interactive user interface where you can experiment with different prompts and change design criteria like temperature level and maximum length.
When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for optimal outcomes. For instance, material for reasoning.<br>
<br>This is an excellent method to explore the design's thinking and text generation capabilities before incorporating it into your applications. The play area provides instant feedback, assisting you understand how the model reacts to various inputs and letting you tweak your prompts for optimum results.<br>
<br>You can rapidly test the design in the playground 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 released DeepSeek-R1 endpoint<br>
<br>The following code example demonstrates how to carry out reasoning utilizing a released DeepSeek-R1 model through Amazon Bedrock using the invoke_model and [ApplyGuardrail API](http://git.cattech.org). You can create a [guardrail](https://vagyonor.hu) using the Amazon Bedrock console or the API. For [wiki.dulovic.tech](https://wiki.dulovic.tech/index.php/User:AnnelieseCheel) the example code to produce the guardrail, see the GitHub repo. After you have actually developed the guardrail, utilize the following code to carry out guardrails. The script initializes the bedrock_runtime customer, configures inference specifications, and sends out a request to create text based on a user timely.<br>
<br>Deploy DeepSeek-R1 with SageMaker JumpStart<br>
<br>SageMaker JumpStart is an artificial intelligence (ML) hub with FMs, built-in algorithms, and prebuilt ML options that you can deploy with simply a few clicks. With SageMaker JumpStart, you can tailor pre-trained models to your use case, with your data, and deploy them into production utilizing either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 model through SageMaker JumpStart offers 2 hassle-free techniques: using the intuitive SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's check out both methods to help you pick the method that finest matches your requirements.<br>
<br>Deploy DeepSeek-R1 through SageMaker JumpStart UI<br>
<br>Complete the following actions to release DeepSeek-R1 [utilizing SageMaker](http://101.33.225.953000) JumpStart:<br>
<br>1. On the console, choose Studio in the navigation pane.
2. First-time users will be prompted to produce a domain.
3. On the SageMaker Studio console, pick JumpStart in the navigation pane.<br>
<br>The model browser shows available designs, with [details](https://carrieresecurite.fr) like the provider name and design abilities.<br>
<br>4. Search for DeepSeek-R1 to see the DeepSeek-R1 model card.
Each design card reveals key details, consisting of:<br>
<br>- Model name
- Provider name
- Task classification (for example, Text Generation).
Bedrock Ready badge (if appropriate), showing that this model can be registered with Amazon Bedrock, enabling you to utilize Amazon Bedrock APIs to conjure up the design<br>
<br>5. Choose the model card to view the design details page.<br>
<br>The [model details](https://hub.bdsg.academy) page includes the following details:<br>
<br>- The design name and service provider details.
Deploy button to deploy the model.
About and [Notebooks tabs](https://albion-albd.online) with detailed details<br>
<br>The About tab includes [essential](https://abstaffs.com) details, such as:<br>
<br>- Model description.
- License details.
- Technical requirements.
- Usage standards<br>
<br>Before you deploy the model, it's recommended to review the model 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 created name or develop a custom-made one.
8. For Instance type ¸ pick an instance type (default: ml.p5e.48 xlarge).
9. For Initial circumstances count, get in the variety of instances (default: 1).
Selecting appropriate instance types and counts is important for expense and performance optimization. Monitor your implementation to change 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 configurations for accuracy. For this design, we strongly advise 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 deployment procedure can take a number of minutes to complete.<br>
<br>When deployment is total, your endpoint status will alter to InService. At this point, the design is ready to accept reasoning demands through the endpoint. You can keep track of the implementation progress on the SageMaker console Endpoints page, which will show appropriate metrics and status details. When the deployment is total, you can conjure up the model using a SageMaker runtime customer and incorporate it with your applications.<br>
<br>Deploy DeepSeek-R1 using the SageMaker Python SDK<br>
<br>To get going with DeepSeek-R1 utilizing the SageMaker Python SDK, you will require to set up the SageMaker Python SDK and make certain you have the necessary AWS authorizations and environment setup. The following is a [detailed code](https://puzzle.thedimeland.com) example that shows how to deploy and utilize DeepSeek-R1 for inference programmatically. The code for releasing the model is offered in the Github here. You can clone the note pad and run 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 likewise use the ApplyGuardrail API with your SageMaker JumpStart [predictor](https://almagigster.com). You can produce a guardrail using the Amazon Bedrock console or the API, and implement it as displayed in the following code:<br>
<br>Clean up<br>
<br>To avoid [undesirable](https://www.jobzpakistan.info) 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 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](https://rrallytv.com) you desire to delete.
3. Select the endpoint, and on the Actions menu, select Delete.
4. Verify the endpoint details to make certain you're erasing the correct 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 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 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, describe Use Amazon Bedrock tooling with Amazon SageMaker JumpStart designs, SageMaker JumpStart pretrained 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](https://xn--9m1bq6p66gu3avit39e.com) at AWS. He helps emerging generative [AI](https://hcp.com.gt) business develop ingenious solutions using [AWS services](http://117.50.100.23410080) and sped up calculate. Currently, he is focused on developing strategies for [fine-tuning](https://dubai.risqueteam.com) and enhancing the inference efficiency of large language designs. In his downtime, Vivek delights in treking, watching films, and trying different foods.<br>
<br>Niithiyn Vijeaswaran is a Generative [AI](http://8.138.140.94:3000) Specialist Solutions Architect with the Third-Party Model Science group at AWS. His [location](http://app.ruixinnj.com) of focus is AWS [AI](http://git.wh-ips.com) accelerators (AWS Neuron). He holds a Bachelor's degree in Computer Science and Bioinformatics.<br>
<br>Jonathan Evans is a Professional Solutions Architect dealing with generative [AI](http://chkkv.cn:3000) with the Third-Party Model Science group at AWS.<br>
<br>Banu Nagasundaram leads item, engineering, and tactical partnerships for Amazon SageMaker JumpStart, SageMaker's artificial intelligence and generative [AI](https://www.cdlcruzdasalmas.com.br) center. She is passionate about developing options that help customers accelerate their [AI](http://rm.runfox.com) journey and unlock company worth.<br>