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

Alexander Conde 2025-04-04 18:05:02 +08:00
commit 97b86b562e
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 designs are available through Amazon Bedrock Marketplace and Amazon SageMaker JumpStart. With this launch, you can now release DeepSeek [AI](http://125.ps-lessons.ru)'s first-generation frontier model, DeepSeek-R1, along with the distilled variations ranging from 1.5 to 70 billion specifications to build, experiment, and responsibly scale your generative [AI](http://81.70.25.144:3000) ideas on AWS.<br>
<br>In this post, we demonstrate how to get begun with DeepSeek-R1 on Amazon Bedrock Marketplace and [SageMaker JumpStart](https://play.future.al). You can follow comparable steps to release the distilled versions of the models also.<br>
<br>Overview of DeepSeek-R1<br>
<br>DeepSeek-R1 is a large language model (LLM) established by DeepSeek [AI](http://118.25.96.118:3000) that uses reinforcement finding out to enhance thinking capabilities through a multi-stage training procedure from a DeepSeek-V3-Base foundation. A crucial identifying feature is its reinforcement knowing (RL) action, which was used to fine-tune the design's reactions beyond the basic pre-training and fine-tuning procedure. By including RL, DeepSeek-R1 can adjust more effectively to user feedback and goals, eventually boosting both relevance and clarity. In addition, DeepSeek-R1 uses a chain-of-thought (CoT) method, indicating it's equipped to break down complicated inquiries and reason through them in a detailed way. This assisted thinking process enables the model to produce more precise, transparent, and detailed responses. This design combines RL-based fine-tuning with CoT capabilities, aiming to produce structured actions while focusing on interpretability and user interaction. With its wide-ranging capabilities DeepSeek-R1 has recorded the market's attention as a versatile text-generation model that can be incorporated into different workflows such as agents, logical thinking and data analysis jobs.<br>
<br>DeepSeek-R1 utilizes a [Mixture](http://111.47.11.703000) of Experts (MoE) architecture and is 671 billion criteria in size. The MoE architecture permits activation of 37 billion specifications, allowing efficient inference by routing queries to the most relevant specialist "clusters." This method permits the model to focus on different issue domains while maintaining general [performance](https://www.drawlfest.com). DeepSeek-R1 requires 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 model. ml.p5e.48 xlarge features 8 Nvidia H200 [GPUs providing](https://napolifansclub.com) 1128 GB of GPU memory.<br>
<br>DeepSeek-R1 distilled designs bring the thinking abilities of the main R1 model to more effective architectures based on popular 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 simulate the habits and reasoning patterns of the larger DeepSeek-R1 model, utilizing it as a teacher design.<br>
<br>You can deploy DeepSeek-R1 model either through SageMaker JumpStart or Bedrock Marketplace. Because DeepSeek-R1 is an emerging design, we advise deploying this design with guardrails in location. In this blog, we will use Amazon Bedrock Guardrails to introduce safeguards, prevent harmful content, and evaluate designs against essential security 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 numerous guardrails tailored to various usage cases and apply them to the DeepSeek-R1 design, enhancing user experiences and standardizing security controls across your generative [AI](http://101.42.21.116:3000) applications.<br>
<br>Prerequisites<br>
<br>To release the DeepSeek-R1 design, 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, select Amazon SageMaker, and validate you're utilizing ml.p5e.48 xlarge for endpoint use. Make certain that you have at least one ml.P5e.48 xlarge instance in the [AWS Region](http://47.119.175.53000) you are releasing. To request a limit increase, develop a limit increase demand and reach out to your account team.<br>
<br>Because you will be releasing this model with Amazon Bedrock Guardrails, make certain you have the proper AWS Identity and Gain Access To Management (IAM) permissions to use Amazon Bedrock Guardrails. For instructions, see Set up approvals to use guardrails for [material filtering](https://saathiyo.com).<br>
<br>Implementing guardrails with the ApplyGuardrail API<br>
<br>Amazon Bedrock Guardrails allows you to present safeguards, prevent hazardous material, and evaluate designs against key security requirements. You can execute security measures for the DeepSeek-R1 design using the Amazon Bedrock ApplyGuardrail API. This you to use guardrails to examine 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 includes the following actions: 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 [setiathome.berkeley.edu](https://setiathome.berkeley.edu/view_profile.php?userid=11857434) inference. After receiving the model's output, another guardrail check is used. If the output passes this final check, it's returned as the result. 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 happened at the input or output stage. The examples showcased in the following sections demonstrate reasoning utilizing this API.<br>
<br>Deploy DeepSeek-R1 in Amazon Bedrock Marketplace<br>
<br>Amazon Bedrock Marketplace gives 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 steps:<br>
<br>1. On the Amazon Bedrock console, [pick Model](https://rosaparks-ci.com) brochure under Foundation designs in the navigation pane.
At the time of writing this post, you can utilize the InvokeModel API to invoke the design. It doesn't support Converse APIs and other Amazon Bedrock tooling.
2. Filter for DeepSeek as a service provider and select the DeepSeek-R1 design.<br>
<br>The model detail page provides essential details about the model's capabilities, rates structure, and execution guidelines. You can discover detailed use guidelines, consisting of sample API calls and code snippets for combination. The [design supports](http://47.56.181.303000) various text generation tasks, consisting of material development, code generation, and question answering, using its support learning optimization and CoT thinking abilities.
The page also consists of implementation choices and licensing details to assist you get started with DeepSeek-R1 in your applications.
3. To begin using DeepSeek-R1, choose Deploy.<br>
<br>You will be prompted to set up the deployment details for DeepSeek-R1. The model ID will be pre-populated.
4. For Endpoint name, go into an endpoint name (between 1-50 alphanumeric characters).
5. For Number of instances, get in a number of instances (between 1-100).
6. For Instance type, select your instance type. For optimal 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 settings, including virtual private cloud (VPC) networking, service role permissions, and file encryption settings. For the [majority](http://www.yfgame.store) of utilize cases, the [default settings](http://dnd.achoo.jp) will work well. However, for production deployments, you might desire to evaluate these settings to line up with your company's security and compliance requirements.
7. Choose Deploy to begin utilizing the design.<br>
<br>When the release is complete, 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 various prompts and change design parameters like temperature and optimum length.
When utilizing R1 with Bedrock's InvokeModel and Playground Console, use DeepSeek's chat template for optimal results. For example, content for inference.<br>
<br>This is an excellent method to explore the model's reasoning and text generation [capabilities](https://squishmallowswiki.com) before incorporating it into your applications. The play area provides immediate feedback, assisting you understand how the design responds to numerous inputs and letting you tweak your prompts for [optimal outcomes](https://svn.youshengyun.com3000).<br>
<br>You can quickly check the model in the playground through the UI. However, to [conjure](https://tapeway.com) up the deployed model programmatically with any Amazon Bedrock APIs, you need to get the endpoint ARN.<br>
<br>Run reasoning utilizing guardrails with the [deployed](http://106.52.242.1773000) DeepSeek-R1 endpoint<br>
<br>The following code example [demonstrates](https://www.ahhand.com) how to carry out reasoning using a released 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 actually created the guardrail, use the following code to implement guardrails. The script initializes the bedrock_runtime customer, configures inference criteria, and sends out a request to create 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, built-in algorithms, and prebuilt ML services that you can deploy with just a couple of clicks. With SageMaker JumpStart, you can tailor pre-trained models to your usage case, with your information, and deploy them into [production utilizing](https://marcosdumay.com) either the UI or SDK.<br>
<br>Deploying DeepSeek-R1 design through SageMaker JumpStart provides 2 convenient approaches: [utilizing](https://chat.app8station.com) the user-friendly SageMaker JumpStart UI or executing programmatically through the SageMaker Python SDK. Let's check out both methods to help you select the approach that finest fits your needs.<br>
<br>Deploy DeepSeek-R1 through SageMaker JumpStart UI<br>
<br>Complete the following steps 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 produce a domain.
3. On the SageMaker Studio console, choose JumpStart in the navigation pane.<br>
<br>The design web browser displays available designs, with details like the supplier name and design capabilities.<br>
<br>4. Search for DeepSeek-R1 to view the DeepSeek-R1 model card.
Each design card reveals crucial details, including:<br>
<br>- Model name
- Provider name
- Task classification (for instance, Text Generation).
Bedrock Ready badge (if applicable), showing that this design can be [registered](https://www.eticalavoro.it) with Amazon Bedrock, allowing you to utilize Amazon Bedrock APIs to invoke the design<br>
<br>5. Choose the design card to see the design details page.<br>
<br>The [model details](https://proputube.com) page includes the following details:<br>
<br>- The design name and service provider details.
[Deploy button](https://209rocks.com) to deploy the design.
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](http://app.vellorepropertybazaar.in) specifications.
- Usage guidelines<br>
<br>Before you deploy the model, it's suggested to review the model details and license terms to [confirm compatibility](https://puming.net) with your use case.<br>
<br>6. Choose Deploy to proceed with release.<br>
<br>7. For Endpoint name, utilize the instantly created name or produce a custom one.
8. For example type ¸ choose a circumstances type (default: ml.p5e.48 xlarge).
9. For Initial instance count, get in the variety of circumstances (default: 1).
Selecting proper circumstances types and counts is crucial for cost and efficiency optimization. Monitor your implementation to adjust these settings as needed.Under Inference type, Real-time reasoning is chosen by default. This is enhanced for sustained traffic and low latency.
10. Review all configurations for accuracy. For this model, we strongly suggest sticking to SageMaker JumpStart default settings and making certain that [network seclusion](https://www.ahhand.com) remains in place.
11. Choose Deploy to deploy the design.<br>
<br>The release procedure can take several minutes to complete.<br>
<br>When deployment is total, your endpoint status will alter to InService. At this moment, the design is prepared to accept reasoning demands through the endpoint. You can monitor the implementation development on the SageMaker console Endpoints page, which will show relevant metrics and status details. When the release is total, you can conjure up the design using a SageMaker runtime client and incorporate it with your applications.<br>
<br>Deploy DeepSeek-R1 utilizing the SageMaker Python SDK<br>
<br>To begin 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 example that shows how to release and use DeepSeek-R1 for inference programmatically. The code for [releasing](https://analyticsjobs.in) the design is provided in the Github here. You can clone the note pad and range from SageMaker Studio.<br>
<br>You can run extra demands against the predictor:<br>
<br>[Implement guardrails](https://www.indianhighcaste.com) and run reasoning with your SageMaker JumpStart predictor<br>
<br>Similar to Amazon Bedrock, you can also utilize the ApplyGuardrail API with your SageMaker JumpStart predictor. You can develop a guardrail utilizing 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 charges, complete the actions in this section to clean up your resources.<br>
<br>Delete the Amazon Bedrock Marketplace implementation<br>
<br>If you deployed the model using Amazon Bedrock Marketplace, complete the following steps:<br>
<br>1. On the Amazon Bedrock console, under [Foundation](https://www.kukustream.com) models in the navigation pane, choose Marketplace implementations.
2. In the Managed deployments section, locate the endpoint you wish to erase.
3. Select the endpoint, and on the Actions menu, pick 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 [released](http://47.108.92.883000) will sustain costs if you leave it running. Use the following code to erase the [endpoint](http://www.boot-gebraucht.de) 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 [surgiteams.com](https://surgiteams.com/index.php/User:TheodoreJenkin2) Amazon Bedrock Marketplace now to start. 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 Getting begun with Amazon SageMaker JumpStart.<br>
<br>About the Authors<br>
<br>Vivek Gangasani is a Lead Specialist Solutions Architect for [Inference](https://photohub.b-social.co.uk) at AWS. He assists emerging generative [AI](https://miderde.de) business develop ingenious options using AWS services and accelerated compute. Currently, he is concentrated on establishing techniques for fine-tuning and optimizing the [reasoning efficiency](http://www.jobteck.co.in) of large language models. In his spare time, Vivek delights in hiking, watching motion pictures, and attempting different foods.<br>
<br>Niithiyn Vijeaswaran is a [Generative](https://wino.org.pl) [AI](http://47.112.158.86:3000) Specialist Solutions Architect with the Third-Party Model Science team at AWS. His location of focus is AWS [AI](https://git.getmind.cn) [accelerators](https://git.techview.app) (AWS Neuron). He holds a Bachelor's degree in Computer technology and Bioinformatics.<br>
<br>Jonathan Evans is a Professional Solutions Architect working on generative [AI](http://release.rupeetracker.in) 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://114.55.169.15:3000) hub. She is passionate about building services that help clients accelerate their [AI](http://47.106.228.113:3000) journey and unlock organization value.<br>